Skip to content

Commit

Permalink
Add an additional stage to allow bright stars and tweak stage offset …
Browse files Browse the repository at this point in the history
…lims

This is pulling more than one lever at once, but my thought is that the
simultaneous complimentary changes are really needed to effect this change
in a reasonable fashion.  There's no reason to try to bring in bright
stars in stage 6 if stage 5 has already bright in super-faint crap.
  • Loading branch information
jeanconn committed Feb 13, 2019
1 parent f8b0651 commit ea4fa05
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
16 changes: 14 additions & 2 deletions proseco/characteristics_guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"RegionFrac": .05,
},
"Imposter": {
"CentroidOffsetLim": 2.5,
"CentroidOffsetLim": 2.0,
}},
{"Stage": 5,
"SigErrMultiplier": 0,
Expand All @@ -96,7 +96,19 @@
"RegionFrac": .05,
},
"Imposter": {
"CentroidOffsetLim": 4.5,
"CentroidOffsetLim": 3.5,
},
{"Stage": 6,
"SigErrMultiplier": 0,
"ASPQ1Lim": 20,
"MagLimit": [5.6, 10.3],
"DoBminusVcheck": 0,
"Spoiler": {
"BgPixThresh": 25,
"RegionFrac": .05,
},
"Imposter": {
"CentroidOffsetLim": 4.0,
},
}
]
Expand Down
5 changes: 3 additions & 2 deletions proseco/guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,12 @@ def search_stage(self, stage):
# For the bright end of the check, set a lower bound to always use at least 1
# mag_err, but do not bother with this bound at the faint end of the check.
# Also explicitly confirm that the star is not within 2 * mag_err of the hard
# bright limit.
# bright limit (which is basically 5.8, but if bright lim set to less than 5.8
# in the stage, take that).
bad_mag = (
((cand_guides['mag'] - max(n_sigma, 1) * mag_err) < bright_lim) |
((cand_guides['mag'] + n_sigma * mag_err) > faint_lim) |
((cand_guides['mag'] - 2 * mag_err) < 5.8))
((cand_guides['mag'] - 2 * mag_err) < min(bright_lim, 5.8))
for idx in np.flatnonzero(bad_mag):
self.reject({'id': cand_guides['id'][idx],
'type': 'mag outside range',
Expand Down

0 comments on commit ea4fa05

Please sign in to comment.