DL3 Data Products#

Examples of using Product for DL3 (science-ready) data product metadata.

import json
import textwrap
import uuid
from pathlib import Path

import ctao_datamodel as dm
import ctao_datamodel.models.dataproducts as dp
import numpy as np
import yaml
from astropy import units as u
from astropy.coordinates import AltAz, EarthLocation, SkyCoord
from astropy.table import Table
from astropy.time import Time
from astropydantic import AstroPydanticICRS, AstroPydanticQuantity, AstroPydanticTime
from IPython.display import HTML
EXAMPLES = []

Setup: some metadata common to all examples#

EXAMPLE_DISCLAIMER = """
DISCLAIMER: This data product was generated from simulations. When publishing any result
using it, please cite the CTAO Science Data challenge...
""".replace(
    "\n", " "
)
TARGET_DIR = SkyCoord.from_name("Crab")
WOBBLE_OFFSET = 0.9 * u.deg
POINTING_DIR = SkyCoord(
    ra=TARGET_DIR.ra, dec=TARGET_DIR.dec + WOBBLE_OFFSET, frame=TARGET_DIR.frame
)
EPOCH = Time(0, format="mjd", scale="utc")  # MJD epoch
T_START = Time("2022-05-10T01:18:01.00")
T_STOP = Time("2022-05-10T01:28:01.00")
T_START_S = (Time("2022-05-10T01:18:01.00") - EPOCH).tai.to_value(u.s)
T_STOP_S = (Time("2022-05-10T01:18:01.00") - EPOCH + 30 * u.min).tai.to_value(u.s)
OBSERVING_NIGHT = "2022-05-09"  # can also be  datetime

# should use real CTAO North coords here, but for this example we can cheat:
LOCATION = EarthLocation.of_site("Roque de los Muchachos")

# for TrackingCoverage
DELTA_T = T_STOP - T_START
TIME_COVERAGE = T_START + np.arange(0, DELTA_T.sec, 1.0) * u.s
TARGET_ALTAZ = TARGET_DIR.transform_to(AltAz(obstime=TIME_COVERAGE, location=LOCATION))

# Some common things for all examples
OBSERVATION = dp.Observation(
    coverage=dp.Coverage(
        time=dp.TimeCoverage(
            reference=dp.TimeReference(
                position=dp.TimeRefPos.TOPOCENTER,  # if TOPOCENTER need also observation.location
                time_mjd=EPOCH.mjd,  # MJD reference at 0
                unit="s",
                system=dp.TimeSystem.TAI,
            ),
            # just some dummy times, here represented in seconds since the
            t_min=T_START_S,
            t_max=T_STOP_S,
        ),
        energy=dp.EnergyCoverage(energy_unit="TeV", energy_min=0.003, energy_max=270.0),
        space=dp.SpaceCoverage(
            ra=POINTING_DIR.ra.deg, dec=POINTING_DIR.dec.deg, field_of_view=6.0
        ),
        tracking=dp.TrackingCoverage(
            elevation_min=TARGET_ALTAZ.alt.min().deg,
            elevation_max=TARGET_ALTAZ.alt.max().deg,
            azimuth_mean=TARGET_ALTAZ.az.mean().deg,
            azimuth_range=0.5 * (TARGET_ALTAZ.az.max() - TARGET_ALTAZ.az.min()).deg,
            mode=dm.models.sciops.TrackingMode.FIXED_ICRS,
        ),
    ),
    location=dp.GeodeticEarthLocation(
        latitude=LOCATION.lat.deg,
        longitude=LOCATION.lon.deg,
        height=LOCATION.height.to_value("m"),
    ),
)
/usr/local/lib/python3.13/site-packages/erfa/core.py:133: ErfaWarning: ERFA function "utctai" yielded 1 of "dubious year (Note 3)"
  warn(f'ERFA function "{func_name}" yielded {wmsg}', ErfaWarning)
/usr/local/lib/python3.13/site-packages/erfa/core.py:133: ErfaWarning: ERFA function "dtf2d" yielded 1 of "dubious year (Note 6)"
  warn(f'ERFA function "{func_name}" yielded {wmsg}', ErfaWarning)

Examples of DL3/Event/Subarray/Observation#

From SDC#

This is for a simulated DL3 file created for a Science Data Challenge (SDC)

