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

Parameterize photo-z files and revise data file download logic #31

Merged
merged 7 commits into from
Apr 22, 2024

Conversation

manning-ncsa
Copy link
Contributor

The data file locations have been parameterized to support custom locations for the dust model files and photo-z weights file, and the download of these data files is skipped if the required files are already in place. This supports deployments where data files are provisioned upon initialization from a self-hosted data set and/or where redundant downloads are undesirable.

@alexandergagliano
Copy link
Collaborator

@manning-ncsa looks like the unit tests fail because with your change, the code tries to open a tarball where it finds a directory:

../../astro_ghost/photoz_helper.py:358: in load_lupton_model
    build_sfd_dir(file_path=dust_path)
../../astro_ghost/photoz_helper.py:59: in build_sfd_dir
    tar = tarfile.open(file_path)

Could you change this and update the pull request?

@manning-ncsa
Copy link
Contributor Author

Oops. Fixed in commit b912762

@manning-ncsa
Copy link
Contributor Author

manning-ncsa commented Apr 22, 2024

Another stupid mistake! Can I run this locally before pushing another commit? I think these errors were hidden from me when I ran the Blast code that calls calc_photoz() because they are caught in an exception block in a print statement that is easy to miss.

@alexandergagliano alexandergagliano merged commit 71c2869 into uiucsn:main Apr 22, 2024
1 check passed
alexandergagliano added a commit that referenced this pull request Apr 22, 2024
Parameterize photo-z files and revise data file download logic

Former-commit-id: 71c2869
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

Successfully merging this pull request may close these issues.

2 participants