IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13937


Ignore:
Timestamp:
Jun 21, 2007, 2:10:11 PM (19 years ago)
Author:
Paul Price
Message:

Changes to multiple packages in order to use "reduction classes" to
specify recipe names. The idea is to give a group of recipes a
symbolic name, which distinguish how the reduction is to be performed,
without going to all the trouble of changing the recipes themselves.

For example, we might want to turn off the usual
overscan/bias/dark/shutter/flat processing and only do photometry if
we have pre-processed data. Gene also wants a similar ability for
building the flat-field correction.

Added a REDUCTION metadata to the camera configuration that contains
multiple METADATA entries that have recipes for different processing
steps. PS::IPP::Config has a 'reduction' function to return the
appropriate recipe, and this is now used in the scripts. Updated
ippTasks to use these where appropriate.

This necessitated changing the database, so that the desired reduction
class can be specified in the right places. Instructions on converting
an extant database are in dbconfig/changes.txt.

Tested with the SIMTEST, and it works.

There is currently no way of specifying the reduction class when an
exposure proceeds from 'register' to 'chip' (it has to be hacked in
the database directly: "update chipPendingExp set reduction =
'SOME_CLASS' where ..."), but it can be specified when adding a
detrend run or queuing chips with 'chiptool -queue' (the '-reduction'
option). Also, the 'recipe' columns remain throughout the detrend
tables, and they continue to be populated with the actual recipe used
(rather than the reduction class; but that is contained in the
detRun).

Location:
trunk
Files:
33 edited

Legend:

Unmodified
Added
Removed
  • trunk/PS-IPP-Config/lib/PS/IPP/Config.pm

    r13789 r13937  
    11# Copyright (c) 2006  Paul Price, Joshua Hoblitt
    22#
    3 # $Id: Config.pm,v 1.61 2007-06-13 19:17:50 eugene Exp $
     3# $Id: Config.pm,v 1.62 2007-06-22 00:10:10 price Exp $
    44
    55package PS::IPP::Config;
     
    783783}
    784784
     785# Given a reduction class name (and a previously defined camera) and a
     786# symbolic name for the recipe, return the actual name of the recipe.
     787sub reduction
     788{
     789    my $self = shift;           # Configuration object
     790    my $reduction = shift;      # Reduction class
     791    my $name = shift;           # Symbolic name of recipe
     792
     793    unless (defined $self and defined $reduction and defined $name) {
     794        carp "Programming error --- inputs undefined";
     795        exit($PS_EXIT_PROG_ERROR);
     796    }
     797
     798    my $camera = $self->{camera}; # Camera configuration
     799    unless (defined $camera) {
     800        carp "Camera has not yet been defined.\n";
     801        return undef;
     802    }
     803   
     804    my $classes = metadataLookupMD($camera, "REDUCTION") or # Reduction classes
     805        (carp "Can't find REDUCTION in camera configuration.\n" and exit($PS_EXIT_CONFIG_ERROR));
     806
     807    my $class = metadataLookupMD($classes, $reduction) or # Class of interest
     808        (carp "Can't find $reduction in REDUCTION in camera configuration.\n" and
     809         exit($PS_EXIT_CONFIG_ERROR));
     810
     811    my $actual = metadataLookupStr($class, $name) or # The actual recipe name of interest
     812        (carp "Can't find $name in $class in REDUCTION in camera configuration.\n" and
     813         exit($PS_EXIT_CONFIG_ERROR));
     814
     815    return $actual;
     816}
     817
    785818# Interpolate environment variables in a directory (or colon-delimited list of directories)
    786819sub _interpolate_env
  • trunk/dbconfig/cam.md

    r13649 r13937  
    66    workdir     STR         255
    77    label       STR         64      # key
    8     recipe      STR         64
     8    reduction   STR         64
    99    expgroup    STR         64      # key
    1010    dvodb       STR         255
     
    1717    workdir        STR      255
    1818    label          STR      64      # key
    19     recipe         STR      64
     19    reduction      STR      64
    2020    expgroup       STR      64      # key
    2121    dvodb          STR      255
  • trunk/dbconfig/changes.txt

    r13715 r13937  
    1212alter table diffSkyfile add column path_base varchar(255) NULL DEFAULT NULL after uri;
    1313alter table stackSumSkyfile add column path_base varchar(255) NULL DEFAULT NULL after uri;
     14
     15
     16Version 1.1.22 --> 1.1.23
     17# Adding support for reduction classes (which are used to specify recipes for parts of the pipeline).
     18# Adding 'reduction' to detRun
     19# Renaming 'recipe' in {chip,cam}{Pending,Processed}Exp to 'reduction'
     20
     21alter table detRun add column reduction varchar(64) NULL DEFAULT NULL after exp_type;
     22alter table chipPendingExp change column recipe reduction varchar(64);
     23alter table chipProcessedExp change column recipe reduction varchar(64);
     24alter table camPendingExp change column recipe reduction varchar(64);
     25alter table camProcessedExp change column recipe reduction varchar(64);
  • trunk/dbconfig/chip.md

    r13649 r13937  
    88    workdir     STR         255
    99    label       STR         64      # key
    10     recipe      STR         64
     10    reduction   STR         64      # Reduction class
    1111    expgroup    STR         64      # key
    1212    dvodb       STR         255
     
    3030    workdir     STR         255
    3131    label       STR         64      # key
    32     recipe      STR         64
     32    reduction   STR         64
    3333    expgroup    STR         64      # key
    3434    dvodb       STR         255
  • trunk/dbconfig/config.md

    r13739 r13937  
    22    pkg_name        STR     ippdb
    33    pkg_namespace   STR     ippdb
    4     pkg_version     STR     1.1.22
     4    pkg_version     STR     1.1.23
    55END
  • trunk/dbconfig/det.md

    r13617 r13937  
    1010    telescope   STR         64
    1111    exp_type    STR         64      # XXX this should be dropped
     12    reduction   STR         64      # Reduction clas
    1213    filter      STR         64
    1314    airmass_min F32         0.0
  • trunk/ippScripts/scripts/chip_imfile.pl

    r13926 r13937  
    2929use Pod::Usage qw( pod2usage );
    3030
    31 my $RECIPE = 'PPIMAGE_OBDSFRA'; # Recipe to use
    32 
    3331# Parse the command-line arguments
    3432my ($exp_id,                    # Exposure identifier
     
    3634    $class_id,                  # Class identifier
    3735    $input,                     # Input FITS file
    38     $recipe,                    # Recipe to use
    3936    $camera,                    # Camera
    4037    $dbname,                    # Database name
    4138    $workdir,                   # Working directory, for output files
     39    $reduction,                 # Reduction class
    4240    $no_update,                 # Don't update the database?
    4341    $no_op,                     # Don't do any operations?
     
    4846           'class_id=s'    => \$class_id,
    4947           'uri|u=s'       => \$input,
    50            'recipe=s'      => \$recipe,
    5148           'camera|c=s'    => \$camera,
    5249           'dbname|d=s'    => \$dbname, # Database name
    5350           'workdir|w=s'   => \$workdir,
     51           'reduction=s'   => \$reduction,
    5452           'no-update'     => \$no_update,
    5553           'no-op'         => \$no_op,
     
    6765
    6866$ipprc->define_camera($camera);
     67$reduction = 'DEFAULT' unless defined $reduction;
     68my $recipe = $ipprc->reduction($reduction, 'CHIP'); # Recipe to use
    6969
    7070# Look for programs we need
     
    9797
    9898    my $command = "$ppImage -file $input $outputRoot";
    99     $command .= " -recipe PPIMAGE $RECIPE";
     99    $command .= " -recipe PPIMAGE $recipe";
    100100    $command .= " -recipe PPSTATS CHIPSTATS";
    101101    $command .= " -stats $outputStats"; # Command to run ppImage
     
    130130my $bg_stdev = ($stats->bg_stdev() or 'NAN');
    131131my $bg_mean_stdev = ($stats->bg_mean_stdev() or 'NAN');
    132 my $fringe_0      = (${$stats->fringe()[0]} or 'NAN');
    133 my $fringe_1      = (${$stats->fringe_err()[0]} or 'NAN');
     132my $fringe_0      = (${$stats->fringe()}[0] or 'NAN');
     133my $fringe_1      = (${$stats->fringe_err()}[0] or 'NAN');
    134134my $fringe_2      = 'NAN';
    135135
  • trunk/ippScripts/scripts/detrend_process_imfile.pl

    r13748 r13937  
    3232use Pod::Usage qw( pod2usage );
    3333
    34 my ($det_id, $exp_tag, $class_id, $det_type, $input_uri, $camera, $dbname, $workdir, $no_update, $no_op);
     34my ($det_id, $exp_tag, $class_id, $det_type, $input_uri, $camera, $dbname, $workdir, $reduction, $no_update, $no_op);
    3535GetOptions(
    3636    'det_id|d=s'        => \$det_id,
     
    4242    'dbname|d=s'        => \$dbname, # Database name
    4343    'workdir|w=s'       => \$workdir, # Working directory, for output files
     44    'reduction=s'       => \$reduction, # Reduction class
    4445    'no-update'         => \$no_update,
    4546    'no-op'             => \$no_op,
     
    6061$ipprc->define_camera($camera);
    6162
    62 # Recipes to use, as a function of the detrend type
    63 use constant RECIPES => {
    64     'bias'     => 'PPIMAGE_O',    # Overscan only
    65     'dark'     => 'PPIMAGE_OB',   # Overscan and bias only
    66     'shutter'  => 'PPIMAGE_OBD',  # Overscan, bias and dark only
    67     'flat'     => 'PPIMAGE_OBDS', # Overscan, bias, dark and shutter only
    68     'domeflat' => 'PPIMAGE_OBDS', # Overscan, bias, dark and shutter only
    69     'skyflat'  => 'PPIMAGE_OBDS', # Overscan, bias, dark and shutter only
    70     'fringe'   => 'PPIMAGE_OBDSF',# Overscan, bias, dark, shutter and flat only
    71 };
     63$reduction = "DETREND" unless defined $reduction;
     64my $recipe = $ipprc->reduction($reduction, $det_type . '_PROCESS'); # Recipe name to use
    7265
    7366# Look for programs we need
     
    8073}
    8174$ppImage .= " -dbname $dbname" if defined $dbname;
    82 
    83 # Recipe to use in processing
    84 my $recipe = RECIPES->{lc($det_type)};
    85 unless (defined $recipe) {
    86     warn("Unrecognised detrend type: $det_type");
    87     exit($PS_EXIT_CONFIG_ERROR);
    88 }
    8975
    9076$workdir = caturi( $workdir, "$camera.$det_type.$det_id" ) if defined $workdir;
  • trunk/ippScripts/scripts/detrend_resid.pl

    r13926 r13937  
    3434
    3535my ($det_id, $iter, $exp_tag, $class_id, $det_type, $detrend,
    36         $input_uri, $camera, $mode, $dbname, $workdir, $no_update, $no_op);
     36        $input_uri, $camera, $mode, $dbname, $workdir, $reduction, $no_update, $no_op);
    3737GetOptions(
    3838    'det_id|d=s'        => \$det_id,
     
    4747    'dbname|d=s'        => \$dbname, # Database name
    4848    'workdir|w=s'       => \$workdir,   # Working directory, for output files
     49    'reduction=s'       => \$reduction, # Reduction class
    4950    'no-update'         => \$no_update,
    5051    'no-op'             => \$no_op,
     
    6768$ipprc->define_camera($camera);
    6869
    69 # Recipes to use, as a function of the detrend type
    70 use constant RECIPES => {
    71     'master' => {               # We're creating a master --- already processed the input
    72         'bias'     => 'PPIMAGE_B',      # Bias only
    73         'dark'     => 'PPIMAGE_D',      # Dark only
    74         'shutter'  => 'PPIMAGE_S',      # Shutter only
    75         'flat'     => 'PPIMAGE_F',      # Flat-field only
    76         'domeflat' => 'PPIMAGE_F',      # Flat-field only
    77         'skyflat'  => 'PPIMAGE_F',      # Flat-field only
    78         'fringe'   => 'PPIMAGE_R',      # Fringe only
    79     },
    80     'verify' => {               # We're checking the master --- input is not already processed
    81         'bias'     => 'PPIMAGE_OB',     # Bias only
    82         'dark'     => 'PPIMAGE_OBD',    # Dark only
    83         'shutter'  => 'PPIMAGE_OBDS',   # Shutter only
    84         'flat'     => 'PPIMAGE_OBDSF',  # Flat-field only
    85         'domeflat' => 'PPIMAGE_OBDSF',  # Flat-field only
    86         'skyflat'  => 'PPIMAGE_OBDSF',  # Flat-field only
    87         'fringe'   => 'PPIMAGE_OBDSFR', # Fringe only
    88     },
    89 };
     70$reduction = 'DETREND' unless defined $reduction;
     71my $recipe;                     # Name of recipe to use
     72if ($mode eq 'master') {
     73    $recipe = $det_type . '_RESID';
     74} elsif ($mode eq 'verify') {
     75    $recipe = $det_type . '_VERIFY';
     76} else {
     77    &my_die("Unrecognised mode: $mode", $det_id, $iter, $exp_tag, $class_id, $PS_EXIT_PROG_ERROR);
     78}
     79$recipe = $ipprc->reduction($reduction, $recipe);
    9080
    9181# Flags to specify the particular detrend to use
     
    113103$ppImage .= " -dbname $dbname" if defined $dbname;
    114104
    115 # Recipe to use in processing
    116 &my_die("Unrecognised mode: $mode", $det_id, $iter, $exp_tag, $class_id, $PS_EXIT_PROG_ERROR) unless defined RECIPES->{$mode};
    117 my $recipe = RECIPES->{$mode}->{lc($det_type)};
    118 &my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $exp_tag, $class_id, $PS_EXIT_PROG_ERROR) unless defined $recipe;
    119 
    120105$workdir = caturi( $workdir, "$camera.$det_type.$det_id" ) if defined $workdir;
    121106
     
    183168my $bg_mean_stdev = ($stats->bg_mean_stdev() or 'NAN');
    184169my $bin_stdev     = ($binnedStats->bg_stdev() or 'NAN');
    185 my $fringe_0      = (${$stats->fringe()[0]} or 'NAN');
    186 my $fringe_1      = (${$stats->fringe_err()[0]} or 'NAN');
     170my $fringe_0      = (${$stats->fringe()}[0] or 'NAN');
     171my $fringe_1      = (${$stats->fringe_err()}[0] or 'NAN');
    187172my $fringe_2      = 'NAN';
    188173
  • trunk/ippScripts/scripts/detrend_stack.pl

    r13748 r13937  
    3333use Pod::Usage qw( pod2usage );
    3434
    35 my ($det_id, $iter, $class_id, $det_type, $camera, $dbname, $workdir, $no_update, $no_op, $quiet);
     35my ($det_id, $iter, $class_id, $det_type, $camera, $dbname, $workdir, $reduction, $no_update, $no_op, $quiet);
    3636GetOptions(
    3737    'det_id|d=s'        => \$det_id,
     
    4242    'dbname|d=s'        => \$dbname, # Database name
    4343    'workdir|w=s'       => \$workdir,   # Working directory, for output files
     44    'reduction=s'       => \$reduction, # Reduction class for processing
    4445    'no-update'         => \$no_update,
    4546    'no-op'             => \$no_op,
     
    5859if (defined $quiet) { $verbose = 0; }
    5960
     61$ipprc->define_camera($camera);
     62
    6063# Recipes to use as a function of detrend type
    61 use constant RECIPES => {
    62     'bias' => 'PPMERGE_BIAS',
    63     'dark' => 'PPMERGE_DARK',
    64     'shutter' => 'PPMERGE_SHUTTER',
    65     'flat' => 'PPMERGE_FLAT',
    66     'domeflat' => 'PPMERGE_FLAT',
    67     'skyflat' => 'PPMERGE_FLAT',
    68     'fringe' => 'PPMERGE_FRINGE',
    69     };
     64$reduction = "DETREND" unless defined $reduction;
     65my $recipe = $ipprc->reduction($reduction, $det_type . '_STACK'); # Recipe name to use
    7066
    7167# Look for programs we need
     
    7773    exit($PS_EXIT_CONFIG_ERROR);
    7874}
    79 
    80 my $recipe = RECIPES()->{lc($det_type)}; # Recipe to use in stacking
    81 &my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $class_id, $PS_EXIT_PROG_ERROR) unless defined $recipe;
    8275
    8376my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files
  • trunk/ippScripts/scripts/ipp_serial_chip.pl

    r12800 r13937  
    5454    my $class_id = $item->{class_id};
    5555    my $uri = $item->{uri};
     56    my $reduction = $item->{reduction};
    5657   
    5758    my $command = "$chip --chip_id $chip_id --exp_id $exp_id --class_id $class_id --uri $uri --dbname $dbname --camera $camera";
     59    $command .= " --reduction $reduction" if defined $reduction;
    5860    $command .= " --no-op" if defined $no_op;
    5961    $command .= " --no-update" if defined $no_update;
  • trunk/ippScripts/scripts/ipp_serial_detrend.pl

    r12800 r13937  
    6565                my $camera = $item->{camera};
    6666                my $workdir = $item->{workdir};
    67                
     67                my $reduction = $item->{reduction};
     68
    6869                my $command = "$detrend_process_imfile --det_id $det_id --exp_tag $exp_tag --class_id $class_id --det_type $det_type --input_uri $uri --camera $camera --dbname $dbname";
     70                $command .= " --reduction $reduction" if defined $reduction;
    6971                $command .= " --workdir $workdir" if defined $workdir;
    7072                my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     
    119121        my $camera = $item->{camera};
    120122        my $workdir = $item->{workdir};
     123        my $reduction = $item->{reduction};
    121124
    122125        my $command = "$detrend_stack --det_id $det_id --iteration $iteration --class_id $class_id --det_type $det_type --camera $camera --dbname $dbname";
     126        $command .= " --reduction $reduction" if defined $reduction;
    123127        $command .= " --workdir $workdir" if defined $workdir;
    124128        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     
    235239                my $mode = $item->{mode};
    236240                my $workdir = $item->{workdir};
     241                my $reduction = $item->{reduction};
    237242
    238243                my $command = "$detrend_resid --det_id $det_id --iteration $iteration --exp_tag $exp_tag --class_id $class_id --det_type $det_type --camera $camera --input_uri $uri --mode $mode --dbname $dbname";
     244                $command .= " --reduction $reduction" if defined $reduction;
    239245                $command .= " --detrend $detrend" if defined $detrend;
    240246                $command .= " --workdir $workdir" if defined $workdir;
  • trunk/ippTasks/chip.pro

    r12697 r13937  
    124124    book getword chipPendingImfile $pageName uri -var URI
    125125    book getword chipPendingImfile $pageName dbname -var DBNAME
     126    book getword chipPendingImfile $pageName reduction -var REDUCTION
    126127
    127128    # specify choice of remote host
     
    149150      $run = $run --workdir $WORKDIR
    150151    end
     152    if ("$REDUCTION" != "NULL")
     153      $run = $run --reduction $REDUCTION
     154    end
    151155    add_standard_args run
    152156
  • trunk/ippTasks/detrend.process.pro

    r13683 r13937  
    144144    book getword detPendingProcessedImfile $pageName workdir  -var WORKDIR
    145145    book getword detPendingProcessedImfile $pageName dbname   -var DBNAME
     146    book getword detPendingProcessedImfile $pageName reduction -var REDUCTION
    146147
    147148    # specify choice of remote host:
     
    172173    if ("$WORKDIR" != "NULL")
    173174      $run = $run --workdir $WORKDIR
     175    end
     176    if ("$REDUCTION" != "NULL")
     177      $run = $run --reduction $REDUCTION
    174178    end
    175179    add_standard_args run
  • trunk/ippTasks/detrend.resid.pro

    r13683 r13937  
    144144    book getword detPendingResidImfile $pageName workdir   -var WORKDIR
    145145    book getword detPendingResidImfile $pageName dbname    -var DBNAME
     146    book getword detPendingResidImfile $pageName reduction -var REDUCTION
    146147
    147148    # specify choice of remote host:
     
    172173    if ("$WORKDIR" != "NULL")
    173174      $run = $run --workdir $WORKDIR
     175    end
     176    if ("$REDUCTION" != "NULL")
     177      $run = $run --reduction $REDUCTION
    174178    end
    175179    add_standard_args run
  • trunk/ippTasks/detrend.stack.pro

    r13683 r13937  
    125125    book getword detPendingStackedImfile $pageName workdir   -var WORKDIR
    126126    book getword detPendingStackedImfile $pageName dbname    -var DBNAME
     127    book getword detPendingStackedImfile $pageName reduction -var REDUCTION
    127128
    128129    # specify choice of remote host:
     
    156157      $run = $run --workdir $WORKDIR
    157158    end
     159    if ("$REDUCTION" != "NULL")
     160      $run = $run --reduction $REDUCTION
     161    end
    158162    add_standard_args run
    159163
  • trunk/ippTools/configure.ac

    r13739 r13937  
    11AC_PREREQ(2.59)
    22
    3 AC_INIT([ipptools], [1.1.22], [ipp-support@ifa.hawaii.edu])
     3AC_INIT([ipptools], [1.1.23], [ipp-support@ifa.hawaii.edu])
    44AC_CONFIG_SRCDIR([autogen.sh])
    55
     
    1818PKG_CHECK_MODULES([PSLIB], [pslib >= 1.1.0])
    1919PKG_CHECK_MODULES([PSMODULES], [psmodules >= 1.1.0])
    20 PKG_CHECK_MODULES([IPPDB], [ippdb >= 1.1.22])
     20PKG_CHECK_MODULES([IPPDB], [ippdb >= 1.1.23])
    2121
    2222PXTOOLS_CFLAGS="${PSLIB_CFLAGS=} ${PSMODULES_CFLAGS=} ${IPPDB_CFLAGS=}"
  • trunk/ippTools/src/camtool.c

    r13702 r13937  
    184184    }
    185185
    186     psString recipe = psMetadataLookupStr(&status, config->args, "-set_recipe");
    187     if (!status) {
    188         psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -set_recipe");
     186    psString reduction = psMetadataLookupStr(&status, config->args, "-set_reduction");
     187    if (!status) {
     188        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -set_reduction");
    189189        return false;
    190190    }
     
    237237
    238238    // would could do this "all in the database" if we didn't want the option
    239     // of changing the label/recipe/expgroup/dvodb/etc.  So we're pulling the
     239    // of changing the label/reduction/expgroup/dvodb/etc.  So we're pulling the
    240240    // data out so we have the option of changing these values or leaving the
    241241    // old values in place (i.e., passing the values through).
     
    257257                    workdir     ? workdir   : row->workdir,
    258258                    label       ? label     : row->label,
    259                     recipe      ? recipe    : row->recipe,
     259                    reduction      ? reduction    : row->reduction,
    260260                    expgroup    ? expgroup  : row->expgroup,
    261261                    dvodb       ? dvodb     : row->dvodb
     
    617617        pendingRow->workdir,
    618618        pendingRow->label,
    619         pendingRow->recipe,
     619        pendingRow->reduction,
    620620        pendingRow->expgroup,
    621621        pendingRow->dvodb,
     
    628628        zp_mean,
    629629        zp_stdev,
    630         fwhm,
    631         fwhm_range,
    632         n_stars,
    633         n_extended,
    634         n_cr,
    635         n_astrom,
     630        fwhm,
     631        fwhm_range,
     632        n_stars,
     633        n_extended,
     634        n_cr,
     635        n_astrom,
    636636        path_base,
    637637        code
  • trunk/ippTools/src/camtoolConfig.c

    r13710 r13937  
    9696    psMetadataAddStr(queueArgs, PS_LIST_TAIL, "-set_label",  0,
    9797            "define label", NULL);
    98     psMetadataAddStr(queueArgs, PS_LIST_TAIL, "-set_recipe",  0,
    99             "define recipe", NULL);
     98    psMetadataAddStr(queueArgs, PS_LIST_TAIL, "-set_reduction",  0,
     99            "define reduction class", NULL);
    100100    psMetadataAddStr(queueArgs, PS_LIST_TAIL, "-set_expgroup",  0,
    101101            "define exposure group", NULL);
  • trunk/ippTools/src/chiptool.c

    r13891 r13937  
    173173    }
    174174
    175     psString recipe = psMetadataLookupStr(&status, config->args, "-set_recipe");
    176     if (!status) {
    177         psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -set_recipe");
     175    psString reduction = psMetadataLookupStr(&status, config->args, "-set_reduction");
     176    if (!status) {
     177        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -set_reduction");
    178178        return false;
    179179    }
     
    243243
    244244        // queue the exp
    245         if (!chipQueueExpTag(config, exp_tag, workdir, label, recipe, expgroup, dvodb)) {
     245        if (!chipQueueExpTag(config, exp_tag, workdir, label, reduction, expgroup, dvodb)) {
    246246            if (!psDBRollback(config->dbh)) {
    247247                psError(PS_ERR_UNKNOWN, false, "database error");
     
    804804                    processedExp->workdir,
    805805                    processedExp->label,
    806                     processedExp->recipe,
     806                    processedExp->reduction,
    807807                    processedExp->expgroup,
    808808                    processedExp->dvodb
     
    999999        pendingExp->workdir,
    10001000        pendingExp->label,
    1001         pendingExp->recipe,
     1001        pendingExp->reduction,
    10021002        pendingExp->expgroup,
    10031003        pendingExp->dvodb
  • trunk/ippTools/src/chiptoolConfig.c

    r13649 r13937  
    9494    psMetadataAddStr(queueArgs, PS_LIST_TAIL, "-set_label",  0,
    9595            "define label", NULL);
    96     psMetadataAddStr(queueArgs, PS_LIST_TAIL, "-set_recipe",  0,
    97             "define recipe", NULL);
     96    psMetadataAddStr(queueArgs, PS_LIST_TAIL, "-set_reduction",  0,
     97            "define reduction class", NULL);
    9898    psMetadataAddStr(queueArgs, PS_LIST_TAIL, "-set_expgroup",  0,
    9999            "define exposure group", NULL);
     
    115115            "search by camera of interest", NULL);
    116116    psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-filter",  0,
    117             "search by filter of interest", NULL); 
     117            "search by filter of interest", NULL);
    118118    psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-uri",  0,
    119119            "search by URL", NULL);
     
    122122    psMetadataAddBool(pendingimfileArgs, PS_LIST_TAIL, "-simple",  0,
    123123            "use the simple output format", false);
    124  
     124
    125125    // -addprocessedimfile
    126126    psMetadata *addprocessedimfileArgs = psMetadataAlloc();
     
    188188            "define camera of interest", NULL);
    189189    psMetadataAddStr(processedimfileArgs, PS_LIST_TAIL, "-filter",  0,
    190             "define filter of interest", NULL); 
     190            "define filter of interest", NULL);
    191191    psMetadataAddStr(processedimfileArgs, PS_LIST_TAIL, "-uri",  0,
    192192            "define URL", NULL);
     
    226226    psMetadataAddStr(blockArgs, PS_LIST_TAIL, "-label",  0,
    227227            "name of a label to mask out (required)", NULL);
    228    
     228
    229229    // -masked
    230230    psMetadata *maskedArgs = psMetadataAlloc();
    231231    psMetadataAddBool(maskedArgs, PS_LIST_TAIL, "-simple",  0,
    232232            "use the simple output format", false);
    233    
     233
    234234    // -unblock
    235235    psMetadata *unblockArgs = psMetadataAlloc();
  • trunk/ippTools/src/dettool.c

    r13849 r13937  
    449449    }
    450450
     451    psString reduction = psMetadataLookupStr(&status, config->args, "-reduction");
     452    if (!status) {
     453        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -reduction");
     454        return false;
     455    }
     456
    451457    psString label = psMetadataLookupStr(&status, config->args, "-label");
    452458    if (!status) {
     
    528534    // XXX det_id
    529535    detRunInsert(config->dbh,
    530             0,
    531             0,
    532             det_type,
    533             mode,
    534             "run",
    535             filelevel,
    536             workdir,
    537             camera,
    538             telescope,
    539             exp_type,
    540             filter,
    541             airmass_min,
    542             airmass_max,
    543             exp_time_min,
    544             exp_time_max,
    545             ccd_temp_min,
    546             ccd_temp_max,
    547             posang_min,
    548             posang_max,
    549             registered,
    550             time_begin,
    551             time_end,
    552             use_begin,
    553             use_end,
    554             solang_min,
    555             solang_max,
    556             label,
    557             0       // parent
     536                 0,
     537                 0,
     538                 det_type,
     539                 mode,
     540                 "run",
     541                 filelevel,
     542                 workdir,
     543                 camera,
     544                 telescope,
     545                 exp_type,
     546                 reduction,
     547                 filter,
     548                 airmass_min,
     549                 airmass_max,
     550                 exp_time_min,
     551                 exp_time_max,
     552                 ccd_temp_min,
     553                 ccd_temp_max,
     554                 posang_min,
     555                 posang_max,
     556                 registered,
     557                 time_begin,
     558                 time_end,
     559                 use_begin,
     560                 use_end,
     561                 solang_min,
     562                 solang_max,
     563                 label,
     564                 0       // parent
    558565        );
    559566    psFree(registered);
     
    11721179    }
    11731180
     1181    psString reduction = psMetadataLookupStr(&status, config->args, "-reduction");
     1182    if (!status) {
     1183        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -reduction");
     1184        return false;
     1185    }
     1186
    11741187    psString label = psMetadataLookupStr(&status, config->args, "-label");
    11751188    if (!status) {
     
    12511264    // XXX det_id
    12521265    detRunInsert(config->dbh,
    1253             0,      // det_id
    1254             0,      // iteration
    1255             det_type,
    1256             mode,
    1257             "run",  // state
    1258             filelevel,
    1259             workdir,
    1260             camera,
    1261             telescope,
    1262             "NA",
    1263             filter,
    1264             airmass_min,
    1265             airmass_max,
    1266             exp_time_min,
    1267             exp_time_max,
    1268             ccd_temp_min,
    1269             ccd_temp_max,
    1270             posang_min,
    1271             posang_max,
    1272             registered,
    1273             time_begin,
    1274             time_end,
    1275             use_begin,
    1276             use_end,
    1277             solang_min,
    1278             solang_max,
    1279             label,
    1280             0       // parent
     1266                 0,      // det_id
     1267                 0,      // iteration
     1268                 det_type,
     1269                 mode,
     1270                 "run",  // state
     1271                 filelevel,
     1272                 workdir,
     1273                 camera,
     1274                 telescope,
     1275                 "NA",
     1276                 reduction,
     1277                 filter,
     1278                 airmass_min,
     1279                 airmass_max,
     1280                 exp_time_min,
     1281                 exp_time_max,
     1282                 ccd_temp_min,
     1283                 ccd_temp_max,
     1284                 posang_min,
     1285                 posang_max,
     1286                 registered,
     1287                 time_begin,
     1288                 time_end,
     1289                 use_begin,
     1290                 use_end,
     1291                 solang_min,
     1292                 solang_max,
     1293                 label,
     1294                 0       // parent
    12811295        );
    12821296    psFree(registered);
     
    16711685            psFree(use_end);
    16721686        }
     1687    }
     1688
     1689    psString reduction = psMetadataLookupStr(&status, config->args, "-set_reduction");
     1690    if (!status) {
     1691        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -set_reduction");
     1692        return false;
     1693    }
     1694    if (reduction) {
     1695        psFree(detRun->reduction);
     1696        detRun->reduction = psStringCopy(reduction);
    16731697    }
    16741698
     
    21152139            "   detRun.det_type,"
    21162140            "   detRun.workdir,"
     2141            "   detRun.reduction,"
    21172142            "   rawImfile.*,"
    21182143            "   rawExp.camera"
     
    28622887        "    detRun.det_type,\n"
    28632888        "    detRun.workdir,\n"
     2889        "    detRun.reduction,\n"
    28642890        "    detProcessedImfile.class_id,\n"
    28652891        "    rawExp.camera\n"
     
    29873013    // add the two required restrictions: detRun.state and detRun.mode
    29883014    if ((value = psMetadataLookupStr(&status, config->args, "-select_state"))) {
    2989         psStringAppend(&query, " detRun.state = '%s'", value);
     3015        psStringAppend(&query, " detRun.state = '%s'", value);
    29903016    } else {
    2991         psStringAppend(&query, " detRun.state = 'run'");
     3017        psStringAppend(&query, " detRun.state = 'run'");
    29923018    }
    29933019    if ((value = psMetadataLookupStr(&status, config->args, "-select_mode"))) {
    2994         psStringAppend(&query, " AND detRun.mode = '%s'", value);
     3020        psStringAppend(&query, " AND detRun.mode = '%s'", value);
    29953021    } else {
    2996         psStringAppend(&query, " AND detRun.mode = 'master'");
     3022        psStringAppend(&query, " AND detRun.mode = 'master'");
    29973023    }
    29983024
     
    44074433        "   detRun.mode,\n"
    44084434        "   detRun.workdir,\n"
     4435        "   detRun.reduction,\n"
    44094436        "   detProcessedImfile.exp_tag,\n"
    44104437        "   detProcessedImfile.class_id,\n"
     
    44444471        "   detRun.mode,\n"
    44454472        "   detRun.workdir,\n"
     4473        "   detRun.reduction,\n"
    44464474        "   rawImfile.exp_tag,\n"
    44474475        "   rawImfile.class_id,\n"
     
    67746802
    67756803    if (!detRunInsert(config->dbh,
    6776             0,          // det_id
    6777             0,          // the iteration is fixed at 0
    6778             det_type,
    6779             mode,
    6780             "reg",      // state
    6781             filelevel,
    6782             workdir,
    6783             camera,
    6784             telescope,
    6785             exp_type,
    6786             filter,
    6787             airmass_min,
    6788             airmass_max,
    6789             exp_time_min,
    6790             exp_time_max,
    6791             ccd_temp_min,
    6792             ccd_temp_max,
    6793             posang_min,
    6794             posang_max,
    6795             registered,
    6796             time_begin,
    6797             time_end,
    6798             use_begin,
    6799             use_end,
    6800             solang_min,
    6801             solang_max,
    6802             label,      // label
    6803             parent ? (psS64)atoll(parent) : 0
    6804     )) {
     6804                      0,          // det_id
     6805                      0,          // the iteration is fixed at 0
     6806                      det_type,
     6807                      mode,
     6808                      "reg",      // state
     6809                      filelevel,
     6810                      workdir,
     6811                      camera,
     6812                      telescope,
     6813                      exp_type,
     6814                      NULL,
     6815                      filter,
     6816                      airmass_min,
     6817                      airmass_max,
     6818                      exp_time_min,
     6819                      exp_time_max,
     6820                      ccd_temp_min,
     6821                      ccd_temp_max,
     6822                      posang_min,
     6823                      posang_max,
     6824                      registered,
     6825                      time_begin,
     6826                      time_end,
     6827                      use_begin,
     6828                      use_end,
     6829                      solang_min,
     6830                      solang_max,
     6831                      label,      // label
     6832                      parent ? (psS64)atoll(parent) : 0
     6833            )) {
    68056834        psError(PS_ERR_UNKNOWN, false, "database error");
    68066835        // rollback
  • trunk/ippTools/src/dettoolConfig.c

    r13849 r13937  
    115115    psMetadataAddStr(definebytagArgs, PS_LIST_TAIL, "-use_end",  0,
    116116            "end of detrend run applicable peroid", NULL);
     117    psMetadataAddStr(definebytagArgs, PS_LIST_TAIL, "-reduction",  0,
     118            "define reduction class for processing", NULL);
    117119    psMetadataAddStr(definebytagArgs, PS_LIST_TAIL, "-label",  0,
    118120            "define detrun label", NULL);
     
    204206    psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-pretend",  0,
    205207            "print the exposures that would be included in the detrend run and exit", false);
     208    psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-reduction",  0,
     209            "define reduction class for processing", NULL);
    206210    psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-label",  0,
    207211            "define detrun label", NULL);
     
    259263    psMetadataAddStr(definebydetrunArgs, PS_LIST_TAIL, "-filter_input_end", 0,
    260264            "filter input detrun exp to be in this peroid", NULL);
     265    psMetadataAddStr(definebydetrunArgs, PS_LIST_TAIL, "-set_reduction",  0,
     266            "define reduction class for processing", NULL);
    261267    psMetadataAddStr(definebydetrunArgs, PS_LIST_TAIL, "-set_label",  0,
    262268            "define detrun label", NULL);
  • trunk/ippconfig/megacam/camera.config

    r13933 r13937  
    113113END
    114114
     115REDUCTION       METADATA
     116        DETREND         METADATA
     117                BIAS_PROCESS    STR     PPIMAGE_O
     118                BIAS_RESID      STR     PPIMAGE_B
     119                BIAS_VERIFY     STR     PPIMAGE_OB
     120                DARK_PROCESS    STR     PPIMAGE_OB
     121                DARK_RESID      STR     PPIMAGE_D
     122                DARK_VERIFY     STR     PPIMAGE_OBD
     123                SHUTTER_PROCESS STR     PPIMAGE_OBD
     124                SHUTTER_RESID   STR     PPIMAGE_S
     125                SHUTTER_VERIFY  STR     PPIMAGE_OBDS
     126                FLAT_PROCESS    STR     PPIMAGE_OBDS
     127                FLAT_RESID      STR     PPIMAGE_F
     128                FLAT_VERIFY     STR     PPIMAGE_OBDSF
     129                FRINGE_PROCESS  STR     PPIMAGE_OBDSF
     130                FRINGE_RESID    STR     PPIMAGE_R
     131                FRINGE_VERIFY   STR     PPIMAGE_OBDSFR
     132        END
     133
     134        RAW             METADATA
     135                CHIP            STR     PPIMAGE_OBDSFRA
     136        END
     137
     138        PROCESSED       METADATA
     139                CHIP            STR     PPIMAGE_PA
     140        END
     141END
     142
    115143FILERULES METADATA
    116144   ### Redirections
  • trunk/ippconfig/simtest/camera.config

    r13878 r13937  
    4545        PSASTRO         STR     simtest/psastro.config  # psastro details
    4646        REJECTIONS      STR     simtest/rejections.config # Rejection for detrend creation
     47END
     48
     49REDUCTION       METADATA
     50        # Detrend processing
     51        DETREND         METADATA
     52                BIAS_PROCESS    STR     PPIMAGE_O
     53                BIAS_RESID      STR     PPIMAGE_B
     54                BIAS_VERIFY     STR     PPIMAGE_OB
     55                BIAS_STACK      STR     PPMERGE_BIAS
     56                DARK_PROCESS    STR     PPIMAGE_OB
     57                DARK_RESID      STR     PPIMAGE_D
     58                DARK_VERIFY     STR     PPIMAGE_OBD
     59                DARK_STACK      STR     PPMERGE_DARK
     60                SHUTTER_PROCESS STR     PPIMAGE_OBD
     61                SHUTTER_RESID   STR     PPIMAGE_S
     62                SHUTTER_VERIFY  STR     PPIMAGE_OBDS
     63                SHUTTER_STACK   STR     PPMERGE_SHUTTER
     64                FLAT_PROCESS    STR     PPIMAGE_OBDS
     65                FLAT_RESID      STR     PPIMAGE_F
     66                FLAT_VERIFY     STR     PPIMAGE_OBDSF
     67                FLAT_STACK      STR     PPMERGE_FLAT
     68                FRINGE_PROCESS  STR     PPIMAGE_OBDSF
     69                FRINGE_RESID    STR     PPIMAGE_R
     70                FRINGE_VERIFY   STR     PPIMAGE_OBDSFR
     71                FRINGE_STACK    STR     PPMERGE_FRINGE
     72        END
     73        # Processing raw data
     74        DEFAULT         METADATA
     75                CHIP            STR     PPIMAGE_OBDSFRA
     76        END
     77        NO_PHOTOM       METADATA
     78                CHIP            STR     PPIMAGE_OBDSF
     79        END
     80        # Photometry and astrometry of data that's already processed
     81        PROCESSED       METADATA
     82                CHIP            STR     PPIMAGE_PA
     83        END
     84
    4785END
    4886
  • trunk/ippdb/configure.ac

    r13739 r13937  
    77AC_PREREQ(2.59)
    88
    9 AC_INIT([ippdb], [1.1.22], [pan-starrs.ifa.hawaii.edu])
     9AC_INIT([ippdb], [1.1.23], [pan-starrs.ifa.hawaii.edu])
    1010AC_CONFIG_SRCDIR([ippdb.pc.in])
    1111
  • trunk/ippdb/src/ippdb.c

    r13739 r13937  
    55415541static void chipPendingExpRowFree(chipPendingExpRow *object);
    55425542
    5543 chipPendingExpRow *chipPendingExpRowAlloc(psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *workdir, const char *label, const char *recipe, const char *expgroup, const char *dvodb)
     5543chipPendingExpRow *chipPendingExpRowAlloc(psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *workdir, const char *label, const char *reduction, const char *expgroup, const char *dvodb)
    55445544{
    55455545    chipPendingExpRow *_object;
     
    55535553    _object->workdir = psStringCopy(workdir);
    55545554    _object->label = psStringCopy(label);
    5555     _object->recipe = psStringCopy(recipe);
     5555    _object->reduction = psStringCopy(reduction);
    55565556    _object->expgroup = psStringCopy(expgroup);
    55575557    _object->dvodb = psStringCopy(dvodb);
     
    55655565    psFree(object->workdir);
    55665566    psFree(object->label);
    5567     psFree(object->recipe);
     5567    psFree(object->reduction);
    55685568    psFree(object->expgroup);
    55695569    psFree(object->dvodb);
     
    55985598        return false;
    55995599    }
    5600     if (!psMetadataAdd(md, PS_LIST_TAIL, "recipe", PS_DATA_STRING, NULL, "64")) {
    5601         psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     5600    if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, "Reduction class", "64")) {
     5601        psError(PS_ERR_UNKNOWN, false, "failed to add item reduction");
    56025602        psFree(md);
    56035603        return false;
     
    56265626}
    56275627
    5628 bool chipPendingExpInsert(psDB * dbh, psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *workdir, const char *label, const char *recipe, const char *expgroup, const char *dvodb)
     5628bool chipPendingExpInsert(psDB * dbh, psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *workdir, const char *label, const char *reduction, const char *expgroup, const char *dvodb)
    56295629{
    56305630    psMetadata *md = psMetadataAlloc();
     
    56545654        return false;
    56555655    }
    5656     if (!psMetadataAdd(md, PS_LIST_TAIL, "recipe", PS_DATA_STRING, NULL, recipe)) {
    5657         psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     5656    if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, reduction)) {
     5657        psError(PS_ERR_UNKNOWN, false, "failed to add item reduction");
    56585658        psFree(md);
    56595659        return false;
     
    56925692bool chipPendingExpInsertObject(psDB *dbh, chipPendingExpRow *object)
    56935693{
    5694     return chipPendingExpInsert(dbh, object->chip_id, object->exp_tag, object->guide_id, object->workdir, object->label, object->recipe, object->expgroup, object->dvodb);
     5694    return chipPendingExpInsert(dbh, object->chip_id, object->exp_tag, object->guide_id, object->workdir, object->label, object->reduction, object->expgroup, object->dvodb);
    56955695}
    56965696
     
    57905790        return false;
    57915791    }
    5792     if (!psMetadataAdd(md, PS_LIST_TAIL, "recipe", PS_DATA_STRING, NULL, object->recipe)) {
    5793         psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     5792    if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, object->reduction)) {
     5793        psError(PS_ERR_UNKNOWN, false, "failed to add item reduction");
    57945794        psFree(md);
    57955795        return false;
     
    58395839        return false;
    58405840    }
    5841     char* recipe = psMetadataLookupPtr(&status, md, "recipe");
    5842     if (!status) {
    5843         psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item recipe");
     5841    char* reduction = psMetadataLookupPtr(&status, md, "reduction");
     5842    if (!status) {
     5843        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item reduction");
    58445844        return false;
    58455845    }
     
    58555855    }
    58565856
    5857     return chipPendingExpRowAlloc(chip_id, exp_tag, guide_id, workdir, label, recipe, expgroup, dvodb);
     5857    return chipPendingExpRowAlloc(chip_id, exp_tag, guide_id, workdir, label, reduction, expgroup, dvodb);
    58585858}
    58595859psArray *chipPendingExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
     
    62846284static void chipProcessedExpRowFree(chipProcessedExpRow *object);
    62856285
    6286 chipProcessedExpRow *chipProcessedExpRowAlloc(psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *workdir, const char *label, const char *recipe, const char *expgroup, const char *dvodb)
     6286chipProcessedExpRow *chipProcessedExpRowAlloc(psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *workdir, const char *label, const char *reduction, const char *expgroup, const char *dvodb)
    62876287{
    62886288    chipProcessedExpRow *_object;
     
    62966296    _object->workdir = psStringCopy(workdir);
    62976297    _object->label = psStringCopy(label);
    6298     _object->recipe = psStringCopy(recipe);
     6298    _object->reduction = psStringCopy(reduction);
    62996299    _object->expgroup = psStringCopy(expgroup);
    63006300    _object->dvodb = psStringCopy(dvodb);
     
    63086308    psFree(object->workdir);
    63096309    psFree(object->label);
    6310     psFree(object->recipe);
     6310    psFree(object->reduction);
    63116311    psFree(object->expgroup);
    63126312    psFree(object->dvodb);
     
    63416341        return false;
    63426342    }
    6343     if (!psMetadataAdd(md, PS_LIST_TAIL, "recipe", PS_DATA_STRING, NULL, "64")) {
    6344         psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     6343    if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, "64")) {
     6344        psError(PS_ERR_UNKNOWN, false, "failed to add item reduction");
    63456345        psFree(md);
    63466346        return false;
     
    63696369}
    63706370
    6371 bool chipProcessedExpInsert(psDB * dbh, psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *workdir, const char *label, const char *recipe, const char *expgroup, const char *dvodb)
     6371bool chipProcessedExpInsert(psDB * dbh, psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *workdir, const char *label, const char *reduction, const char *expgroup, const char *dvodb)
    63726372{
    63736373    psMetadata *md = psMetadataAlloc();
     
    63976397        return false;
    63986398    }
    6399     if (!psMetadataAdd(md, PS_LIST_TAIL, "recipe", PS_DATA_STRING, NULL, recipe)) {
    6400         psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     6399    if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, reduction)) {
     6400        psError(PS_ERR_UNKNOWN, false, "failed to add item reduction");
    64016401        psFree(md);
    64026402        return false;
     
    64356435bool chipProcessedExpInsertObject(psDB *dbh, chipProcessedExpRow *object)
    64366436{
    6437     return chipProcessedExpInsert(dbh, object->chip_id, object->exp_tag, object->guide_id, object->workdir, object->label, object->recipe, object->expgroup, object->dvodb);
     6437    return chipProcessedExpInsert(dbh, object->chip_id, object->exp_tag, object->guide_id, object->workdir, object->label, object->reduction, object->expgroup, object->dvodb);
    64386438}
    64396439
     
    65336533        return false;
    65346534    }
    6535     if (!psMetadataAdd(md, PS_LIST_TAIL, "recipe", PS_DATA_STRING, NULL, object->recipe)) {
    6536         psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     6535    if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, object->reduction)) {
     6536        psError(PS_ERR_UNKNOWN, false, "failed to add item reduction");
    65376537        psFree(md);
    65386538        return false;
     
    65826582        return false;
    65836583    }
    6584     char* recipe = psMetadataLookupPtr(&status, md, "recipe");
    6585     if (!status) {
    6586         psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item recipe");
     6584    char* reduction = psMetadataLookupPtr(&status, md, "reduction");
     6585    if (!status) {
     6586        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item reduction");
    65876587        return false;
    65886588    }
     
    65986598    }
    65996599
    6600     return chipProcessedExpRowAlloc(chip_id, exp_tag, guide_id, workdir, label, recipe, expgroup, dvodb);
     6600    return chipProcessedExpRowAlloc(chip_id, exp_tag, guide_id, workdir, label, reduction, expgroup, dvodb);
    66016601}
    66026602psArray *chipProcessedExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
     
    77227722static void camPendingExpRowFree(camPendingExpRow *object);
    77237723
    7724 camPendingExpRow *camPendingExpRowAlloc(psS64 cam_id, psS64 chip_id, const char *workdir, const char *label, const char *recipe, const char *expgroup, const char *dvodb)
     7724camPendingExpRow *camPendingExpRowAlloc(psS64 cam_id, psS64 chip_id, const char *workdir, const char *label, const char *reduction, const char *expgroup, const char *dvodb)
    77257725{
    77267726    camPendingExpRow *_object;
     
    77337733    _object->workdir = psStringCopy(workdir);
    77347734    _object->label = psStringCopy(label);
    7735     _object->recipe = psStringCopy(recipe);
     7735    _object->reduction = psStringCopy(reduction);
    77367736    _object->expgroup = psStringCopy(expgroup);
    77377737    _object->dvodb = psStringCopy(dvodb);
     
    77447744    psFree(object->workdir);
    77457745    psFree(object->label);
    7746     psFree(object->recipe);
     7746    psFree(object->reduction);
    77477747    psFree(object->expgroup);
    77487748    psFree(object->dvodb);
     
    77727772        return false;
    77737773    }
    7774     if (!psMetadataAdd(md, PS_LIST_TAIL, "recipe", PS_DATA_STRING, NULL, "64")) {
    7775         psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     7774    if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, "64")) {
     7775        psError(PS_ERR_UNKNOWN, false, "failed to add item reduction");
    77767776        psFree(md);
    77777777        return false;
     
    78007800}
    78017801
    7802 bool camPendingExpInsert(psDB * dbh, psS64 cam_id, psS64 chip_id, const char *workdir, const char *label, const char *recipe, const char *expgroup, const char *dvodb)
     7802bool camPendingExpInsert(psDB * dbh, psS64 cam_id, psS64 chip_id, const char *workdir, const char *label, const char *reduction, const char *expgroup, const char *dvodb)
    78037803{
    78047804    psMetadata *md = psMetadataAlloc();
     
    78237823        return false;
    78247824    }
    7825     if (!psMetadataAdd(md, PS_LIST_TAIL, "recipe", PS_DATA_STRING, NULL, recipe)) {
    7826         psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     7825    if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, reduction)) {
     7826        psError(PS_ERR_UNKNOWN, false, "failed to add item reduction");
    78277827        psFree(md);
    78287828        return false;
     
    78617861bool camPendingExpInsertObject(psDB *dbh, camPendingExpRow *object)
    78627862{
    7863     return camPendingExpInsert(dbh, object->cam_id, object->chip_id, object->workdir, object->label, object->recipe, object->expgroup, object->dvodb);
     7863    return camPendingExpInsert(dbh, object->cam_id, object->chip_id, object->workdir, object->label, object->reduction, object->expgroup, object->dvodb);
    78647864}
    78657865
     
    79547954        return false;
    79557955    }
    7956     if (!psMetadataAdd(md, PS_LIST_TAIL, "recipe", PS_DATA_STRING, NULL, object->recipe)) {
    7957         psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     7956    if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, object->reduction)) {
     7957        psError(PS_ERR_UNKNOWN, false, "failed to add item reduction");
    79587958        psFree(md);
    79597959        return false;
     
    79987998        return false;
    79997999    }
    8000     char* recipe = psMetadataLookupPtr(&status, md, "recipe");
    8001     if (!status) {
    8002         psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item recipe");
     8000    char* reduction = psMetadataLookupPtr(&status, md, "reduction");
     8001    if (!status) {
     8002        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item reduction");
    80038003        return false;
    80048004    }
     
    80148014    }
    80158015
    8016     return camPendingExpRowAlloc(cam_id, chip_id, workdir, label, recipe, expgroup, dvodb);
     8016    return camPendingExpRowAlloc(cam_id, chip_id, workdir, label, reduction, expgroup, dvodb);
    80178017}
    80188018psArray *camPendingExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
     
    81268126static void camProcessedExpRowFree(camProcessedExpRow *object);
    81278127
    8128 camProcessedExpRow *camProcessedExpRowAlloc(psS64 cam_id, psS64 chip_id, const char *workdir, const char *label, const char *recipe, const char *expgroup, const char *dvodb, const char *uri, psF32 bg, psF32 bg_stdev, psF32 bg_mean_stdev, psF32 sigma_ra, psF32 sigma_dec, psF32 zp_mean, psF32 zp_stdev, psF32 fwhm, psF32 fwhm_range, psS32 n_stars, psS32 n_extended, psS32 n_cr, psS32 n_astrom, const char *path_base, psS16 fault)
     8128camProcessedExpRow *camProcessedExpRowAlloc(psS64 cam_id, psS64 chip_id, const char *workdir, const char *label, const char *reduction, const char *expgroup, const char *dvodb, const char *uri, psF32 bg, psF32 bg_stdev, psF32 bg_mean_stdev, psF32 sigma_ra, psF32 sigma_dec, psF32 zp_mean, psF32 zp_stdev, psF32 fwhm, psF32 fwhm_range, psS32 n_stars, psS32 n_extended, psS32 n_cr, psS32 n_astrom, const char *path_base, psS16 fault)
    81298129{
    81308130    camProcessedExpRow *_object;
     
    81378137    _object->workdir = psStringCopy(workdir);
    81388138    _object->label = psStringCopy(label);
    8139     _object->recipe = psStringCopy(recipe);
     8139    _object->reduction = psStringCopy(reduction);
    81408140    _object->expgroup = psStringCopy(expgroup);
    81418141    _object->dvodb = psStringCopy(dvodb);
     
    81648164    psFree(object->workdir);
    81658165    psFree(object->label);
    8166     psFree(object->recipe);
     8166    psFree(object->reduction);
    81678167    psFree(object->expgroup);
    81688168    psFree(object->dvodb);
     
    81948194        return false;
    81958195    }
    8196     if (!psMetadataAdd(md, PS_LIST_TAIL, "recipe", PS_DATA_STRING, NULL, "64")) {
    8197         psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     8196    if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, "64")) {
     8197        psError(PS_ERR_UNKNOWN, false, "failed to add item reduction");
    81988198        psFree(md);
    81998199        return false;
     
    83028302}
    83038303
    8304 bool camProcessedExpInsert(psDB * dbh, psS64 cam_id, psS64 chip_id, const char *workdir, const char *label, const char *recipe, const char *expgroup, const char *dvodb, const char *uri, psF32 bg, psF32 bg_stdev, psF32 bg_mean_stdev, psF32 sigma_ra, psF32 sigma_dec, psF32 zp_mean, psF32 zp_stdev, psF32 fwhm, psF32 fwhm_range, psS32 n_stars, psS32 n_extended, psS32 n_cr, psS32 n_astrom, const char *path_base, psS16 fault)
     8304bool camProcessedExpInsert(psDB * dbh, psS64 cam_id, psS64 chip_id, const char *workdir, const char *label, const char *reduction, const char *expgroup, const char *dvodb, const char *uri, psF32 bg, psF32 bg_stdev, psF32 bg_mean_stdev, psF32 sigma_ra, psF32 sigma_dec, psF32 zp_mean, psF32 zp_stdev, psF32 fwhm, psF32 fwhm_range, psS32 n_stars, psS32 n_extended, psS32 n_cr, psS32 n_astrom, const char *path_base, psS16 fault)
    83058305{
    83068306    psMetadata *md = psMetadataAlloc();
     
    83258325        return false;
    83268326    }
    8327     if (!psMetadataAdd(md, PS_LIST_TAIL, "recipe", PS_DATA_STRING, NULL, recipe)) {
    8328         psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     8327    if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, reduction)) {
     8328        psError(PS_ERR_UNKNOWN, false, "failed to add item reduction");
    83298329        psFree(md);
    83308330        return false;
     
    84438443bool camProcessedExpInsertObject(psDB *dbh, camProcessedExpRow *object)
    84448444{
    8445     return camProcessedExpInsert(dbh, object->cam_id, object->chip_id, object->workdir, object->label, object->recipe, object->expgroup, object->dvodb, object->uri, object->bg, object->bg_stdev, object->bg_mean_stdev, object->sigma_ra, object->sigma_dec, object->zp_mean, object->zp_stdev, object->fwhm, object->fwhm_range, object->n_stars, object->n_extended, object->n_cr, object->n_astrom, object->path_base, object->fault);
     8445    return camProcessedExpInsert(dbh, object->cam_id, object->chip_id, object->workdir, object->label, object->reduction, object->expgroup, object->dvodb, object->uri, object->bg, object->bg_stdev, object->bg_mean_stdev, object->sigma_ra, object->sigma_dec, object->zp_mean, object->zp_stdev, object->fwhm, object->fwhm_range, object->n_stars, object->n_extended, object->n_cr, object->n_astrom, object->path_base, object->fault);
    84468446}
    84478447
     
    85368536        return false;
    85378537    }
    8538     if (!psMetadataAdd(md, PS_LIST_TAIL, "recipe", PS_DATA_STRING, NULL, object->recipe)) {
    8539         psError(PS_ERR_UNKNOWN, false, "failed to add item recipe");
     8538    if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, object->reduction)) {
     8539        psError(PS_ERR_UNKNOWN, false, "failed to add item reduction");
    85408540        psFree(md);
    85418541        return false;
     
    86608660        return false;
    86618661    }
    8662     char* recipe = psMetadataLookupPtr(&status, md, "recipe");
    8663     if (!status) {
    8664         psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item recipe");
     8662    char* reduction = psMetadataLookupPtr(&status, md, "reduction");
     8663    if (!status) {
     8664        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item reduction");
    86658665        return false;
    86668666    }
     
    87568756    }
    87578757
    8758     return camProcessedExpRowAlloc(cam_id, chip_id, workdir, label, recipe, expgroup, dvodb, uri, bg, bg_stdev, bg_mean_stdev, sigma_ra, sigma_dec, zp_mean, zp_stdev, fwhm, fwhm_range, n_stars, n_extended, n_cr, n_astrom, path_base, fault);
     8758    return camProcessedExpRowAlloc(cam_id, chip_id, workdir, label, reduction, expgroup, dvodb, uri, bg, bg_stdev, bg_mean_stdev, sigma_ra, sigma_dec, zp_mean, zp_stdev, fwhm, fwhm_range, n_stars, n_extended, n_cr, n_astrom, path_base, fault);
    87598759}
    87608760psArray *camProcessedExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
     
    1282712827static void detRunRowFree(detRunRow *object);
    1282812828
    12829 detRunRow *detRunRowAlloc(psS64 det_id, psS32 iteration, const char *det_type, const char *mode, const char *state, const char *filelevel, const char *workdir, const char *camera, const char *telescope, const char *exp_type, const char *filter, psF32 airmass_min, psF32 airmass_max, psF32 exp_time_min, psF32 exp_time_max, psF32 ccd_temp_min, psF32 ccd_temp_max, psF64 posang_min, psF64 posang_max, psTime* registered, psTime* time_begin, psTime* time_end, psTime* use_begin, psTime* use_end, psF32 solang_min, psF32 solang_max, const char *label, psS32 parent)
     12829detRunRow *detRunRowAlloc(psS64 det_id, psS32 iteration, const char *det_type, const char *mode, const char *state, const char *filelevel, const char *workdir, const char *camera, const char *telescope, const char *exp_type, const char *reduction, const char *filter, psF32 airmass_min, psF32 airmass_max, psF32 exp_time_min, psF32 exp_time_max, psF32 ccd_temp_min, psF32 ccd_temp_max, psF64 posang_min, psF64 posang_max, psTime* registered, psTime* time_begin, psTime* time_end, psTime* use_begin, psTime* use_end, psF32 solang_min, psF32 solang_max, const char *label, psS32 parent)
    1283012830{
    1283112831    detRunRow       *_object;
     
    1284412844    _object->telescope = psStringCopy(telescope);
    1284512845    _object->exp_type = psStringCopy(exp_type);
     12846    _object->reduction = psStringCopy(reduction);
    1284612847    _object->filter = psStringCopy(filter);
    1284712848    _object->airmass_min = airmass_min;
     
    1287612877    psFree(object->telescope);
    1287712878    psFree(object->exp_type);
     12879    psFree(object->reduction);
    1287812880    psFree(object->filter);
    1287912881    psFree(object->registered);
     
    1293812940        return false;
    1293912941    }
     12942    if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, "Reduction clas", "64")) {
     12943        psError(PS_ERR_UNKNOWN, false, "failed to add item reduction");
     12944        psFree(md);
     12945        return false;
     12946    }
    1294012947    if (!psMetadataAdd(md, PS_LIST_TAIL, "filter", PS_DATA_STRING, NULL, "64")) {
    1294112948        psError(PS_ERR_UNKNOWN, false, "failed to add item filter");
     
    1304113048}
    1304213049
    13043 bool detRunInsert(psDB * dbh, psS64 det_id, psS32 iteration, const char *det_type, const char *mode, const char *state, const char *filelevel, const char *workdir, const char *camera, const char *telescope, const char *exp_type, const char *filter, psF32 airmass_min, psF32 airmass_max, psF32 exp_time_min, psF32 exp_time_max, psF32 ccd_temp_min, psF32 ccd_temp_max, psF64 posang_min, psF64 posang_max, psTime* registered, psTime* time_begin, psTime* time_end, psTime* use_begin, psTime* use_end, psF32 solang_min, psF32 solang_max, const char *label, psS32 parent)
     13050bool detRunInsert(psDB * dbh, psS64 det_id, psS32 iteration, const char *det_type, const char *mode, const char *state, const char *filelevel, const char *workdir, const char *camera, const char *telescope, const char *exp_type, const char *reduction, const char *filter, psF32 airmass_min, psF32 airmass_max, psF32 exp_time_min, psF32 exp_time_max, psF32 ccd_temp_min, psF32 ccd_temp_max, psF64 posang_min, psF64 posang_max, psTime* registered, psTime* time_begin, psTime* time_end, psTime* use_begin, psTime* use_end, psF32 solang_min, psF32 solang_max, const char *label, psS32 parent)
    1304413051{
    1304513052    psMetadata *md = psMetadataAlloc();
     
    1309113098    if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_type", PS_DATA_STRING, NULL, exp_type)) {
    1309213099        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_type");
     13100        psFree(md);
     13101        return false;
     13102    }
     13103    if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, reduction)) {
     13104        psError(PS_ERR_UNKNOWN, false, "failed to add item reduction");
    1309313105        psFree(md);
    1309413106        return false;
     
    1320713219bool detRunInsertObject(psDB *dbh, detRunRow *object)
    1320813220{
    13209     return detRunInsert(dbh, object->det_id, object->iteration, object->det_type, object->mode, object->state, object->filelevel, object->workdir, object->camera, object->telescope, object->exp_type, object->filter, object->airmass_min, object->airmass_max, object->exp_time_min, object->exp_time_max, object->ccd_temp_min, object->ccd_temp_max, object->posang_min, object->posang_max, object->registered, object->time_begin, object->time_end, object->use_begin, object->use_end, object->solang_min, object->solang_max, object->label, object->parent);
     13221    return detRunInsert(dbh, object->det_id, object->iteration, object->det_type, object->mode, object->state, object->filelevel, object->workdir, object->camera, object->telescope, object->exp_type, object->reduction, object->filter, object->airmass_min, object->airmass_max, object->exp_time_min, object->exp_time_max, object->ccd_temp_min, object->ccd_temp_max, object->posang_min, object->posang_max, object->registered, object->time_begin, object->time_end, object->use_begin, object->use_end, object->solang_min, object->solang_max, object->label, object->parent);
    1321013222}
    1321113223
     
    1333013342        return false;
    1333113343    }
     13344    if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, object->reduction)) {
     13345        psError(PS_ERR_UNKNOWN, false, "failed to add item reduction");
     13346        psFree(md);
     13347        return false;
     13348    }
    1333213349    if (!psMetadataAdd(md, PS_LIST_TAIL, "filter", PS_DATA_STRING, NULL, object->filter)) {
    1333313350        psError(PS_ERR_UNKNOWN, false, "failed to add item filter");
     
    1347913496        return false;
    1348013497    }
     13498    char* reduction = psMetadataLookupPtr(&status, md, "reduction");
     13499    if (!status) {
     13500        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item reduction");
     13501        return false;
     13502    }
    1348113503    char* filter = psMetadataLookupPtr(&status, md, "filter");
    1348213504    if (!status) {
     
    1357013592    }
    1357113593
    13572     return detRunRowAlloc(det_id, iteration, det_type, mode, state, filelevel, workdir, camera, telescope, exp_type, filter, airmass_min, airmass_max, exp_time_min, exp_time_max, ccd_temp_min, ccd_temp_max, posang_min, posang_max, registered, time_begin, time_end, use_begin, use_end, solang_min, solang_max, label, parent);
     13594    return detRunRowAlloc(det_id, iteration, det_type, mode, state, filelevel, workdir, camera, telescope, exp_type, reduction, filter, airmass_min, airmass_max, exp_time_min, exp_time_max, ccd_temp_min, ccd_temp_max, posang_min, posang_max, registered, time_begin, time_end, use_begin, use_end, solang_min, solang_max, label, parent);
    1357313595}
    1357413596psArray *detRunSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
  • trunk/ippdb/src/ippdb.h

    r13739 r13937  
    27552755    char            *workdir;
    27562756    char            *label;
    2757     char            *recipe;
     2757    char            *reduction;
    27582758    char            *expgroup;
    27592759    char            *dvodb;
     
    27712771    const char      *workdir,
    27722772    const char      *label,
    2773     const char      *recipe,
     2773    const char      *reduction,
    27742774    const char      *expgroup,
    27752775    const char      *dvodb
     
    28082808    const char      *workdir,
    28092809    const char      *label,
    2810     const char      *recipe,
     2810    const char      *reduction,
    28112811    const char      *expgroup,
    28122812    const char      *dvodb
     
    31723172    char            *workdir;
    31733173    char            *label;
    3174     char            *recipe;
     3174    char            *reduction;
    31753175    char            *expgroup;
    31763176    char            *dvodb;
     
    31883188    const char      *workdir,
    31893189    const char      *label,
    3190     const char      *recipe,
     3190    const char      *reduction,
    31913191    const char      *expgroup,
    31923192    const char      *dvodb
     
    32253225    const char      *workdir,
    32263226    const char      *label,
    3227     const char      *recipe,
     3227    const char      *reduction,
    32283228    const char      *expgroup,
    32293229    const char      *dvodb
     
    38433843    char            *workdir;
    38443844    char            *label;
    3845     char            *recipe;
     3845    char            *reduction;
    38463846    char            *expgroup;
    38473847    char            *dvodb;
     
    38583858    const char      *workdir,
    38593859    const char      *label,
    3860     const char      *recipe,
     3860    const char      *reduction,
    38613861    const char      *expgroup,
    38623862    const char      *dvodb
     
    38943894    const char      *workdir,
    38953895    const char      *label,
    3896     const char      *recipe,
     3896    const char      *reduction,
    38973897    const char      *expgroup,
    38983898    const char      *dvodb
     
    40564056    char            *workdir;
    40574057    char            *label;
    4058     char            *recipe;
     4058    char            *reduction;
    40594059    char            *expgroup;
    40604060    char            *dvodb;
     
    40874087    const char      *workdir,
    40884088    const char      *label,
    4089     const char      *recipe,
     4089    const char      *reduction,
    40904090    const char      *expgroup,
    40914091    const char      *dvodb,
     
    41394139    const char      *workdir,
    41404140    const char      *label,
    4141     const char      *recipe,
     4141    const char      *reduction,
    41424142    const char      *expgroup,
    41434143    const char      *dvodb,
     
    66006600    char            *telescope;
    66016601    char            *exp_type;
     6602    char            *reduction;
    66026603    char            *filter;
    66036604    psF32           airmass_min;
     
    66366637    const char      *telescope,
    66376638    const char      *exp_type,
     6639    const char      *reduction,
    66386640    const char      *filter,
    66396641    psF32           airmass_min,
     
    66936695    const char      *telescope,
    66946696    const char      *exp_type,
     6697    const char      *reduction,
    66956698    const char      *filter,
    66966699    psF32           airmass_min,
  • trunk/ippdb/tests/alloc.c

    r13739 r13937  
    610610            exit(EXIT_FAILURE);
    611611        }
    612         if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
     612        if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) {
    613613            psFree(object);
    614614            exit(EXIT_FAILURE);
     
    680680            exit(EXIT_FAILURE);
    681681        }
    682         if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
     682        if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) {
    683683            psFree(object);
    684684            exit(EXIT_FAILURE);
     
    843843            exit(EXIT_FAILURE);
    844844        }
    845         if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
     845        if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) {
    846846            psFree(object);
    847847            exit(EXIT_FAILURE);
     
    884884            exit(EXIT_FAILURE);
    885885        }
    886         if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
     886        if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) {
    887887            psFree(object);
    888888            exit(EXIT_FAILURE);
     
    13271327        detRunRow       *object;
    13281328
    1329         object = detRunRowAlloc(-64, -32, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", 32.32, 32.32, "a string", -32    );
     1329        object = detRunRowAlloc(-64, -32, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", 32.32, 32.32, "a string", -32    );
    13301330
    13311331        if (!object) {
     
    13701370        }
    13711371        if (strncmp(object->exp_type, "a string", MAX_STRING_LENGTH)) {
     1372            psFree(object);
     1373            exit(EXIT_FAILURE);
     1374        }
     1375        if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) {
    13721376            psFree(object);
    13731377            exit(EXIT_FAILURE);
  • trunk/ippdb/tests/insert.c

    r13739 r13937  
    463463        }
    464464
    465         if (!detRunInsert(dbh, -64, -32, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", 32.32, 32.32, "a string", -32)) {
     465        if (!detRunInsert(dbh, -64, -32, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", 32.32, 32.32, "a string", -32)) {
    466466            exit(EXIT_FAILURE);
    467467        }
  • trunk/ippdb/tests/insertobject.c

    r13739 r13937  
    674674        }
    675675
    676         object = detRunRowAlloc(-64, -32, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", 32.32, 32.32, "a string", -32);
     676        object = detRunRowAlloc(-64, -32, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", 32.32, 32.32, "a string", -32);
    677677        if (!object) {
    678678            exit(EXIT_FAILURE);
  • trunk/ippdb/tests/metadatafromobject.c

    r13739 r13937  
    708708            exit(EXIT_FAILURE);
    709709        }
    710         if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
     710        if (strncmp(psMetadataLookupPtr(&status, md, "reduction"), "a string", MAX_STRING_LENGTH)) {
    711711            psFree(md);
    712712            exit(EXIT_FAILURE);
     
    791791            exit(EXIT_FAILURE);
    792792        }
    793         if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
     793        if (strncmp(psMetadataLookupPtr(&status, md, "reduction"), "a string", MAX_STRING_LENGTH)) {
    794794            psFree(md);
    795795            exit(EXIT_FAILURE);
     
    974974            exit(EXIT_FAILURE);
    975975        }
    976         if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
     976        if (strncmp(psMetadataLookupPtr(&status, md, "reduction"), "a string", MAX_STRING_LENGTH)) {
    977977            psFree(md);
    978978            exit(EXIT_FAILURE);
     
    10211021            exit(EXIT_FAILURE);
    10221022        }
    1023         if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
     1023        if (strncmp(psMetadataLookupPtr(&status, md, "reduction"), "a string", MAX_STRING_LENGTH)) {
    10241024            psFree(md);
    10251025            exit(EXIT_FAILURE);
     
    15381538        bool            status;
    15391539
    1540         object = detRunRowAlloc(-64, -32, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", 32.32, 32.32, "a string", -32);
     1540        object = detRunRowAlloc(-64, -32, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", 32.32, 32.32, "a string", -32);
    15411541        if (!object) {
    15421542            exit(EXIT_FAILURE);
     
    15861586        }
    15871587        if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) {
     1588            psFree(md);
     1589            exit(EXIT_FAILURE);
     1590        }
     1591        if (strncmp(psMetadataLookupPtr(&status, md, "reduction"), "a string", MAX_STRING_LENGTH)) {
    15881592            psFree(md);
    15891593            exit(EXIT_FAILURE);
  • trunk/ippdb/tests/objectfrommetadata.c

    r13739 r13937  
    10731073            exit(EXIT_FAILURE);
    10741074        }
    1075         if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) {
     1075        if (!psMetadataAddStr(md, PS_LIST_TAIL, "reduction", 0, NULL, "a string")) {
    10761076            psFree(md);
    10771077            exit(EXIT_FAILURE);
     
    11121112            exit(EXIT_FAILURE);
    11131113        }
    1114         if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
     1114        if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) {
    11151115            psFree(object);
    11161116            exit(EXIT_FAILURE);
     
    11911191            exit(EXIT_FAILURE);
    11921192        }
    1193         if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) {
     1193        if (!psMetadataAddStr(md, PS_LIST_TAIL, "reduction", 0, NULL, "a string")) {
    11941194            psFree(md);
    11951195            exit(EXIT_FAILURE);
     
    12301230            exit(EXIT_FAILURE);
    12311231        }
    1232         if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
     1232        if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) {
    12331233            psFree(object);
    12341234            exit(EXIT_FAILURE);
     
    14891489            exit(EXIT_FAILURE);
    14901490        }
    1491         if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) {
     1491        if (!psMetadataAddStr(md, PS_LIST_TAIL, "reduction", 0, NULL, "a string")) {
    14921492            psFree(md);
    14931493            exit(EXIT_FAILURE);
     
    15241524            exit(EXIT_FAILURE);
    15251525        }
    1526         if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
     1526        if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) {
    15271527            psFree(object);
    15281528            exit(EXIT_FAILURE);
     
    15591559            exit(EXIT_FAILURE);
    15601560        }
    1561         if (!psMetadataAddStr(md, PS_LIST_TAIL, "recipe", 0, NULL, "a string")) {
     1561        if (!psMetadataAddStr(md, PS_LIST_TAIL, "reduction", 0, NULL, "a string")) {
    15621562            psFree(md);
    15631563            exit(EXIT_FAILURE);
     
    16571657            exit(EXIT_FAILURE);
    16581658        }
    1659         if (strncmp(object->recipe, "a string", MAX_STRING_LENGTH)) {
     1659        if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) {
    16601660            psFree(object);
    16611661            exit(EXIT_FAILURE);
     
    23822382            exit(EXIT_FAILURE);
    23832383        }
     2384        if (!psMetadataAddStr(md, PS_LIST_TAIL, "reduction", 0, NULL, "a string")) {
     2385            psFree(md);
     2386            exit(EXIT_FAILURE);
     2387        }
    23842388        if (!psMetadataAddStr(md, PS_LIST_TAIL, "filter", 0, NULL, "a string")) {
    23852389            psFree(md);
     
    24942498        }
    24952499        if (strncmp(object->exp_type, "a string", MAX_STRING_LENGTH)) {
     2500            psFree(object);
     2501            exit(EXIT_FAILURE);
     2502        }
     2503        if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) {
    24962504            psFree(object);
    24972505            exit(EXIT_FAILURE);
Note: See TracChangeset for help on using the changeset viewer.