pyklip.kpp.utils package¶
Submodules¶
pyklip.kpp.utils.GPIimage module¶
pyklip.kpp.utils.mathfunc module¶
pyklip.kpp.utils.multiproc module¶
-
class
pyklip.kpp.utils.multiproc.
NoDaemonPool
(processes=None, initializer=None, initargs=(), maxtasksperchild=None, context=None)[source]¶ Bases:
multiprocessing.pool.Pool
-
Process
¶ alias of
NoDaemonProcess
-
pyklip.kpp.utils.oi module¶
-
pyklip.kpp.utils.oi.
get_pos_known_objects
(fakeinfohdr, object_name, pix2as, center=None, MJDOBS=None, OI_list_folder=None, xy=False, pa_sep=False, ignore_fakes=False, fakes_only=False, include_speckles=False, IWA=None, OWA=None)[source]¶ Return the position of real and/or simulated planets in an image based on its headers.
Parameters: - fakeinfohdr – fits file header containing the injected planets related keywords.
- object_name – Name of the star being observed.
- pix2as – platescale.
- center – Center of the image (not needed if pa_sep = True).
- MJDOBS – Julian date of the observation. (needed when OI_list_folder is not None)
- OI_list_folder – List of Object of Interest (OI) that should be masked from any standard deviation calculation. See the online documentation for instructions on how to define it.
- xy – Boolean. Returns the planets coordinate with x,y coordinates in pixels
- pa_sep – Boolean. Returns the planets coordinates as position angle (in arcsec), separation (in pix)
- ignore_fakes – Don’t return fake planets.
- fakes_only – Returns only fake planets.
- include_speckles – Include speckles from the list of object of interest (OI_list_folder)
- IWA – Inner working angle (in pixels).
- OWA – Outer working angle (in pixels).
- Return: (sep_vec,pa_vec) or (x_vec,y_vec) or (row_vec,col_vec) (default)
- Objects coordinates (real/fakes/others). For e.g., sep_vec,pa_vec are vectors and (sep_vec[0],pa_vec[0]) is the coordinate of the first object and so on…
-
pyklip.kpp.utils.oi.
make_GOI_list
(outputDir, GOI_list_csv, GPI_TID_csv)[source]¶ Generate the GOI files from the GOI table and the TID table (queried from the database).
outputDir: Output directory in which to save the GOI files. GOI_list_csv: Table with the list of GOIs (including separation, PA…). delimiter=’,’ GPI_TID_csv: Table giving the TID code for a given object name. delimiter=’,’ :return: One .csv file per target for which at list one GOI exists. delimiter=’;’
The filename follows: [object]_GOI.csv. For e.g. c_Eri_GOI.csv.
-
pyklip.kpp.utils.oi.
mask_known_objects
(cube, fakeinfohdr, object_name, pix2as, center, MJDOBS=None, OI_list_folder=None, ignore_fakes=False, fakes_only=False, include_speckles=False, IWA=None, OWA=None, mask_radius=7)[source]¶ Mask point sources in cube with an NaN aperture.
Parameters: - cube – Image or cube to be masked.
- fakeinfohdr – fits file header containing the injected planets related keywords.
- object_name – Name of the star being observed.
- pix2as – platescale.
- center – Center of the image.
- MJDOBS – Julian date of the observation. (needed when OI_list_folder is not None)
- OI_list_folder – List of Object of Interest (OI) that should be masked from any standard deviation calculation. See the online documentation for instructions on how to define it.
- xy – Boolean. Returns the planets coordinate with x,y coordinates in pixels
- pa_sep – Boolean. Returns the planets coordinates as position angle (in arcsec), separation (in pix)
- ignore_fakes – Don’t return fake planets.
- fakes_only – Returns only fake planets.
- include_speckles – Include speckles from the list of object of interest (OI_list_folder)
- IWA – Inner working angle (in pixels).
- OWA – Outer working angle (in pixels).
- mask_radius – Radius of the mask in pixels. (default = 7 pixels)
Return: Masked cube.