From ea4fa051702b0fe322b6abeeddd73ed97a2ca56b Mon Sep 17 00:00:00 2001 From: Jean Connelly Date: Wed, 13 Feb 2019 12:42:04 -0500 Subject: [PATCH] Add an additional stage to allow bright stars and tweak stage offset 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. --- proseco/characteristics_guide.py | 16 ++++++++++++++-- proseco/guide.py | 5 +++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/proseco/characteristics_guide.py b/proseco/characteristics_guide.py index 49f48eaa..e80b213a 100644 --- a/proseco/characteristics_guide.py +++ b/proseco/characteristics_guide.py @@ -84,7 +84,7 @@ "RegionFrac": .05, }, "Imposter": { - "CentroidOffsetLim": 2.5, + "CentroidOffsetLim": 2.0, }}, {"Stage": 5, "SigErrMultiplier": 0, @@ -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, }, } ] diff --git a/proseco/guide.py b/proseco/guide.py index bead219b..0c9c612c 100644 --- a/proseco/guide.py +++ b/proseco/guide.py @@ -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',