diff --git a/starcheck/src/lib/Ska/Starcheck/Obsid.pm b/starcheck/src/lib/Ska/Starcheck/Obsid.pm index 88c7d012..ea646c83 100644 --- a/starcheck/src/lib/Ska/Starcheck/Obsid.pm +++ b/starcheck/src/lib/Ska/Starcheck/Obsid.pm @@ -1264,7 +1264,8 @@ sub check_star_catalog { or (($type =~ /BOT|ACQ/) && ($c->{"GS_ASPQ$i"} > 40))) { push @orange_warn, - sprintf "[%2d] Centroid Perturbation Warning. %s: ASPQ1 = %2d\n",; + sprintf("[%2d] Centroid Perturbation Warning. %s: ASPQ1 = %2d\n", + $i, $sid, $c->{"GS_ASPQ$i"}); } } diff --git a/starcheck/src/starcheck.pl b/starcheck/src/starcheck.pl index 2c2c7584..fc57ee37 100755 --- a/starcheck/src/starcheck.pl +++ b/starcheck/src/starcheck.pl @@ -45,7 +45,6 @@ html => 1, text => 1, yaml => 1, - agasc_file => "${SKA}/data/agasc/proseco_agasc_1p7.h5", config_file => "characteristics.yaml", fid_char => "fid_CHARACTERISTICS", verbose => 1, @@ -64,7 +63,6 @@ 'yaml!', 'vehicle!', 'verbose=s', - 'agasc_file=s', 'sc_data=s', 'fid_char=s', 'config_file=s', @@ -189,7 +187,7 @@ my $odb_file = get_file("$Starcheck_Data/$par{fid_char}*", 'odb', 'required'); -my $agasc_file = get_file("$par{agasc_file}", "agasc_file"); +my $agasc_file = get_file(call_python("utils.get_agasc_file"), "agasc_file"); my $ps_file = get_file("$par{dir}/mps/ms*.sum", 'processing summary'); my $tlr_file = get_file("$par{dir}/${sosa_dir_slash}*.tlr", 'TLR', 'required'); @@ -1293,10 +1291,6 @@ =head1 OPTIONS Limit starcheck review to first N obsids (for testing). -=item B<-agasc_file > - -Specify location of agasc h5 file. Default is SKA/data/agasc/agasc1p7.h5 . - =item B<-fid_char > Specify file name of the fid characteristics file to use. This must be in the SKA/data/starcheck/ directory. @@ -1338,8 +1332,8 @@ =head1 DESCRIPTION results in a fatal error, however. Starcheck uses the SKA environment variable to locate the default agasc file -"${SKA}/data/agasc/proseco_agasc_1p7.h5". If SKA is not set this defaults to -'/proj/sot/ska'. +"${SKA}/data/agasc/proseco_agasc_*.h5". The agasc file location can be controlled +with the agasc module environment variables AGASC_DIR and AGASC_HDF5_FILE. Starcheck uses the PROSECO_OR_IMAGE_SIZE environment variable if available to set up the check for the appropriate readout image size in pixels for science diff --git a/starcheck/utils.py b/starcheck/utils.py index 6694b256..a89050b3 100644 --- a/starcheck/utils.py +++ b/starcheck/utils.py @@ -46,6 +46,11 @@ message=r"\nModel .* computed between .* clipping input mag\(s\) outside that range\.", ) + +def get_agasc_file(): + return agasc.get_agasc_filename() + + def prehtml2text(html_text): """Convert the starcheck report html to plain text."""