Skip to content

Strip white space when reading regions from FITS files #637

@schen70

Description

@schen70

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions