Source code for datapipe_testbench.benchmarks.dl1
"""
Benchmarks using DL1 information.
"""
from hist import axis
from ..resolution import ResolutionBenchmark
__all__ = [
"PixelIntensityResolutionBenchmark",
"HillasIntensityResolutionBenchmark",
]
[docs]
class PixelIntensityResolutionBenchmark(ResolutionBenchmark):
"""
Benchmark pixel-wise intensities at the DL1 level, before cleaning.
"""
def __init__(
self,
chunk_size=10_000,
max_chunks=None,
):
super().__init__(
input_data_level="dl1_images",
reco_column="image",
true_axis=axis.Regular(
bins=61,
start=1.0,
stop=1.0e5,
name="true_image",
transform=axis.transform.log,
),
chunk_size=chunk_size,
max_chunks=max_chunks,
per_tel_type=True,
filter_function=lambda true, reco: true > 0,
resolution_requirement_table="PixelIntensityResREQ.txt",
bias_plot_range=(-2, 2),
)
[docs]
class HillasIntensityResolutionBenchmark(ResolutionBenchmark):
"""Benchmark post-cleaning Hillas intensity."""
def __init__(
self,
chunk_size=10_000,
max_chunks=None,
):
super().__init__(
input_data_level="dl1",
reco_column="hillas_intensity",
true_axis=axis.Regular(
bins=50,
start=10,
stop=1e7,
name="true_hillas_intensity",
transform=axis.transform.log,
),
per_tel_type=True,
chunk_size=chunk_size,
max_chunks=max_chunks,
delta_range=(-3, 3),
num_delta_bins=200,
bias_plot_range=(-2, 2),
resolution_method="std",
)