src.superphot_plus.data_generation.alerce

This script provides functions for importing and manipulating ZTF data from the Alerce API.

Module Contents

Functions

add_stamp_column(input_filename, output_filename)

Checks whether stamp classifier categorizes each lightcurve in

get_all_unclassified_samples(save_csv)

Get all unclassified samples and save them to a CSV file.

generate_flux_files(master_csv, save_folder)

Generates flux files for all ZTF samples in the master CSV file,

generate_single_flux_file(ztf_name, save_folder)

Generates a flux file for a single ZTF sample in the master CSV

Attributes

alerce

MIN_PER_FILTER

alerce[source]
MIN_PER_FILTER = 5[source]
add_stamp_column(input_filename, output_filename)[source]

Checks whether stamp classifier categorizes each lightcurve in spreadsheet as a supernova-like transient, and adds as additional column.

Parameters:
  • input_filename (str) – Path to the input CSV file.

  • output_filename (str) – Path to the output CSV file.

get_all_unclassified_samples(save_csv)[source]

Get all unclassified samples and save them to a CSV file.

Parameters:

save_csv (str) – Path to the output CSV file.

generate_flux_files(master_csv, save_folder)[source]

Generates flux files for all ZTF samples in the master CSV file, using ALeRCE’s API.

Parameters:
  • master_csv (str) – Path to the master CSV file.

  • save_folder (str) – Path to the folder where the flux files will be saved.

generate_single_flux_file(ztf_name, save_folder)[source]

Generates a flux file for a single ZTF sample in the master CSV file, using ALeRCE’s API.

Parameters:
  • ztf_name (str) – Name of the ZTF sample.

  • save_folder (str) – Path to the folder where the flux file will be saved.