Skip to content

Commit

Permalink
fixed catalog.filtername issues related to clear filters
Browse files Browse the repository at this point in the history
  • Loading branch information
mommermi committed Nov 20, 2018
1 parent d8b5e0e commit 360b0aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pp_calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ def calibrate(filenames, minstars, manfilter, manualcatalog,
filternames[filtername] = [filename]
ldac_filename = filename[:filename.find('.fit')]+'.ldac'
cat = catalog(filename)
if manfilter is not False:
if manfilter is not False and manfilter is not None:
cat.filtername = manfilter
else:
cat.filtername = filtername
Expand Down
7 changes: 4 additions & 3 deletions pp_distill.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,9 +564,10 @@ def distill(catalogs, man_targetname, offset, fixed_targets_file, posfile,

# identify magnitudes
mag_keys = ['MAG_APER', 'MAGERR_APER']
for key in cat.fields:
if filtername+'mag' in key:
mag_keys.append(key)
if filtername is not None:
for key in cat.fields:
if filtername+'mag' in key:
mag_keys.append(key)

# build field lists for observed catalogs
match_keys_other_catalog, extract_other_catalog = [], []
Expand Down

0 comments on commit 360b0aa

Please sign in to comment.