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

Applying a gain correction #147

Open
KriSun95 opened this issue Jun 12, 2024 · 0 comments
Open

Applying a gain correction #147

KriSun95 opened this issue Jun 12, 2024 · 0 comments

Comments

@KriSun95
Copy link
Collaborator

Provide a general description of the issue or problem.

It turns out that the gain correction (if applied) being performed in fitting_legacy is not being done in the same way as XSPEC, it was doing it more like another package (see gainshift in here).

XSPEC will gain shift the photon energy grid of the spectral response. This is done by defining a new energy grid with the equation $E_{new}=E_{old}/G_{slope} - G_{offset}$ for the photon axis of the SRM then evaluating the photon model at these new energies and interpolating the effective areas (if present) to the $E_{new}$.

The way fitting_legacy does it at the minute is by defining a new energy grid with the same equation but on the output count axis grid. The output model is then interpolated to the $E_{new}$ and compared to the data.

One thing to figure out is which way is the correct way to gain shift.

At the minute, this only affects fitting_legacy but has implications on how things may need to be implemented/made available during the refactor.

I expect this to turn into a discussion and more should be added, but this is maybe a good start! (although it seemed to have started a while ago elsewhere)

@KriSun95 KriSun95 mentioned this issue Jun 12, 2024
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

1 participant