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

cgs: fix problem with PHAII files that do not contain background spectra #874

Closed kglotfelty closed 1 month ago

kglotfelty commented 4 months ago

This fixes problem reported in CXC hd ticket 25247.

The tgcat PHA2 files don't always have background spectra. The script handles this case mostly ok, but is failing when it tries to .sort() a list with all Nones. Not sure if this a change in python behavior, but trivial to fix. (Only sort if values are not None).