Skip to content

Commit

Permalink
Count invalid events as non-predictable, not valid events
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasBeiske committed Nov 6, 2023
1 parent 2839e31 commit 9d0b81a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ctapipe/tools/train_disp_reconstructor.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def _read_table(self, telescope_type):

valid = check_valid_rows(table_chunk)
if not np.all(valid):
n_non_predictable += np.sum(valid)
n_non_predictable += np.sum(~valid)
table_chunk = table_chunk[valid]

table.append(table_chunk)
Expand Down
2 changes: 1 addition & 1 deletion ctapipe/tools/train_energy_regressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def _read_table(self, telescope_type):

valid = check_valid_rows(table_chunk)
if not np.all(valid):
n_non_predictable += np.sum(valid)
n_non_predictable += np.sum(~valid)
table_chunk = table_chunk[valid]

table.append(table_chunk)
Expand Down
2 changes: 1 addition & 1 deletion ctapipe/tools/train_particle_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def _read_table(self, telescope_type, loader, n_events=None):

valid = check_valid_rows(table_chunk)
if not np.all(valid):
n_non_predictable += np.sum(valid)
n_non_predictable += np.sum(~valid)
table_chunk = table_chunk[valid]

table.append(table_chunk)
Expand Down

0 comments on commit 9d0b81a

Please sign in to comment.