From c8c255da0c10e8719132f654486360c639969865 Mon Sep 17 00:00:00 2001 From: Quentin Remy Date: Thu, 13 Apr 2023 14:32:05 +0200 Subject: [PATCH] Apply suggestions from code review --- examples/tutorials/data/hawc.py | 6 +++--- gammapy/datasets/map.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/tutorials/data/hawc.py b/examples/tutorials/data/hawc.py index c1a23e3843..0a1c8165ed 100644 --- a/examples/tutorials/data/hawc.py +++ b/examples/tutorials/data/hawc.py @@ -60,7 +60,7 @@ ###################################################################### # Chose which estimator we will use -which = 'NN' +energy_estimator = 'NN' ###################################################################### @@ -85,8 +85,8 @@ # Load the tables data_path = "$GAMMAPY_DATA/hawc/crab_events_pass4/" -hdu_filename = 'hdu-index-table-' + which + "-Crab.fits.gz" -obs_filename = 'obs-index-table-' + which + "-Crab.fits.gz" +hdu_filename = f'hdu-index-table-{energy_estimator}-Crab.fits.gz' +obs_filename = f'obs-index-table-{energy_estimator}-Crab.fits.gz' # there is only one observation table obs_table = ObservationTable.read(data_path+obs_filename) diff --git a/gammapy/datasets/map.py b/gammapy/datasets/map.py index e613506afc..5a82b34e13 100644 --- a/gammapy/datasets/map.py +++ b/gammapy/datasets/map.py @@ -89,7 +89,7 @@ def create_map_dataset_geoms( geom_irf = geom_image.to_binsz(binsz=binsz_irf) if reco_psf: - geom_psf = geom_irf.to_cube([rad_axis,geom.axes["energy"]]) + geom_psf = geom_irf.to_cube([rad_axis, geom.axes["energy"]]) else: geom_psf = geom_irf.to_cube([rad_axis, energy_axis_true])