Obtain the electron distribution after thick-target bremsstrahlung model fit   

 

The electron distribution has the following forms:

       a(2) * normalization factor * ( γ - 1)p    ------------- below the break energy

a(2) * normalization factor * ( γ - 1)    ------------- above the break energy

Where:

p:  lower electron indices, i.e. a(3)

q: upper electron indices, i.e. a(5)

 γ: electron energy / mc2 + 1. If electron energy is in unit of keV, then mc2 is 511 keV.

The electron flux distribution (electrons per second per keV) is the output of "brm_distrn.pro" (in SSW) times the integrated flux (electrons per second), i.e. a(2), and then times 1./ mc2, i.e. 511.

As for an example, we compute electron flux (electron per second per keV) at 50 keV. Before we use brm_distrn.pro, we should convert the energies in the fitting parameter to γ energies.

IDL> curr_eng = 50   ;set 50 keV for electron flux computation

IDL> lowcut = 37.9659 & break = 139.870 & highcut = 5000.   ;set the three energy fitting parameters 

IDL> p = 3.67 & q = 4.5     ;set low and high electron indices

IDL> flux = 0.87                ;total electron flux in units of 1.0e35 electrons per second, i.e. a(2)

IDL> energy_arr = [ curr_eng, lowcut, break, highcut]

IDL> energy_arr = energy_arr / 511.0d0 + 1.0                  ; convert to the γ energies

IDL> brm_distrn, energy_arr[0], energy_arr[1], energy_arr[2],  energy_arr[3], p, q, fcn

Now We have all we need to compute the electron flux at 50 keV

IDL> fcn = fcn * flux  / 511.0                   ;get the final result, i.e. electron flux for 50 keV electrons

IDL> print, fcn

Here is an IDL procedure that does all of the above steps. You can use it directly by cutting and pasting it into an IDL/SSW session. Yon need change the fitting parameters in the script to what you have obtained from the fitting.