Skip to content

Commit

Permalink
handles new date formats
Browse files Browse the repository at this point in the history
  • Loading branch information
forero committed Nov 16, 2017
1 parent 1d44ae8 commit 4fdb059
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions py/desisim/quicksurvey.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def __init__(self, output_path, targets_path, fiberassign_exec, template_fiberas
if line.startswith('#') or len(line) < 2:
continue
yearmmdd = line.replace('-', '')
year_mm_dd = yearmmdd[0:4]+'-'+yearmmdd[4:6]+'-'+yearmmdd[6:8]
year_mm_dd = yearmmdd[0:4]+yearmmdd[4:6]+yearmmdd[6:8]
dates.append(year_mm_dd)

#- add pre- and post- dates for date range bookkeeping
Expand All @@ -98,7 +98,7 @@ def __init__(self, output_path, targets_path, fiberassign_exec, template_fiberas


for i in range(len(dates)-1):
ii = (dates[i] <= dateobs) & (dateobs < dates[i+1])
ii = (dateobs >= dates[i]) & (dateobs < dates[i+1])
epoch_tiles = list()
for tile in self.exposures['TILEID'][ii]:
if tile not in epoch_tiles:
Expand Down Expand Up @@ -313,7 +313,7 @@ def simulate(self):
zcat = Table.read(os.path.join(epochdir, 'zcat.fits'))

# Update mtl and zcat
self.simulate_epoch(epoch, truth, targets, perfect=False, zcat=zcat)
self.simulate_epoch(epoch, truth, targets, perfect=True, zcat=zcat)

# copy mtl and zcat to epoch directory
self.backup_epoch_data(epoch_id=epoch)
Expand Down

0 comments on commit 4fdb059

Please sign in to comment.