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

Background lightcurves and spectra for non energy calibrated data #78

Open
gregorycorcoran opened this issue Dec 5, 2024 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@gregorycorcoran
Copy link

Hi there, I noticed that while uncalibrated lightcurves and spectra can be plot thanks to a previous enhancement, there currently is no functionality to fit and plot backgrounds for these. I have created a fork attempting to add this functionality here https://github.com/gregorycorcoran/gdt-core. The modifications made largely consist of isinstance checks to create the appropriate background types which then return new objects from the classes BackgroundChannelRates and BackgroundChannelSpectrum.

These new classes are largely copies of their calibrated counterparts, inheriting from TimeChannelBins and ChannelBins instead of their Energy versions. Of course mentions of emin, emax, energy bounds and any other calibration related attributes and methods are replaced following the general structure used for the Channel related classes already present.

The changes made are in the background primitives and fitter files as well as the plotting plot and lib files.

I am very open to feedback regarding these changes as there is likely a neater way to do it but this appears to be functional. Only initial testing has been done to ensure these features work at minimum as I expect there will likely be some suggested changes.

One final note is it appears as though the current channel spectra have the xlim set as to not show their final channel, although this can easily be fixed on the user end with an xlim adjustment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants