emirdrp.processing
— Processing functions
Combination routines
- emirdrp.processing.combine.basic_processing(rinput, flow)
- Parameters:
rinput (RecipeInput) –
flow –
- emirdrp.processing.combine.basic_processing_(frames, flow)
- Parameters:
frames –
flow –
- emirdrp.processing.combine.basic_processing_with_segmentation(rinput, flow, method=<function mean>, errors=True, bpm=None)
- emirdrp.processing.combine.basic_processing_with_update(rinput, flow)
- emirdrp.processing.combine.combine_images(images, method=<function mean>, method_kwargs=None, errors=False, prolog=None)
Combine a sequence of HDUList objects.
- Using the following keywords:
NUM-NCOM
UUID, TSUTC1, TSUTC2
VARIANCE, MAP
- Parameters:
images –
method –
method_kwargs (dict (optional)) –
errors (bool (optional)) –
prolog –
- emirdrp.processing.combine.create_proc_hdulist(images, data_array)
- emirdrp.processing.combine.process_ab(images, errors=False, prolog=None)
Process images in AB sequence
- Parameters:
images –
errors –
prolog –
- emirdrp.processing.combine.process_abba(images, errors=False, prolog=None)
Process images in ABBA sequence
- Parameters:
images –
errors –
prolog –
- emirdrp.processing.combine.resize(frames, shape, offsetsp, finalshape, window=None)
- Parameters:
frames –
shape –
offsetsp –
finalshape –
window –
- emirdrp.processing.combine.resize_hdul(hdul, newshape, region, extensions=None, window=None, scale=1, fill=0.0, conserve=True)
- Parameters:
hdul –
newshape –
region –
extensions –
window –
scale –
fill –
conserve –
- emirdrp.processing.combine.resize_hdulists(hdulists, shape, offsetsp, finalshape, window=None)
- Parameters:
hdulists –
shape –
offsetsp –
finalshape –
window –
- emirdrp.processing.combine.scale_with_median(method)
Adapt combine method to scale with median
- emirdrp.processing.combine.segmentation_combined(data, snr_detect=10.0, fwhm=4.0, npixels=15, mask_corners=False)
Offsets from cross-correlation
- emirdrp.processing.corr.filter_region(arr, level=4)
- emirdrp.processing.corr.offset_from_crosscor(arr0, arr1, region, refine=True, refine_box=3, order='ij')
- emirdrp.processing.corr.offset_from_crosscor_regions(arr0, arr1, regions, refine=True, refine_box=3, order='ij', tol=0.5)
- emirdrp.processing.corr.offsets_from_crosscor(arrs, region, refine=True, refine_box=3, order='ij')
- emirdrp.processing.corr.offsets_from_crosscor_regions(arrs, regions, refine=True, refine_box=3, order='ij', tol=0.5)
- emirdrp.processing.corr.standarize(arr)
- emirdrp.processing.corr.vertex_of_quadratic(coeffs)
Corrector to remove flat field
- class emirdrp.processing.flatfield.FlatFieldCorrector(flatdata, datamodel=None, calibid='calibid-unknown', dtype='float32')
A Node that corrects a frame from flat-field.
- run(img)
- emirdrp.processing.info.gather_info(recipeinput)
- emirdrp.processing.info.gather_info_dframe(dataframe)
- emirdrp.processing.info.gather_info_frames(framelist)
- emirdrp.processing.info.gather_info_hdu(hdulist)
- emirdrp.processing.wcs.offsets_from_wcs(frames, pixref)
Compute offsets between frames using WCS information.
- Parameters:
frames – sequence of FITS filenames or file descriptors
pixref – numpy array used as reference pixel
The sky world coordinates are computed on pixref using the WCS of the first frame in the sequence. Then, the pixel coordinates of the reference sky world-coordinates are computed for the rest of the frames.
The results is a numpy array with the difference between the computed pixel value and the reference pixel. The first line of the array is [0, 0], being the offset from the first image to itself.
- emirdrp.processing.wcs.offsets_from_wcs_imgs(imgs, pixref)
- emirdrp.processing.wcs.reference_pix_from_wcs(frames, pixref, origin=1)
Compute reference pixels between frames using WCS information.
The sky world coordinates are computed on pixref using the WCS of the first frame in the sequence. Then, the pixel coordinates of the reference sky world-coordinates are computed for the rest of the frames.
The results is a list with the position of the reference pixel in each image
- emirdrp.processing.wcs.reference_pix_from_wcs_imgs(imgs, pixref, origin=1)
Compute reference pixels between frames using WCS information.
The sky world coordinates are computed on pixref using the WCS of the first frame in the sequence. Then, the pixel coordinates of the reference sky world-coordinates are computed for the rest of the frames.
The results is a list with the position of the reference pixel in each image