avocado.Augmentor

class avocado.Augmentor(**cosmology_kwargs)

Class used to augment a dataset.

This class takes AstronomicalObject instances as input and generates new AstronomicalObject instances with the following transformations applied:

  • Drop random observations.
  • Drop large blocks of observations.
  • For galactic observations, adjust the brightness (= distance).
  • For extragalactic observations, adjust the redshift.
  • Add noise.

When changing the redshift, we use the host_specz measurement as the redshift of the reference object. While in simulations we might know the true redshift, that isn’t the case for real experiments.

The augmentor needs to have some reasonable idea of the properties of the survey that it is being applied to. If there is a large dataset that the classifier will be used on, then that dataset can be used directly to estimate the properties of the survey.

This class needs to be subclassed to implement survey specific methods. These methods are:

Parameters:cosmology_kwargs (kwargs (optional)) – Optional parameters to modify the cosmology assumed in the augmentation procedure. These kwargs will be passed to astropy.cosmology.FlatLambdaCDM.
__init__(**cosmology_kwargs)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(**cosmology_kwargs) Initialize self.
augment_dataset(augment_name, dataset, …) Generate augmented versions of all objects in a dataset.
augment_object(reference_object[, force_success]) Generate an augmented version of an object.