8000 Exclude COLOR1=0.7 stars from guide selection by jeanconn · Pull Request #401 · sot/proseco · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Exclude COLOR1=0.7 stars from guide selection #401

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

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions proseco/guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ def get_guide_candidates_mask(
& (mag > 5.2)
& (mag < faint_mag_limit)
& (mag_err < 1.0)
& (stars["COLOR1"] != 0.7)
& (stars["ASPQ1"] < 20) # Less than 1 arcsec offset from nearby spoiler
& (stars["ASPQ2"] == 0) # Unknown proper motion, or PM < 500 milli-arcsec/year
& (stars["POS_ERR"] < 1250) # Position error < 1.25 arcsec
Expand Down
16 changes: 16 additions & 0 deletions proseco/tests/test_guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,22 @@ def test_bad_star_list():
assert guides.bad_stars_mask[idx]


def test_color1_0p7():
"""Test that a star with COLOR1=0.7 is not selected"""
dark = DARK40.copy()
stars = StarsTable.empty()
stars.add_fake_constellation(mag=np.linspace(9, 10.3, 4), n_stars=4)
# Bright star that would normally be selected but with color=0.7
bad_id = 11111111
stars.add_fake_star(yang=100, zang=100, mag=6.5, id=bad_id, COLOR1=0.7)
kwargs = mod_std_info(stars=stars, dark=dark, n_guide=5)
guides = get_guide_catalog(**kwargs)
assert bad_id not in guides["id"]

idx = guides.stars.get_id_idx(bad_id)
assert guides.bad_stars_mask[idx]


def test_avoid_trap():
"""
Set up a scenario where a star is selected fine at one roll, and then
Expand Down
0