Skip to content

RomanCuts

Machine

Bases: object

Class for calculating fast PRF photometry on a collection of images and a list of in image sources.

This method is discussed in detail in Hedges et al. 2021.

This method solves a linear model to assuming Gaussian priors on the weight of each linear components as explained by Luger, Foreman-Mackey & Hogg, 2017

__init__

__init__(
    time: ArrayLike,
    flux: ArrayLike,
    flux_err: ArrayLike,
    ra: ArrayLike,
    dec: ArrayLike,
    sources: DataFrame,
    column: ArrayLike,
    row: ArrayLike,
    time_mask: Optional[ArrayLike] = None,
    sparse_dist_lim: float = 4,
    sources_flux_column: str = "flux",
) -> None

Parameters:

  • time (ArrayLike) –

    Time values in JD

  • flux (ArrayLike) –

    Flux values at each pixels and times in units of electrons / sec

  • flux_err (ArrayLike) –

    Flux error values at each pixels and times in units of electrons / sec

  • ra (ArrayLike) –

    Right Ascension coordinate of each pixel

  • dec (ArrayLike) –

    Declination coordinate of each pixel

  • sources (DataFrame) –

    DataFrame with source present in the images

  • column (ArrayLike) –

    Data array containing the "columns" of the detector that each pixel is on.

  • row (ArrayLike) –

    Data array containing the "rows" of the detector that each pixel is on.

  • time_mask (Optional[ArrayLike], default: None ) –

    A boolean array of shape time. Only values where this mask is True will be used to calculate the average image for fitting the PSF. Use this to e.g. select frames with low VA, or no focus change

  • n_r_knots

    Number of radial knots in the spline model.

  • n_phi_knots

    Number of azimuthal knots in the spline model.

  • time_nknots

    Number og knots for cartesian DM in time model.

  • time_resolution

    Number of time points to bin by when fitting for velocity aberration.

  • time_radius

    The radius around sources, out to which the velocity aberration model will be fit. (arcseconds)

  • rmin

    The minimum radius for the PRF model to be fit. (arcseconds)

  • rmax

    The maximum radius for the PRF model to be fit. (arcseconds)

  • cut_r (float) –

    Radius distance whithin the shape model only depends on radius and not angle.

  • sparse_dist_lim (float, default: 4 ) –

    Radial distance used to include pixels around sources when creating delta arrays (dra, ddec, r, and phi) as sparse matrices for efficiency. Default is 40" (recommended for kepler). (arcseconds)

  • sources_flux_column (str, default: 'flux' ) –

    Column name in sources table to be used as flux estimate. For Kepler data gaia.phot_g_mean_flux is recommended, for TESS use gaia.phot_rp_mean_flux.

Attributes:

  • nsources (int) –

    Number of sources to be extracted

  • nt (int) –

    Number of onservations in the time series (aka number of cadences)

  • npixels (int) –

    Total number of pixels with flux measurements

  • source_flux_estimates (ndarray) –

    First estimation of pixel fluxes assuming values given by the sources catalog (e.g. Gaia phot_g_mean_flux)

  • dra (ndarray) –

    Distance in right ascension between pixel and source coordinates, units of degrees

  • ddec (ndarray) –

    Distance in declination between pixel and source coordinates, units of degrees

  • r (ndarray) –

    Radial distance between pixel and source coordinates (polar coordinates), in units of arcseconds

  • phi (ndarray) –

    Angle between pixel and source coordinates (polar coordinates), in units of radians

  • source_mask (csr_matrix) –

    Sparce mask matrix with pixels that contains flux from sources

  • uncontaminated_source_mask (csr_matrix) –

    Sparce mask matrix with selected uncontaminated pixels per source to be used to build the PSF model

  • mean_model (csr_matrix) –

    Mean PSF model values per pixel used for PSF photometry

  • cartesian_knot_spacing (string) –

    Defines the type of spacing between knots in cartessian space to generate the design matrix, options are "linear" or "sqrt".

  • quiet (booleans) –

    Quiets TQDM progress bars.

  • contaminant_flux_limit (float) –

    The limiting magnitude at which a sources is considered as contaminant