Nonuniform Target Ionization Fit

Detailed RHESSI spectral data show a deviation from a simple power law
in the range 20-100 kev often attributed to a feature in electron distribution function ,
i.e in the acceleration process. Inclusion of the effect of target ionisation change across the transition region
removes the need for any such features. (see (Kontar, Brown, and McArthur: 2002, Solar Physics, 210, 419) for details [PDF file ])

Included into SPEX as
f_ion.pro
f_vth_ion.pro (in combination with thermal fit)

EXAMPLE:

This example shows how fit accounting effects of nonuniform ionisation works. It is strongly recommended to read general manual on SPEX before going any further. RHESSI Spectroscopy -- First Steps by Brian Dennis
can be found here: http://hesperia.gsfc.nasa.gov/~dennis/spectroscopy/first_steps.htm

We start assuming that spectra and response matrix fits files are already produced by solar software. As anexample, we took March 17 2002 flare that happened around 19:29 UT:
hsi_spectrum_20020317_192000.fits
hsi_srm_20020317_192000.fits

Let's start SPEX:
IDL> spex_proc
...
...

And load  the data :
SPEX> data,hessi,front
% Compiled module: PARSE_COMLINE.
Change parameters or enter a command
SPEX> _1file,hsi_spectrum_20020317_192000.fits
Change parameters or enter a command
SPEX> preview
Command: preview
% Compiled module: UTIME.
% Compiled module: JDCNV.
% Compiled module: AVG.
% Compiled module: SPEX_PREVIEW.
File D:\17\hsi_spectrum_20020317_192000.fits found.
Data will be read from D:\17\hsi_spectrum_20020317_192000.fitsData file name returned: D:\17\hsi_spectrum_20020317_192000.fits
Change parameters or enter a command
SPEX> energy_bands,3,12,12,25,25,50,50,100
Change parameters or enter a command
SPEX> th_ytype,1
Change parameters or enter a command
SPEX> th_yrange,1e-4,1e2
Change parameters or enter a command
SPEX> back_order,1
Change parameters or enter a command
SPEX> graph
Command: graph
% Compiled module: CRANGE.
Change parameters or enter a command
SPEX> background
Command: background_interval
% Compiled module: SPEX_BACKGROUND.
Select points for discrete intervals using any mouse button.
% Compiled module: RESPOND_WIDG.
% Compiled module: XMANAGER.
% XMANAGER: The MODAL keyword to the XMANAGER procedure is obsolete. It is superseded by the MODAL keyword to the WIDGET_BASE function.
x =69639.243
Select points for discrete intervals using any mouse button.
x =69639.243
Suspected double entry on last selection.Last point rejected
Select points for discrete intervals using any mouse button.
x =69708.346
Select points for discrete intervals using any mouse button.
x =69708.346
Suspected double entry on last selection.Last point rejected
Select points for discrete intervals using any mouse button.
x =69777.450
Select points for discrete intervals using any mouse button.
x =69777.450
Suspected double entry on last selection.Last point rejected
Select points for discrete intervals using any mouse button.
x =69962.646
Select points for discrete intervals using any mouse button.
x =69962.646
Suspected double entry on last selection.Last point rejected
Select points for discrete intervals using any mouse button.
x = null
% Compiled module: FIT_BACKGRND.
% Compiled module: POLYFITW.
% Compiled module: POLY.
Command: graph
Change parameters or enter a command

We selected time interval over impulsive phase of the flare: 19:27:36-19:28:56 UT

SPEX> select
SPEX> graph
Command: graph
Change parameters or enter a command
SPEX> display
Command: display_intervals
Change parameters or enter a command

After this command you will see the following window:

We chose the following energyinterval:

SPEX> erange,3,100
Change parameters or enter a command

Here we need to change the fitting model from the default to f_vth_ion, which is the combination of thermal part and nonthermal part that accounts effects of nonuniform ionisation:
SPEX> f_model,f_vth_ion
Change parameters or enter a command

You may want to adjust the default values of the fitting function:
SPEX> apar,1.,1.,1e+7,5.,35.
Change parameters or enter a command
SPEX> fit
Command: fitting
Free Parameters:11111
RUN_CURVEFIT
Input parameters for f_vth_ion on entering loop:
1.000001.00000 1.00000e+0075.0000035.0000
% CURVFIT: No improvement using analytic expansion, i.e lambda=0
% CURVFIT: No improvement using analytic expansion, i.e lambda=0
USE CURVATURE MATRIX WITH FLAMBDA=0, CHISQ=2.7902852
% CURVFIT: No improvement using analytic expansion, i.e lambda=0
% CURVFIT: No improvement using analytic expansion, i.e lambda=0
% CURVFIT: No improvement using analytic expansion, i.e lambda=0
Change parameters or enter a command

Fit gives us the following window (see above) with the following three parameters :
23.43 keV is the effective energy
5.094 is the spectral index for electron flux
******** shows that SPEX format is not consistent with the value - this will be fixed soon.
 

Finally we can plot the fitted photon spectra:
SPEX> photon
Command: photon_spectrum
Parameters for f_vth_ion:2.901971.07090 2.95405e+0075.0936423.4260
Change parameters or enter a command