Skip to content

Commit

Permalink
renamed to PixelStatisticsCalculator
Browse files Browse the repository at this point in the history
  • Loading branch information
TjarkMiener committed Oct 8, 2024
1 parent 4af4e74 commit 1e684b1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/ctapipe/monitoring/calculator.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Definition of the ``StatisticsCalculator`` class, providing all steps needed to
Definition of the ``PixelStatisticsCalculator`` class, providing all steps needed to
calculate the montoring data for the camera calibration.
"""

Expand All @@ -19,15 +19,15 @@
from ctapipe.monitoring.outlier import OutlierDetector

__all__ = [
"StatisticsCalculator",
"PixelStatisticsCalculator",
]


class StatisticsCalculator(TelescopeComponent):
class PixelStatisticsCalculator(TelescopeComponent):
"""
Component to calculate statistics from calibration events.
The ``StatisticsCalculator`` is responsible for calculating various statistics from
The ``PixelStatisticsCalculator`` is responsible for calculating various statistics from
calibration events, such as pedestal and flat-field data. It aggregates statistics,
detects outliers, and handles faulty data periods.
This class holds two functions to conduct two different passes over the data with and without
Expand Down
10 changes: 5 additions & 5 deletions src/ctapipe/monitoring/tests/test_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
from traitlets.config.loader import Config

from ctapipe.monitoring.aggregator import PlainAggregator
from ctapipe.monitoring.calculator import StatisticsCalculator
from ctapipe.monitoring.calculator import PixelStatisticsCalculator


def test_statistics_calculator(example_subarray):
"""test basic functionality of the StatisticsCalculator"""
"""test basic functionality of the PixelStatisticsCalculator"""

# Create dummy data for testing
n_images = 5050
Expand All @@ -31,7 +31,7 @@ def test_statistics_calculator(example_subarray):
chunk_size = 1000
aggregator = PlainAggregator(subarray=example_subarray, chunk_size=chunk_size)
chunk_shift = 500
calculator = StatisticsCalculator(
calculator = PixelStatisticsCalculator(
subarray=example_subarray,
stats_aggregator=aggregator,
chunk_shift=chunk_shift,
Expand Down Expand Up @@ -93,7 +93,7 @@ def test_outlier_detector(example_subarray):
# Create configuration
config = Config(
{
"StatisticsCalculator": {
"PixelStatisticsCalculator": {
"stats_aggregator_type": [
("id", 1, "SigmaClippingAggregator"),
],
Expand Down Expand Up @@ -123,7 +123,7 @@ def test_outlier_detector(example_subarray):
}
)
# Initialize the calculator from config
calculator = StatisticsCalculator(subarray=example_subarray, config=config)
calculator = PixelStatisticsCalculator(subarray=example_subarray, config=config)
# Run the first pass over the data
stats_first_pass = calculator.first_pass(table=ped_table, tel_id=1)
# Run the second pass over the data
Expand Down

0 comments on commit 1e684b1

Please sign in to comment.