Skip to content

Commit

Permalink
Merge pull request #24 from fact-project/astropy4
Browse files Browse the repository at this point in the history
Fix logspace call for astropy 4
  • Loading branch information
maxnoe authored Jul 16, 2020
2 parents 8c78b1f + 391cef7 commit d82a3d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion irf/sensitivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,12 @@ def select_off(df):
if 'weight' not in df.columns:
df['weight'] = 1

bin_edges = np.logspace(np.log10(e_min / u.GeV), np.log10(e_max / u.GeV), n_bins + 1)
bin_edges = np.logspace(
np.log10(e_min / u.GeV).to_value(u.dimensionless_unscaled),
np.log10(e_max / u.GeV).to_value(u.dimensionless_unscaled),
n_bins + 1
)

bin_edges = np.append(-np.inf, np.append(bin_edges, np.inf))
bin_id = np.arange(n_bins + 2) + 1

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

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

0 comments on commit d82a3d4

Please sign in to comment.