Vetters Building Blocks

The high-level vetter classes in Vetters utilize lower level implementations laid out in Low-Level Vetter API and pass around a data structure for Threshold Crossing Event (TCE) as documented in Data Structure: Tce Class.

Low-Level Vetter API

exovetter.lpp Module

Module to handle Locality Preserving Projections (LPP).

Functions

compute_lpp_Transitmetric(data, mapInfo)

Take a data class with light curve info and the mapInfo with information about the mapping to use.

runningMedian(t, y, dt, runt)

Take a running median of size dt.

foldBinLightCurve(data, ntrfr, npts)

Fold and bin lightcurve for input to LPP metric calculation.

computeRawLPPTransitMetric(binFlux, mapInfo)

Perform the matrix transformation with LPP.

knnDistance_fromKnown(knownTransits, new, knn)

For a group of known transits and a new one, use KNN to determine how close the new one is to the known transits.

periodNormalLPPTransitMetric(rawTLpp, ...)

Normalize the rawTransitMetric value by those with the closest period.

lpp_onetransit(tcedata, mapInfo, ntransit)

Chop down the full time series to one orbital period.

lpp_averageIndivTransit(tcedata, mapInfo)

Create the loop over individual transits and return array normalized lpp values, mean, and std.

plot_lpp_diagnostic(data, target, norm_lpp)

Plot LPP data for diagnostics.

Classes

Lppdata(tce, lc[, lc_name, default_snr])

Class to handle LPP data.

Loadmap([filename])

Class to handle map info parsing.

exovetter.modshift Package

Functions

compute_convolution_for_binned_data(phase, ...)

Convolve the binned data with the model

compute_event_significances(conv, sigma, results)

Compute the statistical significance of 4 major events

compute_false_alarm_threshold(period_days, ...)

Compute the stat, significance needed to invalidate the null hypothesis

compute_modshift_metrics(time, flux, model, ...)

Compute Jeff Coughlin's Modshift metrics.

estimate_scatter(phi_days, flux, ...)

Estimate the point-to-point scatter in the lightcurve after the transits have been removed.

find_indices_of_key_locations(phase, conv, ...)

Find the locations of the 4 major events in the convolved data.

fold_and_bin_data(time, flux, period, epoch, ...)

Fold data, then bin it up.

mark_events(results)

Mark events.

mark_false_alarm_threshold(results)

Mark false alarm threshold.

mark_phase_range(phase_days, i0, gap_width_days)

Mark phase range.

plot_modshift(phase, period_days, flux, ...)

Plot modshift results.

exovetter.odd_even Module

Simple average-based odd/even vetter.

Functions

calc_odd_even(time, flux, period, epoch, ...)

Simple odd/even vetter.

calc_ratio_significance(odd, even)

Calculate ratio significance between odd and even.

calc_diff_significance(odd, even)

Calculate difference significance between odd and even.

avg_odd_even(phases, flux, duration[, ...])

Simple average-based odd/even vetter.

exovetter.sweet Module

Module to handle SWEET vetter.

Functions

sweet(time, flux, period, epoch, duration[, ...])

Perform the SWEET test.

exovetter.transit_coverage Module

Module to handle transit coverage calculations.

Functions

calc_coverage(time, p_day, epoch, dur_hour)

Calculate the fraction of the in-transit points that contain data.

compute_phases(time, period, epoch[, offset])

Calculate phases.

Data Structure: Tce Class

exovetter.tce Module

Module to handle Threshold Crossing Event (TCE).

This module constains a Tce class, which stores the measured properties (orbital period, transit depth, etc.) of a proposed transit.

To create model transits from a Tce, see the exovetter.model module. For example, you can obtain flux from a boxcar model using create_box_model_for_tce().

Examples

Define a TCE in BKJD:

>>> from astropy import units as u
>>> from exovetter import const as exo_const
>>> from exovetter.model import create_box_model_for_tce
>>> from exovetter.tce import Tce
>>> period = 5.3 * u.day
>>> epoch = 133.4 * u.day
>>> depth = 1 * exo_const.ppm
>>> duration = 24 * u.hr
>>> my_tce = Tce(period=period, epoch=epoch, epoch_offset=exo_const.bkjd,
...              depth=depth, duration=duration, comment='test')
>>> my_tce
{'period': <Quantity 5.3 d>,
 'epoch': <Quantity 133.4 d>,
 'epoch_offset': <Quantity -2454833. d>,
 'depth': <Quantity 1.e-06>,
 'duration': <Quantity 24. h>,
 'comment': 'test'}

Retrieve the epoch of the transit in BJD:

>>> epoch_bjd = my_tce.get_epoch(exo_const.bjd)
>>> epoch_bjd
<Quantity 2454966.4 d>

Calculate flux from boxcar model:

>>> times = [134, 135, 136] * u.d
>>> create_box_model_for_tce(my_tce, times, epoch_bjd)
<Quantity [ 0.e+00, -1.e-06,  0.e+00]>

Classes

Tce(*args, **kwargs)

Class to handle Threshold Crossing Event (TCE).