Skip to content

Commit

Permalink
Merge pull request #367 from sot/no_starcat
Browse files Browse the repository at this point in the history
Remove old ok-no-starcat stuff
  • Loading branch information
jeanconn authored Jan 13, 2021
2 parents 5f3f4d0 + f603eeb commit d897c35
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 65 deletions.
8 changes: 0 additions & 8 deletions starcheck/data/characteristics.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
paths:
week_lookup: https://icxc.harvard.edu/cgi-bin/aspect/starcheck/find_shortterm.cgi

# string match on oflsids that may not have a maneuver or starcat, and its OK!
# The RDE (and probably RDX) entries most likely do not applie to ORViewer DOT schedules
# and can likely be removed in the future.
no_starcat_oflsid:
- RDX
- RDE
- DC_T

ccd_temp_yellow_limit: -7.5
ccd_temp_red_limit: -6.5

Expand Down
44 changes: 0 additions & 44 deletions starcheck/src/lib/Ska/Starcheck/Obsid.pm
Original file line number Diff line number Diff line change
Expand Up @@ -817,19 +817,6 @@ sub check_dither {
my $obs_end_pad = 3*60;
my $manvr;

# If there's no starcat on purpose, return without doing any dither checks.
# This used to just check if "ok_no_starcat" was defined and set to non-zero, but
# that can actually happen on RDE observations that have star catalogs, such as
# obsid 57166 in APR2009C. Now this checks that an observation doesn't actually
# have a star catalog before checking to see if it is "allowed" to not have
# a star catalog. This RDE/RDX business only applies to legacy loads pre ORViewer-DOT
# and can likely be removed in the future along with the ok_no_starcat entries
# for them in characteristics.
my $cat_cmd = find_command($self, 'MP_STARCAT');
if (not $cat_cmd and defined $self->{ok_no_starcat} and $self->{ok_no_starcat}){
return;
}

unless (defined $dthr){
push @{$self->{warn}}, "Dither states unavailable. Dither not checked\n";
return;
Expand Down Expand Up @@ -1227,27 +1214,6 @@ sub check_sim_position {
}
}

#############################################################################################
sub set_ok_no_starcat{
#############################################################################################
my $self = shift;
my $oflsid = $self->{dot_obsid};
# Is this an obsid that is allowed to not have a star catalog,
# if so, what oflsid string does it match:
my $ok_no_starcat;
if (defined $config{no_starcat_oflsid}){
my @no_starcats = @{$config{no_starcat_oflsid}};
for my $ofls_string (@no_starcats){
if ( $oflsid =~ /$ofls_string/){
$ok_no_starcat = $ofls_string;
}
}
}
$self->{ok_no_starcat} = $ok_no_starcat;
}



#############################################################################################
sub check_star_catalog {
#############################################################################################
Expand Down Expand Up @@ -1302,7 +1268,6 @@ sub check_star_catalog {

my $oflsid = $self->{dot_obsid};
my $obsid = $self->{obsid};
my $ok_no_starcat = $self->{ok_no_starcat};

# Set slew error (arcsec) for this obsid, or 120 if not available
my $slew_err;
Expand All @@ -1312,22 +1277,13 @@ sub check_star_catalog {
}
else{
# if no target quaternion, warn and continue
if (defined $ok_no_starcat){
push @{$self->{fyi}}, "No target/maneuver for obsid $obsid ($oflsid). OK for '$ok_no_starcat' ER. \n";
}
else{
push @{$self->{warn}}, "No target/maneuver for obsid $obsid ($oflsid). \n";
}
}
$slew_err = 120 if not defined $slew_err;

# ACA-004
# if no starcat, warn and quit this subroutine
unless ($c = find_command($self, "MP_STARCAT")) {
if (defined $ok_no_starcat){
push @{$self->{fyi}}, "No star catalog for obsid $obsid ($oflsid). OK for '$ok_no_starcat' ER. \n";
return;
}
push @{$self->{warn}}, "No star catalog for obsid $obsid ($oflsid). \n";
return;
}
Expand Down
13 changes: 0 additions & 13 deletions starcheck/src/starcheck.pl
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@

foreach my $obsid (@obsid_id) {
$obs{$obsid}->set_obsid(\%guidesumm); # Commanded obsid
$obs{$obsid}->set_ok_no_starcat();
$obs{$obsid}->set_target();
$obs{$obsid}->set_star_catalog();
$obs{$obsid}->set_maneuver(%mm) if ($mm_file);
Expand Down Expand Up @@ -398,12 +397,6 @@
}
else {
my $obsid = $obs{$oflsid}->{obsid};
if (defined $obs{$oflsid}->{ok_no_starcat}){
my $ofls_string = $obs{$oflsid}->{ok_no_starcat};
push @{$obs{$oflsid}->{fyi}},
sprintf("No Guide Star Summary for obsid $obsid ($oflsid). OK for '$ofls_string' ER. \n");
next HAS_GUIDE;
}
push @{$obs{$oflsid}->{warn}}, sprintf("No Guide Star Summary for obsid $obsid ($oflsid). \n");
}

Expand Down Expand Up @@ -700,12 +693,6 @@ sub json_obsids{
# minumum requirements for fractional guide star count for ERs and ORs
my $min_num_gui = ($obs{$obsid}->{obsid} >= 38000 ) ? 6.0 : 4.0;

# if there is no star catalog and that's ok
if (not ($obs{$obsid}->find_command("MP_STARCAT"))
and $obs{$obsid}->{ok_no_starcat}){
$min_num_gui = 0.0;
}

# use the 'special case' ER rules from ACA-044
if ($obs{$obsid}->{special_case_er}){
$min_num_gui = 4.0;
Expand Down

0 comments on commit d897c35

Please sign in to comment.