Halo Photometry (photometry.HaloPhotometry
)
Halo Photometry.
Code author: Benjamin Pope <benjamin.pope@nyu.edu>
Code author: Tim White <white@phys.au.dk>
Code author: Rasmus Handberg <rasmush@phys.au.dk>
- class photometry.HaloPhotometry(*args, **kwargs)[source]
Bases:
BasePhotometry
Use halo photometry to observe very saturated stars.
Code author: Benjamin Pope <benjamin.pope@nyu.edu>
Code author: Tim White <white@phys.au.dk>
Code author: Rasmus Handberg <rasmush@phys.au.dk>
- __init__(*args, **kwargs)[source]
Initialize the photometry object.
- Parameters:
starid (int) – TIC number of star to be processed.
input_folder (str) – Root directory where files are loaded from.
output_folder (str) – Root directory where output files are saved.
datasource (str) – Source of the data. Options are
'ffi'
or'tpf'
. Default is'ffi'
.plot (bool) – Create plots as part of the output. Default is
False
.camera (int) – TESS camera (1-4) to load target from (Only used for FFIs).
ccd (int) – TESS CCD (1-4) to load target from (Only used for FFIs).
cadence (int, optional) – Not used for
datasource='ffi'
.cache (str) – Optional values are
'none'
,'full'
or'basic'
(Default).version (int) – Data release number to be added to headers. Default=6.
- Raises:
Exception – If starid could not be found in catalog.
FileNotFoundError – If input file (HDF5, TPF, Catalog) could not be found.
ValueError – On invalid datasource.
ValueError – If
camera
andccd
is not provided together withdatasource='ffi'
.
- do_photometry()[source]
Performs ‘halo’ TV-min weighted-aperture photometry.
- Parameters:
aperture_mask (array-like, 'pipeline', or 'all') – A boolean array describing the aperture such that False means that the pixel will be masked out. If the string ‘all’ is passed, all pixels will be used. The default behavior is to use the Kepler pipeline mask.
splits (tuple, (None, None) or (2152,2175) etc.) – A tuple including two times at which to split the light curve and run halo separately outside these splits.
sub (int) – Do you want to subsample every nth pixel in your light curve? Not advised, but can come in handy for very large TPFs.
maxiter (int) – Number of iterations to optimize. 101 is default & usually sufficient.
w_init (None or array-like.) – Initialize weights with a particular weight vector - useful if you have already run TV-min and want to update, but otherwise set to None and it will have default initialization.
random_init (Boolean) – If False, and w_init is None, it will initialize with uniform weights; if True, it will initialize with random weights. False is usually better.
thresh (float) – A float greater than 0. Pixels less than this fraction of the maximum flux at any pixel will be masked out - this is to deal with saturation. Because halo is usually intended for saturated stars, the default is 0.8, to deal with saturated pixels. If your star is not saturated, set this greater than 1.0.
objective (string) – Objective function: can be tv, tv_o2, l2v, or l3v.
analytic (Boolean) – If True, it will optimize the TV with autograd analytic derivatives, which is several orders of magnitude faster than with numerical derivatives. This is by default True but you can run it numerically with False if you prefer.
sigclip (Boolean) – If True, it will iteratively run the TV-min algorithm clipping outliers. Use this for data with a lot of outliers, but by default it is set False.