Access to Parallel/Serial Overscan in Calibrated Images

I am currently attempting to study features in the overscan regions of images taken by the BOT during the integration and testing of the LSST Camera.

For “raw” exposures i can extract these regions using the bounding boxes returned by the methods: getRawVerticalOverscanBBox() and getRawHorizontalOverscanBBox().

exp = butler.get('raw', dataId)

ccd = exp.getDetector()
amp = ccd[1]
overscan_image = exp.maskedImage[amp.getRawVerticalOverscanBBox()]

However, a calibrated image returned by the IsrTask() appears to be trimmed of these regions.

Is there a method for getting the parallel and serial overscan regions of calibrated images returned by IsrTask()?

My understanding (which should be corrected by someone in Pipelines as necessary) is that post-ISR images always have non-science pixels removed. Since the various ISR corrections are not done to these pixels, it is not clear what values they would have in a post-ISR image.

If you have some way of combining ISR-corrected science pixels and non-corrected overscan pixels, you will need to retrieve the latter from the raw image using something like the code you suggested.

In integration and testing we regular use the overscan regions for electro-optical characterization, in particular in regards to studying deferred charge and electronic bias stability and structure, which necessarily involves the application of the ISR to both imaging and overscan pixels. If there is no way to perform this action in the DM stack I believe this is a major deficiency.

You can likely get what you want by using individual methods of IsrTask rather than the IsrTask.run catch-all. In particular, you should have a look at the OverscanCorrectionTask.

What exactly are you trying to do? If you ask for a raw you’ll get an image containing all the overscan pixels, and a Detector which contains the bounding boxes for the e.g. pre-scan. If you want to trust the Rubin ISR (which can be tuned via config parameters) then run IsrTask. If you want to modify bits and pieces, then you’ll want to follow Paul’s advice; git clone ip_isr; set it up, and hack away at the python.

During current camera optimization some diagnostic plots show anomalous behavior of the pixel signals in the parallel and serial overscan, after calibration performed using the eotest software stack. I would like to investigate whether the observed overscan behaviors are due to instability of the electronic bias structure that would indicate a deficiency in the current overscan/superbias corrections or are instead due to other causes such as hot columns, etc. However to do so I need to apply the overscan/superbias to the overscan regions as looking at the row overscans the largest features are the electronic bias structure.

I will take a look deeper into the subtasks within the IsrTask to see if a simple modification can be done to preserve the full image region including overscans when performing the ISR.