|
|
|
|
2. Selecting Multiple Analysis Intervals
SPEX is capable to doing spectral fitting for multiple time intervals. In order to do this, we need to first select multiple analysis intervals. Since the July 23 event lasts for a very long time (about 1 hour), it is very difficult to select time intervals in the crowded time history window, even though the rates are binned every 4 s. First, we can enlarge the time history widow by clicking on one edge and dragging it to produce the desired size. The lightcurve with background subtracted then appears as follows:
An enlarged version of the time of interest can be obtained with the zoom command. First type "zoom", then select the "Graphic Input", "Continue by selecting from the window", then select the start time and end time of the zoom-in region. A zoomed in time history will appear as follows:
It is much more convenient to select time intervals from the window above to analyze the main impulsive peak of the flare (from 00:26:20 UT to 00:39:40 UT). By typing clear_ut, then typing graph in SPEX, the time history window will return to the original time history plot. After you type "select", the following window will pop up: This window lists three ways to select time intervals. Method 1: Boundaries for contiguous intervals. This means the end of time one interval is the start time of the following interval. To use this method, click on the top button in the above window, click "Continue by selecting from the window" in the next widget, then select the start of the first interval by moving the curser to the desired time in the Time History Window and clicking, and then select the end of the first , second, third, etc. intervals until you have selected all the intervals. To show what you have selected, type the following in SPEX: SPEX> graph
The following selected time history window will appear:
We selected four contiguous intervals. Variable ifirst and ilast are the start and end time interval number to fit. The default of ifirst is 0, ilast is the last interval, which is 3 for this case. SPEX> print,ifirst, ilast
If we type count to see the count flux spectrum, the spectrum is for the first time interval (00:27:27.999 -- 00:28:31.999 UT):
Using what we have learned from "Spectroscopy -- First Steps", we set the function we want to fit (f_vth_bpow model is the default), the energy range to fit, initial estimates of the fitting parameters, and which ones should be free to vary. We then type fit to fit the spectra for all the intervals sequentially.. As the fitting proceeds, the spectral window will show the fitted spectrum, one by one, and stop at the final time interval. All the fitting parameters are saved in variable array, apar_arr: SPEX> print, apar_arr The reduced chi-square values are stored in the array chi: SPEX> print, chi If we only want to fit the spectrum for interval 0, we need change the value of ilast to 0: SPEX> ilast, 0 The following plot of the best fit f_vth_bpow photon flux spectrum appears along with the residuals expressed as the number of sigma above or below the model values:
We can set eplot to 1 so that we can see the error bar in spectral data: SPEX> eplot, 1 If we want to fit the spectrum at the second time interval, we need to reset ifirst and ilast: SPEX> ifirst, 1 Then we can do the fit for the second interval. Similarly, we can do the third and forth interval and so on. Method 2: Boundaries for discrete intervals. Since the intervals are discrete, we need to select the start and end time of each interval. Click on the middle button, click "śContinue by selecting from the window" in the next widget, then select the start and the end of each time interval by moving the curser to the appropriate times in the Time History Window and clicking with any mouse button. As many intervals can be selected as needed but the end of one interval will not necessarily be the start of the next. To show what we have selected, we should type the following in SPEX: SPEX> graph The selected discrete intervals are shown in the following:
The vertical orange dotted/broken lines mark the start/end of each interval, respectively. To get the time in seconds for each time interval: SPEX> print, xselect Type fit to fit all intervals one by one. If we want to fit a specific interval, set the ifirst and ilast to that interval. These steps are similar to those in Method 1 above.
Method 3: As limits on sample groups of N (to be chosen). This method allows us to choose one long interval and divide it up into equal intervals of length N times the basic binning time of the data. In our example, we have used 4-s binning times Thus, if we want to fit spectra in every 4-s interval, we would set N to 1. If wanted to use 8-s intervals we would set N to 2. Here, we set N to 5, so we are fitting the spectrum contiguously with 20-s time intervals. Click on the button marked "AS LIMITS ON SAMPLE GROUPS OF N (TO BE CHOSEN)". The following window pops up:
Select 5 in the righthand column, click the "Ready" button, then click "Continue by selecting from the window". Finally in the Time History Window, click the start and the end of time of the period in which you want to make your 20-s intervals. In order to see the intervals we selected, type the following: SPEX>graph And this window appears:
We can see evenly selected contiguous 20-s intervals. By checking the size of the "xselect" array, we know how many intervals we have selected:
SPEX> help, xselect
We selected 37 time intervals. We can fit the 37 spectra sequentially by assuring that ifirst = 0 and ilast = 36 and typing fit. After it finishes, we can check the best-fit parameters: SPEX> fit The window with the fitted spectra and residuals cycles through very rapidly in the Spectral Window. However, we can use create_ps to save all the spectral and residual plots as postscript files: SPEX> psstyle = fullportrait Then postscript files named like fitting_100212_110946.ps will be saved in your IDL working directory. It has 37 pages of spectral plots. Each one is one interval we select. This create_ps can also be used with the former two methods. For more detailed explanation, see "How to Create and Customize Postscript Plots within SPEX". If the postscript files we saved are not appropriate for publication purposes, or we need plots of the time history of some fitting parameters, then we have to save all the parameters and use them outside SPEX to make publication-quality plots. After selecting the multiple intervals with either of the three methods above , we can check the variable "xselect" to see what the start and end time are for each time interval. Here, let us check the multiple time intervals we selected in method 1. The variable "xselect" will give us the time in units of seconds: SPEX> help,xselect If we want to know the "xselect" in units of UT, then we need to get UT base time (in unit of seconds) by issuing an IDL command: SPEX> idl, ut_base = getutbase() We check the ut_base in UT time, we type: SPEX> idl, ptim, ut_base Then we print xselect in UT time format: SPEX> idl, ptim, xselect + base
|
|
This page last updated: June 27, 2011
|