Skip to content

Commit

Permalink
Dont use subarray features for the ml unit tests
Browse files Browse the repository at this point in the history
- Files with the impact reconstructor applied have a differing amount of
  tables in the dl1 and the dl2 group. See #1961 for details. This
  breaks the unit tests as it tries to apply the model to telescopes without
  dl1 information available

Co-authored-by: Noah Biederbeck <[email protected]>
  • Loading branch information
2 people authored and maxnoe committed Oct 27, 2022
1 parent 692f81a commit 3ca9bc5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 3 additions & 5 deletions ctapipe/ml/tools/tests/test_apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
import shutil


def test_apply_energy_regressor(
energy_regressor_path, dl2_shower_geometry_file, tmp_path
):
def test_apply_energy_regressor(energy_regressor_path, dl1_parameters_file, tmp_path):
from ctapipe.ml.tools.apply_energy_regressor import ApplyEnergyRegressor

input_path = tmp_path / dl2_shower_geometry_file.name
input_path = tmp_path / dl1_parameters_file.name

# create copy to not mutate common test file
shutil.copy2(dl2_shower_geometry_file, input_path)
shutil.copy2(dl1_parameters_file, input_path)

ret = run_tool(
ApplyEnergyRegressor(),
Expand Down
2 changes: 0 additions & 2 deletions ctapipe/resources/ml-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ TrainEnergyRegressor:
- concentration_cog
- concentration_core
- morphology_num_pixels
- HillasReconstructor_average_intensity
- mirror_area


Expand All @@ -48,5 +47,4 @@ TrainParticleIdClassifier:
- concentration_cog
- concentration_core
- morphology_num_pixels
- HillasReconstructor_average_intensity
- mirror_area

0 comments on commit 3ca9bc5

Please sign in to comment.