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

Using PCA backgrounds in Sherpa changes the default behaviour of plots #34

Open
ruizca opened this issue Mar 15, 2022 · 2 comments
Open

Comments

@ruizca
Copy link
Contributor

ruizca commented Mar 15, 2022

After using the auto_background function in Sherpa, the data and fit plots use counts in the y axis. Since the default behavior of Sherpa is using count rates, this change after calculating PCA models can be quite annoying. It is something easy to fix by the user, but it can take some time to realize what happen.

As far as I understand this is caused by the following line in the fit method of the PCAFitter class:

set_analysis(id, "ener", "counts")

It would be helpful if a note is included in the documentation so the users are aware of that change when using PCA models.

Ideally, the best would be to recover the initial behavior of Sherpa after running a PCA fit. I can give it a try, if you think is something worth it.

@JohannesBuchner
Copy link
Owner

Yes, that sounds like a good idea. IIRC one also should not set any energy limits yet at that point.

@JohannesBuchner
Copy link
Owner

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

2 participants