Skip to content

Commit

Permalink
Add MonitoringCameraContainer to image_cleaner_component tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Hckjs committed Jul 24, 2024
1 parent 7286fc1 commit 9357ef7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ctapipe/image/tests/test_image_cleaner_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import pytest
from traitlets.config import Config

from ctapipe.containers import MonitoringCameraContainer
from ctapipe.image import ImageCleaner
from ctapipe.instrument import SubarrayDescription

Expand Down Expand Up @@ -41,6 +42,11 @@ def test_image_cleaner(method, prod5_mst_nectarcam, reference_location):
reference_location=reference_location,
)

monitoring = MonitoringCameraContainer()
monitoring.pedestal.charge_std = np.ones(
prod5_mst_nectarcam.camera.geometry.n_pixels
)

clean = ImageCleaner.from_name(method, config=config, subarray=subarray)

image = np.zeros_like(
Expand All @@ -51,7 +57,7 @@ def test_image_cleaner(method, prod5_mst_nectarcam, reference_location):
image[31:40] = 8.0
times = np.linspace(-5, 10, image.shape[0])

mask = clean(tel_id=1, image=image, arrival_times=times)
mask = clean(tel_id=1, image=image, arrival_times=times, monitoring=monitoring)

# we're not testing the algorithm here, just that it does something (for the
# algorithm tests, see test_cleaning.py
Expand Down

0 comments on commit 9357ef7

Please sign in to comment.