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 environ context for tweak align #260

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TheSkyentist
Copy link
Contributor

During tweak align, grizli uses a hard-coded CRDS context to apply a photom correction. However, this is quite an old context, and if the CRDS folder is write only (as it is in shared environments), it will cause a failure. As this doesn't affect the final output (only used to compute the tweak shifts) I have added in a check to use the environment context value if it exists.

@TheSkyentist TheSkyentist marked this pull request as ready for review November 11, 2024 14:15
@PJ-Watson
Copy link
Contributor

This isn't the only place that I've noticed the CRDS is essentially hard-coded - it also appears as a default parameter in get_crds_zeropoint() (although this seems to be a redundant function), and in aws.visit_processor.cutout_mosaic() (which itself also calls utils.drizzle_from_visit()). The latter function is a bit of a problem, as the context parameter isn't passed through or checked when using prep.iterate_tweak_align(). I can always submit a separate pull request though if that's easier!

@TheSkyentist
Copy link
Contributor Author

Yes, this is mostly to handle when utils.drizzle_from_visit() is called. Though I agree that it would be better to try and fix it by passing it through at the high level for both cutout_mosaic and iterate_tweak_align, so feel free to open a new PR that handles this better.
I'm not sure where get_crds_zeropoint gets used, so perhaps its okay to leave that for later.

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