What is the relationship between peak counts in STIX flares and GOES class/flux?
c.f. Lastufka et al 2020b
#ldf['AU_to_Earth']=np.sqrt(np.multiply(ldf.solo_x-1,ldf.solo_x-1)+np.multiply(ldf.solo_y,ldf.solo_y)+np.multiply(ldf.solo_z,ldf.solo_z))
#want no correction if concentric with Earth orbit... ie if 1 AU from sun
#so for distance correction use 1/(1-solo_r)**2
ldf.describe()
solo_x | solo_y | solo_z | AU_to_Earth | |
---|---|---|---|---|
count | 701.000000 | 701.000000 | 701.000000 | 701.000000 |
mean | 0.088660 | -0.030678 | 0.009766 | 1.047430 |
std | 0.569704 | 0.571013 | 0.039378 | 0.621496 |
min | -0.622433 | -0.935519 | -0.056593 | 0.011632 |
25% | -0.453305 | -0.547169 | -0.017508 | 0.319418 |
50% | -0.124245 | -0.049534 | 0.008084 | 1.383826 |
75% | 0.695613 | 0.566451 | 0.022782 | 1.519672 |
max | 1.009807 | 0.804849 | 0.099672 | 1.787906 |
sum of squared residuals: 64.661
Observed GOES class - GOES class calculated using linear relationship
log10 (counts) | 1 $\sigma$ | N flares |
---|---|---|
< 3 | 0.273 | 707 |
[3,4) | 0.224 | 198 |
> 4 | 0.196 | 58 |
What threshold in peak counts gives a fit the strongest correlation (R-value)?
def find_best_r(df, threshold_range):
largest_r=0
for t in threshold_range:
dfc=df.where(dfgc.peak_counts_corrected > t).dropna(how='all')
rel2=linregress(np.log10(dfc.peak_counts_corrected.values),np.log10(dfc.GOES_flux.values))
if rel2.rvalue > largest_r:
largest_r=rel2.rvalue
best_results=rel2
threshold=t
data=dfc
return best_results, largest_r,threshold, data
res2,bigr,thresh,dfc=find_best_r(dfgc,np.arange(100,2000,50))