astronomaly.data_management package

Submodules

astronomaly.data_management.image_reader module

astronomaly.data_management.light_curve_reader module

class astronomaly.data_management.light_curve_reader.LightCurveDataset(data_dict, header_nrows=1, delim_whitespace=False, max_gap=50, plot_errors=True, convert_flux=False, mag_ref=22, split_lightcurves=False, filter_colors=['#9467bd', '#1f77b4', '#2ca02c', '#d62728', '#ff7f0e', '#8c564b'], filter_labels=[], which_filters=[], plot_column='flux', **kwargs)

Bases: astronomaly.base.base_dataset.Dataset

get_display_data(idx)

Returns a single instance of the dataset in a form that is ready to be displayed by the web front end.

Parameters:idx (str) – Index (should be a string to avoid ambiguity)
Returns:json-compatible dictionary of the light curve data
Return type:dict
get_sample(idx)

Returns a single instance of the dataset given an index.

Parameters:idx (str) – Index (should be a string to avoid ambiguity)
Raises:NotImplementedError – This function must be implemented when the base class is inherited.
astronomaly.data_management.light_curve_reader.convert_flux_to_mag(lcs, mag_ref)

Converts flux to mags for a given light curve data.

Parameters:
  • lcs (pd.DataFrame) – Light curve
  • mag_ref (float) – Reference magnitude
astronomaly.data_management.light_curve_reader.split_lc(lc_data, max_gap)

Splits the light curves into smaller chunks based on their gaps. This is useful for long light curves that span many observing seasons so have large gaps that can sometimes interfere with feature extraction.

Parameters:
  • lc_data (pd.Dataframe) – Light curves
  • max_gap (int) – Maximum gap between observations
Returns:

Split light curves

Return type:

pd.DataFrame

astronomaly.data_management.raw_features module

class astronomaly.data_management.raw_features.RawFeatures(**kwargs)

Bases: astronomaly.base.base_dataset.Dataset

get_display_data(idx)

Returns data as a dictionary for web display

get_sample(idx)

Returns a particular instance given an index string.

Module contents