dl3_sdc = dp.Product(
    description="Simulated gamma-like events and IRFs.",
    creation_time=Time.now(),
    curation=dp.Curation(
        release="CTAO-Simulation/DL3-SDC1",  # note: recommendation
        reference="doi://reference/to/the/sdc/archive",
        license="cc-by-sa",
        license_url="https://creativecommons.org/licenses/by-sa/4.0/",
        copyright="CTAO ERIC",
        rights="public",
    ),
    disclaimer=EXAMPLE_DISCLAIMER,
    data=dp.ProductType(
        level=dp.DataLevel.DL3,
        division=dp.DataDivision.EVENT,
        association=dp.DataAssociation.SUBARRAY,
        type=dp.DataType.OBSERVATION_SIM,
    ),
    instance=dp.InstanceIdentifier(
        obs_id=1000012345,
        site_id=dm.models.common.SiteID.CTAO_NORTH,  # optional, as it is linked to the obs_id
        facility_name=dp.FacilityName.SIMULATED_CTAO, # this is simulated data, so need to be clear
        event_type="hires-soft",
    ),
    model=dp.DataModel(
        name="CTAO-GADF",
        version="v0.3",
        url="https://gamma-astro-data-formats.readthedocs.io/en/v0.3/",
    ),
    contact=dp.Contact(
        name="CTAO Science Data Challenge HelpDesk",
        email="sdc@ctao.org",
        organization="CTAO",
    ),
    activity=dp.Activity(
        process=dp.ObservatoryProcess.SCIENCE_DATA_CHALLENGE,
        configuration_id="eventdisplay-v1",  # this is the "data processing configuration", for SDC, not sure
        name="sdc-production",
        description="production of SDC data products",
        id="2accb086-068d-11f1-8a8d-acde48001122",
        start=Time("2025-11-28 13:45:12.62"),
        software=dp.Software(
            name="SDC_Simulator.py",
            version="UNRELEASED",
            url="https://gitlab.cta-observatory.org/cta-science/sdc/sdc-simulations",
        ),
        inputs=[
            dp.ExternalDataProduct(
                id="1fcade22-d04d-11f0-84af-acde48001122",
                uri="file:./irf_calibration.fits",
                role="IRF calibration coefficients",
            ),
            dp.ExternalDataProduct(
                id="1e6f6306-d050-11f0-8af5-acde48001122",
                uri="file:./other_input.fits",
                role="Some critical input",
            ),
        ],
    ),
    observation=OBSERVATION,
    sdc=dp.ScienceDataChallenge(nsb_conditions="bright"), # moonlight=bright, normal=dark
)
EXAMPLES.append(dl3_sdc)

From ACADA (Cat-A)#

This is a Cat-A (real-time) DL3 product from ACADA-SAG (Science Alert Generation pipeline)

dl3_acada_sag = dp.Product(
    description="DL3 Event Data Product from Realtime analysis (SAG)",
    creation_time=Time.now(),
    curation=dp.Curation(
        release="CTAO/DL3-Realtime-DR1",  # note: recommendation
        reference="doi://reference/to/release-info",
        license="cc-by-sa",
        license_url="https://creativecommons.org/licenses/by-sa/4.0/",
        copyright="CTAO ERIC",
        rights="public",
    ),
    disclaimer=(
        "This data product was produced with the Cat-A analysis, which is optimized "
        "for semi-realtime results but may have high systematic uncertainties. "
        "If a CatB or CatC product is available for the same OB, it should be used instead."
    ),
    data=dp.ProductType(
        level=dp.DataLevel.DL3,
        division=dp.DataDivision.EVENT,
        association=dp.DataAssociation.SUBARRAY,
        type=dp.DataType.OBSERVATION,
    ),
    instance=dp.InstanceIdentifier(
        obs_id=1000012345,
        site_id=dm.models.common.SiteID.CTAO_SOUTH,  # optional, as it is linked to the obs_id
        category=dp.DataProcessingCategory.A,
    ),
    model=dp.DataModel(
        name="CTAO-GADF",
        version="v0.3",
        url="https://gamma-astro-data-formats.readthedocs.io/en/v0.3/",
    ),
    contact=dp.Contact(
        name="CTAO HelpDesk",
        email="help@ctao.org",
        organization="CTAO",
    ),
    activity=dp.Activity(
        process=dp.ObservatoryProcess.DATA_PROCESSING,
        configuration_id="sag-standard",  # this is the "data processing configuration"
        name="sag-reco",
        description="realtime reconstruction and IRF generation",
        id="225c364c-068d-11f1-8a8d-acde48001122",
        start=Time("2025-11-28 13:45:12.62"),
        software=dp.Software(
            name="acada-sag-reco",
            version="v2.0.1",
            url="https://gitlab.cta-observatory.org/cta-computing/acada/sag/sag-reconstruction",
        ),
        inputs=[
            dp.ExternalDataProduct(
                id="1fcade22-d04d-11f0-84af-acde48001122",
                uri="lfn://dpps/datapipe/models/v7/gammaness_model.pkl",
                role="gammaness reconstruction model",
            ),
            dp.ExternalDataProduct(
                id="AA214079-1D3E-4BB0-9B30-F2BDB72094B3",
                uri="lfn://dpps/datapipe/models/v7/energy_model.pkl",
                role="energy reconstruction model",
            ),
        ],
    ),
    observation=OBSERVATION,
    acquisition=dp.Acquisition(sb_id=102934192),
)
EXAMPLES.append(dl3_acada_sag)

From DPPS (Cat-B)#

