For deriving spectrum, it is better to integrate longer than default
for getting better S/N ratio. In case integrating 300 points (30 sec),
IDL> mint=300 CR
IDL> norp_mkint,mint,mvd,tim,fi,fv,mvdav,timav,fiav,fvav CR
Next subtract pre-flare flux
IDL> for m=0,6 do fiav(m,*)=fiav(m,*)-fiavg(m) CR
Using this flux, fit the spectrum
IDL> norp_alpha,freq,fiav,mvdav,mvdfit,alpha_tk,alpha_tn,freqpk,fluxpk
CR
Assuming gyrosynchrotron emission, the power-law index of non-thermal electrons
is obtained
IDL> norp_alpha2delta,alpha_tn,delta CR
Sometimes fitting will fail if the observation data include
some points extremely out of the fitting function. One reason
is that the emission mechanism is different in the low frequency
range ( not gyrosynchrotron but plasma emission ). Another reason
is bad S/N ratio in high frequency observation, especially in 80 GHz.
In this case, remove such data points from fitting as follwos:
IDL> mvfreq=[2,3,4,5,6] CR
IDL> norp_alpha,freq(mvfreq),fiav(mvfreq,*),mvdav(mvfreq,*) $ CR
IDL> ,mvdfit,alpha_tk,alpha_tn,freqpk,fluxpk CR
In order to confirm that the fitting is well-done,
plot the fitting function over the observation data.
For example, for n-th data
IDL> norp_funcp,alpha_tk(n),alpha_tn(n),freqpk(n)
,fluxpk(n),freqfit,fifit CR
IDL> plot,freq,fiav(*,n),/xlog,/ylog,psym=5 CR
IDL> oplot,freqfit,fifit CR