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

"ValueError: The HDUCLAS3=RATE keyword in the PHA file is not supported.Please open an issue if this is required." #185

Open
matteobachetti opened this issue Sep 13, 2024 · 5 comments

Comments

@matteobachetti
Copy link

As the message in title recommends ;)

First of all, thanks a lot for this great piece of software, I'm experimenting using it these days after finding the paper in the arXiv.

I'm dealing with spectra obtained by a likelihood analysis, which have non-integer values for the counts, so they don't comply with the HDUCLAS3=COUNTS specification. If jaxspec supported the RATE format it would be great!

@renecotyfanboy
Copy link
Owner

Hi Matteo, thank you very much for your feedback and for trying jaxspec!

Could you detail a bit more about the processes for building these spectra?

The straightforward solution I see would be simply to multiply this spectrum by the exposure, and rounding it to the closest integer so that it could be dropped in a Poisson likelihood. However, if this spectrum is a result of a fit or so, I am not sure that a Poisson statistic would be representative. Does the .pha file has values for STAT_ERR or SYS_ERR ? If not, the previous solution might work, and I'll look forward to implementing it

@matteobachetti
Copy link
Author

@renecotyfanboy they're basically covariance spectra, obtained in the time domain. Their error bars are Gaussian, so I'm using STAT_ERR. I'm figuring your software could be really useful for people doing this kind of spectral timing and want a Python-only, robust fitting work flow. If you have time, it would be great!

@renecotyfanboy
Copy link
Owner

@matteobachetti I'll start working on it this week. Would it be possible for you to share with me a .pha formatted like this so that I can test the implementation on my own? I could also add it to the HEACIT database that way. (You can directly share it in this conversation or send by mail to sdupourque[at]irap.omp.eu)

Extra question, do you use .pha2 formatted files in time series analysis? Or do you deal with a bunch of individual .pha ? I still have to implement support for .pha2 files in jaxspec

@renecotyfanboy
Copy link
Owner

@matteobachetti Getting back to you on this topic, do you know where I can find such a spectrum ?

@matteobachetti
Copy link
Author

@renecotyfanboy sorry for the slow response, I have two pending deadlines. I'll send you a spectrum early next week

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