Data Validation (dataval.DataValidation)

Data Validation module for TASOC Pipeline.

Code author: Mikkel N. Lund <mikkelnl@phys.au.dk>

Code author: Rasmus Handberg <rasmush@phys.au.dk>

class dataval.DataValidation(todo_file, output_folder=None, corr=False, validate=True, colorbysector=False, ext='png', showplots=False, sysnoise=5.0)[source]

Bases: object

__init__(todo_file, output_folder=None, corr=False, validate=True, colorbysector=False, ext='png', showplots=False, sysnoise=5.0)[source]

Initialize DataValidation object.

Parameters:
  • todo_file (str) – TODO-file or directory to load from.

  • output_folder (str) – Directory in which to place output.

  • corr (bool) – Include corrected data checks. Default is False.

  • validate (bool) – Save validation in TODO-file. Default is True.

  • colorbysector (bool) – Color relevant plots by sector instead of the defaults.

  • ext (str) – File-extension of plots. Default is 'png'.

  • showplots (bool) – Show plots? Defaults is False.

  • sysnoise (float) – Systematic noise level for noise model. Default is 5 ppm/hr.

Code author: Rasmus Handberg <rasmush@phys.au.dk>

basic(errors_ratio_warn=0.05, errors_ratio_err=0.1)[source]

Perform basic checks of the TODO-file and the lightcurve files.

Parameters:
  • errors_ratio_warn (float, optional) – Fraction of ERRORs to OK and WARNINGs to warn about. Default=5%.

  • errors_ratio_err (float, optional) – Fraction of ERRORs to OK and WARNINGs to throw error about. Default=10%.

Code author: Rasmus Handberg <rasmush@phys.au.dk>

calctime()[source]
calctime_corrections()[source]
camera_overlap()[source]
cleanup()[source]
close()[source]

Close DataValidation object and all associated objects.

contam()[source]
haloswitch()[source]
mag2flux()[source]
mag_dist()[source]
noise_metrics()[source]
pixinaperture()[source]
search_database(select=None, search=None, order_by=None, limit=None, distinct=False, joins=None)[source]

Search list of lightcurves and return a list of tasks/stars matching the given criteria.

Parameters:
  • search (list of strings or None) – Conditions to apply to the selection of stars from the database.

  • order_by (list, string or None) – Column to order the database output by.

  • limit (int or None) – Maximum number of rows to retrieve from the database. If limit is None, all the rows are retrieved.

  • distinct (boolean) – Boolean indicating if the query should return unique elements only.

Returns:

Returns all stars retrieved by the call to the database as dicts/tasks that can be consumed directly by load_lightcurve

Return type:

list of dicts

Code author: Rasmus Handberg <rasmush@phys.au.dk>

stampsize()[source]
update_dataval(priorities, values)[source]

Update data validation table in database.

Parameters:
  • priorities (array) – Array of priorities.

  • values (array) – Array of data validation flags to be assigned each corresponding priority.

Code author: Rasmus Handberg <rasmush@phys.au.dk>

validate()[source]

Run all validations and write out summary.

Code author: Rasmus Handberg <rasmush@phys.au.dk>

waittime()[source]
property logcounts
property random_state