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

MIRI special case in Instrument._getWeights should be moved out #20

Closed
josePhoenix opened this issue Dec 8, 2014 · 4 comments
Closed
Assignees
Milestone

Comments

@josePhoenix
Copy link
Collaborator

JWST-specific logic in poppy.Instrument._getWeights should be moved into JWInstrument in WebbPSF.

            minwave = band.wave[w_above10].min()
            maxwave = band.wave[w_above10].max()
            poppy_core._log.debug("Min, max wavelengths = %f, %f" % (minwave/1e4, maxwave/1e4))
            # special case: ignore red leak for MIRI F560W, which has a negligible effect in practice
            # this is lousy test data rather than a bad filter?
            if self.filter == 'F560W':
                poppy_core._log.debug("Special case: setting max wavelength to 6.38 um to ignore red leak")
                maxwave = 63800.0
            elif self.filter == 'F1280W':
                poppy_core._log.debug("Special case: setting max wavelength to 14.32 um to ignore red leak")
                maxwave = 143200.0

Also

 if self.filter == 'FND': # special case MIRI's ND filter since it is < 0.1% everywhere...
wtrans = np.where( ( filterdata.THROUGHPUT > 0.0005) & (filterdata.WAVELENGTH > 7e-6*1e10) & (filterdata.WAVELENGTH < 26e-6*1e10 ))
@mperrin
Copy link
Owner

mperrin commented Dec 8, 2014

Hmmm. I have little recollection of this. Agreed that code is in the wrong spot.

Based on the comment there about it possibly being bad test data, I wonder if we shouldn't just do some surgery on the data files rather than having a special case in the code for this. We should check with the MIRI team about making sure we have good input values for this. Charles can probably help track this down from the MIRI calibration data products data deliveries. He'll know who on the MIRI team to talk to, at least.

@mperrin
Copy link
Owner

mperrin commented Dec 16, 2014

Dean said he would provide us with updated spectral response curves, so let's
(a) remove the special case in poppy
(b) hold off on any additional changes until we get the updated MIRI filter information from the MIRI team.

@josePhoenix josePhoenix modified the milestone: 0.3 Jan 22, 2015
@mperrin
Copy link
Owner

mperrin commented Jan 22, 2015

Let's remove the special case, and I will update the data files to set the suspect values to 0 so a special case in the code is not needed. We can do this ASAP even without the new MIRI data files.

@mperrin mperrin self-assigned this Jan 22, 2015
@mperrin
Copy link
Owner

mperrin commented Jan 23, 2015

So I looked at the data files, and it turns out that if any cleanup was needed, I did it long ago, because both the F560W nor F1280W files are strictly 0 above the cutoff wavelengths imposed above.

The FND case above is in the "fallback simple code if we don't have pysynphot" branch, which definitely doesn't need to care about MIRI instrument details.

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