Skip to content

Commit

Permalink
fixed double-transformation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Mommert committed Dec 18, 2017
1 parent 03e8005 commit f8611d5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
5 changes: 5 additions & 0 deletions catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,11 @@ def transform_filters (self, targetfilter):
if len(self.data) == 0:
return 0

# check if this specific transformation has already been done
if '_'+targetfilter+'mag' in self.fields:
logging.info(targetfilter + ' already available')
return self.shape[0]

### SDSS to BVRI
### transformations based on Chonis & Gaskell 2008, AJ, 135
if (('SDSS' in self.catalogname) and
Expand Down
16 changes: 8 additions & 8 deletions pp_stackedphotometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,14 +299,14 @@

os.chdir(rootdir)

# logging.info('move comove/photometry*.dat to root directory')
# targets = numpy.array(list(distillate['targetnames'].keys()))
# target = targets[targets != 'control_star'][0]
# shutil.copyfile(('comove/photometry_%s.dat' %
# target.translate(_pp_conf.target2filename)),
# ('photometry_%s.dat' %
# target.translate(_pp_conf.target2filename)))
# logging.info('move skycoadd.fits into skycoadd/ directory')
logging.info('move comove/photometry*.dat to root directory')
targets = numpy.array(list(distillate['targetnames'].keys()))
target = targets[targets != 'control_star'][0]
shutil.copyfile(('comove/photometry_%s.dat' %
target.translate(_pp_conf.target2filename)),
('photometry_%s.dat' %
target.translate(_pp_conf.target2filename)))
logging.info('move skycoadd.fits into skycoadd/ directory')

print('\nDone!\n')
logging.info('----- successfully done with this process ----')
Expand Down

0 comments on commit f8611d5

Please sign in to comment.