IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42749


Ignore:
Timestamp:
Dec 6, 2024, 1:25:39 PM (20 months ago)
Author:
eugene
Message:

merge changes from trunk : add file.magic and rawfix tools

Location:
branches/eam_branches/ipp-20230313/tools
Files:
1 deleted
6 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20230313/tools

  • branches/eam_branches/ipp-20230313/tools/eam/rawfix.20230221/src/get_hosts_fixchip.sh

    r42531 r42749  
    2727
    2828foreach f ($basedir/$dateobs/XY??.hosts.txt)
    29   set myhost = `cat $f | grep -v ippb | sort -k 2n | tail -n 1 | prcol 1`
     29# set myhost = `cat $f | grep -v ippb | sort -k 2n | tail -n 1 | prcol 1`
     30  set myhost = `awk 'BEGIN{srand()}{print $0, rand()}' $f | grep -v ippb | sort -k 2n | tail -n 5 | sort -k 3n | tail -n 1 | prcol 1`
    3031  set chipID = `echo $f | awk -F/ '{print $NF}' | awk -F. '{print $1}'`
    3132  if ("$myhost" == "") then
  • branches/eam_branches/ipp-20230313/tools/eam/rawfix.20230221/src/ipp_apply_burntool_psvideo.pl

    r42703 r42749  
    1515use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
    1616use Pod::Usage qw( pod2usage );
     17
     18use Sys::Hostname;
     19my $host = hostname();
     20my $date = `date`;
     21print "\n\n";
     22print "Starting script $0 on $host at $date\n\n";
    1723
    1824my ( $class_id, $dateobs_begin, $dateobs_end, $convert, $dbname, $logfile, $verbose, $save_temps, $rerun, $psvidOutput);
     
    3238pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    3339pod2usage(
    34           -msg => "Required options: --class_id --dateobs_begin --dateobs_end --dbname",
     40          -msg => "Required options: --class_id --dateobs_begin --dateobs_end --dbname --psvidOutput",
    3541          -exitval => 3,
    3642          ) unless
     
    3844    defined $dateobs_begin and
    3945    defined $dateobs_end and
     46    defined $psvidOutput and
    4047    defined $dbname;
    4148
     
    6572$ipprc->redirect_output($logfile) if $logfile;
    6673
    67 # Determine the value of a "good" burntool run.
    68 # XXX this program should always generate the latest version
    69 # but the processing system must be told to use an earlier version
    70 # until the newer version is validated.  Perhaps split these.
    71 my $config_cmd = "$ppConfigDump -camera $camera -get-key BURNTOOL.STATE.GOOD";
    72 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    73     run ( command => $config_cmd, verbose => $verbose);
    74 unless ($success) {
    75     $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
    76     &my_die("Unable to perform ppConfigDump: $error_code", 0, 0, $class_id, $PS_EXIT_SYS_ERROR);
    77 }
    78 
    79 my $recipeData = $mdcParser->parse(join "", @$stdout_buf) or
    80     &my_die("Unable to parse metadata config doc", 0, 0, $class_id, $PS_EXIT_SYS_ERROR);
    81 
    82 my $burntoolStateGood = 999;
    83 foreach my $cfg (@$recipeData) {
    84     if ($cfg->{name} eq 'BURNTOOL.STATE.GOOD') {
    85         $burntoolStateGood = $cfg->{value};
    86     }
    87 }
    88 if ($burntoolStateGood == 999) {
    89     &my_die("Failed to determine BURNTOOL.STATE.GOOD", $burntoolStateGood, $class_id, 0, $PS_EXIT_SYS_ERROR);
     74my $burntoolStateGood = 15;
     75if (0) {
     76    # Determine the value of a "good" burntool run.
     77    # XXX this program should always generate the latest version
     78    # but the processing system must be told to use an earlier version
     79    # until the newer version is validated.  Perhaps split these.
     80
     81    my $config_cmd = "$ppConfigDump -camera $camera -get-key BURNTOOL.STATE.GOOD";
     82    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     83        run ( command => $config_cmd, verbose => $verbose);
     84    unless ($success) {
     85        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     86        &my_die("Unable to perform ppConfigDump: $error_code", 0, 0, $class_id, $PS_EXIT_SYS_ERROR);
     87    }
     88
     89    my $recipeData = $mdcParser->parse(join "", @$stdout_buf) or
     90        &my_die("Unable to parse metadata config doc", 0, 0, $class_id, $PS_EXIT_SYS_ERROR);
     91
     92    my $burntoolStateGood = 999;
     93    foreach my $cfg (@$recipeData) {
     94        if ($cfg->{name} eq 'BURNTOOL.STATE.GOOD') {
     95            $burntoolStateGood = $cfg->{value};
     96        }
     97    }
     98    if ($burntoolStateGood == 999) {
     99        &my_die("Failed to determine BURNTOOL.STATE.GOOD", $burntoolStateGood, $class_id, 0, $PS_EXIT_SYS_ERROR);
     100    }
    90101}
    91102my $outState = -1 * abs($burntoolStateGood);
    92103
    93104print "Target burntool version: $burntoolStateGood\n";
     105if ($burntoolStateGood != 15) { &my_die ("burntool state is not set to 15\n"); }
    94106
    95107# Define list of images to examine.
     
    101113$command .= " -dbname $dbname" if defined $dbname;
    102114
    103 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     115my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    104116    run ( command => $command, verbose => $verbose);
    105117unless ($success) {
     
    151163    my $outTable  = $file->{uri};
    152164   
     165    my $data_state = $file->{data_state};
     166    if ($data_state eq "lossy") {
     167        print "## skipping $rawImfile : data_state $data_state\n";
     168        next;
     169    }
     170
    153171    if($burntoolStateGood == 15) {
    154172        $outTable =~ s/fits$/burn.v15.tbl/;         
  • branches/eam_branches/ipp-20230313/tools/eam/rawfix.20230221/src/rawfix.advance.pt

    r42531 r42749  
    11
    2 $MAX_ACTIVE_NIGHTS = 10
     2$MAX_ACTIVE_NIGHTS = 30
    33
    44## regularly run the command advance.rawfits.sh
  • branches/eam_branches/ipp-20230313/tools/eam/rawfix.20230221/src/rawfix.burntool.pt

    r42531 r42749  
    160160    stderr $mypath/$YEAR/$DATEOBS/log.burntool.run.$CHIP_ID.v$ITER
    161161
    162     host -required $BURNHOST
     162   
     163    host $BURNHOST
     164#   host -required $BURNHOST
     165#   too many jobs wanted the same machines so the processing was clogged.
     166#   allow them to go elsewhere if needed.
     167   
    163168    ## check if this host needs to be launched
    164169    if (not($?host:$BURNHOST))
  • branches/eam_branches/ipp-20230313/tools/eam/rawfix.20230221/src/update.bnodes.sh

    r42404 r42749  
    11#!/bin/csh
     2
     3echo "this program is deprecated since we use a directory on b-node for the analysis"
     4exit 2
    25
    36if ($#argv != 2) then
Note: See TracChangeset for help on using the changeset viewer.