MicroLIA.quality_check

Created on Thu Jun 28 20:30:11 2018

@author: danielgodinez

Module Contents

Functions

test_microlensing(timestamps, microlensing_mag, ...[, n])

Test to ensure proper microlensing signal.

test_cv(timestamps, outburst_start_times, ...[, n1, n2])

Test to ensure proper CV signal.

MicroLIA.quality_check.test_microlensing(timestamps, microlensing_mag, magerr, baseline, u_0, t_0, t_e, blend_ratio, n=7)[source]

Test to ensure proper microlensing signal. This requires 7 measurements with a magnification of at least 1.34, imposing additional magnification thresholds to ensure the microlensing signal doesn’t mimic a noisy constant.

Parameters:

timestampsarray

Times at which to simulate the lightcurve.

microlensing_magarray

Microlensing simulated magnitudes given the timestamps.

magerrarray

Photometric error for each mag measurement.

baselinefloat

Baseline magnitude of the event.

u_0float

The source minimum impact parameter.

t_0float

The time of maximum magnification.

t_Efloat

The timescale of the event in days.

blend_ratiofloat

The blending coefficient.

nint, optional

The mininum number of measurements that should be within the microlensing signal when simulating the lightcurves.

Returns:

bool

Returns True if microlensing passes the quality test.

MicroLIA.quality_check.test_cv(timestamps, outburst_start_times, outburst_end_times, end_rise_times, end_high_times, n1=7, n2=1)[source]

Test to ensure proper CV signal. This requires 7 measurements within ANY outburst, with at least one occurring within the rise or fall.

Parameters:

timestampsarray

Times at which to simulate the lightcurve.

outburst_start_timesarray

The start time of each outburst.

outburst_end_timesarray

The end time of each outburst.

end_rise_timesarray

The end time of each rise (start time of max amplitude).

end_high_timesarray

The end time of each peak (end time of max amplitude).

n1int, optional

The mininum number of measurements that should be within at least one outburst, defaults to 7.

n2int, optional

The mininum number of measurements that should be within the rise or drop of at least one outburst, defaults to 1.

Returns:

bool

Returns True if CV passes the quality test.