Skip to content

Commit

Permalink
Set more conservative P2 of 3.0 for ERs and to use as yellow-warn for…
Browse files Browse the repository at this point in the history
… ORs
  • Loading branch information
jeanconn committed Jan 17, 2019
1 parent 78e19bd commit 1857984
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions starcheck/src/lib/Ska/Starcheck/Obsid.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2851,14 +2851,20 @@ sub set_proseco_probs{
}
$self->{acq_probs} = \%slot_probs;

# Set the P2 requirement to be 2.0
my $P2_required = 2.0;
# Set the P2 requirement to be 2.0 for ORs and 3.0 for ERs.
my $P2_required = $self->{obsid} < $ER_MIN_OBSID ? 2.0 : 3.0.
$self->{figure_of_merit} = {expected => substr($expected, 0, 4),
P2 => $P2,
cum_prob_bad => ($P2 < $P2_required)};
if ($P2 < $P2_required){
push @{$self->{warn}}, ">> WARNING: -log10 probability of 2 or fewer stars < $P2_required\n";
}
# If OR and P2 less than 3.0, yellow_warn. This probably doesn't need the check on OR/ER
# because if it is an ER and < 3.0 the if statement above was hit.
elsif (($self->{obsid} < $ER_MIN_OBSID) and ($P2 < 3.0)){
push @{$self->{yellow_warn}}, ">> WARNING: -log10 probability of 2 or fewer stars < 3.0\n";
}

}


Expand Down

0 comments on commit 1857984

Please sign in to comment.