podi_constructpupilghost Module

podi_constructpupilghost.create_radial_pupilghost(filename, outputfile, radial_opts, verbose=True)[source]

This function takes a full multi-extension pupil ghost, derives the azimuthal profile and writes it back to a new file. This azimuthal profile can then be used to remove the pupilghost from science with a range of rotator angles.

Parameters are: - filename of the full 2-d input pupil ghost - name for the output file

podi_constructpupilghost.get_median_level(data, radii, ri, ro)[source]
podi_constructpupilghost.get_radii_angles(data_fullres, center, binfac, verbose=False)[source]
podi_constructpupilghost.make_pupilghost_slice(filename, binfac, bpmdir, radius_range, clobber=False)[source]
podi_constructpupilghost.subtract_background(data, radius, angle, radius_range, binfac)[source]

This routine takes the input in polar coordinates and fits a straight line to the radial profile inside and outside of the allowed range. This is assumed to be the background level (in analogy to the algorithm used in the IRAF task mkpupil).

Input data: - data (the actual intensity values for all pixels) - radius (the r in the polar coordianates) - angle (the phi in polar coordinates) - radius range (r_inner, r_outer, d_radius) - binfac (the binning used for the data)