-
Notifications
You must be signed in to change notification settings - Fork 167
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
Update refpix step for NIR detectors to use convolution kernel #8482
Comments
Comment by Maria Pena-Guerrero on JIRA: The attached notebook uses a file containing the Fourier coefficients, can that file please be attached here as well? |
Comment by Maria Pena-Guerrero on JIRA: I am assuming all instruments can/will provide their coefficients in the same format, is this correct? |
Comment by Timothy Brandt on JIRA: I have attached the reference file provided by Bernie Rauscher. I believe that all H2RG detectors can/will provide coefficients in the same format. |
Comment by Maria Pena-Guerrero on JIRA: Reference file question: Please check if the following structure woks for reference file (sample file [^nrc_conv_kernel.asdf]). Example for a NIRCam ASDF tree: |
Comment by Maria Pena-Guerrero on JIRA: another question, is the convolution only to be applied for full frame data? |
Comment by Timothy Brandt on JIRA: Maria Pena-Guerrero: that is correct; this is only to be applied to full frame data. |
Comment by Maria Pena-Guerrero on JIRA: David Law we need a response regarding the format of the reference file for all the instruments. Please see comment 22/Aug/24 10:06 AM.
The branch of the datamodels repo is: spacetelescope/stdatamodels#321 The branch of the jwst repo is:
Please go ahead and test the code. Try the following: pip install git+[https://github.com/penaguerrero/jwst@jp3622] pip install git+https://github.com/penaguerrero/stdatamodels@ conv_kernel_model
|
Comment by Maria Pena-Guerrero on JIRA: David Law we are pushing this ticket to the next build since there is still quite a bit of testing and coordination required between the jwst, stdatamodels, and CRDS for the changes in this ticket to take effect, especially since the changes are to be applied by default. |
Maria Pena-Guerrero Agreed, this will need to be dealt with early in a build to get the CRDS changes in place. Will look back at this once 11.1 is done. |
Comment by Maria Pena-Guerrero on JIRA: David Law is this a good time to take up this ticket again? |
Maria Pena-Guerrero Yes, now that 11.1 and the Cycle 4 deadline are out of the way (or very nearly so) then I think we can look back at this. I think what we'd want to do is set the code default to use the existing running-median and side pixel corrections, as this default is least likely to cause problems. Instrument teams can then deliver reference files and parameter reference files to turn the new code on once they've had a chance to test it out. Likewise, we'll need to make sure that nothing crashes if the step can't find reference files in CRDS for the step when using the existing method. |
Filed corresponding ticket https://jira.stsci.edu/browse/CRDS-892 to give ReDCaT a heads up that this is coming |
Issue JP-3622 was created on JIRA by David Law:
As part of an ongoing multi-instrument discussion of ways in which to improve 1/f noise in NIR data (see https://outerspace.stsci.edu/display/JWSTCC/JWST+Pipeline+1-over-f+Noise+Removal]) there was general agreement on a desired improvement to the refpix step which should allow reference pixels to mitigate 1/f noise as much as possible without the need for using science pixels. In brief, instead of the side-reference pixel subtraction using a simple median smoothed signal as a function of row, it should instead use an optimized convolution kernel to do the smoothing prior to subtraction. Algorithm and example implementation provided by Timothy Brandt (in collaboration with Bernie Rauscher).
The impact of this change on rate files is quite modest, improving the total noise by a few percent. Likewise, there is not a large impact on the visible residual 1/f striping. Nonetheless, this change allows us to maximize the gains that can be realized without science-specific solutions.
Details:
A notebook is attached that demonstrates the use of this approach in a custom post-hook step appended to the refpix step (passing in the kernels for convenience as global variables- these would come from reference files instead).
This ticket will require multiple steps to implement: defining a new CRDS reference file format, implementing the necessary code changes, creating and delivering the new reference files for each NIR instrument, and potentially updating parameter reference files.
The text was updated successfully, but these errors were encountered: