potpyri.primitives.calibration

Master bias, dark, and flat creation from pipeline file tables.

Orchestrates grouping by CalType and calling instrument-specific create_bias/create_dark/create_flat. Authors: Charlie Kilpatrick.

Functions

do_bias(file_table, tel, paths[, ...])

Build master bias frames from file_table; skip if instrument has no bias.

do_dark(file_table, tel, paths[, ...])

Build master dark frames from file_table; skip if instrument has no dark.

do_flat(file_table, tel, paths[, ...])

Build master flat frames from file_table; skip if instrument has no flat.

potpyri.primitives.calibration.do_bias(file_table, tel, paths, nmin_images=3, log=None)[source]

Build master bias frames from file_table; skip if instrument has no bias.

Parameters:
  • file_table (astropy.table.Table) – File list from sort_files (Type, CalType, File, Amp, Binning).

  • tel (Instrument) – Instrument instance (bias, match_type_keywords, create_bias, get_mbias_name).

  • paths (dict) – Paths dict from options.add_paths.

  • nmin_images (int, optional) – Minimum images per CalType to build master. Default is 3.

  • log (ColoredLogger, optional) – Logger for progress.

Returns:

Master bias FITS written to paths; exits if no bias and instrument requires it.

Return type:

None

potpyri.primitives.calibration.do_dark(file_table, tel, paths, nmin_images=3, log=None)[source]

Build master dark frames from file_table; skip if instrument has no dark.

Parameters:
  • file_table (astropy.table.Table) – File list from sort_files.

  • tel (Instrument) – Instrument instance (dark, bias, load_bias, create_dark, get_mdark_name).

  • paths (dict) – Paths dict from options.add_paths.

  • nmin_images (int, optional) – Minimum images per CalType to build master. Default is 3.

  • log (ColoredLogger, optional) – Logger for progress.

Returns:

Master dark FITS written to paths.

Return type:

None

potpyri.primitives.calibration.do_flat(file_table, tel, paths, nmin_images=3, log=None)[source]

Build master flat frames from file_table; skip if instrument has no flat.

Parameters:
  • file_table (astropy.table.Table) – File list from sort_files.

  • tel (Instrument) – Instrument instance (flat, match_type_keywords, create_flat, get_mflat_name).

  • paths (dict) – Paths dict from options.add_paths.

  • nmin_images (int, optional) – Minimum images per (filter, amp, binning) to build master. Default is 3.

  • log (ColoredLogger, optional) – Logger for progress.

Returns:

Master flat FITS written to paths.

Return type:

None