kai.reduce.kai_util
Attributes
Functions
|
|
|
Make an electronic log for all the FITS files in the |
|
|
|
Determine pixel shifts from true RA and Dec positions. |
|
|
|
Determine pixel shifts from true RA and Dec positions. |
|
Determine E and N offsets from Sgr A* (in arcsec) from |
|
Determine pixel shifts from E and N offsets from Sgr A*. |
|
Rotate the coordinates in the *.coo files for data sets |
|
|
|
|
|
|
|
|
|
Pass in a file containing a list of images. For each of these |
|
Process unprocessed FITS frames and coadds to align star positions, stack them, |
|
Adds WCS keywords to file. |
Module Contents
- kai.reduce.kai_util.makelog(directory, outfile='image_log.txt', instrument=instruments.default_inst)[source]
Make an electronic log for all the FITS files in the specified directory.
- kai.reduce.kai_util.radec2pix(radec, phi, scale, posRef)[source]
Determine pixel shifts from true RA and Dec positions.
@param radec: a 2-element list containing the RA and Dec in degrees. @type radec: float list @param phi: position angle (E of N) in degrees. @type phi: float @param scale: arcsec per pixel. @type scale: float @param posRef: 2-element list containing the ra, dec positions (in degrees)
of a reference object.
@type posRef: float list
- kai.reduce.kai_util.pcuxy2pix(pcuxy, phi, scale, pcuxyRef)[source]
Determine pixel shifts from true RA and Dec positions.
@param pcuxy: a 2-element list containing the PCU x and y in mm. @type pcuxy: float list @param phi: position angle (E of N) in degrees. @type phi: float @param scale: mm per pixel. @type scale: float @param pcuxyRef: 2-element list containing the PCU x, y positions (in mm) in the reference position. @type pcuxyRef: float list
- kai.reduce.kai_util.pix2xyarcsec(xypix, phi, scale, sgra)[source]
Determine E and N offsets from Sgr A* (in arcsec) from pixel positions and the pixel position of Sgr A*.
xypix: 2-element list containing the RA and Dec in degrees. phi: position angle (E of N) in degrees. scale: arcsec per pixel. sgra: 2-element list containing the pixel position of Sgr A*.
- kai.reduce.kai_util.xyarcsec2pix(xyarcsec, phi, scale)[source]
Determine pixel shifts from E and N offsets from Sgr A*.
xyarcsec: 2-element list containing the RA and Dec in degrees. phi: position angle (E of N) in degrees. scale: arcsec per pixel.
- kai.reduce.kai_util.rotate_coo(x, y, phi)[source]
Rotate the coordinates in the *.coo files for data sets containing images at different PAs.
- kai.reduce.kai_util.plotKeyword(keyword1, keyword2, imgList)[source]
Pass in a file containing a list of images. For each of these images, read out the values of the header keywords specified. Then plot each of the keywords against each other.
- kai.reduce.kai_util.restackCoadd(clean_directory, raw_directory, raw_unp_directory, save_diagnostics=False, save_coadds=False)[source]
Process unprocessed FITS frames and coadds to align star positions, stack them, and optionally save diagnostics and intermediate outputs. This stacks to the first coadd.
@param clean_directory: Path to directory containing .coo files with reference star positions. @type clean_directory: str @param raw_directory: Path to directory containing raw FITS frames. @type raw_directory: str @param raw_unp_directory: Path to directory containing unprocessed FITS files (n_unp_###.fits). @type raw_unp_directory: str @param save_diagnostics: If True, saves intermediate plots and motion diagnostics. @type save_diagnostics: bool @param save_coadds: If True, saves individual coadd FITS frames. @type save_coadds: bool