Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plotting "Corrected" RHESSI Hard X-Ray emission light curve #132

Open
TheNovusCoder opened this issue Aug 21, 2024 · 4 comments
Open

Plotting "Corrected" RHESSI Hard X-Ray emission light curve #132

TheNovusCoder opened this issue Aug 21, 2024 · 4 comments

Comments

@TheNovusCoder
Copy link

TheNovusCoder commented Aug 21, 2024

Describe the feature

Hi. You can refer to the issue here in my chat with ayshih. I noticed that there is no feature in SunPy to plot the "Corrected" RHESSI Hard X-Ray emission light curve. It would be useful to have it. Thank you.

@nabobalis nabobalis transferred this issue from sunpy/sunpy Aug 21, 2024
@nabobalis nabobalis transferred this issue from sunpy/sunkit-instruments Aug 21, 2024
@nabobalis
Copy link
Contributor

nabobalis commented Aug 21, 2024

From Albert: The corrected rates are not in the FITS file, so we would need to re-implement the algorithm in Python.

@nabobalis nabobalis transferred this issue from sunpy/sunpy Aug 22, 2024
@ayshih
Copy link
Member

ayshih commented Aug 22, 2024

My description of the algorithm from the thread:

... RHESSI has attenuators that are moved in and out to moderate the incident flux. ... The normal or “uncorrected” quicklook lightcurves are merely showing the attenuators doing their job.

It is not possible to accurately correct the rates for the changing attenuator states without a spectral model, which formally requires a careful analysis of the flare spectrum and the underlying background. Instead, for quicklook rates, the “corrected” quicklook rates are calculated using a heuristic algorithm that essentially scales each lightcurve segment so that the overall result looks continuous. However, this correction approach is intended only for qualitative use because it is not scientifically robust: the algorithm can get misled if there is a real transition/burst close to an attenuator-state change, resulting in short artifacts or even long-term scaling errors.

@ianan
Copy link

ianan commented Dec 18, 2024

Don't the corrected rates also take into account decimation as well - the above seems to be mostly focused on the attenuators. And neither of these are currently being done by rhessi.parse_observing_summary_hdulist() ?

As the fits files do contain the front and rear decimation weights as a function of time as part of the flags, i.e.

hdulist = read_file(obssumfile)
print(hdulist[14].data[0][4][19]) #DECIMATION_WEIGHT
print(hdulist[14].data[0][4][29]) #REAR_DEC_WEIGHT
dec_wght=[ff[19] for ff in hdulist[15].data.field("flags")]
rear_dec_wght=[ff[29] for ff in hdulist[15].data.field("flags")]

is this relatively "easy" to partially correct for as we just have to multiply the energy bins by these weights? Lower energy bins by decimation weight, the higher by the rear rate - though the sswidl code looks a bit more complicated.....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants