[PIPE2D-1088] Add PFSB-compliant NIR data to weeklies Created: 14/Oct/22  Updated: 07/Dec/22  Resolved: 07/Dec/22

Status: Done
Project: DRP 2-D Pipeline
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Normal
Reporter: hassan Assignee: hassan
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
is blocked by PIPE2D-1102 Import DM-35718 solution for Gen2 dat... Done
Relates
relates to PIPE2D-1095 Fix w.2022.42 weekly test failure Done
relates to PIPE2D-668 Support ISR processing for NIR data Done
Story Points: 2
Reviewers: price

 Description   

With PIPE2D-668, n-band data need to be compatible with the PSFB format. This is not the case for the current weekly n data, so a temporary fix was added to the PIPE2D-668 ticket branch pfs_pipe2d repo, such that n data are ignored.

Please introduce PFSB n band data to the weekly build, and remove the temporary fix to the pfs_pipe2d repo.



 Comments   
Comment by hassan [ 27/Oct/22 ]

This work appears to be blocked by DM-35718 .

Comment by hassan [ 07/Nov/22 ]

Blockage by DM-35718 (PIPE2D-1102) no longer the case. However, as bias, dark and flat corrections need to be applied to b+r processing, but not for n, for the science processing two separate runs need to be made with reduceExposure.py: one for b+r using bias, dark and flat corrections, and one for `n` without bias, dark and flat corrections. This specific feature is currently not supported in the YAML command generation mechanism. sogo.mineo has been informed and looking into a means of supporting this.

Comment by price [ 08/Nov/22 ]

We should simply disable the loading of bias and dark for n in our custom IsrTask. I think we want to keep the flats, though.

Comment by hassan [ 08/Nov/22 ]

Disabling the bias and dark for n in IsrTask would be good. But just want to re-iterate (mainly for Mineo-san's information) that if the flats need to be configured separately for n, an update to the command generation mechanism is still needed.

Comment by sogo.mineo [ 08/Nov/22 ]

I began working on extending the command generation mechanism.

Comment by rhl [ 08/Nov/22 ]

Where is the I/O done? They are ignored in the processing.

Comment by sogo.mineo [ 08/Nov/22 ]

Can I add a commit to the current tickets/PIPE2D-1088 branch worked on by Hassan? Is it legitimate act?

Comment by sogo.mineo [ 08/Nov/22 ]

This is the commit I want to push:

generateCommands.py: Introduce subgroups of ScienceStep

After this patch is applied, the following construction (`group:...`)
will be valid.

scienceBlock:
  -
    name: process_brn
    id: ["visit=47", "arm=b^r^n"]
    policy:
      reduceExposure:
        config: ["isr.doDark=False"]
        group:
          -
            id: ["arm=b^r"]
          -
            id: ["arm=n"]
            config: ["isr.doBias=False"]

In this case, "arm=b^r" will be processed with `--config isr.doDark=False`
and "arm=n" will be processed with `--config isr.doDark=False isr.doBias=False`.
Comment by hassan [ 08/Nov/22 ]

Sure sogo.mineo feel free to add commits to tickets/PIPE2D-1088 as you wish.

Comment by price [ 09/Nov/22 ]

We shouldn't need to change anything in the command generation. We just need to tell the ISR that we don't need bias and dark for n. The flats will be required for n, just as for b and r.

Comment by price [ 09/Nov/22 ]

I've changed the PfsIsrTask so it won't attempt to load the bias or dark for arm=n. This should allow us to process CCD and H4RG data with the same configuration.

Comment by hassan [ 09/Nov/22 ]

OK. I'll incorporate your changes Paul in my changes to the weekly build, and get back to you if there's any issues.

Comment by sogo.mineo [ 09/Nov/22 ]

This may no longer be necessary, but here is the branch I made yesterday (Hassan told me about personal branches): u/SogoMineo/20221109a

Comment by hassan [ 05/Dec/22 ]

Converted n-band PFFA files (generated by 2D simulator) to PFFB format. ISR-corrected images were first generated, and then converted to PFFB format using script dev_2ddrp/scripts/convertPFSAtoPFSB.py. For details of conversion process, see notes in https://github.com/Subaru-PFS/dev_2ddrp/blob/366f2bad38321de16cafb3197163a2bf30f7f013/notes/pipe2d-1088-notes.md .

Comment by price [ 06/Dec/22 ]

Code changes look reasonable; I've not looked at the data.

Comment by hassan [ 07/Dec/22 ]

Merged to master

Generated at Sat Feb 10 16:02:32 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.