Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move bright limits to approach or hit the new 5.2 mag onboard limit #368

Merged
merged 4 commits into from
Oct 9, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion proseco/acq.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def get_candidates_mask(self, stars):
"""
ok = ((stars['CLASS'] == 0) &
(stars['mag'] > 5.9) &
(stars['mag'] > 5.3) &
(stars['mag'] < 11.0) &
(~np.isclose(stars['COLOR1'], 0.7)) &
(stars['mag_err'] < 1.0) & # Mag err < 1.0 mag
Expand Down
12 changes: 6 additions & 6 deletions proseco/characteristics_guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
stages = [{"Stage": 1,
"SigErrMultiplier": 3,
"ASPQ1Lim": 0,
"MagLimit": [6.2, 10.2],
"MagLimit": [5.6, 10.2],
"DoBminusVcheck": 1,
"Spoiler": {
"BgPixThresh": 25,
Expand All @@ -61,7 +61,7 @@
{"Stage": 2,
"SigErrMultiplier": 2,
"ASPQ1Lim": 0,
"MagLimit": [6.2, 10.2],
"MagLimit": [5.6, 10.2],
"DoBminusVcheck": 1,
"Spoiler": {
"BgPixThresh": 25,
Expand All @@ -73,7 +73,7 @@
{"Stage": 3,
"SigErrMultiplier": 1,
"ASPQ1Lim": 10,
"MagLimit": [6.1, 10.3],
"MagLimit": [5.5, 10.3],
"DoBminusVcheck": 1,
"Spoiler": {
"BgPixThresh": 25,
Expand All @@ -85,7 +85,7 @@
{"Stage": 4,
"SigErrMultiplier": 0,
"ASPQ1Lim": 20,
"MagLimit": [6.0, 10.3],
"MagLimit": [5.4, 10.3],
"DoBminusVcheck": 1,
"Spoiler": {
"BgPixThresh": 25,
Expand All @@ -97,7 +97,7 @@
{"Stage": 5,
"SigErrMultiplier": 0,
"ASPQ1Lim": 20,
"MagLimit": [5.9, 10.3],
"MagLimit": [5.3, 10.3],
"DoBminusVcheck": 0,
"Spoiler": {
"BgPixThresh": 25,
Expand All @@ -109,7 +109,7 @@
{"Stage": 6,
"SigErrMultiplier": 0,
"ASPQ1Lim": 20,
"MagLimit": [5.6, 10.3],
"MagLimit": [5.2, 10.3],
jeanconn marked this conversation as resolved.
Show resolved Hide resolved
"DoBminusVcheck": 0,
"Spoiler": {
"BgPixThresh": 25,
Expand Down
10 changes: 5 additions & 5 deletions proseco/guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def search_stage(self, stage):
{"Stage": 1,
"SigErrMultiplier": 3,
"ASPQ1Lim": 0,
"MagLimit": [5.9, 10.2],
"MagLimit": [5.6, 10.2],
jeanconn marked this conversation as resolved.
Show resolved Hide resolved
"DoBminusVcheck": 1,
"Spoiler": {
"BgPixThresh": 25,
Expand All @@ -369,7 +369,7 @@ def search_stage(self, stage):
1. Candidate star magnitude is checked to see if it is within the range plus error.
For stage 1 for example , each candidate star is checked to see if it is within the
5.9 to 10.2 mag range, minus padding for error (SigErrMultiplier * cand['mag_err']).
5.6 to 10.2 mag range, minus padding for error (SigErrMultiplier * cand['mag_err']).
2. Candidates with ASPQ1 > stage ASPQ1Lim are marked for exclusion.
Expand Down Expand Up @@ -444,12 +444,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 (which is basically 5.8, but if bright lim set to less than 5.8
# bright limit (which is basically 5.2, but if bright lim set to less than 5.2
# 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) < min(bright_lim, 5.8)))
((cand_guides['mag'] - 2 * mag_err) < min(bright_lim, 5.2)))
for idx in np.flatnonzero(bad_mag):
self.reject({'id': cand_guides['id'][idx],
'type': 'mag outside range',
Expand Down Expand Up @@ -568,7 +568,7 @@ def get_candidates_mask(self, stars):
GUIDE.ref_faint_mag)

ok = ((stars['CLASS'] == 0) &
(stars['mag'] > 5.8) &
(stars['mag'] > 5.2) &
(stars['mag'] < faint_mag_limit) &
(stars['mag_err'] < 1.0) & # Mag err < 1.0 mag
(stars['ASPQ1'] < 20) & # Less than 1 arcsec offset from nearby spoiler
Expand Down
10 changes: 5 additions & 5 deletions proseco/tests/test_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,13 +659,13 @@ def test_dense_star_field_regress():
' 0 1 3 FID 8x8 40.01 -1871.10 1 1 25 7.00',
' 1 2 4 FID 8x8 2140.23 166.63 1 1 25 7.00',
' 2 3 5 FID 8x8 -1826.28 160.17 1 1 25 7.00',
' 3 4 1130889232 BOT 6x6 -251.98 -1971.97 28 1 160 6.99',
' 4 5 1130893664 BOT 6x6 1530.07 -2149.38 28 1 160 7.62',
' 5 6 1130890288 BOT 6x6 2030.55 -2011.89 28 1 160 7.67',
' 3 4 1130899056 BOT 6x6 2386.83 -1808.51 28 1 160 6.24',
' 4 5 1130889232 BOT 6x6 -251.98 -1971.97 28 1 160 6.99',
' 5 6 1130893664 BOT 6x6 1530.07 -2149.38 28 1 160 7.62',
' 6 7 1130898232 GUI 6x6 1244.84 2399.68 1 1 25 7.38',
' 7 8 1130773616 GUI 6x6 -1713.06 1312.10 1 1 25 7.50',
' 0 9 1130899056 ACQ 6x6 2386.83 -1808.51 28 1 160 6.24',
' 1 10 1130770696 ACQ 6x6 -1900.42 2359.33 28 1 160 7.35',
' 0 9 1130770696 ACQ 6x6 -1900.42 2359.33 28 1 160 7.35',
' 1 10 1130890288 ACQ 6x6 2030.55 -2011.89 28 1 160 7.67',
' 2 11 1130890616 ACQ 6x6 1472.68 -376.72 28 1 160 7.77',
' 6 12 1130893640 ACQ 6x6 64.32 -1040.81 28 1 160 7.77',
' 7 13 1130894376 ACQ 6x6 -633.90 1186.80 28 1 160 7.78']
Expand Down