When trying to read region files downloaded from the Chandra Source Catalog using CSCView, I ran into multiple issues.
One is that the extension names in the fits file are "SRCREG" and "BKGREG", but Regions.read only accepts "REGION". It may be a good idea to add an argument to allow the user to chose which extension to use.
The second issue is that the region shape had trailing white space when read by parse_table, preventing it from being recognized. Perhaps this is an issue with encoding on Windows. I added .strip() to line 79 in read.py as a quick fix.
When trying to read region files downloaded from the Chandra Source Catalog using CSCView, I ran into multiple issues.
One is that the extension names in the fits file are "SRCREG" and "BKGREG", but
Regions.readonly accepts "REGION". It may be a good idea to add an argument to allow the user to chose which extension to use.The second issue is that the region shape had trailing white space when read by
parse_table, preventing it from being recognized. Perhaps this is an issue with encoding on Windows. I added.strip()to line 79 inread.pyas a quick fix.