Skip to content

Commit

Permalink
Used logger for line_background_estimation
Browse files Browse the repository at this point in the history
  • Loading branch information
hiyoneda committed Oct 25, 2024
1 parent ffe777f commit ad4eac3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cosipy/background_estimation/LineBackgroundEstimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def _get_weight_indices(self, energy_range):
energy_indices = np.where((energy_range[0] <= self.energy_axis.bounds[:, 1]) & (self.energy_axis.bounds[:, 0] <= energy_range[1]))[0]
integrate_energy_range = [self.energy_axis.lower_bounds[energy_indices[0]].value, self.energy_axis.lower_bounds[energy_indices[-1]].value]
if integrate_energy_range[0] != energy_range[0].value or integrate_energy_range[1] != energy_range[1].value:
print(f"The energy range {energy_range.value} is modified to {integrate_energy_range}")
logger.info(f"The energy range {energy_range.value} is modified to {integrate_energy_range}")
weight = integrate.quad(lambda x: self.bkg_spectrum_model(x, *self.bkg_spectrum_model_parameter), *integrate_energy_range)[0]
return weight, energy_indices

Expand Down

0 comments on commit ad4eac3

Please sign in to comment.