Skip to content

Commit

Permalink
Merge pull request #444 from sot/agasc
Browse files Browse the repository at this point in the history
Set starcheck to use agasc module default agasc file
  • Loading branch information
jeanconn authored Jul 1, 2024
2 parents 144485d + f141eab commit 1b5ec5e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
3 changes: 2 additions & 1 deletion starcheck/src/lib/Ska/Starcheck/Obsid.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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"});
}
}

Expand Down
12 changes: 3 additions & 9 deletions starcheck/src/starcheck.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -64,7 +63,6 @@
'yaml!',
'vehicle!',
'verbose=s',
'agasc_file=s',
'sc_data=s',
'fid_char=s',
'config_file=s',
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -1293,10 +1291,6 @@ =head1 OPTIONS
Limit starcheck review to first N obsids (for testing).
=item B<-agasc_file <agasc>>
Specify location of agasc h5 file. Default is SKA/data/agasc/agasc1p7.h5 .
=item B<-fid_char <fid characteristics file>>
Specify file name of the fid characteristics file to use. This must be in the SKA/data/starcheck/ directory.
Expand Down Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions starcheck/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand Down

0 comments on commit 1b5ec5e

Please sign in to comment.