Skip to content

Commit

Permalink
Merge pull request #28 from boada/kbandfix
Browse files Browse the repository at this point in the history
improve kband error
  • Loading branch information
mommermi committed Sep 18, 2017
2 parents 5064586 + be0f30e commit 03add5e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,8 @@ def download_catalog(self, ra_deg, dec_deg, rad_deg,
# photometric catalog
vquery = Vizier(columns=['2MASS', 'RAJ2000', 'DEJ2000', 'errMaj',
'errMin', 'errPA', 'Jmag', 'e_Jmag',
'Hmag', 'e_Hmag', 'Kmag', 'e_Kmag'],
'Hmag', 'e_Hmag', 'Kmag', 'e_Kmag',
'Qflg', 'Rflg'],
column_filters={"Jmag":
("<%f" % max_mag)},
row_limit = max_sources)
Expand All @@ -414,6 +415,14 @@ def download_catalog(self, ra_deg, dec_deg, rad_deg,
logging.error('no data available from %s' % self.catalogname)
return 0

# filter columns to only have really good detections
# see the Vizier webpage for a description of what the flags mean
Qflags = set('ABC') # only A, B, or C flagged detections
qmask = [True if not set(item).difference(Qflags) else False
for item in self.data['Qflg']]
# filter columns to only have really good detections
self.data = self.data[qmask]

### rename column names using PP conventions
self.data.rename_column('_2MASS', 'ident')
self.data.rename_column('RAJ2000', 'ra.deg')
Expand Down

0 comments on commit 03add5e

Please sign in to comment.