Skip to content

Commit

Permalink
Merge pull request #531 from fermiPy/517_component_tmin_lc
Browse files Browse the repository at this point in the history
Overwrite component-wise time selection in lightcurve bin
  • Loading branch information
omodei committed Mar 26, 2024
2 parents 2850962 + 0f3c0ac commit 65d52b5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions fermipy/lightcurve.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,15 @@ def _process_lc_bin(itime, name, config, basedir, workdir, diff_sources, const_s
config = copy.deepcopy(config)
config['selection']['tmin'] = time[0]
config['selection']['tmax'] = time[1]

if 'components' in config:
for component in config['components']:
if 'selection' in component:
if 'tmin' in component['selection']:
component['selection']['tmin'] = time[0]
if 'tmin' in component['selection']:
component['selection']['tmax'] = time[1]


# create output directories labeled in MET vals
outdir = basedir + 'lightcurve_%.0f_%.0f' % (time[0], time[1])
Expand Down

0 comments on commit 65d52b5

Please sign in to comment.