API¶
This is the API documentation for PIPE.
pipe Package¶
Functions¶
|
Returns a boolean 2D-array of the same dimensions as frame with True inside radius from (xc, yc), and False outside. |
|
Reads the CHEOPS attitude file and puts the data into a N-by-4 array with spacecraft mjd, ra, dev, and roll angle. |
|
Compute center of pixel values for cube of rectangular frames. |
|
Filters values lower more than clip from the average (iterates niter times). |
|
Checks the number of masked pixels for each mask of an array, and de-selects those frames that deviate more than clip sigma from the average. |
|
Selects frames with positions after and before that are fairly consistent, with the goal to select frames with little motion blur. |
|
Filters positions deviating more than clip from the median (iterates niter times). |
|
Filters values in array deviating more than clip from the average (iterates niter times). |
|
Cleans all bad pixels as defined by mask (2D or 3D) inside aperture apt, by averaging neighbouring pixels in spatial dimensions (not time). |
|
Returns a cube with apertures for each plane along 0-axis defined by 1D-arrays xc and yc and constant radius. |
|
Read CHEOPS datacube format, either subarray or imagettes. |
|
Function that de-rotates coordinates according to roll angle (in degrees) |
|
Reads the flatfield cube and interpolates the flatfield temperatures to the given temperature. |
|
Compute gain using HK parameters and the gain reference table Returns gain in units of e/ADU |
|
Returns the first imagette offset from an imagette fits-file cube; first offset is relative to full array, second offset is relative to subarray |
|
Computes the flux of the psf inside radius. |
|
Resample planes from datacube, no extrapolation |
|
Resample planes from datacube, with extrapolation |
|
Compute normalised mean absolute deviation (MAD) for an array, return in ppm |
|
Find pixels that deviate too much from fitted models, and produce a cube of masks. |
|
|
|
Use a PSF to find the best matching centres in a cube. |
|
Use a PSF to find the best matching centres in a cube, using initial guessed positions and a fixed separation (dx, dy). |
|
Use a PSF to find the best matching centres in a cube. |
|
Fit a defined PSF to a frame by constructing a matrix of offsets. |
|
Fit two PSFs independently to both components of a binary, in a similar way as the regular multi_psf.fit function described above. |
|
Computes the photon + read-out noise of a bias subtracted frame (or cube). |
|
Reads the non-linear correction from a text file with ADU vs multiplicative correction. |
|
Turn a data cube into a pixel matrix with columns y-coordinate, x-coordinate, pixel value, pixel value noise the mask can either be a 2D plane or 3D cube (True = select, False mask out). |
|
Uses a source model (PSF*scale+background) of the source to compute the photon + read-out noise. |
|
Use defined PSF to integrate flux and derive error. |
|
Traverses darkpath directory, looking for all dark current files and picks the one closest in time |
|
Reads a predefined mask saved as a fits file, returns numpy array |
|
Reads the readout noise table entry from the CHEOPS calibratared subarray cube file. |
|
Resamples table of attitude data (RA, DEC, ROLL, DROLL) to the midtimes of the observations of duration exp_time Note: exptime in seconds, mjd in days, DROLL is change in roll angle during exposure |
|
Equidistantly distributes nexp exposures over the sa_time data points. |
|
Function that rotates coordinates according to roll angle (in degrees) |
|
Computes a rouch contrast (flux difference) between pixels inside aperture and outside aperture, for each frame. |
|
Save lightcurve data from both componentes of a binary, as defined by arguments to fits table in binary format. |
|
Save lightcurve data as defined by arguments to fits table in binary format. |
|
A simple 1D sigma-clipping routine that returns a boolean array of indices to non-clipped data |
|
Reads star catalogue file and returns value for column string colstr and entry row |
|
Helper function that computes index ranges given a 2D offset and a 2D size |
|
Reads frontTemp_2 sensor data from the CHEOPS raw file. |
Classes¶
|
|
|
Keeps track of tima and messages to the logfile |
|
PipeParam keeps all parameters relevant for the extraction, with default values given for most. |
|
Reads catalogue data on background stars and produces images of stars, to be removed from observations. |