Commit 39bdcd2a16f4ac7aed41558b2ba87d77990c201e

Authored by Jürgen Knödlseder
1 parent f560242d

Use separate drwsuffix and drwmethod

modules/comscripts/comobsbin.py
... ... @@ -503,23 +503,24 @@ class comobsbin(ctools.csobservation):
503 503 drwnames = []
504 504 engindex = []
505 505  
506   - # Get DRW method in lower case
  506 + # Get DRW method and suffix in lower case
507 507 drwmethod = gammalib.tolower(self['drwmethod'].string())
508   - if drwmethod == 'phibar':
509   - drwmethod += '%d' % (self['timebin'].real())
  508 + drwsuffix = drwmethod
  509 + if drwsuffix == 'phibar':
  510 + drwsuffix += '%d' % (self['timebin'].real())
510 511  
511 512 # Generate one DRW for each energy boundary
512 513 for i in range(ebounds.size()):
513 514  
514 515 # Set DRW filename in output folder
515 516 drwname = '%s/%s%s_drw-%s%s_%6.6d-%6.6dkeV.fits' % \
516   - (self['outfolder'].string(), obs.id(), dri_prefix, drwmethod,
  517 + (self['outfolder'].string(), obs.id(), dri_prefix, drwsuffix,
517 518 self._drw_suffix, ebounds.emin(i).keV(), ebounds.emax(i).keV())
518 519 drwfile = gammalib.GFilename(drwname)
519 520  
520 521 # Set DRW filename in global data store
521 522 drwname_global = '%s/%s%s_drw-%s%s_%6.6d-%6.6dkeV.fits' % \
522   - (self._global_datastore, obs.id(), dri_prefix, drwmethod,
  523 + (self._global_datastore, obs.id(), dri_prefix, drwsuffix,
523 524 self._drw_suffix, ebounds.emin(i).keV(), ebounds.emax(i).keV())
524 525 drwfile_global = gammalib.GFilename(drwname_global)
525 526  
... ...