dl3_acada_sag = dp.Product(
    description="DL3 Event Data Product from DPPS DataPipe, Cat-C",
    creation_time=Time.now(),
    curation=dp.Curation(
        release="CTAO/DL3-DR1",  # note: recommendation
        reference="doi://reference/to/release-info",
        license="cc-by-sa",
        license_url="https://creativecommons.org/licenses/by-sa/4.0/",
        copyright="CTAO ERIC",
        rights="public",
    ),
    disclaimer=(
        "This data product was produced with the Cat-A analysis, which is optimized "
        "for semi-realtime results but may have high systematic uncertainties. "
        "If a CatB or CatC product is available for the same OB, it should be used instead."
    ),
    data=dp.ProductType(
        level=dp.DataLevel.DL3,
        division=dp.DataDivision.EVENT,
        association=dp.DataAssociation.SUBARRAY,
        type=dp.DataType.OBSERVATION,
    ),
    instance=dp.InstanceIdentifier(
        obs_id=1000012345,
        site_id=dm.models.common.SiteID.CTAO_SOUTH,  # optional, as it is linked to the obs_id
        category=dp.DataProcessingCategory.A,
        observing_night=OBSERVING_NIGHT,
    ),
    model=dp.DataModel(
        name="CTAO-GADF",
        version="v0.3",
        url="https://gamma-astro-data-formats.readthedocs.io/en/v0.3/",
    ),
    contact=dp.Contact(
        name="CTAO HelpDesk",
        email="help@ctao.org",
        organization="CTAO",
    ),
    activity=dp.Activity(
        process=dp.ObservatoryProcess.DATA_PROCESSING,
        configuration_id="standard-hillas-v3.1",  # this is the "data processing configuration"
        name="process-ob.cwl",
        description="data processing pipeline",
        id="225c364c-068d-11f1-8a8d-acde48001122",
        start=Time("2025-11-28 13:45:12.62"),
        software=dp.Software(
            name="ctao-dpps-datapipe",
            version="v1.1.2",
            url="https://gitlab.cta-observatory.org/cta-computing/dpps/datapipe",
        ),
        inputs=[
            dp.ExternalDataProduct(
                id="1fcade22-d04d-11f0-84af-acde48001122",
                uri="lfn://dpps/datapipe/models/v7/gammaness_model.pkl",
                role="gammaness reconstruction model",
            ),
            dp.ExternalDataProduct(
                id="AA214079-1D3E-4BB0-9B30-F2BDB72094B3",
                uri="lfn://dpps/datapipe/models/v7/energy_model.pkl",
                role="energy reconstruction model",
            ),
        ],
    ),
    observation=OBSERVATION,
    acquisition=dp.Acquisition(sb_id=102934192),
)
EXAMPLES.append(dl3_acada_sag)

Output in flattened JSON format#

import json

for example in EXAMPLES:
    flat = dm.flatten_model_instance(example)
    print(f"====== {example.data} =======")
    print()
    print(json.dumps(dm.flatten_model_instance(example), indent=2))
    print()
====== DL3/Event/Subarray/ObservationSim =======

{
  "ctao_metadata_version": "1.0.1.dev4+g2af9abbfb",
  "description": "Simulated gamma-like events and IRFs.",
  "data.level": "DL3",
  "data.division": "Event",
  "data.association": "Subarray",
  "data.type": "ObservationSim",
  "instance.id": "9b0de431-3dde-4ca2-8e82-a664476b931e",
  "instance.obs_id": 1000012345,
  "instance.event_type": "hires-soft",
  "instance.facility_name": "Simulated-CTAO",
  "instance.site_id": "CTAO-North",
  "curation.release": "CTAO-Simulation/DL3-SDC1",
  "curation.reference": "doi://reference/to/the/sdc/archive",
  "curation.license": "cc-by-sa",
  "curation.license_url": "https://creativecommons.org/licenses/by-sa/4.0/",
  "curation.copyright": "CTAO ERIC",
  "curation.rights": "public",
  "model.name": "CTAO-GADF",
  "model.version": "v0.3",
  "model.url": "https://gamma-astro-data-formats.readthedocs.io/en/v0.3/",
  "disclaimer": " DISCLAIMER: This data product was generated from simulations. When publishing any result using it, please cite the CTAO Science Data challenge... ",
  "creation_time": "2026-04-16T10:05:01.885159000",
  "contact.name": "CTAO Science Data Challenge HelpDesk",
  "contact.organization": "CTAO",
  "contact.email": "sdc@ctao.org",
  "activity.process": "science_data_challenge",
  "activity.name": "sdc-production",
  "activity.description": "production of SDC data products",
  "activity.id": "2accb086-068d-11f1-8a8d-acde48001122",
  "activity.start": "2025-11-28T13:45:12.620000000",
  "activity.software.name": "SDC_Simulator.py",
  "activity.software.version": "UNRELEASED",
  "activity.software.url": "https://gitlab.cta-observatory.org/cta-science/sdc/sdc-simulations",
  "activity.configuration_id": "eventdisplay-v1",
  "activity.inputs.0.uri": "file:///irf_calibration.fits",
  "activity.inputs.0.role": "IRF calibration coefficients",
  "activity.inputs.0.id": "1fcade22-d04d-11f0-84af-acde48001122",
  "activity.inputs.1.uri": "file:///other_input.fits",
  "activity.inputs.1.role": "Some critical input",
  "activity.inputs.1.id": "1e6f6306-d050-11f0-8af5-acde48001122",
  "observation.coverage.time.reference.position": "TOPOCENTER",
  "observation.coverage.time.reference.unit": "s",
  "observation.coverage.time.reference.system": "tai",
  "observation.coverage.time.t_min": 5158862318.0,
  "observation.coverage.time.t_max": 5158864118.0,
  "observation.coverage.space.frame": "ICRS",
  "observation.coverage.space.ra": 83.6324,
  "observation.coverage.space.dec": 22.917399999999997,
  "observation.coverage.space.field_of_view": 6.0,
  "observation.coverage.energy.energy_unit": "TeV",
  "observation.coverage.energy.energy_min": 0.003,
  "observation.coverage.energy.energy_max": 270.0,
  "observation.coverage.tracking.elevation_min": -30.573454373136034,
  "observation.coverage.tracking.elevation_max": -29.28662285733611,
  "observation.coverage.tracking.azimuth_mean": 324.0862581358564,
  "observation.coverage.tracking.azimuth_range": 1.1137201189470147,
  "observation.coverage.tracking.mode": "fixed_icrs",
  "observation.location.longitude": -17.879999999999995,
  "observation.location.latitude": 28.758333333333336,
  "observation.location.height": 2326.999999998442,
  "sdc.nsb_conditions": "bright"
}

====== DL3/Event/Subarray/Observation =======

{
  "ctao_metadata_version": "1.0.1.dev4+g2af9abbfb",
  "description": "DL3 Event Data Product from Realtime analysis (SAG)",
  "data.level": "DL3",
  "data.division": "Event",
  "data.association": "Subarray",
  "data.type": "Observation",
  "instance.id": "4f1f435e-d583-48ba-8dfb-729e2e697fa7",
  "instance.obs_id": 1000012345,
  "instance.facility_name": "CTAO",
  "instance.site_id": "CTAO-South",
  "instance.category": "A",
  "curation.release": "CTAO/DL3-Realtime-DR1",
  "curation.reference": "doi://reference/to/release-info",
  "curation.license": "cc-by-sa",
  "curation.license_url": "https://creativecommons.org/licenses/by-sa/4.0/",
  "curation.copyright": "CTAO ERIC",
  "curation.rights": "public",
  "model.name": "CTAO-GADF",
  "model.version": "v0.3",
  "model.url": "https://gamma-astro-data-formats.readthedocs.io/en/v0.3/",
  "disclaimer": "This data product was produced with the Cat-A analysis, which is optimized for semi-realtime results but may have high systematic uncertainties. If a CatB or CatC product is available for the same OB, it should be used instead.",
  "creation_time": "2026-04-16T10:05:01.918571000",
  "contact.name": "CTAO HelpDesk",
  "contact.organization": "CTAO",
  "contact.email": "help@ctao.org",
  "activity.process": "data_processing",
  "activity.name": "sag-reco",
  "activity.description": "realtime reconstruction and IRF generation",
  "activity.id": "225c364c-068d-11f1-8a8d-acde48001122",
  "activity.start": "2025-11-28T13:45:12.620000000",
  "activity.software.name": "acada-sag-reco",
  "activity.software.version": "v2.0.1",
  "activity.software.url": "https://gitlab.cta-observatory.org/cta-computing/acada/sag/sag-reconstruction",
  "activity.configuration_id": "sag-standard",
  "activity.inputs.0.uri": "lfn://dpps/datapipe/models/v7/gammaness_model.pkl",
  "activity.inputs.0.role": "gammaness reconstruction model",
  "activity.inputs.0.id": "1fcade22-d04d-11f0-84af-acde48001122",
  "activity.inputs.1.uri": "lfn://dpps/datapipe/models/v7/energy_model.pkl",
  "activity.inputs.1.role": "energy reconstruction model",
  "activity.inputs.1.id": "aa214079-1d3e-4bb0-9b30-f2bdb72094b3",
  "observation.coverage.time.reference.position": "TOPOCENTER",
  "observation.coverage.time.reference.unit": "s",
  "observation.coverage.time.reference.system": "tai",
  "observation.coverage.time.t_min": 5158862318.0,
  "observation.coverage.time.t_max": 5158864118.0,
  "observation.coverage.space.frame": "ICRS",
  "observation.coverage.space.ra": 83.6324,
  "observation.coverage.space.dec": 22.917399999999997,
  "observation.coverage.space.field_of_view": 6.0,
  "observation.coverage.energy.energy_unit": "TeV",
  "observation.coverage.energy.energy_min": 0.003,
  "observation.coverage.energy.energy_max": 270.0,
  "observation.coverage.tracking.elevation_min": -30.573454373136034,
  "observation.coverage.tracking.elevation_max": -29.28662285733611,
  "observation.coverage.tracking.azimuth_mean": 324.0862581358564,
  "observation.coverage.tracking.azimuth_range": 1.1137201189470147,
  "observation.coverage.tracking.mode": "fixed_icrs",
  "observation.location.longitude": -17.879999999999995,
  "observation.location.latitude": 28.758333333333336,
  "observation.location.height": 2326.999999998442,
  "acquisition.sb_id": 102934192
}

====== DL3/Event/Subarray/Observation =======

{
  "ctao_metadata_version": "1.0.1.dev4+g2af9abbfb",
  "description": "DL3 Event Data Product from DPPS DataPipe, Cat-C",
  "data.level": "DL3",
  "data.division": "Event",
  "data.association": "Subarray",
  "data.type": "Observation",
  "instance.id": "fca03dc2-32f5-4122-aea8-3b8248e80db9",
  "instance.obs_id": 1000012345,
  "instance.observing_night": "2022-05-09",
  "instance.facility_name": "CTAO",
  "instance.site_id": "CTAO-South",
  "instance.category": "A",
  "curation.release": "CTAO/DL3-DR1",
  "curation.reference": "doi://reference/to/release-info",
  "curation.license": "cc-by-sa",
  "curation.license_url": "https://creativecommons.org/licenses/by-sa/4.0/",
  "curation.copyright": "CTAO ERIC",
  "curation.rights": "public",
  "model.name": "CTAO-GADF",
  "model.version": "v0.3",
  "model.url": "https://gamma-astro-data-formats.readthedocs.io/en/v0.3/",
  "disclaimer": "This data product was produced with the Cat-A analysis, which is optimized for semi-realtime results but may have high systematic uncertainties. If a CatB or CatC product is available for the same OB, it should be used instead.",
  "creation_time": "2026-04-16T10:05:01.925499000",
  "contact.name": "CTAO HelpDesk",
  "contact.organization": "CTAO",
  "contact.email": "help@ctao.org",
  "activity.process": "data_processing",
  "activity.name": "process-ob.cwl",
  "activity.description": "data processing pipeline",
  "activity.id": "225c364c-068d-11f1-8a8d-acde48001122",
  "activity.start": "2025-11-28T13:45:12.620000000",
  "activity.software.name": "ctao-dpps-datapipe",
  "activity.software.version": "v1.1.2",
  "activity.software.url": "https://gitlab.cta-observatory.org/cta-computing/dpps/datapipe",
  "activity.configuration_id": "standard-hillas-v3.1",
  "activity.inputs.0.uri": "lfn://dpps/datapipe/models/v7/gammaness_model.pkl",
  "activity.inputs.0.role": "gammaness reconstruction model",
  "activity.inputs.0.id": "1fcade22-d04d-11f0-84af-acde48001122",
  "activity.inputs.1.uri": "lfn://dpps/datapipe/models/v7/energy_model.pkl",
  "activity.inputs.1.role": "energy reconstruction model",
  "activity.inputs.1.id": "aa214079-1d3e-4bb0-9b30-f2bdb72094b3",
  "observation.coverage.time.reference.position": "TOPOCENTER",
  "observation.coverage.time.reference.unit": "s",
  "observation.coverage.time.reference.system": "tai",
  "observation.coverage.time.t_min": 5158862318.0,
  "observation.coverage.time.t_max": 5158864118.0,
  "observation.coverage.space.frame": "ICRS",
  "observation.coverage.space.ra": 83.6324,
  "observation.coverage.space.dec": 22.917399999999997,
  "observation.coverage.space.field_of_view": 6.0,
  "observation.coverage.energy.energy_unit": "TeV",
  "observation.coverage.energy.energy_min": 0.003,
  "observation.coverage.energy.energy_max": 270.0,
  "observation.coverage.tracking.elevation_min": -30.573454373136034,
  "observation.coverage.tracking.elevation_max": -29.28662285733611,
  "observation.coverage.tracking.azimuth_mean": 324.0862581358564,
  "observation.coverage.tracking.azimuth_range": 1.1137201189470147,
  "observation.coverage.tracking.mode": "fixed_icrs",
  "observation.location.longitude": -17.879999999999995,
  "observation.location.latitude": 28.758333333333336,
  "observation.location.height": 2326.999999998442,
  "acquisition.sb_id": 102934192
}

Output as FITS Headers#

for ii, example in enumerate(EXAMPLES):
    header = dm.instance_to_fits_header(example)
    print("=" * 70)
    print(f"Example {ii}: {example.data} ({len(header)} keys)")
    print(
        textwrap.fill(
            example.description, initial_indent="    ", subsequent_indent="   "
        )
    )
    print("=" * 70)

    print()
    print(repr(header))
    print()
======================================================================
Example 0: DL3/Event/Subarray/ObservationSim (61 keys)
    Simulated gamma-like events and IRFs.
======================================================================

CTAOMETA= '1.0.1.dev4+g2af9abbfb' / CTAO DataProducts Metadata Version          
TITLE   = 'Simulated gamma-like events and IRFs.' / Human-readable description o
DATALEVL= 'DL3     '           / CTAO Data Level, see Top-Level Data Model. Opti
DATADIV = 'Event   '           / Primary data type.  See the CTAO Top-level Data
DATAASSO= 'Subarray'           / The main associated instrument or analysis part
DATATYPE= 'ObservationSim'     / The specific type of the product.  This is used
DATAID  = '9b0de431-3dde-4ca2-8e82-a664476b931e' / A locally-generated unique ID
OBS_ID  =           1000012345 / Unique identifier of the observation block, in 
EVTYPE  = 'hires-soft'         / For DL3+ data products that are associated with
TELESCOP= 'Simulated-CTAO'     / Observatory or facility used to collect the dat
INSTRUME= 'CTAO-North'         / CTAO site associated with this instance.       
RELEASE = 'CTAO-Simulation/DL3-SDC1' / Name of the data release (data collection
REFERENC= 'doi://reference/to/the/sdc/archive' / a reference to where the data p
LICENSE = 'cc-by-sa'           / License for this data product                  
LICENURL= 'https://creativecommons.org/licenses/by-sa/4.0/' / URL pointing to th
COPYRIGH= 'CTAO ERIC'          / Copyright holder(s) of this data product       
RIGHTS  = 'public  '           / Availability of the data product, if known at t
MODEL   = 'CTAO-GADF'          / Name of the overall data model, which may conta
MODELVER= 'v0.3    '           / Version number of the data model               
MODELURL= 'https://gamma-astro-data-formats.readthedocs.io/en/v0.3/' / URL or DO
COMMENT  DISCLAIMER: This data product was generated from simulations. When publ
COMMENT ishing any result using it, please cite the CTAO Science Data challenge.
COMMENT ..                                                                      
CREATED = '2026-04-16T10:05:01.885159000' / UTC Date-time the data product was c
AUTHOR  = 'CTAO Science Data Challenge HelpDesk' / Contact name for this data pr
ORIGIN  = 'CTAO    '           / Contact organization name of this data product.
EMAIL   = 'sdc@ctao.org'       / Contact's email address                        
ACTPROC = 'science_data_challenge' / Observatory operational Process.  These are
ACTIVITY= 'sdc-production'     / Name of the activity that produced this data pr
ACTDESC = 'production of SDC data products' / Human-readable details of the acti
ACTID   = '2accb086-068d-11f1-8a8d-acde48001122' / Unique identifier of this pro
ACTSTART= '2025-11-28T13:45:12.620000000' / Start time of the activity          
SOFTWARE= 'SDC_Simulator.py'   / Descriptive name of the software.              
SOFTVER = 'UNRELEASED'         / Version number                                 
SOFTURL = 'https://gitlab.cta-observatory.org/cta-science/sdc/sdc-simulations' /
ANAMODE = 'eventdisplay-v1'    / Identifier for the configuration for the softwa
HIERARCH CTAO ACTIVITY INPUTS 0 URI = 'file:///irf_calibration.fits' / URI of th
HIERARCH CTAO ACTIVITY INPUTS 0 ROLE = 'IRF calibration coefficients' / context 
HIERARCH CTAO ACTIVITY INPUTS 0 ID = '1fcade22-d04d-11f0-84af-acde48001122' / Un
HIERARCH CTAO ACTIVITY INPUTS 1 URI = 'file:///other_input.fits' / URI of the da
HIERARCH CTAO ACTIVITY INPUTS 1 ROLE = 'Some critical input' / context of the da
HIERARCH CTAO ACTIVITY INPUTS 1 ID = '1e6f6306-d050-11f0-8af5-acde48001122' / Un
TREFPOS = 'TOPOCENTER'         / Spatial location at which the observation time 
TIMEUNIT= 's       '                                                            
TIMESYS = 'tai     '           / The time scale of the time-related keywords.  F
TSTART  =         5158862318.0 / Start of time range of the data as either an IS
TSTOP   =         5158864118.0 / End of time range of the data, as either an ISO
RADESYS = 'ICRS    '           / Standard equatorial coordinate system used for 
RA_PNT  =              83.6324 / [deg] ICRS Right ascension of the center of the
DEC_PNT =   22.917399999999997 / [deg] ICRS Declination of the center of the reg
FOV     =                  6.0 / [deg] Approximate diameter (not radius) of the 
EUNIT   = 'TeV     '           / Unit for all energy metadata.                  
EMIN    =                0.003 / [TeV] Approximate minimum energy of the dataset
EMAX    =                270.0 / [TeV] Approximate maximum energy of the dataset
ALT_MIN =  -30.573454373136034 / [deg] Minimum elevation above horizon of observ
ALT_MAX =   -29.28662285733611 / [deg] Maximum elevation above horizon of observ
AZ_MEAN =    324.0862581358564 / [deg] Mean azimith of observation.             
AZ_RANGE=   1.1137201189470147 / [deg] Full angular width of the observation in 
TRACKING= 'fixed_icrs'         / Coordinate system tracked by the nominal pointi
OBSGEO-L=  -17.879999999999995 / [deg] Longitude, with East positive.           
OBSGEO-B=   28.758333333333336 / [deg] Latitude, with North positive.           
OBSGEO-H=    2326.999999998442 / [m] Height above sea level                     
SDC_NSB = 'bright  '           / Simulated sky brightness level: dark (normal da

======================================================================
Example 1: DL3/Event/Subarray/Observation (61 keys)
    DL3 Event Data Product from Realtime analysis (SAG)
======================================================================

CTAOMETA= '1.0.1.dev4+g2af9abbfb' / CTAO DataProducts Metadata Version          
TITLE   = 'DL3 Event Data Product from Realtime analysis (SAG)' / Human-readable
DATALEVL= 'DL3     '           / CTAO Data Level, see Top-Level Data Model. Opti
DATADIV = 'Event   '           / Primary data type.  See the CTAO Top-level Data
DATAASSO= 'Subarray'           / The main associated instrument or analysis part
DATATYPE= 'Observation'        / The specific type of the product.  This is used
DATAID  = '4f1f435e-d583-48ba-8dfb-729e2e697fa7' / A locally-generated unique ID
OBS_ID  =           1000012345 / Unique identifier of the observation block, in 
TELESCOP= 'CTAO    '           / Observatory or facility used to collect the dat
INSTRUME= 'CTAO-South'         / CTAO site associated with this instance.       
HIERARCH CTAO INSTANCE CATEGORY = 'A       ' / Which data processing pipeline ca
RELEASE = 'CTAO/DL3-Realtime-DR1' / Name of the data release (data collection) t
REFERENC= 'doi://reference/to/release-info' / a reference to where the data prod
LICENSE = 'cc-by-sa'           / License for this data product                  
LICENURL= 'https://creativecommons.org/licenses/by-sa/4.0/' / URL pointing to th
COPYRIGH= 'CTAO ERIC'          / Copyright holder(s) of this data product       
RIGHTS  = 'public  '           / Availability of the data product, if known at t
MODEL   = 'CTAO-GADF'          / Name of the overall data model, which may conta
MODELVER= 'v0.3    '           / Version number of the data model               
MODELURL= 'https://gamma-astro-data-formats.readthedocs.io/en/v0.3/' / URL or DO
COMMENT This data product was produced with the Cat-A analysis, which is optimiz
COMMENT ed for semi-realtime results but may have high systematic uncertainties.
COMMENT  If a CatB or CatC product is available for the same OB, it should be us
COMMENT ed instead.                                                             
CREATED = '2026-04-16T10:05:01.918571000' / UTC Date-time the data product was c
AUTHOR  = 'CTAO HelpDesk'      / Contact name for this data product.            
ORIGIN  = 'CTAO    '           / Contact organization name of this data product.
EMAIL   = 'help@ctao.org'      / Contact's email address                        
ACTPROC = 'data_processing'    / Observatory operational Process.  These are the
ACTIVITY= 'sag-reco'           / Name of the activity that produced this data pr
ACTDESC = 'realtime reconstruction and IRF generation' / Human-readable details 
ACTID   = '225c364c-068d-11f1-8a8d-acde48001122' / Unique identifier of this pro
ACTSTART= '2025-11-28T13:45:12.620000000' / Start time of the activity          
SOFTWARE= 'acada-sag-reco'     / Descriptive name of the software.              
SOFTVER = 'v2.0.1  '           / Version number                                 
SOFTURL = 'https://gitlab.cta-observatory.org/cta-computing/acada/sag/sag-reco&'
CONTINUE  'nstruction&'                                                         
CONTINUE  '' / URL or DOI linking to more detail.                               
ANAMODE = 'sag-standard'       / Identifier for the configuration for the softwa
HIERARCH CTAO ACTIVITY INPUTS 0 URI = 'lfn://dpps/datapipe/models/v7/gammaness&'
CONTINUE  '_model.pkl&'                                                         
CONTINUE  '&' / URI of the data product, can be a https address, DOI, Bulk      
CONTINUE  '' / Archive LFN, or a file:// if only known locally.                 
HIERARCH CTAO ACTIVITY INPUTS 0 ROLE = 'gammaness reconstruction model' / contex
HIERARCH CTAO ACTIVITY INPUTS 0 ID = '1fcade22-d04d-11f0-84af-acde48001122' / Un
HIERARCH CTAO ACTIVITY INPUTS 1 URI = 'lfn://dpps/datapipe/models/v7/energy_mo&'
CONTINUE  'del.pkl&'                                                            
CONTINUE  '&' / URI of the data product, can be a https address, DOI, Bulk      
CONTINUE  '' / Archive LFN, or a file:// if only known locally.                 
HIERARCH CTAO ACTIVITY INPUTS 1 ROLE = 'energy reconstruction model' / context o
HIERARCH CTAO ACTIVITY INPUTS 1 ID = 'aa214079-1d3e-4bb0-9b30-f2bdb72094b3' / Un
TREFPOS = 'TOPOCENTER'         / Spatial location at which the observation time 
TIMEUNIT= 's       '                                                            
TIMESYS = 'tai     '           / The time scale of the time-related keywords.  F
TSTART  =         5158862318.0 / Start of time range of the data as either an IS
TSTOP   =         5158864118.0 / End of time range of the data, as either an ISO
RADESYS = 'ICRS    '           / Standard equatorial coordinate system used for 
RA_PNT  =              83.6324 / [deg] ICRS Right ascension of the center of the
DEC_PNT =   22.917399999999997 / [deg] ICRS Declination of the center of the reg
FOV     =                  6.0 / [deg] Approximate diameter (not radius) of the 
EUNIT   = 'TeV     '           / Unit for all energy metadata.                  
EMIN    =                0.003 / [TeV] Approximate minimum energy of the dataset
EMAX    =                270.0 / [TeV] Approximate maximum energy of the dataset
ALT_MIN =  -30.573454373136034 / [deg] Minimum elevation above horizon of observ
ALT_MAX =   -29.28662285733611 / [deg] Maximum elevation above horizon of observ
AZ_MEAN =    324.0862581358564 / [deg] Mean azimith of observation.             
AZ_RANGE=   1.1137201189470147 / [deg] Full angular width of the observation in 
TRACKING= 'fixed_icrs'         / Coordinate system tracked by the nominal pointi
OBSGEO-L=  -17.879999999999995 / [deg] Longitude, with East positive.           
OBSGEO-B=   28.758333333333336 / [deg] Latitude, with North positive.           
OBSGEO-H=    2326.999999998442 / [m] Height above sea level                     
SB_ID   =            102934192 / Unique identifier of the scheduling block assoc

======================================================================
Example 2: DL3/Event/Subarray/Observation (62 keys)
    DL3 Event Data Product from DPPS DataPipe, Cat-C
======================================================================

CTAOMETA= '1.0.1.dev4+g2af9abbfb' / CTAO DataProducts Metadata Version          
TITLE   = 'DL3 Event Data Product from DPPS DataPipe, Cat-C' / Human-readable de
DATALEVL= 'DL3     '           / CTAO Data Level, see Top-Level Data Model. Opti
DATADIV = 'Event   '           / Primary data type.  See the CTAO Top-level Data
DATAASSO= 'Subarray'           / The main associated instrument or analysis part
DATATYPE= 'Observation'        / The specific type of the product.  This is used
DATAID  = 'fca03dc2-32f5-4122-aea8-3b8248e80db9' / A locally-generated unique ID
OBS_ID  =           1000012345 / Unique identifier of the observation block, in 
OBSNIGHT= '2022-05-09'         / Date associated with the start of data taking. 
TELESCOP= 'CTAO    '           / Observatory or facility used to collect the dat
INSTRUME= 'CTAO-South'         / CTAO site associated with this instance.       
HIERARCH CTAO INSTANCE CATEGORY = 'A       ' / Which data processing pipeline ca
RELEASE = 'CTAO/DL3-DR1'       / Name of the data release (data collection) that
REFERENC= 'doi://reference/to/release-info' / a reference to where the data prod
LICENSE = 'cc-by-sa'           / License for this data product                  
LICENURL= 'https://creativecommons.org/licenses/by-sa/4.0/' / URL pointing to th
COPYRIGH= 'CTAO ERIC'          / Copyright holder(s) of this data product       
RIGHTS  = 'public  '           / Availability of the data product, if known at t
MODEL   = 'CTAO-GADF'          / Name of the overall data model, which may conta
MODELVER= 'v0.3    '           / Version number of the data model               
MODELURL= 'https://gamma-astro-data-formats.readthedocs.io/en/v0.3/' / URL or DO
COMMENT This data product was produced with the Cat-A analysis, which is optimiz
COMMENT ed for semi-realtime results but may have high systematic uncertainties.
COMMENT  If a CatB or CatC product is available for the same OB, it should be us
COMMENT ed instead.                                                             
CREATED = '2026-04-16T10:05:01.925499000' / UTC Date-time the data product was c
AUTHOR  = 'CTAO HelpDesk'      / Contact name for this data product.            
ORIGIN  = 'CTAO    '           / Contact organization name of this data product.
EMAIL   = 'help@ctao.org'      / Contact's email address                        
ACTPROC = 'data_processing'    / Observatory operational Process.  These are the
ACTIVITY= 'process-ob.cwl'     / Name of the activity that produced this data pr
ACTDESC = 'data processing pipeline' / Human-readable details of the activity, i
ACTID   = '225c364c-068d-11f1-8a8d-acde48001122' / Unique identifier of this pro
ACTSTART= '2025-11-28T13:45:12.620000000' / Start time of the activity          
SOFTWARE= 'ctao-dpps-datapipe' / Descriptive name of the software.              
SOFTVER = 'v1.1.2  '           / Version number                                 
SOFTURL = 'https://gitlab.cta-observatory.org/cta-computing/dpps/datapipe' / URL
ANAMODE = 'standard-hillas-v3.1' / Identifier for the configuration for the soft
HIERARCH CTAO ACTIVITY INPUTS 0 URI = 'lfn://dpps/datapipe/models/v7/gammaness&'
CONTINUE  '_model.pkl&'                                                         
CONTINUE  '&' / URI of the data product, can be a https address, DOI, Bulk      
CONTINUE  '' / Archive LFN, or a file:// if only known locally.                 
HIERARCH CTAO ACTIVITY INPUTS 0 ROLE = 'gammaness reconstruction model' / contex
HIERARCH CTAO ACTIVITY INPUTS 0 ID = '1fcade22-d04d-11f0-84af-acde48001122' / Un
HIERARCH CTAO ACTIVITY INPUTS 1 URI = 'lfn://dpps/datapipe/models/v7/energy_mo&'
CONTINUE  'del.pkl&'                                                            
CONTINUE  '&' / URI of the data product, can be a https address, DOI, Bulk      
CONTINUE  '' / Archive LFN, or a file:// if only known locally.                 
HIERARCH CTAO ACTIVITY INPUTS 1 ROLE = 'energy reconstruction model' / context o
HIERARCH CTAO ACTIVITY INPUTS 1 ID = 'aa214079-1d3e-4bb0-9b30-f2bdb72094b3' / Un
TREFPOS = 'TOPOCENTER'         / Spatial location at which the observation time 
TIMEUNIT= 's       '                                                            
TIMESYS = 'tai     '           / The time scale of the time-related keywords.  F
TSTART  =         5158862318.0 / Start of time range of the data as either an IS
TSTOP   =         5158864118.0 / End of time range of the data, as either an ISO
RADESYS = 'ICRS    '           / Standard equatorial coordinate system used for 
RA_PNT  =              83.6324 / [deg] ICRS Right ascension of the center of the
DEC_PNT =   22.917399999999997 / [deg] ICRS Declination of the center of the reg
FOV     =                  6.0 / [deg] Approximate diameter (not radius) of the 
EUNIT   = 'TeV     '           / Unit for all energy metadata.                  
EMIN    =                0.003 / [TeV] Approximate minimum energy of the dataset
EMAX    =                270.0 / [TeV] Approximate maximum energy of the dataset
ALT_MIN =  -30.573454373136034 / [deg] Minimum elevation above horizon of observ
ALT_MAX =   -29.28662285733611 / [deg] Maximum elevation above horizon of observ
AZ_MEAN =    324.0862581358564 / [deg] Mean azimith of observation.             
AZ_RANGE=   1.1137201189470147 / [deg] Full angular width of the observation in 
TRACKING= 'fixed_icrs'         / Coordinate system tracked by the nominal pointi
OBSGEO-L=  -17.879999999999995 / [deg] Longitude, with East positive.           
OBSGEO-B=   28.758333333333336 / [deg] Latitude, with North positive.           
OBSGEO-H=    2326.999999998442 / [m] Height above sea level                     
SB_ID   =            102934192 / Unique identifier of the scheduling block assoc
WARNING: VerifyWarning: Card is too long, comment will be truncated. [astropy.io.fits.card]