On Feb 24, 2009, at 3:32 PM, Maurice Leutenegger wrote: > I have a few questions about the treatment of background in isis > that are not totally clear to me from the manual: > > 1. Suppose I have a spectrum with corresponding response and > background files, and I use "define_back" to load the background > file and associate it with the spectrum. > > What does this do? Does it subtract the background from the data > before a model is fit to it, like xspec? Or does it add onto the > model in lieu of an explicitly modeled background? If the latter is > true, how does the fit algorithm account for the statistical error > on the background? Actually, it is like XSPEC in that it adds the background counts to the model counts, and then compares that to the data counts. In this process, it increases the error bars to account for the background uncertainty. Basically, it becomes: Error^2 = Total Counts + (Data Exposure/Background Exposure)^2*(Data Area/Background Area)^2*Background Counts where Source Counts = Total Counts - (Data Exposure/Background Exposure)*(Data Area/Background Area)*Background Counts with that last piece after the - sign being the "scaled background". I.e., if you fit the same data with the same model in ISIS or XSPEC, the chi^2 should be identical. There are facilities within ISIS to use a fit function instead to describe the background instead. I have used that to replicate XSPECs "corfile" facility, i.e., renormalize the background slightly during the fitting process. Although it's a bit more general than XSPEC's scheme (e.g., I can use a background subtracted spectrum as a correction file, e.g., to subtract Galactic ridge emission from RXTE data), and John has recently added something like that to ISIS proper. But basically it becomes the same idea: add your background counts (measured or modeled) to your model counts, compare to data counts (unless of course you choose a different statistic). > Also, is "define_back" sufficient to include a treatment of the > background in spectral fitting, or must further steps be taken > during the fitting process? I think that's sufficient. Although you might want to add: Isis_List_Filenames=1; to your .isisrc, and you'll see the background files more prominently displayed in things like list_data. Otherwise ISIS can be a little quite about it being there. ISIS "does the right thing" with backgrounds, but historically has been pretty quite about mentioning them in list functions, and subtracting them out in plotting, partly due to its legacy coming from use with the Chandra gratings. Background in Chandra gratings is negligible 99 times out of 100. > 2. I can load a type I pha spectrum with corresponding type I pha > background (e.g. XMM RGS data). What about HETGS data? The > background information is contained in the columns BACKGROUND_UP and > _DOWN of the main type II pha spectrum file, or it can be split off > into a separate type II file. But "define_back" only takes type I > pha files. Does this mean I need to split off the background into > type I pha files? Or is there a more elegant way to do this? Dave Huenenmoerder probably has some good examples of using these. But one can read the columns directly, and then define them directly as the background. I've got code buried to do this, which I originally got from Dave, and he probably has something nicer and more modern. I see that Manfred has just sent an example. That's copied from me copied from Dave. Maybe something cleaner now exists. > 3. How can I plot a background subtracted spectrum? As Manfred also pointed out, I have this in my plot routines, which you can download from the web. Getting the background subtracted from the plots was the initial motivation for writing those. (Plotting HEXTE data, for example, is a little annoying without background subtraction.) I also have a plot option toggle (the name of which I am forgetting - look at the usage messages that you get if you use the routines without arguments) that allows you to leave the background in for the plots. (That was added so one could gauge the level of the background.) As for plotting units, as Manfred just wrote, it's plot_unit("a") vs. plot_unit("kev"). There is also cm, m, eV, GeV, etc. (Although John left out micorns, oddly enough...) My Plot_Unit is a wrapper around that that adds back in microns, and allows y-axes like ergs, watts, and mJy for unfolded data. Cheers, Mike Nowak ---- You received this message because you are subscribed to the isis-users list. To unsubscribe, send a message to isis-users-request_at_email.domain.hiddenwith the first line of the message as: unsubscribeReceived on Tue Feb 24 2009 - 16:40:57 EST
This archive was generated by hypermail 2.2.0 : Tue Feb 24 2009 - 19:51:44 EST