Skip to content

Use astropy to get package data everywhere #100

@wtbarnes

Description

@wtbarnes

Instead of constructing paths manually, as is done here,

_ccd_contam_filename = (
Path(__file__).parent.absolute() / "data" / "xrt_contam_on_ccd.geny"
)

it would be better to use the get_pkg_data_filename function to do this (see #99).

Unfortunately, this is complicated by the fact that these bits of code are currently run at import time which results in an import error because the xrtpy.response namespace cannot be resolved immediately at import time.

Instead, I would recommend that this code to read these files be moved into the objects themselves, unless doing so would create a lot of overhead in reading these files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions