4. Tips and Tricks

This is a collection of tips and tricks that can be useful for reducing different data, or to do it slightly differently from what is presented in the example.

4.1. Getting Bad Pixel Masks from the archive

Starting with DRAGONS v3.1, the static bad pixel masks (BPMs) are now handled as calibrations. They are downloadable from the archive instead of being packaged with the software. There are various ways to get the BPMs.

4.1.2. Associated calibrations

The BPMs are now handled like other calibrations. This means that they are also downloaded from the archive. From the archive search form, once you have identified your science data, select the “Load Associated Calibrations” (which turns to “View Calibrations” once the table is loaded). The BPM will show up with the green background.

_images/bpmassociated.png


If a BPM does not show up, see if you find one using the manual search explained in the previous section, Manual search.

4.2. Sky Subtraction

For sky subtraction, there are two input parameters to skyCorrect that users should be aware of: scale_sky and offset_sky. Both serve to match the sky frames to the target frame before the subtraction. The first, scale_sky is multiplicative and is turned off by default for GSAOI, while the second, offset_sky is additive and is turned on by default for GSAOI.

The reason why offset_sky is favored for GSAOI is that often the flux in individual pixels can be very low and that is observed to make the multiplicative scale less accurate. In any case, from experience, it was found that offset_sky==True was more successful, more often, with GSAOI data, which is why it was set as the default.

Depending on the data and the science objectives, those two input parameters might have to be experimented with. The only combination we would not recommend is setting both of them on. (The software will not let you either.)

When there are offset to sky, it is likely to be because the target fills the field of view and there is no usable sky. In those cases, all sky scaling and offsetting should be turned off (skyCorrect:scale_sky=False and skyCorrect:offset_sky=False). There is no sky to measure in the target frame, any attempts at scaling or offsetting will result in an over subtraction of the sky.

4.3. Useful parameters

4.3.1. skip_primitive

I might happen that you will want or need to not run a primitive in a recipe. You could copy the recipe over and edit it. Or you could invoke the skip_primitive parameter to tell DRAGONS to completely skip that step.

Let’s say that you want the data aligned but not stacked. You would do:

reduce @sci.lis -p stackFrames:skip_primitive=True

4.3.2. write_outputs

When debugging or when there’s a need to inspect intermediate products, you might want to write the output of a specific primitive to disk. This is done with the write_outputs parameter.

For example, to write the sky subtracted frames before alignment and stacking, you would do:

reduce @sci.lis -p skyCorrect:write_outputs=True