IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 27301


Ignore:
Timestamp:
Mar 16, 2010, 12:39:45 PM (16 years ago)
Author:
Paul Price
Message:

Make destreaking care about whether we used dynamic masking (so that we need to care about the camera mask or only use the chip mask). This we get from the (current) recipe, which is not ideal, but better than simply looking whether the file exists (it may not be available over NFS or Nebulous). Though I have discussed these fixes with Bill, I have not yet tested the code.

Location:
trunk
Files:
9 edited

Legend:

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

    r26554 r27301  
    3232my $camtool = can_run('camtool') or (warn "Can't find camtool" and $missing_tools = 1);
    3333my $censorObjects = can_run('censorObjects') or (warn "Can't find censorObjects" and $missing_tools = 1);
     34my $ppConfigDump = can_run('ppConfigDump') or (warn "Can't find ppConfigDump" and $missing_tools = 1);
    3435my $ppStatsFromMetadata = can_run('ppStatsFromMetadata') or (warn "Can't find ppStatsFromMetadata" and $missing_tools = 1);
    3536if ($missing_tools) {
     
    3940
    4041# Parse the command-line arguments
    41 my ($magic_ds_id, $camera, $streaks, $inv_streaks, $exp_id, $stage, $stage_id, $component, $uri, $path_base, $cam_path_base);
     42my ($magic_ds_id, $camera, $streaks, $inv_streaks, $exp_id, $stage, $stage_id, $component, $uri, $path_base, $cam_path_base, $cam_reduction);
    4243my ($outroot, $recoveryroot);
    4344my ($replace, $release);
     
    5657           'path_base=s'    => \$path_base,  # path_base of the input
    5758           'cam_path_base=s'=> \$cam_path_base,  # path_base from camera stage (for chip and raw)
     59           'cam_reduction=s'=> \$cam_reduction,  # reduction class from camera stage (for chip and raw)
    5860           'outroot=s'      => \$outroot,     # "directory" for temporary images (may be nebulous)
    5961           'recoveryroot=s' => \$recoveryroot,# "directory" for saving the images of excised pixels
     
    8486my $ipprc = PS::IPP::Config->new( $camera ) or my_die( "Unable to set up", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR ); # IPP configuration
    8587$ipprc->redirect_output($logfile) or my_die( "Unable to redirect output", $magic_ds_id, $component, $PS_EXIT_SYS_ERROR ) if $logfile;
     88my $recipe_psastro = $ipprc->reduction($cam_reduction, 'PSASTRO'); # Recipe to use
     89&my_die("Unrecognised PSASTRO recipe", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR) unless defined $recipe_psastro;
    8690
    8791my ($skycell_args, $class_id, $skycell_id);
     
    97101} elsif ($stage ne "camera") {
    98102    &my_die("Invalid value for stage: $stage", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR);
    99 }   
     103}
    100104$inv_streaks = undef if defined($inv_streaks) and ($inv_streaks eq "NULL");
    101105
     
    114118    if ($stage eq 'camera') {
    115119        my $nebulousServer = metadataLookupStr( $ipprc->{_siteConfig}, 'NEB_SERVER' );
    116         &my_die("cannot find NEB_SERVER in site configuration", 
    117                                         $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR) 
     120        &my_die("cannot find NEB_SERVER in site configuration",
     121                                        $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR)
    118122            if !$ nebulousServer;
    119123
     
    233237        $mask   = $ipprc->filename("PSASTRO.OUTPUT.MASK", $cam_path_base, $class_id) if $release ;
    234238    } elsif ($stage eq "chip") {
     239
     240        # Check to see if we're using dynamic masks
     241        my $dynamicMasks;               # Use dynamic masks?
     242        {
     243            # Get the PSASTRO recipe
     244            my $command = "$ppConfigDump -camera $camera -recipe PSASTRO $recipe_psastro -dump-recipe PSASTRO -";
     245            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     246                run(command => $command, verbose => $verbose);
     247            unless ($success) {
     248                $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     249                &my_die("Unable to perform ppConfigDump: $error_code", $magic_ds_id, $component,
     250                        $PS_EXIT_CONFIG_ERROR);
     251            }
     252            my $recipeData = $mdcParser->parse(join "", @$stdout_buf) or
     253                &my_die("Unable to parse metadata config doc", $magic_ds_id, $component,
     254                        $PS_EXIT_CONFIG_ERROR);
     255
     256            $dynamicMasks = metadataLookupBool($recipeData, 'REFSTAR_MASK');
     257        }
     258
    235259        # we use the mask output from the camera stage for input and replace
    236260        # the output of the chip stage with that mask as well.
    237261        $image  = $ipprc->filename("PPIMAGE.CHIP", $path_base, $class_id);
    238         $mask   = $ipprc->filename("PSASTRO.OUTPUT.MASK", $cam_path_base, $class_id);
    239         $ch_mask= $ipprc->filename("PPIMAGE.CHIP.MASK", $path_base, $class_id);
    240262        $weight = $ipprc->filename("PPIMAGE.CHIP.VARIANCE", $path_base, $class_id);
    241263        $astrom = $ipprc->filename("PSASTRO.OUTPUT", $cam_path_base);
    242         if (!$ipprc->file_exists($mask)) {
    243             carp("camera mask file $mask for $component not found. Continuing using mask from chip stage.");
    244             $mask = $ch_mask;
    245             $ch_mask = undef;
    246         }
     264
     265        if ($dynamicMasks) {
     266            $mask = $ipprc->filename("PSASTRO.OUTPUT.MASK", $cam_path_base, $class_id);
     267            $ch_mask = $ipprc->filename("PPIMAGE.CHIP.MASK", $path_base, $class_id);
     268        } else {
     269            $mask = $ipprc->filename("PPIMAGE.CHIP.MASK", $path_base, $class_id);
     270        }
     271
    247272        # XXX: should we censor the sources as well? For now we're leaving them out of the distribution bundles
    248273        # because they confuse people
     
    262287
    263288        if ($inv_streaks) {
    264             # create a temporary file containing the contents of the 
     289            # create a temporary file containing the contents of the
    265290            # two streaks files
    266291            ($allstreaks_fh, $allstreaks_name) = tempfile ("/tmp/all.streaks.XXXX",
     
    357382        my $quality = $file->{quality};
    358383        if (!$quality) {
    359             my $mask = $ipprc->filename("PSASTRO.OUTPUT.MASK", $path_base, $class_id); 
     384            my $mask = $ipprc->filename("PSASTRO.OUTPUT.MASK", $path_base, $class_id);
    360385            if (! $ipprc->file_exists($mask)) {
    361386                # camera mask doesn't exist for this chip. Fall back to the chip mask
     
    379404                &my_die("Unable to perform censorObjects: $error_code", $magic_ds_id, $component, $error_code);
    380405            }
    381             my $output = $ipprc->filename("CENSOR.OUTPUT", $backup_path_base); 
     406            my $output = $ipprc->filename("CENSOR.OUTPUT", $backup_path_base);
    382407            &my_die("expected output file $output not found ", $magic_ds_id, $component, $PS_EXIT_DATA_ERROR)
    383408                unless $ipprc->file_exists($output);
     
    481506    }
    482507
    483     close $fout 
     508    close $fout
    484509        or my_die("failed to close combined streaks file", $magic_ds_id,
    485510                     $component, $PS_EXIT_UNKNOWN_ERROR);
  • trunk/ippScripts/scripts/magic_destreak_cleanup.pl

    r27256 r27301  
    3030my $missing_tools;
    3131my $magicdstool   = can_run('magicdstool') or (warn "Can't find magicdstool" and $missing_tools = 1);
     32my $ppConfigDump = can_run('ppConfigDump') or (warn "Can't find ppConfigDump" and $missing_tools = 1);
    3233if ($missing_tools) {
    3334    warn("Can't find required tools.");
     
    3637
    3738# Parse the command-line arguments
    38 my ($magic_ds_id, $camera, $force);
     39my ($magic_ds_id, $camera);
    3940my ($dbname, $save_temps, $verbose, $no_update, $no_op, $logfile);
    4041
     
    4243           'magic_ds_id=s'  => \$magic_ds_id,# Magic destreak run identifier
    4344           'camera=s'       => \$camera,     # camera for evaluating file rules
    44            'force'          => \$force,      # force deletion
    4545           'save-temps'     => \$save_temps, # Save temporary files?
    4646           'dbname=s'       => \$dbname,     # Database name
     
    8787my $dbh = DBI->connect($dsn, $dbuser, $dbpassword) or die "Cannot connect to mysql server\n";
    8888
    89 my $q1 = "SELECT magicDSRun.*, camera, camProcessedExp.path_base AS cam_path_base, magicRun.inverse"
    90          . " FROM magicDSRun JOIN magicRun USING(magic_id) JOIN rawExp USING(exp_id) LEFT JOIN camProcessedExp USING(cam_id)"
     89my $q1 = "SELECT magicDSRun.*, camera, camProcessedExp.path_base AS cam_path_base, camRun.reduction AS cam_reduction, magicRun.inverse"
     90         . " FROM magicDSRun JOIN magicRun USING(magic_id) JOIN rawExp USING(exp_id) LEFT JOIN camProcessedExp USING(cam_id) LEFT JOIN camRun USING(cam_id)"
    9191         . " WHERE magic_ds_id = $magic_ds_id";
    9292my $q2 = "SELECT * from magicDSFile where magic_ds_id = $magic_ds_id";
    93 
    94 # my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files
    9593
    9694my $stmt1 = $dbh->prepare($q1);
     
    104102my $stage_id = $run->{stage_id};
    105103my $cam_path_base = $run->{cam_path_base};
     104my $cam_reduction = $run->{cam_reduction};
    106105my $inverse = $run->{inverse};
    107 my $replace = $run->{re_place};
    108106
    109107
    110108&my_die("unexpected run state found: $state", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) if $state ne "goto_cleaned";
    111 &my_die("clean not allowed for raw stage, use goto_restore", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) if ($stage eq "raw"); # XXX: add this once we implement and $replace;
     109&my_die("clean not allowed for raw stage, use goto_restore", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) if $stage eq "raw";
     110
     111my $recipe_psastro = $ipprc->reduction($cam_reduction, 'PSASTRO'); # Recipe to use
     112&my_die("Unrecognised PSASTRO recipe", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) unless defined $recipe_psastro;
    112113
    113114
     
    126127
    127128        if ($stage eq "chip") {
    128             # we use the mask output from the camera stage for input and replace
    129             # the output of the chip stage with that mask as well.
    130             my $cammask   = $cam_path_base ? $ipprc->filename("PSASTRO.OUTPUT.MASK", $cam_path_base, $component) : undef;
     129            # Check to see if we're using dynamic masks
     130            my $dynamicMasks;               # Use dynamic masks?
     131            {
     132                # Get the PSASTRO recipe
     133                my $command = "$ppConfigDump -camera $camera -recipe PSASTRO $recipe_psastro -dump-recipe PSASTRO -";
     134                my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     135                    run(command => $command, verbose => $verbose);
     136                unless ($success) {
     137                    $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     138                    &my_die("Unable to perform ppConfigDump: $error_code", $magic_ds_id, $component,
     139                            $PS_EXIT_CONFIG_ERROR);
     140                }
     141                my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files
     142                my $recipeData = $mdcParser->parse(join "", @$stdout_buf) or
     143                    &my_die("Unable to parse metadata config doc", $magic_ds_id, $component,
     144                            $PS_EXIT_CONFIG_ERROR);
     145
     146                $dynamicMasks = metadataLookupBool($recipeData, 'REFSTAR_MASK');
     147            }
    131148
    132149            if ($backup_path_base) {
    133150                $bimage  = $ipprc->filename("PPIMAGE.CHIP", $backup_path_base, $component);
    134                 $bch_mask= $ipprc->filename("PPIMAGE.CHIP.MASK", $backup_path_base, $component);
     151
     152                if ($dynamicMasks) {
     153                    my $mask = $ipprc->filename("PSASTRO.OUTPUT.MASK", $cam_path_base, $component);
     154                    # This is kludgey but correct
     155                    $bmask = dirname($backup_path_base) . "/SR_" . basename($mask);
     156                    $bch_mask= $ipprc->filename("PPIMAGE.CHIP.MASK", $backup_path_base, $component);
     157                } else {
     158                    $bmask = $ipprc->filename("PPIMAGE.CHIP.MASK", $backup_path_base, $component);
     159                }
    135160                $bweight = $ipprc->filename("PPIMAGE.CHIP.VARIANCE", $backup_path_base, $component);
    136                 # This is kludgey but correct
    137                
    138                 my $prefix;
    139                 if ($backup_path_base =~ /\.SR/) {
    140                     $prefix = "";
     161            }
     162            if ($recovery_path_base) {
     163                $rimage  = $ipprc->filename("PPIMAGE.CHIP", $recovery_path_base, $component);
     164
     165                if ($dynamicMasks) {
     166                    my $mask = $ipprc->filename("PSASTRO.OUTPUT.MASK", $cam_path_base, $component);
     167                    # This is kludgey but correct
     168                    $rmask = dirname($recovery_path_base) . "/" . basename($mask);
     169                    $rch_mask= $ipprc->filename("PPIMAGE.CHIP.MASK", $recovery_path_base, $component);
    141170                } else {
    142                     $prefix = "SR_";
    143                 }
    144 
    145                 $bmask   = dirname($backup_path_base) . "/" . $prefix . basename($cammask) if $cammask;
    146             }
    147             if ($recovery_path_base) {
    148                 $rimage  = $ipprc->filename("PPIMAGE.CHIP", $recovery_path_base, $component);
    149                 $rch_mask= $ipprc->filename("PPIMAGE.CHIP.MASK", $recovery_path_base, $component);
     171                    $rmask = $ipprc->filename("PPIMAGE.CHIP.MASK", $recovery_path_base, $component);
     172                }
    150173                $rweight = $ipprc->filename("PPIMAGE.CHIP.VARIANCE", $recovery_path_base, $component);
    151                 # This is kludgey but correct
    152                 $rmask   = dirname($recovery_path_base) . "/" . basename($cammask) if $cammask;;
    153174            }
    154175        } elsif ($stage eq "camera") {
     
    162183                $bweight = $ipprc->filename("PSWARP.OUTPUT.VARIANCE", $backup_path_base);
    163184                $bsources = $ipprc->filename("PSWARP.OUTPUT.SOURCES", $backup_path_base);
    164             } 
     185            }
    165186            if ($recovery_path_base) {
    166187                $rimage  = $ipprc->filename("PSWARP.OUTPUT", $recovery_path_base);
     
    168189                $rweight = $ipprc->filename("PSWARP.OUTPUT.VARIANCE", $recovery_path_base);
    169190                $rsources = $ipprc->filename("PSWARP.OUTPUT.SOURCES", $recovery_path_base);
    170             } 
     191            }
    171192        } elsif ($stage eq "diff") {
    172193            my $name = "PPSUB.OUTPUT";
     
    228249                if (!$no_update) {
    229250                    print STDERR "deleting $file\n" if $verbose;
    230                     $ipprc->file_delete($file, $force) or my_die("Failed to delete $file", $magic_ds_id, $PS_EXIT_UNKNOWN_ERROR);
    231                 } else {
     251                    $ipprc->file_delete($file, 1) or my_die("Failed to delete $file", $magic_ds_id, $PS_EXIT_UNKNOWN_ERROR);
     252                    } else {
    232253                    print STDERR "skipping delete $file\n";
    233254                }
  • trunk/ippScripts/scripts/magic_destreak_revert.pl

    r27092 r27301  
    3030my $magicdstool   = can_run('magicdstool') or (warn "Can't find magicdstool" and $missing_tools = 1);
    3131my $isdestreaked = can_run('isdestreaked') or (warn "Can't find isdestreaked" and $missing_tools = 1);
     32my $ppConfigDump = can_run('ppConfigDump') or (warn "Can't find ppConfigDump" and $missing_tools = 1);
    3233if ($missing_tools) {
    3334    warn("Can't find required tools.");
     
    3637
    3738# Parse the command-line arguments
    38 my ($magic_ds_id, $camera, $streaks, $stage, $stage_id, $component, $uri, $path_base, $bothways, $cam_path_base);
     39my ($magic_ds_id, $camera, $streaks, $stage, $stage_id, $component, $uri, $path_base, $bothways, $cam_path_base, $cam_reduction);
    3940my ($outroot, $recoveryroot, $replace, $release, $bytes, $md5sum);
    4041my ($dbname, $save_temps, $verbose, $no_update, $no_op, $logfile);
     
    4849           'path_base=s'    => \$path_base,  # path_base of the input
    4950           'cam_path_base=s'=> \$cam_path_base,  # path_base of the associated camera run
     51           'cam_reduction=s'=> \$cam_reduction,  # reduction class of the associated camera run
    5052           'outroot=s'      => \$outroot,     # "directory" for temporary images (may be nebulous)
    5153           'recoveryroot=s' => \$recoveryroot,# "directory" for saving the images of excised pixels
     
    7880
    7981$ipprc->redirect_output($logfile) or my_die( "Unable to redirect output", $magic_ds_id, $component, $PS_EXIT_SYS_ERROR ) if $logfile;
     82my $recipe_psastro = $ipprc->reduction($cam_reduction, 'PSASTRO'); # Recipe to use
     83&my_die("Unrecognised PSASTRO recipe", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR) unless defined $recipe_psastro;
    8084
    8185my $nebulousServer = metadataLookupStr( $ipprc->{_siteConfig}, 'NEB_SERVER' );
     
    112116}
    113117
    114 &my_die("replace not allowed for non-nebulous files", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR) 
     118&my_die("replace not allowed for non-nebulous files", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR)
    115119    if ($replace eq "T") and !$nebulousInput;
    116120
     
    156160    $bimage = $backup_path_base . ".fits";
    157161} elsif ($stage eq "chip") {
     162    # Check to see if we're using dynamic masks
     163    my $dynamicMasks;               # Use dynamic masks?
     164    {
     165        # Get the PSASTRO recipe
     166        my $command = "$ppConfigDump -camera $camera -recipe PSASTRO $recipe_psastro -dump-recipe PSASTRO -";
     167        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     168            run(command => $command, verbose => $verbose);
     169        unless ($success) {
     170            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     171            &my_die("Unable to perform ppConfigDump: $error_code", $magic_ds_id, $component,
     172                    $PS_EXIT_CONFIG_ERROR);
     173        }
     174        my $recipeData = $mdcParser->parse(join "", @$stdout_buf) or
     175            &my_die("Unable to parse metadata config doc", $magic_ds_id, $component,
     176                    $PS_EXIT_CONFIG_ERROR);
     177
     178        $dynamicMasks = metadataLookupBool($recipeData, 'REFSTAR_MASK');
     179    }
     180
    158181    # we use the mask output from the camera stage for input and replace
    159182    # the output of the chip stage with that mask as well.
    160183    $image  = $ipprc->filename("PPIMAGE.CHIP", $path_base, $class_id);
    161     $mask   = $ipprc->filename("PSASTRO.OUTPUT.MASK", $cam_path_base, $class_id);
    162     $ch_mask= $ipprc->filename("PPIMAGE.CHIP.MASK", $path_base, $class_id);
    163184    $weight = $ipprc->filename("PPIMAGE.CHIP.VARIANCE", $path_base, $class_id);
     185
     186    if ($dynamicMasks) {
     187        $mask = $ipprc->filename("PSASTRO.OUTPUT.MASK", $cam_path_base, $class_id);
     188        $ch_mask = $ipprc->filename("PPIMAGE.CHIP.MASK", $path_base, $class_id);
     189    } else {
     190        $mask = $ipprc->filename("PPIMAGE.CHIP.MASK", $path_base, $class_id);
     191    }
    164192
    165193    $bimage  = $ipprc->filename("PPIMAGE.CHIP", $backup_path_base, $class_id);
     
    261289            &my_die("failed to restore chip mask file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR);
    262290        }
    263     } 
     291    }
    264292
    265293
  • trunk/ippTasks/destreak.pro

    r27081 r27301  
    208208    book getword magicToDS $pageName path_base -var PATH_BASE
    209209    book getword magicToDS $pageName cam_path_base -var CAM_PATH_BASE
     210    book getword magicToDS $pageName cam_reduction -var CAM_REDUCTION
    210211    book getword magicToDS $pageName outroot -var OUTROOT
    211212    book getword magicToDS $pageName recoveryroot -var RECROOT
     
    225226    # TODO: do not add recoveryroot or replace if they are null or zero
    226227
    227     $run = magic_destreak.pl --magic_ds_id $MAGIC_DS_ID --camera $CAMERA --exp_id $EXP_ID --streaks $STREAKS --inv_streaks $INV_STREAKS --stage $STAGE --stage_id $STAGE_ID --component $COMPONENT --uri $URI --path_base $PATH_BASE --cam_path_base $CAM_PATH_BASE --outroot $OUTROOT --logfile $logfile --recoveryroot $RECROOT --replace $REPLACE
     228    $run = magic_destreak.pl --magic_ds_id $MAGIC_DS_ID --camera $CAMERA --exp_id $EXP_ID --streaks $STREAKS --inv_streaks $INV_STREAKS --stage $STAGE --stage_id $STAGE_ID --component $COMPONENT --uri $URI --path_base $PATH_BASE --cam_path_base $CAM_PATH_BASE --cam_reduction $CAM_REDUCTION --outroot $OUTROOT --logfile $logfile --recoveryroot $RECROOT --replace $REPLACE
    228229
    229230    add_standard_args run
     
    401402    book getword magicDSToRevert $pageName path_base -var PATH_BASE
    402403    book getword magicDSToRevert $pageName cam_path_base -var CAM_PATH_BASE
     404    book getword magicDSToRevert $pageName cam_reduction -var CAM_REDUCTION
    403405    book getword magicDSToRevert $pageName outroot -var OUTROOT
    404406    book getword magciDSToRevert $pageName bytes -var BYTES
     
    419421    end
    420422
    421     $run = magic_destreak_revert.pl --magic_ds_id $MAGIC_DS_ID --camera $CAMERA --stage $STAGE --stage_id $STAGE_ID --component $COMPONENT --path_base $PATH_BASE --cam_path_base $CAM_PATH_BASE --outroot $OUTROOT --logfile $logfile --replace $REPLACE --bothways $BOTHWAYS
     423    $run = magic_destreak_revert.pl --magic_ds_id $MAGIC_DS_ID --camera $CAMERA --stage $STAGE --stage_id $STAGE_ID --component $COMPONENT --path_base $PATH_BASE --cam_path_base $CAM_PATH_BASE --cam_reduction $CAM_REDUCTION --outroot $OUTROOT --logfile $logfile --replace $REPLACE --bothways $BOTHWAYS
    422424
    423425    add_standard_args run
  • trunk/ippTools/share/magicdstool_todestreak_camera.sql

    r25419 r27301  
    55    magicDSRun.label,
    66    camera,
    7     magicMask.uri as streaks_uri,
     7    magicMask.uri AS streaks_uri,
    88    CAST(NULL AS CHAR(255)) AS inv_streaks_uri,
    99    stage,
    1010    stage_id,
    11     'exposure' as component,
     11    'exposure' AS component,
    1212    CAST(NULL AS CHAR(255)) AS uri,
    1313    camProcessedExp.path_base,
    1414    magicRun.inverse,
    15     camProcessedExp.path_base as cam_path_base,
     15    camProcessedExp.path_base AS cam_path_base,
     16    camRun.reduction AS cam_reduction,
    1617    outroot,
    1718    recoveryroot,
  • trunk/ippTools/share/magicdstool_todestreak_chip.sql

    r25419 r27301  
    55    magicDSRun.label,
    66    camera,
    7     magicMask.uri as streaks_uri,
     7    magicMask.uri AS streaks_uri,
    88    CAST(NULL AS CHAR(255)) AS inv_streaks_uri,
    99    stage,
    1010    stage_id,
    11     class_id as component,
     11    class_id AS component,
    1212    chipProcessedImfile.uri,
    1313    chipProcessedImfile.path_base,
    1414    magicRun.inverse,
    15     camProcessedExp.path_base as cam_path_base,
     15    camProcessedExp.path_base AS cam_path_base,
     16    camRun.reduction AS cam_reduction,
    1617    outroot,
    1718    recoveryroot,
     
    2122JOIN magicMask USING (magic_id)
    2223JOIN magicRun USING(magic_id)
     24JOIN camRun USING(cam_id)
    2325JOIN camProcessedExp USING(cam_id)
    2426JOIN chipRun ON chip_id = stage_id
  • trunk/ippTools/share/magicdstool_todestreak_diff.sql

    r25419 r27301  
    66    magicDSRun.label,
    77    rawExp.camera,
    8     magicMask.uri as streaks_uri,
     8    magicMask.uri AS streaks_uri,
    99    CAST(NULL AS CHAR(255)) AS inv_streaks_uri,
    1010    stage,
    11     magicRun.diff_id as stage_id,
    12     diffSkyfile.skycell_id as component,
     11    magicRun.diff_id AS stage_id,
     12    diffSkyfile.skycell_id AS component,
    1313    CAST(NULL AS CHAR(255)) AS uri,
    1414    diffSkyfile.path_base,
    1515    magicRun.inverse,
    16     CAST(NULL AS CHAR(255)) as cam_path_base,
     16    CAST(NULL AS CHAR(255)) AS cam_path_base,
     17    CAST(NULL AS CHAR(255)) AS cam_reduction,
    1718    outroot,
    1819    recoveryroot,
  • trunk/ippTools/share/magicdstool_todestreak_raw.sql

    r25419 r27301  
    1414    magicRun.inverse,
    1515    camProcessedExp.path_base as cam_path_base,
     16    camRun.reduction AS cam_reduction,
    1617    outroot,
    1718    recoveryroot,
     
    2122JOIN magicMask USING (magic_id)
    2223JOIN magicRun USING (magic_id)
     24JOIN camRun USING(cam_id)
    2325JOIN camProcessedExp USING(cam_id)
    2426JOIN rawImfile ON magicRun.exp_id = rawImfile.exp_id
  • trunk/ippTools/share/magicdstool_todestreak_warp.sql

    r25419 r27301  
    1414    magicRun.inverse,
    1515    CAST(NULL AS CHAR(255)) as cam_path_base,
     16    CAST(NULL AS CHAR(255)) as cam_reduction,
    1617    outroot,
    1718    recoveryroot,
Note: See TracChangeset for help on using the changeset viewer.