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

Add module to find ER catalog #161

Merged
merged 5 commits into from
Oct 25, 2021
Merged

Add module to find ER catalog #161

merged 5 commits into from
Oct 25, 2021

Conversation

taldcroft
Copy link
Member

@taldcroft taldcroft commented Aug 25, 2021

Description

Add module to find ER catalog.

This requires sot/Quaternion#39.

Testing

  • Passes unit tests on MacOS
  • Functional testing (new unit tests + jupyter notebook)

Fixes https://github.com/sot/ska-projects/issues/107

@taldcroft taldcroft changed the title WIP add module to find ER catalog Add module to find ER catalog Sep 22, 2021
@taldcroft taldcroft requested a review from jeanconn September 22, 2021 10:38
@taldcroft
Copy link
Member Author

@jeanconn - I'd like to get this in soon so please have a look. It will be better to have it in the release and we can test or develop against it. We can consider this to be experimental for the moment and it's certainly possible there will be API changes when it gets connected with ORviewer.

@jeanconn
Copy link
Contributor

jeanconn commented Sep 22, 2021 via email

@taldcroft
Copy link
Member Author

taldcroft commented Sep 22, 2021

No, I just meant the flight release so it isn't just hanging here as a PR for too long. So whenever the next available release goes out.

@jeanconn
Copy link
Contributor

Right, the next one is just technically today. But I would like a little more time to review this.

@taldcroft
Copy link
Member Author

I'm using the Polish next, which is the one after the US English next one.

"""
yags, zags = radec_to_yagzag(stars['RA_PMCORR'], stars['DEC_PMCORR'], att)
rows, cols = yagzag_to_pixels(yags, zags, allow_bad=True)
ok = (np.abs(rows) < 507) & (np.abs(cols) < 507) # FIXME: Hardcoded, get from characteristics?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps could use max_ccd_row / col from characteristics, but it isn't like this is going to change much.

from sparkles.find_er_catalog import (
get_candidate_stars, find_er_catalog, filter_candidate_stars_on_ccd,
get_guide_counts, init_quat_from_attitude)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this also needs something like the os.environ[agasc.SUPPLEMENT_ENABLED_ENV] = 'False' that is used in test_review.py .

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though only a problem if you try to run just the tests in this file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I'm being sloppy. It looks like that env var gets set globally during test collection. This needs to be done with setup/teardown or monkeypatch fixtures. Of course in practice it is fine for testing here to disable globally, but the pattern I had in mind for disabling just in a test module doesn't work. :frown:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "sloppy" is a little harsh, but yes, handling of the env var the way we've used it so far can result in side effects that should be considered.

@taldcroft taldcroft merged commit b177f14 into master Oct 25, 2021
@taldcroft taldcroft deleted the find-er-catalog branch October 25, 2021 21:18
@javierggt javierggt mentioned this pull request Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants