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
Implement NIRCAM TSO grism extraction from CubeModel in extract 2D #1710
Comments
Just a reminder that the extracted arrays are now stored in a |
And I believe SlitModel is capable of doing 3D, right? |
Yes, |
This is a "must have" for B7.2 in order to support level 4 requirement DMS-786. |
@hbushouse if the team wants |
As noted in #1235, the user is allowed to use a few different subarray sizes and full frame for NIRCam TSO grism exposures. All of the subarrays have their "bottom" edge located at the physical bottom edge of the detector and grow in size vertically. According to the TSO WG, the source spectrum trace will always be centered somewhere near row 34 in the vertical direction (dispersion running parallel to rows). So the larger subarrays will just result in larger amount of sky above the spectrum. The WG indicates that we can assume that TSO grism sources will always be point-like. They would like extract_2d to always produce a cutout that is 64 pixels in height (cross-dispersion direction) for all subarrays and full frame exposures, which is equal to the height of the smallest available subarray (2048 x 64). This is to allow area within the cutout for sampling the background in later steps, such as extract_1d. Extract_1d, in turn, should use an extraction slit height of ~5 pixels within the 2D cutout, because the sources should be point-like. They would like the slit height to be a parameter that a user can set (during reprocessing) to tailor their results. |
I noticed from #1235 that the full-frame image has crpix2 = 485. If the spectrum will be near row 34 even for full-frame TSO grism data, will that value of crpix2 be a problem for |
@philhodge Good catch. I'll ask the TSO group about that one. |
Kevin Stevenson (TSO WG) agrees that the source will be located at CRPIX2=485 when full-frame readouts are used for NIRCam TS grism exposures. For consistency with the subarray modes, in terms of the spectral trace always ending up near row 34, they'd like to have extract_2d produce a 2D cutout that is slightly miscentered in the y direction so that the trace falls near row 34 in the cutout. Given that the 2D cutouts are 64 pixels high, this would mean centering the cutout near row 483 (CRPIX2 - 2). |
quick question - I currently have this implemented to use the orders specified for extraction in the |
Good question. Let's get Kevin's input on this (I'll ask him). For TSO I'm guessing that they might only want order 1, as opposed to regular WFSS science where they could want both. |
cc: @kevin218 in case you can comment here |
@NorPirzkal I must have asked you in person, I can't find the email at the moment, but for WFSS specifically, I also have both orders being extracted for all filters, is that still what the nircam team wants? |
Yes, both orders should be identified and extracted. For two reasons: 1) the second order is present in only a subset of filters and small fraction of the FOV for these filters, so it does not add very much to the amount of data extracted, but 2) extracting the second orders is a very basic first step to understanding where these are and hence how they contaminate first orders. |
@kevin218 @hbushouse how about the three of us try and get together in person to go over this. Any possibility to do this later this afternoon, or tomorrow some time? |
I can do 3-5pm today. I won't be around tomorrow. |
Discussion results: nircam TSO team wants @philhodge is there anything else I could add in the background to |
If I remember correctly the discussion also resulted in the decision to only produce output for order 1 (is that right?). If so, will there be meta data of some kind passed along to |
For NIRISS SOSS, |
@hbushouse nope. The discussion yielded that I wouldn't do anything to identify orders and just cut the cross-dispersion size to 64pixels. The team believes however that only order 1 will be present. But, |
@philhodge yah, as it stands |
@sosey By "and get the position for the dispersion extents" do you mean from |
essentially. The bounding box for the grism is technically the whole image. For TSO there's only one object, always in a known location, so I've harded coded that source position, which really limits the valid row, but not the valid columns. I think that |
The center row (32?) and the extraction width 5 should be specified in the reference file. |
I can only go by what the team has specified.... but, since we are outputting a |
After discussion with phil: For now, since the |
|
I thought we decided |
I'm pretty sure that if |
yah, nadia and I discussed that. To set the bounding box I still need to read the wavelengthrange reference file and calculate where the trace is (I would still need numbers from Kevin on the padding) and if it needs to go in today, I'd need to use the old wavelengthrange format to get that information...and then change it when we deliver the new schema and datamodel. I think my preference for a delivery today is just make the cutout and stop there. Then worry about the optimal way to get the information to extract 1d after.. |
The bounding box doesn't have to set limits in the dispersion direction. For the time being, you could just set the cross-dispersion limits and leave the width to be the full width of the cutout. |
This doesn't need to get in today to be included in 0.10.0, especially since the new wavelengthrange ref files aren't installed yet and By the way @sosey, |
okay. Can we remove the 0.10 milestone then? Thanks for the clarification on |
hbushouse modified the milestones: 0.10.0, 0.11.0 20 hours ago |
In TSO mode, the data arrays are 3D, where each plane of the cube corresponds to the countrate image for a given integration within the exposure. I think we've already enabled the various calwebb_spec2 steps to handle this form of data (a "CubeModel", as opposed to a more normal 2D "ImageModel"). So the thing to ensure is that extract_2d does an extraction from the input 3D cube, producing an output 3D cube that is simply smaller in the first two (x, y) dimensions, but still has all of the axis 3 planes. The extract_1d step then knows to produce a 1D spectrum from each plane of the 3D cube that it's given.
The text was updated successfully, but these errors were encountered: