Skip to content

Commit

Permalink
Use keyword arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasBeiske committed Nov 14, 2023
1 parent a5c291c commit c444700
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 32 deletions.
16 changes: 8 additions & 8 deletions ctapipe/tools/train_disp_reconstructor.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,14 @@ def start(self):
"hillas_psi",
]
table = read_training_events(
self.loader,
self.chunk_size,
tel_type,
self.models,
feature_names,
self.rng,
self.log,
self.n_events.tel[tel_type],
loader=self.loader,
chunk_size=self.chunk_size,
telescope_type=tel_type,
reconstructor=self.models,
feature_names=feature_names,
rng=self.rng,
log=self.log,
n_events=self.n_events.tel[tel_type],
)
table[self.models.target] = self._get_true_disp(table)
table = table[self.models.features + [self.models.target, "true_energy"]]
Expand Down
16 changes: 8 additions & 8 deletions ctapipe/tools/train_energy_regressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ def start(self):
self.log.info("Loading events for %s", tel_type)
feature_names = self.regressor.features + [self.regressor.target]
table = read_training_events(
self.loader,
self.chunk_size,
tel_type,
self.regressor,
feature_names,
self.rng,
self.log,
self.n_events.tel[tel_type],
loader=self.loader,
chunk_size=self.chunk_size,
telescope_type=tel_type,
reconstructor=self.regressor,
feature_names=feature_names,
rng=self.rng,
log=self.log,
n_events=self.n_events.tel[tel_type],
)

self.log.info("Train on %s events", len(table))
Expand Down
32 changes: 16 additions & 16 deletions ctapipe/tools/train_particle_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,24 +176,24 @@ def _read_input_data(self, tel_type):
"true_energy",
]
signal = read_training_events(
self.signal_loader,
self.chunk_size,
tel_type,
self.classifier,
feature_names,
self.rng,
self.log,
self.n_signal.tel[tel_type],
loader=self.signal_loader,
chunk_size=self.chunk_size,
telescope_type=tel_type,
reconstructor=self.classifier,
feature_names=feature_names,
rng=self.rng,
log=self.log,
n_events=self.n_signal.tel[tel_type],
)
background = read_training_events(
self.background_loader,
self.chunk_size,
tel_type,
self.classifier,
feature_names,
self.rng,
self.log,
self.n_signal.tel[tel_type],
loader=self.background_loader,
chunk_size=self.chunk_size,
telescope_type=tel_type,
reconstructor=self.classifier,
feature_names=feature_names,
rng=self.rng,
log=self.log,
n_events=self.n_signal.tel[tel_type],
)
table = vstack([signal, background])
self.log.info(
Expand Down

0 comments on commit c444700

Please sign in to comment.