IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35134


Ignore:
Timestamp:
Feb 8, 2013, 11:50:49 AM (13 years ago)
Author:
bills
Message:

For warp_bg stage add column alt_cam_label. If set use the smf file
from that cam run for the astrometry. This is intended to be a
camRun with the nomal backckground subtraction.

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/dbconfig/background.md

    r29493 r35134  
    4848    dist_group          STR     64
    4949    reduction           STR     64
     50    alt_cam_label       STR     64
    5051    note                STR     255
    5152    registered          TAI     NULL
  • trunk/dbconfig/changes.txt

    r35048 r35134  
    22662266UPDATE dbversion set schema_version = '1.1.73', updated= CURRENT_TIMESTAMP();
    22672267
     2268ALTER TABLE warpBackgroundRun ADD COLUMN alt_cam_label VARCHAR(255) AFTER reduction;
     2269
     2270UPDATE dbversion set schema_version = '1.1.74', updated= CURRENT_TIMESTAMP();
    22682271
    22692272-- new tables for managing the "release" of ipp data
     
    23352338) ENGINE=innodb DEFAULT CHARSET=latin1;
    23362339
    2337 UPDATE dbversion set schema_version = '1.1.74', updated= CURRENT_TIMESTAMP();
     2340ALTER TABLE warpBackgroundRun ADD COLUMN alt_cam_label VARCHAR(255) AFTER reduction;
     2341
     2342UPDATE dbversion set schema_version = '1.1.75', updated= CURRENT_TIMESTAMP();
  • trunk/ippScripts/scripts/background_warp.pl

    r35127 r35134  
    3939
    4040my ($warp_bg_id, $skycell_id, $tess_dir, $reduction, $camera, $dbname, $outroot, $threads, $verbose, $no_update, $no_op, $redirect, $save_temps);
    41 my ($astrometry, $imageName, $maskName, $weightName, $magicked);
     41my ($astrometry, $imageName, $maskName, $weightName, $magicked, $exp_tag, $alternate_astrometry_label);
    4242GetOptions(
    4343    'warp_bg_id|i=s'      => \$warp_bg_id, # Warp identifier
    4444    'skycell_id|s=s'      => \$skycell_id, # Skycell identifier
    4545    'tess_dir|s=s'        => \$tess_dir, # Tesselation identifier
     46    'exp_tag|=s'          => \$exp_tag, # exposure tag
    4647    'camera|c=s'          => \$camera, # Camera name
    4748    'dbname|d=s'          => \$dbname, # Database name
     
    5152    'mask-list=s'         => \$maskName, # list of input mask files
    5253    'astrometry=s'        => \$astrometry,
     54    'alt_cam_label=s'     => \$alternate_astrometry_label,  # camRun.label for alternate astrometry
    5355    'magicked=s'          => \$magicked,
    5456    'threads=s'           => \$threads,   # Number of threads to use for pswarp
     
    8486}
    8587
     88if ($alternate_astrometry_label) {
     89    my_die( "--exp_tag is required when using alternate astrometry", $warp_bg_id, $skycell_id, $PS_EXIT_PROG_ERROR )
     90        unless defined $exp_tag;
     91}
     92
    8693my $ipprc = PS::IPP::Config->new( $camera ) or
    8794my_die( "Unable to set up", $warp_bg_id, $skycell_id, $PS_EXIT_CONFIG_ERROR ); # IPP configuration
     
    119126my $tempOutRoot = "/tmp/background.warp.$warp_bg_id.$skycell_id";
    120127
    121 # XXX: get this from recipe
    122 my $alternate_astrometry_label = 'M31.test.20130206.bgsub';
    123 # XXX: get exp_id from command line
    124 my $exp_id = 196758;
    125 
    126128if (!defined $imageName) {
    127129    # go find our inputs
    128130    my $astrom_path_base;
    129131    if (defined $alternate_astrometry_label) {
    130         my $command = "$camtool -processedexp -exp_id $exp_id -label $alternate_astrometry_label";
     132        my $command = "$camtool -processedexp -exp_tag $exp_tag -label $alternate_astrometry_label";
    131133        $command .= " -dbname $dbname" if $dbname;
    132134        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
  • trunk/ippTasks/background.pro

    r28486 r35134  
    394394    book getword warpBackgroundRuns $pageName dbname -var DBNAME
    395395    book getword warpBackgroundRuns $pageName reduction -var REDUCTION
     396    book getword warpBackgroundRuns $pageName alt_cam_label -var ALT_CAM_LABEL
    396397
    397398    set.host.for.skycell $SKYCELL_ID
     
    402403    stderr $LOGDIR/bg.warp.run.log
    403404
    404     $run = background_warp.pl --threads @MAX_THREADS@ --warp_bg_id $WARP_BG_ID --skycell_id $SKYCELL_ID --tess_dir $TESS_DIR --camera $CAMERA --outroot $outroot --redirect-output
     405    $run = background_warp.pl --threads @MAX_THREADS@ --warp_bg_id $WARP_BG_ID --skycell_id $SKYCELL_ID --tess_dir $TESS_DIR --camera $CAMERA --exp_tag $EXP_TAG --outroot $outroot --redirect-output
    405406    if ("$REDUCTION" != "NULL")
    406407      $run = $run --reduction $REDUCTION
     408    end
     409    if ("$ALT_CAM_LABEL" != "NULL")
     410      $run = $run --alt_cam_label $ALT_CAM_LABEL
    407411    end
    408412    add_standard_args run
     
    446450
    447451  periods      -poll $LOADPOLL
    448 #  periods      -exec $LOADEXEC
    449452  periods      -exec 30
    450453  periods      -timeout 60
  • trunk/ippTools/share/bgtool_towarp.sql

    r34589 r35134  
    2424    AND (Label.active OR Label.active IS NULL)
    2525-- WHERE hook %s
    26 ORDER BY priority DESC, chip_bg_id
     26ORDER BY priority DESC, warp_bg_id, skycell_id
  • trunk/ippTools/share/bgtool_warp.sql

    r28743 r35134  
    44    warpBackgroundRun.workdir,
    55    warpBackgroundRun.label,
     6    warpBackgroundRun.alt_cam_label,
    67    rawExp.exp_id,
    78    rawExp.exp_name,
  • trunk/ippTools/share/pxadmin_create_tables.sql

    r35110 r35134  
    18431843    data_group VARCHAR(64),           -- group for data
    18441844    dist_group VARCHAR(64),           -- group for distribution
    1845     reduction VARCHAR(64),    -- reduction class (for altering recipe)
     1845    reduction VARCHAR(64),            -- reduction class (for altering recipe)
     1846    alt_cam_label VARCHAR(64),        -- label for alternate version of astrometry (optional)
    18461847    note VARCHAR(255),        -- note
    18471848    registered TIMESTAMP DEFAULT CURRENT_TIMESTAMP, -- time run was registered
  • trunk/ippTools/src/bgtool.c

    r35121 r35134  
    13101310    PXOPT_LOOKUP_STR(dist_group, config->args, "-set_dist_group", false, false);
    13111311    PXOPT_LOOKUP_STR(reduction, config->args, "-set_reduction", false, false);
     1312    PXOPT_LOOKUP_STR(alt_cam_label, config->args, "-set_alt_cam_label", false, false);
    13121313    PXOPT_LOOKUP_STR(note, config->args, "-set_note", false, false);
    13131314    PXOPT_LOOKUP_TIME(registered, config->args, "-registered", false, false);
     
    14241425                                     dist_group  ? dist_group : row->dist_group,
    14251426                                     reduction   ? reduction  : row->reduction,
     1427                                     alt_cam_label,
    14261428                                     note        ? note       : row->note,
    14271429                                     NULL, 0)) {
  • trunk/ippTools/src/bgtoolConfig.c

    r35121 r35134  
    285285    psMetadataAddStr(definewarpArgs, PS_LIST_TAIL, "-set_label", 0, "define label", NULL);
    286286    psMetadataAddStr(definewarpArgs, PS_LIST_TAIL, "-set_reduction", 0, "define reduction class", NULL);
     287    psMetadataAddStr(definewarpArgs, PS_LIST_TAIL, "-set_alt_cam_label", 0, "define alternate astrometry sources", NULL);
    287288    psMetadataAddStr(definewarpArgs, PS_LIST_TAIL, "-set_data_group", 0, "define data group", NULL);
    288289    psMetadataAddStr(definewarpArgs, PS_LIST_TAIL, "-set_dist_group", 0, "define dist group", NULL);
Note: See TracChangeset for help on using the changeset viewer.