Observational input (CSV)

AMPy ingests observational data from a single CSV file. This file is the authoritative source for the dataset used during modeling and inference.

The input format is designed to be flexible while remaining explicit and machine-readable: each measurement is represented by a row, and the meaning of each row is determined by its declared data type.

Row types

AMPy is capable of modeling three types of measurements, each of which are specified via the ValueType column.

SpectralFlux

A flux density measurement at a single observing frequency.

IntegratedFlux

A measurement integrated over a frequency/energy band. This row type typically specifies a lower and upper bound for the integration range along with the integrated flux value.

SpectralIndex

An observed spectral index (e.g., from an X-ray spectral fit).

Column reference

This section documents the core columns used to define observational measurements in the input CSV file. All values are parsed and internally converted to a consistent unit system when modeling using astropy.units.

Units and internal consistency

All Units columns are parsed using Astropy’s unit system. As a result:

  • Unit strings must correspond to valid Astropy units

  • Values are converted internally to consistent units before modeling

  • Users are free to mix units across rows and data types

This design prioritizes flexibility while maintaining physical correctness and numerical consistency.

Grouping columns

AMPy supports several optional grouping and control columns that allow users to associate subsets of the data with specific modeling or plotting behavior. These columns are designed to support flexible, reproducible workflows.

Band

Band or filter identifier associated with the observation.

This column is:

  • Used for plotting only

  • Not used during modeling or inference

AMPy uses the Band column to group and color-code data when generating light curves and other visualizations. The supported values, and their associated colors, are described in API reference.

CalGroup

Calibration grouping label.

This column defines subsets of the data that share a common calibration offset. Rows with the same CalGroup value are assigned the same calibration parameter during modeling. Typical use cases include filter-dependent calibration uncertainties.

Behavior:

  • Rows with the same non-null CalGroup value share a calibration offset

  • Rows with a blank or missing CalGroup are not modeled with a calibration offset

  • The specific calibration model is defined by the corresponding plugin

The value may be any string; only equality between rows matters.

HostGroup

HostGalaxy grouping label.

This column defines subsets of the data that share a common host galaxy contribution. Rows with the same HostGroup value are assigned the same host galaxy parameter during modeling.

SlopGroup

Slop (extra variance) grouping label.

Slop is used to model unaccounted-for variance in the likelihood (e.g., an additional term in the chi-squared calculation). This column allows different subsets of the data to have independent slop parameters.

Behavior:

  • Rows with the same SlopGroup value share the same slop parameter

  • If the SlopGroup column is present, slop is modeled per group

  • If the SlopGroup column is absent, AMPy models a single global slop across the entire dataset

As with CalGroup, the specific slop model is defined by the corresponding plugin.

Include

Model inclusion flag.

This column controls whether a given data point is included in the inference. This column is intended to support exploratory workflows by allowing users to temporarily exclude data points without deleting or modifying the underlying dataset.

Accepted values:

  • 1 — include the data point in modeling

  • 0 — exclude the data point from modeling

Behavior:

  • If the Include column is absent, all data points are included

  • Excluded data points (Include = 0) are plotted in a muted or greyed-out style to indicate that they were not used during inference

See also