Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use astropy to get package data everywhere #100

Open
wtbarnes opened this issue Dec 13, 2022 · 0 comments
Open

Use astropy to get package data everywhere #100

wtbarnes opened this issue Dec 13, 2022 · 0 comments
Milestone

Comments

@wtbarnes
Copy link
Collaborator

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.

@joyvelasquez joyvelasquez added this to the 0.5.0 milestone Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants