Skip to content

Implement simulated histogram shower-distribution event weighting #2977

@kosack

Description

@kosack

Please describe the use case that requires this feature.

For upcoming CTAO simulation campaigns, they will start to test importance-sampling, i.e, generating non-powerlaw shower energy distributions and also non-flat spatial distributions. Our current event weighting code (and pyIRF itself) only support a simple power-law weighting function read from the SimulationConfig. We do however, have the full histogram and propegate it (/simulation/service/shower_distribution), and this can be used as the correct weighting function.

Importance sampled simulations are expected in ≈4-6 months.

Describe the solution you'd like

  • Allow 2D weighting functions in the IRF/etc codes: energy (already there for the 1D case), offset from array center (needs to be added)
  • Create a HistogramShowerDistribution function that is a 2D interpolator over these parameters, using the shower_distribution.

Some preliminary implementation is in #2927 in the spectrum_from_simulation_config function, but only a stub where we would put this code. Some modification is needed in pyirf if we want to have the weighting function there, or we could keep pyirf simple and create a local weighting function in ctapipe.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions