astra.contrib.thecannon.tasks.base

Module Contents

Classes

TheCannonMixin A mixin class all tasks related to The Cannon.

Functions

read_training_set(path, default_inverse_variance=1000000.0) Read a training set from disk.
class astra.contrib.thecannon.tasks.base.TheCannonMixin

A mixin class all tasks related to The Cannon.

Parameters:
  • label_names – A list of label names.
  • order – (optional) The polynomial order to use for this model (default: 2).
task_namespace = TheCannon
label_names
order
astra.contrib.thecannon.tasks.base.read_training_set(path, default_inverse_variance=1000000.0)

Read a training set from disk.

The path should refer to a disk location that is a pickle file storing a dictionary that contains the following keys:

  • wavelength: a P-length array containing the wavelengths of P pixels
  • flux: a (N, P) shape array containing pseudo-continuum-normalised fluxes for N stars
  • ivar: a (N, P) shape array containing inverse variances for the pseudo-continuum-normalised fluxes for N stars
  • labels: a (N, L) shape array containing L label values for N stars
  • label_names: a L-length tuple containing the names of the labels
Parameters:
  • path – The location of the training set on disk.
  • default_inverse_variance – (optional) The default inverse variance value to set, if no inverse variances values are found.