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

Warn on fid light in acq search box #50

Merged
merged 5 commits into from
Feb 24, 2014
Merged

Warn on fid light in acq search box #50

merged 5 commits into from
Feb 24, 2014

Conversation

jeanconn
Copy link
Contributor

Warn on fid light in acq search box to avoid obsid 14577 issue. This should be a "yellow" warning for an acq-only star, red for a acq/guide star.

# Warn if there is a fid light in the search box
if ($type =~ /BOT|GUI|ACQ/){
for my $fpos (@fid_positions){
if (($fpos->{y} > ($yag - $halfw))
Copy link
Member

Choose a reason for hiding this comment

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

I think you can do this with if (abs($fpos->{y} - $yag) < $halfw and abs($fpos-{z} - $zag) < $halfw) {

@taldcroft
Copy link
Member

Good for 11.0 with the minor code update. Also, please add a comment giving the origin of the issue being checked (obsid 14577) along with a link to the discussion (yay google groups!):
https://groups.google.com/a/cfa.harvard.edu/forum/#!topic/ssawg/xkkv5s9OC8A

With all these corner cases and special rules, it is not a bad idea to have some details in the code comments.

@jeanconn
Copy link
Contributor Author

By "code comments" do you mean commit messages? I wasn't sure what was fine just being captured here in the PR.

@taldcroft
Copy link
Member

Could also be a comment that refers back to the PR. Imagine me in 3 years looking at a test and trying to understand what's going on. Getting back to the context is very useful, and can be done without too much clutter. So something like:

# Check for situation that occurred for obsid 14577 with a fid light 
# inside the search box (PR #50).

@jeanconn
Copy link
Contributor Author

Whereas I'm hoping that github will still exist and you'll be able to use
"blame" to look at the code. But sure. Did we want to add this as an item
to the load review checklist and reference back that way?

@@ -1135,6 +1138,21 @@ sub check_star_catalog {
}
}

# Check for situation that occurred for obsid 14577 with a fid light
# inside the search box (PR #50).
if ($type =~ /BOT|GUI|ACQ/){
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I suppose this should just be /BOT|ACQ/ since the GUI-only case is captured in the fid spoiler check (ACA-024)

jeanconn added a commit that referenced this pull request Feb 24, 2014
The JUL2913A week is sufficient to verify the fid-in-search-box check
for PR #50.
jeanconn added a commit that referenced this pull request Feb 24, 2014
Warn on fid light in acq search box
@jeanconn jeanconn merged commit 9b8335d into master Feb 24, 2014
@jeanconn jeanconn deleted the issue-50 branch March 2, 2014 14:02
@taldcroft
Copy link
Member

Could also be a comment that refers back to the PR. Imagine me in 3 years looking at a test and trying to understand what's going on.

This just happened, and PR #50 was quite useful!!

@taldcroft
Copy link
Member

With all these corner cases and special rules, it is not a bad idea to have some details in the code comments.

And detailed code comment with the provenance of the change was useful as well.

@jeanconn
Copy link
Contributor Author

Hah. If you are in fids we've also got issue #243 at some point (so fids need a bit more review in warnings and severity for 13.1).

@taldcroft
Copy link
Member

BTW, I don't remember why this is yellow (not orange) or an ACQ-only star.

@jeanconn
Copy link
Contributor Author

Um.. That is issue #243 (aka Jean suggests that ACQ-only should be orange not yellow).

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