Primitives/API
- kcwidrp.scripts.kcwi_masksky_ds9.main()[source]
Creates mask image from ds9 region file.
To use this routine, process your data with default sky subtraction. Then display the target *_intf.fits file in ds9. Use region shapes to indicate non-sky pixels in image (box, circle, etc.). Write out ds9 region file (*.reg). Then run this routine:
python ~/kderp/devel/kcwi_masksky_ds9.py kb180101_00111_intf.fits ds9.reg
(replace paths/filenames with your local paths/filenames)
This should create kb180101_00111_smsk.fits, which will be used when you re-run the pipeline.
- Parameters:
imagename (string) – The name of a *_intf.fits image
regionname (string) – The name of a ds9 region file
- Returns:
None
- kcwidrp.scripts.wb.wb_main()[source]
Generate summary log and group list files for BLUE channel images.
Call get_log_string to create summary entry for each image and group them according to processing group. Write out unique processing group lists in *.txt files. These files can be input to the pipeline with the -l command line parameter to allow processing of groups one at a time. For example, 2x2 Blue biases taken with the TUP amp configuration in slow readout with gainmul 10 will end up in the file bias2x2TUP010_0.txt. A master bias can be created by issuing the following command:
>>> reduce_kcwi -b -l bias2x2TUP010_0.txt
These group files are generated for biases, darks, continuum bars, arcs, flats, and all objects. The filenames are all appended with the last four characters of the STATEID header keyword, so identical configurations from different states can be distinguished.
Always good to type out the list file before processing it.
Examples
>>> wb kb*.fits > whatb.list
This will generate a summary log file along with associated group list files that can be used as inputs to the reduce_kcwi command with the -l parameter. An example of the resulting *.txt files is below:
SN2023ixf2x2MedKBlueBL4500_75fe.txt bias2x2TUP010_0.txt allb.txt cbars2x2MedKBlueBL_4500_0.7_75fe.txt arcs2x2MedKBlueBLFeAr4500_10.0_75fe.txt cflat2x2MedKBlueBL_4500_0.7_75fe.txt arcs2x2MedKBlueBLThAr4500_20.0_75fe.txt dflat2x2MedKBlueBL_4500_14.0_75fe.txt bd26d26062x2MedKBlueBL4500_75fe.txt
One can proceed through processing steps like this:
>>> reduce_kcwi -b -l bias2x2TUP010_0.txt >>> reduce_kcwi -b -l cbars2x2MedKBlueBL_4500_0.7_75fe.txt >>> reduce_kcwi -b -l arcs2x2MedKBlueBLThAr4500_20.0_75fe.txt >>> reduce_kcwi -b -l cflat2x2MedKBlueBL_4500_0.7_75fe.txt >>> reduce_kcwi -b -l bd26d26062x2MedKBlueBL4500_75fe.txt >>> reduce_kcwi -b -l SN2023ixf2x2MedKBlueBL4500_75fe.txt
- kcwidrp.scripts.wr.wr_main()[source]
Generate summary log and group list files for RED channel images.
Call get_log_string to create summary entry for each image and group them according to processing group. Write out unique processing group lists in *.txt files. These files can be input to the pipeline with the -l command line parameter to allow processing of groups one at a time. For example, 2x2 Red biases taken with the L2U2 amp configuration with slow readout and high gain will end up in the file bias2x2TUP01_0.txt. A master bias can be created by issuing the following command:
>>> reduce_kcwi -r -l bias2x2L2U201_0.txt
These group files are generated for biases, darks, continuum bars, arcs, flats, and all objects. The filenames are all appended with the last four characters of the STATEID header keyword, so identical configurations from different states can be distinguished.
Always good to type out the list file before processing it.
Examples
>>> wr kr*.fits > whatr.list
This will generate a summary log file along with associated group list files that can be used as inputs to the reduce_kcwi command with the -l parameter. An example of the resulting *.txt files is below:
SN2023ixf2x2MedRL8000_75fe.txt bias2x2L2U201_0.txt allr.txt cbars2x2MedRL_8000_5.0_75fe.txt arcs2x2MedRLFeAr8000_2.5_75fe.txt cflat2x2MedRL_8000_5.0_75fe.txt arcs2x2MedRLThAr8000_2.5_75fe.txt dflat2x2MedRL_8000_20.0_75fe.txt bd26d26062x2MedRL8000_75fe.txt
One can proceed through processing steps like this:
>>> reduce_kcwi -r -l bias2x2L2U201_0.txt >>> reduce_kcwi -r -l cbars2x2MedRL_8000_5.0_75fe.txt >>> reduce_kcwi -r -l arcs2x2MedRlThAr8000_2.5_75fe.txt >>> reduce_kcwi -r -l cflat2x2MedRL_8000_5.0_75fe.txt >>> reduce_kcwi -r -l bd26d26062x2MedRL8000_75fe.txt >>> reduce_kcwi -r -l SN2023ixf2x2MedRL8000_75fe.txt