IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31533


Ignore:
Timestamp:
May 11, 2011, 5:50:38 PM (15 years ago)
Author:
watersc1
Message:

backports from the trunk:

stacktool: implement -warp_id option to definebyquery
laptool: add -listrun mode that is an alias of -pendingrun (because once the job completes -listrun makes more sense)
camera_exp.pl : set the quality for exposures with very large FWHM values to prevent them from continuing
camera.config : set the MAX_ALLOWED_FWHM to 12 (3")
lap_science.pl : make use of the stacktool -warp_id option to only queue stacks that have good data_states.

Location:
tags/ipp-20110505
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-20110505/ippScripts/scripts/camera_exp.pl

    r30071 r31533  
    153153    }
    154154    chomp $cmdflags;
     155
     156    { # Determine if FWHM is too large to bother continuing.
     157        my $command = "$ppConfigDump -camera $camera -dump-camera -";
     158        my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     159            run(command => $command, verbose => $verbose);
     160        unless ($success) {
     161            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     162            &my_die("Unable to perform ppConfigDump: $error_code", $cam_id, $PS_EXIT_CONFIG_ERROR);
     163        }
     164        my $cameraConfig = $mdcParser->parse(join "", @$stdout_buf) or
     165            &my_die("Unable to parse metadata config doc", $cam_id, $PS_EXIT_CONFIG_ERROR);
     166
     167        my $maxFWHM = metadataLookupStr($cameraConfig, 'MAX_ALLOWED_FWHM');
     168        if ($maxFWHM) {
     169            my $expFWHM;
     170            ($expFWHM) = $cmdflags =~ /-fwhm_major (\d+)/;     
     171           
     172            if ($expFWHM > $maxFWHM) {
     173                print "Setting quality to 4007 due to large FWHM: exposure: $expFWHM  maximum: $maxFWHM\n";
     174                $cmdflags .= " -quality 4007 "; # This corresponds to PSASTRO_ERR_DATA
     175                $no_op = 1;
     176            }
     177        }
     178    }
    155179}
    156180
  • tags/ipp-20110505/ippScripts/scripts/lap_science.pl

    r31526 r31533  
    621621    }
    622622
     623    my $warps = '';
     624    foreach $exposure (@$exposures) {
     625        if (($exposure->{data_state} != 'drop')&&
     626            (S64_IS_NOT_NULL($exposure->{warp_id}))) {
     627            $warps .= " -warp_id $exposure->{warp_id} ";
     628        }
     629    }
     630
    623631    my @utctime = gmtime();
    624632    $utctime[5] += 1900;
     
    636644    $command .= "  -set_workdir $workdir  -set_dist_group NODIST ";
    637645    $command .= " -min_num 2 -set_reduction QUICKSTACK ";
     646    $command .= " $warps ";
    638647
    639648    my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     
    689698    unless (defined($label) && defined($filter) && defined($proj_cell)) {
    690699        &my_die("Unable to perform stacktool. Insufficient information.", $lap_id);
     700    }
     701
     702    my $warps = '';
     703    foreach $exposure (@$exposures) {
     704        if (($exposure->{data_state} != 'drop')&&
     705            (S64_IS_NOT_NULL($exposure->{magicked}))&&
     706            (S64_IS_NOT_NULL($exposure->{warp_id}))) {
     707            $warps .= " -warp_id $exposure->{warp_id} ";
     708        }
    691709    }
    692710
     
    704722    $command .= " -definebyquery -select_label $label -select_skycell_id ${proj_cell}.% -select_filter $filter ";
    705723    $command .= " -set_label ${label} -set_workdir $workdir -set_data_group $data_group ";
    706     $command .= " -min_num 2 -set_reduction THREEPI_STACK -set_dist_group ${label}";
     724    $command .= " -min_num 2 -set_reduction THREEPI_STACK -set_dist_group ${label} ";
     725    $command .= " $warps ";
    707726
    708727    my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
  • tags/ipp-20110505/ippTools/src/laptoolConfig.c

    r31483 r31533  
    7575  ADD_OPT(Bool,pendingrunArgs, "-simple",                     "use the simple output format", false);
    7676
     77  // -listrun
     78  psMetadata *listrunArgs = psMetadataAlloc();
     79  ADD_OPT(S64, listrunArgs, "-seq_id",                     "search by LAP sequence ID", 0);
     80  ADD_OPT(S64, listrunArgs, "-lap_id",                     "search by LAP run ID", 0);
     81  ADD_OPT(Str, listrunArgs, "-projection_cell",            "search by projection cell", NULL);
     82  ADD_OPT(Str, listrunArgs, "-filter",                     "search by filter", NULL);
     83  //  ADD_OPT(Str, listrunArgs, "-label",                      "search by LAP run label", NULL);
     84  psMetadataAddStr(listrunArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "search by LAP run label", NULL);
     85  ADD_OPT(Str, listrunArgs, "-state",                      "search by LAP run state", NULL);
     86  ADD_OPT(Str, listrunArgs, "-fault",                      "search by LAP run fault", NULL);
     87  ADD_OPT(Bool,listrunArgs, "-simple",                     "use the simple output format", false);
     88
    7789  // -updaterun
    7890  psMetadata *updaterunArgs = psMetadataAlloc();
     
    129141  psMetadata *argSets = psMetadataAlloc();
    130142  psMetadata *modes = psMetadataAlloc();
    131 
     143 
    132144  PXOPT_ADD_MODE("-definesequence",          "", LAPTOOL_MODE_DEFINESEQUENCE,   definesequenceArgs);
    133145  PXOPT_ADD_MODE("-listsequence",            "", LAPTOOL_MODE_LISTSEQUENCE,     listsequenceArgs);
    134146  PXOPT_ADD_MODE("-definerun",               "", LAPTOOL_MODE_DEFINERUN,        definerunArgs);
    135147  PXOPT_ADD_MODE("-pendingrun",              "", LAPTOOL_MODE_PENDINGRUN,       pendingrunArgs);
     148  PXOPT_ADD_MODE("-listrun",                 "", LAPTOOL_MODE_PENDINGRUN,       listrunArgs);
    136149  PXOPT_ADD_MODE("-updaterun",               "", LAPTOOL_MODE_UPDATERUN,        updaterunArgs);
    137150  PXOPT_ADD_MODE("-pendingexp",              "", LAPTOOL_MODE_PENDINGEXP,       pendingexpArgs);
  • tags/ipp-20110505/ippTools/src/stacktool.c

    r31479 r31533  
    246246    PXOPT_COPY_STR(config->args,  where, "-select_data_group",         "warpRun.data_group", "==");
    247247    pxAddLabelSearchArgs (config, where, "-select_label",              "warpRun.label", "LIKE"); // define using warp label
    248 
     248    pxAddLabelSearchArgs (config, where, "-warp_id",                   "warpRun.warp_id", "==");
     249   
    249250    // these are used to build the HAVING restriction
    250251    PXOPT_COPY_S32(config->args, having, "-min_num", "num_warp", ">=");
  • tags/ipp-20110505/ippTools/src/stacktoolConfig.c

    r30945 r31533  
    9191    psMetadataAddF64(definebyqueryArgs, PS_LIST_TAIL, "-select_zpt_obs_max", 0, "define max zero point", NAN);
    9292    psMetadataAddF64(definebyqueryArgs, PS_LIST_TAIL, "-select_astrom", 0, "define max astrometry rms", NAN);
     93    psMetadataAddS64(definebyqueryArgs, PS_LIST_TAIL, "-warp_id", PS_META_DUPLICATE_OK, "include this warp ID (multiple OK)", 0);
    9394    psMetadataAddS32(definebyqueryArgs, PS_LIST_TAIL, "-random", 0, "use this number of random elements", 0);
    9495    psMetadataAddS32(definebyqueryArgs, PS_LIST_TAIL, "-min_num", 0, "minimum number of inputs", 0);
  • tags/ipp-20110505/ippconfig/gpc1/camera.config

    r31163 r31533  
    165165NPIX_INTERCHIP          S32     103794483
    166166
     167# This sets the maximum size for the fwhm_major.  This is roughly 3", and 98.67% of all exposures in the database are less than this.
     168MAX_ALLOWED_FWHM          F32         12
     169
    167170# The set of maskbits that should not be set to NAN in "released" images
    168171# This value is equal to CONV.POOR | STARCORE | SPIKE | SUSPECT  = 0x5280
Note: See TracChangeset for help on using the changeset viewer.