IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19652


Ignore:
Timestamp:
Sep 22, 2008, 3:48:05 PM (18 years ago)
Author:
Paul Price
Message:

Using new JPEG recipe.

Location:
trunk/ippScripts/scripts
Files:
6 edited

Legend:

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

    r19561 r19652  
    221221    # Make the jpeg for binning 1
    222222    if ($run_state eq 'new') {
    223         my $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run
     223        my $command = "$ppImage -list $list1Name $outroot"; # Command to run
     224        $command .= " -recipe PPIMAGE $recipe1";
    224225        $command .= " -dbname $dbname" if defined $dbname;
    225226
     
    235236    # Make the jpeg for binning 2
    236237    if ($run_state eq 'new') {
    237         my $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run
     238        my $command = "$ppImage -list $list2Name $outroot"; # Command to run
     239        $command .= " -recipe PPIMAGE $recipe2"
    238240        $command .= " -dbname $dbname" if defined $dbname;
    239241
  • trunk/ippScripts/scripts/detrend_norm_exp.pl

    r19261 r19652  
    5959# Recipes to use based on reduction class
    6060$reduction = 'DETREND' unless defined $reduction;
    61 
    62 my $recipe1 = $ipprc->reduction($reduction, 'JPEG_BIN1_IMAGE_' . uc($det_type)); # Recipe to use
    63 &my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $PS_EXIT_PROG_ERROR) unless defined $recipe1;
    64 
    65 my $recipe2 = $ipprc->reduction($reduction, 'JPEG_BIN2_IMAGE_' . uc($det_type)); # Recipe to use
    66 &my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $PS_EXIT_PROG_ERROR) unless defined $recipe2;
     61my $recipe = $ipprc->reduction($reduction, uc($det_type) . '_JPEG_IMAGE');
     62&my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $PS_EXIT_PROG_ERROR) unless defined $recipe;
    6763
    6864# values to extract from output metadata and the stats to calculate
     
    9490    $command  = "$dettool -normalizedimfile"; # Command to run
    9591    $command .= " -det_id $det_id";
    96     $command .= " -iteration $iter"; 
     92    $command .= " -iteration $iter";
    9793    $command .= " -dbname $dbname" if defined $dbname;
    9894    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     
    140136unless ($no_op) {
    141137    # Make the jpeg for binning 1
    142     $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run
     138    $command = "$ppImage -list $list1Name $outroot"; # Command to run
     139    $command .= " -recipe PPIMAGE PPIMAGE_N";
     140    $command .= " -recipe JPEG $recipe";
    143141    $command .= " -dbname $dbname" if defined $dbname;
    144142    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     
    147145
    148146    # Make the jpeg for binning 2
    149     $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run
     147    $command = "$ppImage -list $list2Name $outroot"; # Command to run
     148    $command .= " -recipe PPIMAGE PPIMAGE_N";
     149    $command .= " -recipe JPEG $recipe";
    150150    $command .= " -dbname $dbname" if defined $dbname;
    151151    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     
    188188        $command .= " -det_id $det_id";
    189189        $command .= " -iteration $iter";
    190         $command .= " -path_base $outroot ";
     190        $command .= " -path_base $outroot ";
    191191        $command .= " -code $exit_code";
    192192        $command .= " -dbname $dbname" if defined $dbname;
  • trunk/ippScripts/scripts/detrend_process_exp.pl

    r19261 r19652  
    5757
    5858if ($redirect) {
    59     my $logDest = $ipprc->filename("LOG.EXP", $outroot, "NONE") 
     59    my $logDest = $ipprc->filename("LOG.EXP", $outroot, "NONE")
    6060        or &my_die("Missing entry in file rules", $det_id, $exp_id, $PS_EXIT_CONFIG_ERROR);
    6161    $ipprc->redirect_output($logDest);
     
    6565$reduction = 'DETREND' unless defined $reduction;
    6666
    67 my $recipe1 = $ipprc->reduction($reduction, 'JPEG_BIN1_IMAGE_' . uc($det_type)); # Recipe to use
    68 &my_die("Unrecognised detrend type: $det_type", $det_id, $exp_id, $PS_EXIT_PROG_ERROR) unless defined $recipe1;
    69 
    70 my $recipe2 = $ipprc->reduction($reduction, 'JPEG_BIN2_IMAGE_' . uc($det_type)); # Recipe to use
    71 &my_die("Unrecognised detrend type: $det_type", $det_id, $exp_id, $PS_EXIT_PROG_ERROR) unless defined $recipe2;
     67my $recipe = $ipprc->reduction($reduction, uc($det_type) . '_JPEG_IMAGE'); # Recipe to use
     68&my_die("Unrecognised detrend type: $det_type", $det_id, $exp_id, $PS_EXIT_PROG_ERROR) unless defined $recipe;
    7269
    7370# values to extract from output metadata and the stats to calculate
     
    144141unless ($no_op) {
    145142    # Make the jpeg for binning 1
    146     $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run
     143    $command = "$ppImage -list $list1Name $outroot"; # Command to run
     144    $command .= " -recipe PPIMAGE PPIMAGE_N";
     145    $command .= " -recipe JPEG $recipe";
    147146    $command .= " -dbname $dbname" if defined $dbname;
    148147    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     
    155154
    156155    # Make the jpeg for binning 2
    157     $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run
     156    $command = "$ppImage -list $list2Name $outroot"; # Command to run
     157    $command .= " -recipe PPIMAGE PPIMAGE_N";
     158    $command .= " -recipe JPEG $recipe";
    158159    $command .= " -dbname $dbname" if defined $dbname;
    159160    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     
    200201        $command .= " -exp_id $exp_id";
    201202        $command .= " -code $exit_code";
    202         $command .= " -path_base $outroot";
     203        $command .= " -path_base $outroot";
    203204        $command .= " -dbname $dbname" if defined $dbname;
    204205        system ($command);
  • trunk/ippScripts/scripts/detrend_process_imfile.pl

    r19127 r19652  
    3737    'dbname|d=s'        => \$dbname, # Database name
    3838    'reduction=s'       => \$reduction, # Reduction class
    39     'threads=s'         => \$threads,   # Number of threads to use for ppImage
     39    'threads=s'         => \$threads,   # Number of threads to use for ppImage
    4040    'verbose'           => \$verbose,   # Print to stdout
    4141    'no-update'         => \$no_update,
     
    6565# Recipes to use as a function of detrend type
    6666$reduction = "DETREND" unless defined $reduction;
    67 my $recipe = $ipprc->reduction($reduction, uc($det_type) . '_PROCESS'); # Recipe name to use
     67my $ppimage_recipe = $ipprc->reduction($reduction, uc($det_type) . '_PROCESS'); # Recipe name for ppImage
     68my $jpeg_recipe = $ipprc->reduction($reduction, uc($det_type) . '_JPEG_IMAGE'); # Recipe name for JPEG
    6869
    6970# values to extract from output metadata and the stats to calculate
     
    104105unless ($no_op) {
    105106    my $command = "$ppImage -file $input_uri $outroot";
    106     $command .= " -recipe PPIMAGE $recipe";
     107    $command .= " -recipe PPIMAGE $ppimage_recipe";
     108    $command .= " -recipe JPEG $jpeg_recipe";
    107109    $command .= " -recipe PPSTATS CHIPSTATS";
    108110    $command .= " -stats $outputStats";
     
    175177        $command .= " -exp_id $exp_id";
    176178        $command .= " -class_id $class_id";
    177         $command .= " -path_base $outroot";
     179        $command .= " -path_base $outroot";
    178180        $command .= " -code $exit_code";
    179181        $command .= " -dbname $dbname" if defined $dbname;
  • trunk/ippScripts/scripts/detrend_resid_exp.pl

    r19627 r19652  
    8282$reduction = 'DETREND' unless defined $reduction;
    8383
    84 my $recipe1 = $ipprc->reduction($reduction, 'JPEG_BIN1_RESID_' . uc($det_type)); # Recipe to use
    85 &my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $PS_EXIT_PROG_ERROR) unless defined $recipe1;
    86 
    87 my $recipe2 = $ipprc->reduction($reduction, 'JPEG_BIN2_RESID_' . uc($det_type)); # Recipe to use
    88 &my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $PS_EXIT_PROG_ERROR) unless defined $recipe2;
     84my $recipe = $ipprc->reduction($reduction, uc($det_type) . '_JPEG_RESID'); # Recipe to use
     85&my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $PS_EXIT_PROG_ERROR) unless defined $recipe;
    8986
    9087# Look for programs we need
     
    129126    my ($statFile, $statName) = tempfile( "/tmp/$exp_tag.detresid.$det_id.$iter.stats.XXXX", UNLINK => !$save_temps );
    130127    foreach my $line (@$stdout_buf) {
    131         print $statFile $line;
     128        print $statFile $line;
    132129    }
    133130    close $statFile;
     
    143140
    144141    foreach my $line (@$stdout_buf) {
    145         $cmdflags .= " $line";
     142        $cmdflags .= " $line";
    146143    }
    147144    print "cmdflags: $cmdflags\n";
     
    173170unless ($no_op) {
    174171    # Make the jpeg for binning 1
    175     $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run
     172    $command = "$ppImage -list $list1Name $outroot"; # Command to run
     173    $command .= " -recipe PPIMAGE PPIMAGE_N";
     174    $comamnd .= " -recipe JPEG $recipe";
    176175    $command .= " -dbname $dbname" if defined $dbname;
    177176    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     
    184183
    185184    # Make the jpeg for binning 2
    186     $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run
     185    $command = "$ppImage -list $list2Name $outroot"; # Command to run
     186    $command .= " -recipe PPIMAGE PPIMAGE_N";
     187    $command .= " -recipe JPEG $recipe";
    187188    $command .= " -dbname $dbname" if defined $dbname;
    188189    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     
    530531
    531532
    532 sub value_for_flag 
     533sub value_for_flag
    533534{
    534535    my $cmdflags = shift;
     
    537538    my $value = 0.0;
    538539    if ($cmdflags =~ m|$flag|) {
    539         ($value) = $cmdflags =~ m|$flag\s+(\S+)|;
     540        ($value) = $cmdflags =~ m|$flag\s+(\S+)|;
    540541    }
    541542    $value;
  • trunk/ippScripts/scripts/detrend_resid_imfile.pl

    r19642 r19652  
    4444    'dbname|d=s'        => \$dbname, # Database name
    4545    'reduction=s'       => \$reduction, # Reduction class
    46     'threads=s'         => \$threads,   # Number of threads to use for ppImage
     46    'threads=s'         => \$threads,   # Number of threads to use for ppImage
    4747    'verbose'           => \$verbose,   # Print to stdout
    4848    'no-update'         => \$no_update,
     
    8787
    8888print "raw recipe: $recipe\n";
    89 $recipe = $ipprc->reduction($reduction, $recipe);
     89$ppimage_recipe = $ipprc->reduction($reduction, $recipe);
     90$jpeg_recipe = $ipprc->reduction($reduction, uc($det_type) . '_JPEG_RESID';
    9091print "real recipe: $recipe\n";
    9192
    9293# Flags to specify the particular detrend to use
    9394use constant DETRENDS => {
    94     'bias'             => '-bias',      # Specify the bias frame
    95     'dark'             => '-dark',      # Specify the dark frame
     95    'bias'             => '-bias',      # Specify the bias frame
     96    'dark'             => '-dark',      # Specify the dark frame
    9697    'dark_premask'     => '-dark',      # Specify the dark frame
    97     'shutter'          => '-shutter',   # Specify the shutter frame
     98    'shutter'          => '-shutter',   # Specify the shutter frame
    9899    'flat_premask'     => '-flat',      # Specify the flat frame
    99100    'domeflat_premask' => '-flat',      # Specify the flat frame
     
    102103    'domeflat_raw'     => '-flat',      # Specify the flat frame
    103104    'skyflat_raw'      => '-flat',      # Specify the flat frame
    104     'flat'             => '-flat',      # Specify the flat frame
    105     'domeflat'         => '-flat',      # Specify the flat frame
    106     'skyflat'          => '-flat',      # Specify the flat frame
    107     'fringe'           => '-fringe',    # Specify the fringe frame
    108     'mask'             => '-mask',      # Specify the mask frame
    109     'darkmask'         => '-mask',      # Specify the mask frame
    110     'flatmask'         => '-mask',      # Specify the mask frame
     105    'flat'             => '-flat',      # Specify the flat frame
     106    'domeflat'         => '-flat',      # Specify the flat frame
     107    'skyflat'          => '-flat',      # Specify the flat frame
     108    'fringe'           => '-fringe',    # Specify the fringe frame
     109    'mask'             => '-mask',      # Specify the mask frame
     110    'darkmask'         => '-mask',      # Specify the mask frame
     111    'flatmask'         => '-mask',      # Specify the mask frame
    111112};
    112113
     
    146147unless ($no_op) {
    147148    my $command = "$ppImage -file $input_uri $outroot";
    148     $command .= " -recipe PPIMAGE $recipe";
     149    $command .= " -recipe PPIMAGE $ppimage_recipe";
     150    $command .= " -recipe JPEG $jpeg_recipe";
    149151    $command .= " -recipe PPSTATS RESIDUAL";
    150152    $command .= " -F PPIMAGE.OUTPUT PPIMAGE.OUTPUT.RESID";
     
    235237        $command .= " -det_id $det_id";
    236238        $command .= " -iteration $iter";
    237         $command .= " -ref_det_id $ref_det_id";
    238         $command .= " -ref_iter $ref_iter";
     239        $command .= " -ref_det_id $ref_det_id";
     240        $command .= " -ref_iter $ref_iter";
    239241        $command .= " -exp_id $exp_id";
    240242        $command .= " -class_id $class_id";
    241         $command .= " -path_base $outroot";
     243        $command .= " -path_base $outroot";
    242244        $command .= " -code $exit_code";
    243245        $command .= " -dbname $dbname" if defined $dbname;
Note: See TracChangeset for help on using the changeset viewer.