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

lab/niriss fixes #182

Closed
wants to merge 4 commits into from
Closed

Conversation

lboogaard
Copy link

@lboogaard lboogaard commented Nov 27, 2023

Dear Gabe,
Here is a long overdue PR with some fixes needed to run NIRISS data

FYI: @jdavies-st @rameyer @TheSkyentist

TheSkyentist

This comment was marked as duplicate.

@@ -3073,7 +3073,7 @@ def load_GroupFLT(field_root='j142724+334246', PREP_PATH='../Prep', force_ref=No
for filt in ['F090W', 'F115W', 'F150W', 'F200W']:
#key = f'{gr.lower()}-{filt.lower()}'
# key = filt.lower()
key = filt.lower() + 'n-clear'
key = filt.lower() + '-clear'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason this also works with key = filt.lower() and I can't understand why this works as well.

@@ -4572,7 +4572,8 @@ def make_filter_combinations(root, weight_fnu=2, filter_combinations=FILTER_COMB
head[band] = im_i[0].header.copy()
else:
for k in im_i[0].header:
head[band][k] = im_i[0].header[k]
#head[band][k] = im_i[0].header[k]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also just skip the offending keys:
if k == '' or k == 'HISTORY': continue

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good, I can change that

@lboogaard
Copy link
Author

Note:

file_filters[j] = file_filters[j].replace('-CLEAR','N-CLEAR')

@gbrammer
Copy link
Owner

gbrammer commented Dec 5, 2023

Adding that n to the NIRISS filters is a bit of an ugly hack, but it's assumed to be set as such in various places. Does this change affect that or should it be back compatible?

@gbrammer
Copy link
Owner

gbrammer commented Dec 5, 2023

And for the background image, maybe you can rather write the updated version to the working directory and update the returned bkg_file path accordingly.

@lboogaard
Copy link
Author

Thanks - Raphael and I are looking into this

@gbrammer
Copy link
Owner

Is this PR now superseded by the others @TheSkyentist submitted today?

@TheSkyentist
Copy link
Contributor

I believe so but I'll let @lboogaard be the final decider. The "n-clear" issue still exists (see #191) though I don't think this PR presents a global solution for combined NIRCam/NIRISS data.

@lboogaard
Copy link
Author

lboogaard commented Dec 13, 2023

I agree - let's close this in favor of #186 and #187 and continue on #191

@lboogaard lboogaard closed this Dec 13, 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

Successfully merging this pull request may close these issues.

3 participants