Skip to content

Commit d82a3d4

Browse files
authored
Merge pull request #24 from fact-project/astropy4
Fix logspace call for astropy 4
2 parents 8c78b1f + 391cef7 commit d82a3d4

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

irf/sensitivity.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,12 @@ def select_off(df):
130130
if 'weight' not in df.columns:
131131
df['weight'] = 1
132132

133-
bin_edges = np.logspace(np.log10(e_min / u.GeV), np.log10(e_max / u.GeV), n_bins + 1)
133+
bin_edges = np.logspace(
134+
np.log10(e_min / u.GeV).to_value(u.dimensionless_unscaled),
135+
np.log10(e_max / u.GeV).to_value(u.dimensionless_unscaled),
136+
n_bins + 1
137+
)
138+
134139
bin_edges = np.append(-np.inf, np.append(bin_edges, np.inf))
135140
bin_id = np.arange(n_bins + 2) + 1
136141

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
setup(
55
name='irf',
6-
version='0.5.2',
6+
version='0.5.3',
77
description='Functions to do instrument response functions for FACT',
88
url='http://github.com/fact-project/irf',
99
author='Kai Brügge, Maximilian Nöthe',

0 commit comments

Comments
 (0)