Skip to content

Commit 8b67c78

Browse files
committed
use new shallow_copy_table
1 parent 7d4e19e commit 8b67c78

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/ctapipe/irf/event_weighter.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88

99
import numpy as np
1010
from astropy import units as u
11-
from astropy.table import QTable
11+
from astropy.table import QTable, Table
1212
from pyirf.binning import OVERFLOW_INDEX, UNDERFLOW_INDEX, calculate_bin_indices
1313
from pyirf.spectral import (
1414
calculate_event_weights,
1515
)
1616

1717
from ..core import Component, traits
18-
from ..core.feature_generator import _shallow_copy_table
18+
from ..core.feature_generator import shallow_copy_table
1919
from .binning import DefaultFoVOffsetBins
2020
from .spectra import Spectra, spectrum_from_name
2121

@@ -69,10 +69,10 @@ def _compute_weights(self, events_table: QTable):
6969
f"{self.__class__.__name__} weighting is not implemented"
7070
)
7171

72-
def __call__(self, events_table: QTable) -> QTable:
72+
def __call__(self, events_table: Table | QTable) -> QTable:
7373
"""Returns shallow copy of input table with a ``weight`` column added"""
7474

75-
table = _shallow_copy_table(events_table)
75+
table = shallow_copy_table(events_table, output_cls=QTable)
7676
self._compute_weights(table)
7777
return table
7878

0 commit comments

Comments
 (0)