IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23440


Ignore:
Timestamp:
Mar 19, 2009, 3:19:16 PM (17 years ago)
Author:
bills
Message:

make --clean and --magicked args booleans manage conversion in task

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/dist_component.pl

    r23396 r23440  
    5454           'magicked=s'     => \$magicked,   # data_state for this component
    5555           'outroot=s'      => \$outroot,    # "directory" for outputs
    56            'clean=s'        => \$clean,      # create clean distribution
     56           'clean        => \$clean,      # create clean distribution
    5757           'save-temps'     => \$save_temps, # Save temporary files?
    5858           'dbname=s'       => \$dbname,     # Database name
     
    8484
    8585my $basename = basename($path_base);
    86 
    87 #
    88 # are we creating a clean distribution?
    89 if (defined($clean) and ($clean eq "T")) {
    90     $clean = 1;
    91 } else {
    92     $clean = 0;
    93 }
    9486
    9587# making a clean bundle of raw images doesn't make sense
     
    258250        # TODO: these data will eventually come from the CONFIG dump
    259251
    260         my $fh;
    261         open $fh, "/data/ipp004.0/home/bills/ipp/ippScripts/scripts/clean.mdc" or
    262             &my_die("cannot find clean.mdc", $dist_id, $component, $PS_EXIT_UNKNOWN_ERROR);
    263 
    264         my @data = <$fh>;
    265         my $clean_mdc = join "", @data;
     252        my $clean_mdc = get_legacy_file_mdc();
    266253
    267254        my $mdlist = $mdcParser->parse($clean_mdc) or
     
    341328}
    342329
    343 sub delete_tmpdir {
     330sub delete_tmpdir
     331{
    344332    if (!$save_temps) {
    345333        system "rm -r $tmpdir";
     
    347335}
    348336
     337# list of output data products for runs that were made before the configuration re-work
     338sub get_legacy_file_mdc
     339{
     340    my $list =
     341"
     342#
     343# interesting things we might want to save in this file
     344#   1. whether file is to be distributed in 'clean' mode
     345#   2. whether file is to be cleaned (this should be the same thing)
     346#   3. type of file 'no, not our business, precious'
     347
     348# this data should probably be computed by the relevant program and saved as part
     349# of the configuration dump that is output.
     350
     351
     352PROD_LIST MULTI
     353
     354PROD_LIST   METADATA
     355        STAGE                    STR     RAW
     356    # there is isn't really a file rule for raw images
     357        DUMMY                   BOOL    F
     358END
     359
     360# list of data products for a gpc1 chipProcessedImfile  (made by ppImage)
     361PROD_LIST   METADATA
     362        STAGE                    STR     CHIP
     363        PPIMAGE.CONFIG          BOOL    T
     364#       PPIMAGE.CHIP            BOOL    F
     365#       PPIMAGE.CHIP.MASK       BOOL    F
     366#       PPIMAGE.CHIP.VARIANCE   BOOL    F
     367        PPIMAGE.BIN1            BOOL    T
     368        PPIMAGE.BIN2            BOOL    T
     369        PSPHOT.OUT.CMF.SPL      BOOL    T
     370        PSPHOT.BACKMDL          BOOL    T
     371        PPIMAGE.STATS           BOOL    T
     372        LOG.IMFILE              BOOL    T
     373        TRACE.IMFILE            BOOL    T
     374    # where do we put exposure level data such as LOG.EXP ?
     375END
     376# exposure level output products from camera processing made by psastro and ppImage (jpegs)
     377PROD_LIST   METADATA
     378        STAGE                    STR     CAM
     379        PSASTRO.CONFIG          BOOL    T
     380        PSASTRO.OUTPUT          BOOL    T
     381        PSASTRO.STATS           BOOL    T
     382        PPIMAGE.JPEG1           BOOL    T
     383        PPIMAGE.JPEG2           BOOL    T
     384        LOG.EXP                 BOOL    T
     385        TRACE.EXP               BOOL    T
     386END
     387# chip lelel output products from camera processing made by psastro
     388PROD_LIST   METADATA
     389        STAGE                    STR CAM_CHIP
     390#       PSASTRO.OUTPUT.MASK     BOOL    F
     391END
     392PROD_LIST   METADATA
     393        STAGE                    STR     FAKE
     394#       PPSIM.OUTPUT            BOOL    F
     395END
     396# list of data products for a gpc1 warpSkyfile (pswarp)
     397PROD_LIST   METADATA
     398        STAGE                    STR     WARP
     399        PSWARP.CONFIG           BOOL    T
     400#       PSWARP.OUTPUT           BOOL    F
     401#       PSWARP.OUTPUT.MASK      BOOL    F
     402#       PSWARP.OUTPUT.VARIANCE  BOOL    F
     403        PSWARP.OUTPUT.SOURCES   BOOL    T
     404        PSPHOT.BACKMDL.MEF      BOOL    T
     405        PSPHOT.PSF.SKY.SAVE     BOOL    T
     406        SKYCELL.STATS           BOOL    T
     407        SKYCELL.TEMPLATE        BOOL    T
     408        LOG.EXP                 BOOL    T
     409        TRACE.EXP               BOOL    T
     410END
     411# outputs from diffRun (ppSub)
     412PROD_LIST   METADATA
     413        STAGE                    STR     DIFF
     414        PPSUB.CONFIG            BOOL    T
     415#       PPSUB.OUTPUT            BOOL    F
     416#       PPSUB.OUTPUT.MASK       BOOL    F
     417#       PPSUB.OUTPUT.VARIANCE   BOOL    F
     418        PPSUB.OUTPUT.KERNELS    BOOL    T
     419        PPSUB.OUTPUT.JPEG1      BOOL    T
     420        PPSUB.OUTPUT.JPEG2      BOOL    T
     421        PSPHOT.OUT.CMF.MEF      BOOL    T
     422        PSPHOT.BACKMDL.MEF      BOOL    T
     423        SKYCELL.STATS           BOOL    T
     424        LOG.EXP                 BOOL    T
     425        TRACE.EXP               BOOL    T
     426END
     427PROD_LIST   METADATA
     428        STAGE                    STR     STACK
     429        PPSTACK.CONFIG          BOOL    T
     430#       PPSTACK.OUTPUT          BOOL    F
     431#       PPSTACK.OUTPUT.MASK     BOOL    F
     432#       PPSTACK.OUTPUT.VARIANCE BOOL    F
     433        PPSTACK.TARGET.PSF      BOOL    T
     434        PSPHOT.OUT.CMF.MEF      BOOL    T
     435        PSPHOT.BACKMDL.MEF      BOOL    T
     436        SKYCELL.STATS           BOOL    T
     437        PPSTACK.OUTPUT.JPEG1    BOOL    T
     438        PPSTACK.OUTPUT.JPEG2    BOOL    T
     439        LOG.EXP                 BOOL    T
     440        TRACE.EXP               BOOL    T
     441END
     442";
     443    return $list;
     444}
     445
     446
    349447__END__
  • trunk/ippTasks/dist.pro

    r23253 r23440  
    134134    book getword distToProcess $pageName outroot -var OUTROOT
    135135    book getword distToProcess $pageName dbname -var DBNAME
     136    if ("$CLEAN" = "T")
     137        $CLEAN_ARG = "--clean"
     138    else
     139        $CLEAN_ARG = ""
     140    end
     141    # magicked is output as integer due to the union in the sql
     142    if ($MAGICKED)
     143        $MAGICKED_ARG = "--magicked"
     144    else
     145        $MAGICKED_ARG = ""
     146    end
    136147
    137148#    set.host.for.camera $CAMERA $MAGIC_ID
     
    141152    sprintf logfile "%s/dist.%s.%s.log" $OUTROOT $DIST_ID $COMPONENT
    142153
    143     $run = dist_component.pl --dist_id $DIST_ID --camera $CAMERA --stage $STAGE --stage_id $STAGE_ID --component $COMPONENT --path_base $PATH_BASE --chip_path_base $CHIP_PATH_BASE --state $STATE --data_state $DATA_STATE --magicked $MAGICKED --clean $CLEAN --outroot $OUTROOT --logfile $logfile
     154    $run = dist_component.pl --dist_id $DIST_ID --camera $CAMERA --stage $STAGE --stage_id $STAGE_ID --component $COMPONENT --path_base $PATH_BASE --chip_path_base $CHIP_PATH_BASE --state $STATE --data_state $DATA_STATE $MAGICKED_ARG $CLEAN_ARG --outroot $OUTROOT --logfile $logfile
    144155
    145156    add_standard_args run
Note: See TracChangeset for help on using the changeset viewer.