Skip to content

Commit

Permalink
Use separate drwsuffix and drwmethod
Browse files Browse the repository at this point in the history
  • Loading branch information
jknodlseder committed Mar 26, 2023
1 parent f560242 commit 39bdcd2
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions modules/comscripts/comobsbin.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,23 503,24 @@ def _generate_dri(self, obs, ebounds):
drwnames = []
engindex = []

# Get DRW method in lower case
# Get DRW method and suffix in lower case
drwmethod = gammalib.tolower(self['drwmethod'].string())
if drwmethod == 'phibar':
drwmethod = '%d' % (self['timebin'].real())
drwsuffix = drwmethod
if drwsuffix == 'phibar':
drwsuffix = '%d' % (self['timebin'].real())

# Generate one DRW for each energy boundary
for i in range(ebounds.size()):

# Set DRW filename in output folder
drwname = '%s/%s%s_drw-%s%s_%6.6d-%6.6dkeV.fits' % \
(self['outfolder'].string(), obs.id(), dri_prefix, drwmethod,
(self['outfolder'].string(), obs.id(), dri_prefix, drwsuffix,
self._drw_suffix, ebounds.emin(i).keV(), ebounds.emax(i).keV())
drwfile = gammalib.GFilename(drwname)

# Set DRW filename in global data store
drwname_global = '%s/%s%s_drw-%s%s_%6.6d-%6.6dkeV.fits' % \
(self._global_datastore, obs.id(), dri_prefix, drwmethod,
(self._global_datastore, obs.id(), dri_prefix, drwsuffix,
self._drw_suffix, ebounds.emin(i).keV(), ebounds.emax(i).keV())
drwfile_global = gammalib.GFilename(drwname_global)

Expand Down

0 comments on commit 39bdcd2

Please sign in to comment.