cxcsds / ciao-contrib

Extra scripts and code to enhance the capabilities of CIAO.
GNU General Public License v3.0
8 stars 6 forks source link

Should specextract warn if a user has energy-filtered the event file? #333

Open DougBurke opened 4 years ago

DougBurke commented 4 years ago

I think it would make sense if we check the subspace of the input event files to see if there's been an energy filter applied to it, and - if so - warn the user. To start the bike-shedding, something like

Warning: the event file has been energy-filtered (blah to blah) which can complicate spectral analysis,
since the energy to channel mapping is not unique/probabilistic (and means you can not use the pileup model)

The pileup model warning is only really relevant if you have a high-energy cut-off, but I think it would make sense to leave in even if only a low-energy cut-off was used. The "blah to blah" but also depends on the choice of filter (and I'd suggest listing the most conservative limits if the filters are not consistent between the chips, which is a whole nother can of worms).

hamogu commented 4 years ago

Is it true that you can't use the pile-up model? I would think that you can, but the model parameters of the pile-up model will turn out to be only very weakly constraint. But I did not check the pile-up model code to see if it really works the way I think it works.

DougBurke commented 4 years ago

Well, it's not that the pileup model will stop working, but I was under the impression that you needed the high energy events (I have no idea how "high energy") to help constrain things (e.g. if two 7 keV photons piled up then you'd want ~ 14 keV events in the model). If you've filtered out these events aren't you going to bias the fit, not just increase the error bars?

However, I try to stay looking at faint things so I am no expert on this.