Changeset 13937
- Timestamp:
- Jun 21, 2007, 2:10:11 PM (19 years ago)
- Location:
- trunk
- Files:
-
- 33 edited
-
PS-IPP-Config/lib/PS/IPP/Config.pm (modified) (2 diffs)
-
dbconfig/cam.md (modified) (2 diffs)
-
dbconfig/changes.txt (modified) (1 diff)
-
dbconfig/chip.md (modified) (2 diffs)
-
dbconfig/config.md (modified) (1 diff)
-
dbconfig/det.md (modified) (1 diff)
-
ippScripts/scripts/chip_imfile.pl (modified) (6 diffs)
-
ippScripts/scripts/detrend_process_imfile.pl (modified) (4 diffs)
-
ippScripts/scripts/detrend_resid.pl (modified) (5 diffs)
-
ippScripts/scripts/detrend_stack.pl (modified) (4 diffs)
-
ippScripts/scripts/ipp_serial_chip.pl (modified) (1 diff)
-
ippScripts/scripts/ipp_serial_detrend.pl (modified) (3 diffs)
-
ippTasks/chip.pro (modified) (2 diffs)
-
ippTasks/detrend.process.pro (modified) (2 diffs)
-
ippTasks/detrend.resid.pro (modified) (2 diffs)
-
ippTasks/detrend.stack.pro (modified) (2 diffs)
-
ippTools/configure.ac (modified) (2 diffs)
-
ippTools/src/camtool.c (modified) (5 diffs)
-
ippTools/src/camtoolConfig.c (modified) (1 diff)
-
ippTools/src/chiptool.c (modified) (4 diffs)
-
ippTools/src/chiptoolConfig.c (modified) (5 diffs)
-
ippTools/src/dettool.c (modified) (11 diffs)
-
ippTools/src/dettoolConfig.c (modified) (3 diffs)
-
ippconfig/megacam/camera.config (modified) (1 diff)
-
ippconfig/simtest/camera.config (modified) (1 diff)
-
ippdb/configure.ac (modified) (1 diff)
-
ippdb/src/ippdb.c (modified) (50 diffs)
-
ippdb/src/ippdb.h (modified) (15 diffs)
-
ippdb/tests/alloc.c (modified) (6 diffs)
-
ippdb/tests/insert.c (modified) (1 diff)
-
ippdb/tests/insertobject.c (modified) (1 diff)
-
ippdb/tests/metadatafromobject.c (modified) (6 diffs)
-
ippdb/tests/objectfrommetadata.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/PS-IPP-Config/lib/PS/IPP/Config.pm
r13789 r13937 1 1 # Copyright (c) 2006 Paul Price, Joshua Hoblitt 2 2 # 3 # $Id: Config.pm,v 1.6 1 2007-06-13 19:17:50 eugene Exp $3 # $Id: Config.pm,v 1.62 2007-06-22 00:10:10 price Exp $ 4 4 5 5 package PS::IPP::Config; … … 783 783 } 784 784 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. 787 sub 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 785 818 # Interpolate environment variables in a directory (or colon-delimited list of directories) 786 819 sub _interpolate_env -
trunk/dbconfig/cam.md
r13649 r13937 6 6 workdir STR 255 7 7 label STR 64 # key 8 re cipeSTR 648 reduction STR 64 9 9 expgroup STR 64 # key 10 10 dvodb STR 255 … … 17 17 workdir STR 255 18 18 label STR 64 # key 19 re cipeSTR 6419 reduction STR 64 20 20 expgroup STR 64 # key 21 21 dvodb STR 255 -
trunk/dbconfig/changes.txt
r13715 r13937 12 12 alter table diffSkyfile add column path_base varchar(255) NULL DEFAULT NULL after uri; 13 13 alter table stackSumSkyfile add column path_base varchar(255) NULL DEFAULT NULL after uri; 14 15 16 Version 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 21 alter table detRun add column reduction varchar(64) NULL DEFAULT NULL after exp_type; 22 alter table chipPendingExp change column recipe reduction varchar(64); 23 alter table chipProcessedExp change column recipe reduction varchar(64); 24 alter table camPendingExp change column recipe reduction varchar(64); 25 alter table camProcessedExp change column recipe reduction varchar(64); -
trunk/dbconfig/chip.md
r13649 r13937 8 8 workdir STR 255 9 9 label STR 64 # key 10 re cipe STR 6410 reduction STR 64 # Reduction class 11 11 expgroup STR 64 # key 12 12 dvodb STR 255 … … 30 30 workdir STR 255 31 31 label STR 64 # key 32 re cipeSTR 6432 reduction STR 64 33 33 expgroup STR 64 # key 34 34 dvodb STR 255 -
trunk/dbconfig/config.md
r13739 r13937 2 2 pkg_name STR ippdb 3 3 pkg_namespace STR ippdb 4 pkg_version STR 1.1.2 24 pkg_version STR 1.1.23 5 5 END -
trunk/dbconfig/det.md
r13617 r13937 10 10 telescope STR 64 11 11 exp_type STR 64 # XXX this should be dropped 12 reduction STR 64 # Reduction clas 12 13 filter STR 64 13 14 airmass_min F32 0.0 -
trunk/ippScripts/scripts/chip_imfile.pl
r13926 r13937 29 29 use Pod::Usage qw( pod2usage ); 30 30 31 my $RECIPE = 'PPIMAGE_OBDSFRA'; # Recipe to use32 33 31 # Parse the command-line arguments 34 32 my ($exp_id, # Exposure identifier … … 36 34 $class_id, # Class identifier 37 35 $input, # Input FITS file 38 $recipe, # Recipe to use39 36 $camera, # Camera 40 37 $dbname, # Database name 41 38 $workdir, # Working directory, for output files 39 $reduction, # Reduction class 42 40 $no_update, # Don't update the database? 43 41 $no_op, # Don't do any operations? … … 48 46 'class_id=s' => \$class_id, 49 47 'uri|u=s' => \$input, 50 'recipe=s' => \$recipe,51 48 'camera|c=s' => \$camera, 52 49 'dbname|d=s' => \$dbname, # Database name 53 50 'workdir|w=s' => \$workdir, 51 'reduction=s' => \$reduction, 54 52 'no-update' => \$no_update, 55 53 'no-op' => \$no_op, … … 67 65 68 66 $ipprc->define_camera($camera); 67 $reduction = 'DEFAULT' unless defined $reduction; 68 my $recipe = $ipprc->reduction($reduction, 'CHIP'); # Recipe to use 69 69 70 70 # Look for programs we need … … 97 97 98 98 my $command = "$ppImage -file $input $outputRoot"; 99 $command .= " -recipe PPIMAGE $ RECIPE";99 $command .= " -recipe PPIMAGE $recipe"; 100 100 $command .= " -recipe PPSTATS CHIPSTATS"; 101 101 $command .= " -stats $outputStats"; # Command to run ppImage … … 130 130 my $bg_stdev = ($stats->bg_stdev() or 'NAN'); 131 131 my $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');132 my $fringe_0 = (${$stats->fringe()}[0] or 'NAN'); 133 my $fringe_1 = (${$stats->fringe_err()}[0] or 'NAN'); 134 134 my $fringe_2 = 'NAN'; 135 135 -
trunk/ippScripts/scripts/detrend_process_imfile.pl
r13748 r13937 32 32 use Pod::Usage qw( pod2usage ); 33 33 34 my ($det_id, $exp_tag, $class_id, $det_type, $input_uri, $camera, $dbname, $workdir, $ no_update, $no_op);34 my ($det_id, $exp_tag, $class_id, $det_type, $input_uri, $camera, $dbname, $workdir, $reduction, $no_update, $no_op); 35 35 GetOptions( 36 36 'det_id|d=s' => \$det_id, … … 42 42 'dbname|d=s' => \$dbname, # Database name 43 43 'workdir|w=s' => \$workdir, # Working directory, for output files 44 'reduction=s' => \$reduction, # Reduction class 44 45 'no-update' => \$no_update, 45 46 'no-op' => \$no_op, … … 60 61 $ipprc->define_camera($camera); 61 62 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; 64 my $recipe = $ipprc->reduction($reduction, $det_type . '_PROCESS'); # Recipe name to use 72 65 73 66 # Look for programs we need … … 80 73 } 81 74 $ppImage .= " -dbname $dbname" if defined $dbname; 82 83 # Recipe to use in processing84 my $recipe = RECIPES->{lc($det_type)};85 unless (defined $recipe) {86 warn("Unrecognised detrend type: $det_type");87 exit($PS_EXIT_CONFIG_ERROR);88 }89 75 90 76 $workdir = caturi( $workdir, "$camera.$det_type.$det_id" ) if defined $workdir; -
trunk/ippScripts/scripts/detrend_resid.pl
r13926 r13937 34 34 35 35 my ($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); 37 37 GetOptions( 38 38 'det_id|d=s' => \$det_id, … … 47 47 'dbname|d=s' => \$dbname, # Database name 48 48 'workdir|w=s' => \$workdir, # Working directory, for output files 49 'reduction=s' => \$reduction, # Reduction class 49 50 'no-update' => \$no_update, 50 51 'no-op' => \$no_op, … … 67 68 $ipprc->define_camera($camera); 68 69 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; 71 my $recipe; # Name of recipe to use 72 if ($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); 90 80 91 81 # Flags to specify the particular detrend to use … … 113 103 $ppImage .= " -dbname $dbname" if defined $dbname; 114 104 115 # Recipe to use in processing116 &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 120 105 $workdir = caturi( $workdir, "$camera.$det_type.$det_id" ) if defined $workdir; 121 106 … … 183 168 my $bg_mean_stdev = ($stats->bg_mean_stdev() or 'NAN'); 184 169 my $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');170 my $fringe_0 = (${$stats->fringe()}[0] or 'NAN'); 171 my $fringe_1 = (${$stats->fringe_err()}[0] or 'NAN'); 187 172 my $fringe_2 = 'NAN'; 188 173 -
trunk/ippScripts/scripts/detrend_stack.pl
r13748 r13937 33 33 use Pod::Usage qw( pod2usage ); 34 34 35 my ($det_id, $iter, $class_id, $det_type, $camera, $dbname, $workdir, $ no_update, $no_op, $quiet);35 my ($det_id, $iter, $class_id, $det_type, $camera, $dbname, $workdir, $reduction, $no_update, $no_op, $quiet); 36 36 GetOptions( 37 37 'det_id|d=s' => \$det_id, … … 42 42 'dbname|d=s' => \$dbname, # Database name 43 43 'workdir|w=s' => \$workdir, # Working directory, for output files 44 'reduction=s' => \$reduction, # Reduction class for processing 44 45 'no-update' => \$no_update, 45 46 'no-op' => \$no_op, … … 58 59 if (defined $quiet) { $verbose = 0; } 59 60 61 $ipprc->define_camera($camera); 62 60 63 # 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; 65 my $recipe = $ipprc->reduction($reduction, $det_type . '_STACK'); # Recipe name to use 70 66 71 67 # Look for programs we need … … 77 73 exit($PS_EXIT_CONFIG_ERROR); 78 74 } 79 80 my $recipe = RECIPES()->{lc($det_type)}; # Recipe to use in stacking81 &my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $class_id, $PS_EXIT_PROG_ERROR) unless defined $recipe;82 75 83 76 my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files -
trunk/ippScripts/scripts/ipp_serial_chip.pl
r12800 r13937 54 54 my $class_id = $item->{class_id}; 55 55 my $uri = $item->{uri}; 56 my $reduction = $item->{reduction}; 56 57 57 58 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; 58 60 $command .= " --no-op" if defined $no_op; 59 61 $command .= " --no-update" if defined $no_update; -
trunk/ippScripts/scripts/ipp_serial_detrend.pl
r12800 r13937 65 65 my $camera = $item->{camera}; 66 66 my $workdir = $item->{workdir}; 67 67 my $reduction = $item->{reduction}; 68 68 69 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; 69 71 $command .= " --workdir $workdir" if defined $workdir; 70 72 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = … … 119 121 my $camera = $item->{camera}; 120 122 my $workdir = $item->{workdir}; 123 my $reduction = $item->{reduction}; 121 124 122 125 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; 123 127 $command .= " --workdir $workdir" if defined $workdir; 124 128 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = … … 235 239 my $mode = $item->{mode}; 236 240 my $workdir = $item->{workdir}; 241 my $reduction = $item->{reduction}; 237 242 238 243 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; 239 245 $command .= " --detrend $detrend" if defined $detrend; 240 246 $command .= " --workdir $workdir" if defined $workdir; -
trunk/ippTasks/chip.pro
r12697 r13937 124 124 book getword chipPendingImfile $pageName uri -var URI 125 125 book getword chipPendingImfile $pageName dbname -var DBNAME 126 book getword chipPendingImfile $pageName reduction -var REDUCTION 126 127 127 128 # specify choice of remote host … … 149 150 $run = $run --workdir $WORKDIR 150 151 end 152 if ("$REDUCTION" != "NULL") 153 $run = $run --reduction $REDUCTION 154 end 151 155 add_standard_args run 152 156 -
trunk/ippTasks/detrend.process.pro
r13683 r13937 144 144 book getword detPendingProcessedImfile $pageName workdir -var WORKDIR 145 145 book getword detPendingProcessedImfile $pageName dbname -var DBNAME 146 book getword detPendingProcessedImfile $pageName reduction -var REDUCTION 146 147 147 148 # specify choice of remote host: … … 172 173 if ("$WORKDIR" != "NULL") 173 174 $run = $run --workdir $WORKDIR 175 end 176 if ("$REDUCTION" != "NULL") 177 $run = $run --reduction $REDUCTION 174 178 end 175 179 add_standard_args run -
trunk/ippTasks/detrend.resid.pro
r13683 r13937 144 144 book getword detPendingResidImfile $pageName workdir -var WORKDIR 145 145 book getword detPendingResidImfile $pageName dbname -var DBNAME 146 book getword detPendingResidImfile $pageName reduction -var REDUCTION 146 147 147 148 # specify choice of remote host: … … 172 173 if ("$WORKDIR" != "NULL") 173 174 $run = $run --workdir $WORKDIR 175 end 176 if ("$REDUCTION" != "NULL") 177 $run = $run --reduction $REDUCTION 174 178 end 175 179 add_standard_args run -
trunk/ippTasks/detrend.stack.pro
r13683 r13937 125 125 book getword detPendingStackedImfile $pageName workdir -var WORKDIR 126 126 book getword detPendingStackedImfile $pageName dbname -var DBNAME 127 book getword detPendingStackedImfile $pageName reduction -var REDUCTION 127 128 128 129 # specify choice of remote host: … … 156 157 $run = $run --workdir $WORKDIR 157 158 end 159 if ("$REDUCTION" != "NULL") 160 $run = $run --reduction $REDUCTION 161 end 158 162 add_standard_args run 159 163 -
trunk/ippTools/configure.ac
r13739 r13937 1 1 AC_PREREQ(2.59) 2 2 3 AC_INIT([ipptools], [1.1.2 2], [ipp-support@ifa.hawaii.edu])3 AC_INIT([ipptools], [1.1.23], [ipp-support@ifa.hawaii.edu]) 4 4 AC_CONFIG_SRCDIR([autogen.sh]) 5 5 … … 18 18 PKG_CHECK_MODULES([PSLIB], [pslib >= 1.1.0]) 19 19 PKG_CHECK_MODULES([PSMODULES], [psmodules >= 1.1.0]) 20 PKG_CHECK_MODULES([IPPDB], [ippdb >= 1.1.2 2])20 PKG_CHECK_MODULES([IPPDB], [ippdb >= 1.1.23]) 21 21 22 22 PXTOOLS_CFLAGS="${PSLIB_CFLAGS=} ${PSMODULES_CFLAGS=} ${IPPDB_CFLAGS=}" -
trunk/ippTools/src/camtool.c
r13702 r13937 184 184 } 185 185 186 psString re cipe = psMetadataLookupStr(&status, config->args, "-set_recipe");187 if (!status) { 188 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -set_re cipe");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"); 189 189 return false; 190 190 } … … 237 237 238 238 // would could do this "all in the database" if we didn't want the option 239 // of changing the label/re cipe/expgroup/dvodb/etc. So we're pulling the239 // of changing the label/reduction/expgroup/dvodb/etc. So we're pulling the 240 240 // data out so we have the option of changing these values or leaving the 241 241 // old values in place (i.e., passing the values through). … … 257 257 workdir ? workdir : row->workdir, 258 258 label ? label : row->label, 259 re cipe ? recipe : row->recipe,259 reduction ? reduction : row->reduction, 260 260 expgroup ? expgroup : row->expgroup, 261 261 dvodb ? dvodb : row->dvodb … … 617 617 pendingRow->workdir, 618 618 pendingRow->label, 619 pendingRow->re cipe,619 pendingRow->reduction, 620 620 pendingRow->expgroup, 621 621 pendingRow->dvodb, … … 628 628 zp_mean, 629 629 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, 636 636 path_base, 637 637 code -
trunk/ippTools/src/camtoolConfig.c
r13710 r13937 96 96 psMetadataAddStr(queueArgs, PS_LIST_TAIL, "-set_label", 0, 97 97 "define label", NULL); 98 psMetadataAddStr(queueArgs, PS_LIST_TAIL, "-set_re cipe", 0,99 "define re cipe", NULL);98 psMetadataAddStr(queueArgs, PS_LIST_TAIL, "-set_reduction", 0, 99 "define reduction class", NULL); 100 100 psMetadataAddStr(queueArgs, PS_LIST_TAIL, "-set_expgroup", 0, 101 101 "define exposure group", NULL); -
trunk/ippTools/src/chiptool.c
r13891 r13937 173 173 } 174 174 175 psString re cipe = psMetadataLookupStr(&status, config->args, "-set_recipe");176 if (!status) { 177 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -set_re cipe");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"); 178 178 return false; 179 179 } … … 243 243 244 244 // queue the exp 245 if (!chipQueueExpTag(config, exp_tag, workdir, label, re cipe, expgroup, dvodb)) {245 if (!chipQueueExpTag(config, exp_tag, workdir, label, reduction, expgroup, dvodb)) { 246 246 if (!psDBRollback(config->dbh)) { 247 247 psError(PS_ERR_UNKNOWN, false, "database error"); … … 804 804 processedExp->workdir, 805 805 processedExp->label, 806 processedExp->re cipe,806 processedExp->reduction, 807 807 processedExp->expgroup, 808 808 processedExp->dvodb … … 999 999 pendingExp->workdir, 1000 1000 pendingExp->label, 1001 pendingExp->re cipe,1001 pendingExp->reduction, 1002 1002 pendingExp->expgroup, 1003 1003 pendingExp->dvodb -
trunk/ippTools/src/chiptoolConfig.c
r13649 r13937 94 94 psMetadataAddStr(queueArgs, PS_LIST_TAIL, "-set_label", 0, 95 95 "define label", NULL); 96 psMetadataAddStr(queueArgs, PS_LIST_TAIL, "-set_re cipe", 0,97 "define re cipe", NULL);96 psMetadataAddStr(queueArgs, PS_LIST_TAIL, "-set_reduction", 0, 97 "define reduction class", NULL); 98 98 psMetadataAddStr(queueArgs, PS_LIST_TAIL, "-set_expgroup", 0, 99 99 "define exposure group", NULL); … … 115 115 "search by camera of interest", NULL); 116 116 psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-filter", 0, 117 "search by filter of interest", NULL); 117 "search by filter of interest", NULL); 118 118 psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-uri", 0, 119 119 "search by URL", NULL); … … 122 122 psMetadataAddBool(pendingimfileArgs, PS_LIST_TAIL, "-simple", 0, 123 123 "use the simple output format", false); 124 124 125 125 // -addprocessedimfile 126 126 psMetadata *addprocessedimfileArgs = psMetadataAlloc(); … … 188 188 "define camera of interest", NULL); 189 189 psMetadataAddStr(processedimfileArgs, PS_LIST_TAIL, "-filter", 0, 190 "define filter of interest", NULL); 190 "define filter of interest", NULL); 191 191 psMetadataAddStr(processedimfileArgs, PS_LIST_TAIL, "-uri", 0, 192 192 "define URL", NULL); … … 226 226 psMetadataAddStr(blockArgs, PS_LIST_TAIL, "-label", 0, 227 227 "name of a label to mask out (required)", NULL); 228 228 229 229 // -masked 230 230 psMetadata *maskedArgs = psMetadataAlloc(); 231 231 psMetadataAddBool(maskedArgs, PS_LIST_TAIL, "-simple", 0, 232 232 "use the simple output format", false); 233 233 234 234 // -unblock 235 235 psMetadata *unblockArgs = psMetadataAlloc(); -
trunk/ippTools/src/dettool.c
r13849 r13937 449 449 } 450 450 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 451 457 psString label = psMetadataLookupStr(&status, config->args, "-label"); 452 458 if (!status) { … … 528 534 // XXX det_id 529 535 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 558 565 ); 559 566 psFree(registered); … … 1172 1179 } 1173 1180 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 1174 1187 psString label = psMetadataLookupStr(&status, config->args, "-label"); 1175 1188 if (!status) { … … 1251 1264 // XXX det_id 1252 1265 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 1281 1295 ); 1282 1296 psFree(registered); … … 1671 1685 psFree(use_end); 1672 1686 } 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); 1673 1697 } 1674 1698 … … 2115 2139 " detRun.det_type," 2116 2140 " detRun.workdir," 2141 " detRun.reduction," 2117 2142 " rawImfile.*," 2118 2143 " rawExp.camera" … … 2862 2887 " detRun.det_type,\n" 2863 2888 " detRun.workdir,\n" 2889 " detRun.reduction,\n" 2864 2890 " detProcessedImfile.class_id,\n" 2865 2891 " rawExp.camera\n" … … 2987 3013 // add the two required restrictions: detRun.state and detRun.mode 2988 3014 if ((value = psMetadataLookupStr(&status, config->args, "-select_state"))) { 2989 psStringAppend(&query, " detRun.state = '%s'", value);3015 psStringAppend(&query, " detRun.state = '%s'", value); 2990 3016 } else { 2991 psStringAppend(&query, " detRun.state = 'run'");3017 psStringAppend(&query, " detRun.state = 'run'"); 2992 3018 } 2993 3019 if ((value = psMetadataLookupStr(&status, config->args, "-select_mode"))) { 2994 psStringAppend(&query, " AND detRun.mode = '%s'", value);3020 psStringAppend(&query, " AND detRun.mode = '%s'", value); 2995 3021 } else { 2996 psStringAppend(&query, " AND detRun.mode = 'master'");3022 psStringAppend(&query, " AND detRun.mode = 'master'"); 2997 3023 } 2998 3024 … … 4407 4433 " detRun.mode,\n" 4408 4434 " detRun.workdir,\n" 4435 " detRun.reduction,\n" 4409 4436 " detProcessedImfile.exp_tag,\n" 4410 4437 " detProcessedImfile.class_id,\n" … … 4444 4471 " detRun.mode,\n" 4445 4472 " detRun.workdir,\n" 4473 " detRun.reduction,\n" 4446 4474 " rawImfile.exp_tag,\n" 4447 4475 " rawImfile.class_id,\n" … … 6774 6802 6775 6803 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 )) { 6805 6834 psError(PS_ERR_UNKNOWN, false, "database error"); 6806 6835 // rollback -
trunk/ippTools/src/dettoolConfig.c
r13849 r13937 115 115 psMetadataAddStr(definebytagArgs, PS_LIST_TAIL, "-use_end", 0, 116 116 "end of detrend run applicable peroid", NULL); 117 psMetadataAddStr(definebytagArgs, PS_LIST_TAIL, "-reduction", 0, 118 "define reduction class for processing", NULL); 117 119 psMetadataAddStr(definebytagArgs, PS_LIST_TAIL, "-label", 0, 118 120 "define detrun label", NULL); … … 204 206 psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-pretend", 0, 205 207 "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); 206 210 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-label", 0, 207 211 "define detrun label", NULL); … … 259 263 psMetadataAddStr(definebydetrunArgs, PS_LIST_TAIL, "-filter_input_end", 0, 260 264 "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); 261 267 psMetadataAddStr(definebydetrunArgs, PS_LIST_TAIL, "-set_label", 0, 262 268 "define detrun label", NULL); -
trunk/ippconfig/megacam/camera.config
r13933 r13937 113 113 END 114 114 115 REDUCTION 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 141 END 142 115 143 FILERULES METADATA 116 144 ### Redirections -
trunk/ippconfig/simtest/camera.config
r13878 r13937 45 45 PSASTRO STR simtest/psastro.config # psastro details 46 46 REJECTIONS STR simtest/rejections.config # Rejection for detrend creation 47 END 48 49 REDUCTION 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 47 85 END 48 86 -
trunk/ippdb/configure.ac
r13739 r13937 7 7 AC_PREREQ(2.59) 8 8 9 AC_INIT([ippdb], [1.1.2 2], [pan-starrs.ifa.hawaii.edu])9 AC_INIT([ippdb], [1.1.23], [pan-starrs.ifa.hawaii.edu]) 10 10 AC_CONFIG_SRCDIR([ippdb.pc.in]) 11 11 -
trunk/ippdb/src/ippdb.c
r13739 r13937 5541 5541 static void chipPendingExpRowFree(chipPendingExpRow *object); 5542 5542 5543 chipPendingExpRow *chipPendingExpRowAlloc(psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *workdir, const char *label, const char *re cipe, const char *expgroup, const char *dvodb)5543 chipPendingExpRow *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) 5544 5544 { 5545 5545 chipPendingExpRow *_object; … … 5553 5553 _object->workdir = psStringCopy(workdir); 5554 5554 _object->label = psStringCopy(label); 5555 _object->re cipe = psStringCopy(recipe);5555 _object->reduction = psStringCopy(reduction); 5556 5556 _object->expgroup = psStringCopy(expgroup); 5557 5557 _object->dvodb = psStringCopy(dvodb); … … 5565 5565 psFree(object->workdir); 5566 5566 psFree(object->label); 5567 psFree(object->re cipe);5567 psFree(object->reduction); 5568 5568 psFree(object->expgroup); 5569 5569 psFree(object->dvodb); … … 5598 5598 return false; 5599 5599 } 5600 if (!psMetadataAdd(md, PS_LIST_TAIL, "re cipe", PS_DATA_STRING, NULL, "64")) {5601 psError(PS_ERR_UNKNOWN, false, "failed to add item re cipe");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"); 5602 5602 psFree(md); 5603 5603 return false; … … 5626 5626 } 5627 5627 5628 bool chipPendingExpInsert(psDB * dbh, psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *workdir, const char *label, const char *re cipe, const char *expgroup, const char *dvodb)5628 bool 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) 5629 5629 { 5630 5630 psMetadata *md = psMetadataAlloc(); … … 5654 5654 return false; 5655 5655 } 5656 if (!psMetadataAdd(md, PS_LIST_TAIL, "re cipe", PS_DATA_STRING, NULL, recipe)) {5657 psError(PS_ERR_UNKNOWN, false, "failed to add item re cipe");5656 if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, reduction)) { 5657 psError(PS_ERR_UNKNOWN, false, "failed to add item reduction"); 5658 5658 psFree(md); 5659 5659 return false; … … 5692 5692 bool chipPendingExpInsertObject(psDB *dbh, chipPendingExpRow *object) 5693 5693 { 5694 return chipPendingExpInsert(dbh, object->chip_id, object->exp_tag, object->guide_id, object->workdir, object->label, object->re cipe, 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); 5695 5695 } 5696 5696 … … 5790 5790 return false; 5791 5791 } 5792 if (!psMetadataAdd(md, PS_LIST_TAIL, "re cipe", PS_DATA_STRING, NULL, object->recipe)) {5793 psError(PS_ERR_UNKNOWN, false, "failed to add item re cipe");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"); 5794 5794 psFree(md); 5795 5795 return false; … … 5839 5839 return false; 5840 5840 } 5841 char* re cipe = psMetadataLookupPtr(&status, md, "recipe");5842 if (!status) { 5843 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item re cipe");5841 char* reduction = psMetadataLookupPtr(&status, md, "reduction"); 5842 if (!status) { 5843 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item reduction"); 5844 5844 return false; 5845 5845 } … … 5855 5855 } 5856 5856 5857 return chipPendingExpRowAlloc(chip_id, exp_tag, guide_id, workdir, label, re cipe, expgroup, dvodb);5857 return chipPendingExpRowAlloc(chip_id, exp_tag, guide_id, workdir, label, reduction, expgroup, dvodb); 5858 5858 } 5859 5859 psArray *chipPendingExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 6284 6284 static void chipProcessedExpRowFree(chipProcessedExpRow *object); 6285 6285 6286 chipProcessedExpRow *chipProcessedExpRowAlloc(psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *workdir, const char *label, const char *re cipe, const char *expgroup, const char *dvodb)6286 chipProcessedExpRow *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) 6287 6287 { 6288 6288 chipProcessedExpRow *_object; … … 6296 6296 _object->workdir = psStringCopy(workdir); 6297 6297 _object->label = psStringCopy(label); 6298 _object->re cipe = psStringCopy(recipe);6298 _object->reduction = psStringCopy(reduction); 6299 6299 _object->expgroup = psStringCopy(expgroup); 6300 6300 _object->dvodb = psStringCopy(dvodb); … … 6308 6308 psFree(object->workdir); 6309 6309 psFree(object->label); 6310 psFree(object->re cipe);6310 psFree(object->reduction); 6311 6311 psFree(object->expgroup); 6312 6312 psFree(object->dvodb); … … 6341 6341 return false; 6342 6342 } 6343 if (!psMetadataAdd(md, PS_LIST_TAIL, "re cipe", PS_DATA_STRING, NULL, "64")) {6344 psError(PS_ERR_UNKNOWN, false, "failed to add item re cipe");6343 if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, "64")) { 6344 psError(PS_ERR_UNKNOWN, false, "failed to add item reduction"); 6345 6345 psFree(md); 6346 6346 return false; … … 6369 6369 } 6370 6370 6371 bool chipProcessedExpInsert(psDB * dbh, psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *workdir, const char *label, const char *re cipe, const char *expgroup, const char *dvodb)6371 bool 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) 6372 6372 { 6373 6373 psMetadata *md = psMetadataAlloc(); … … 6397 6397 return false; 6398 6398 } 6399 if (!psMetadataAdd(md, PS_LIST_TAIL, "re cipe", PS_DATA_STRING, NULL, recipe)) {6400 psError(PS_ERR_UNKNOWN, false, "failed to add item re cipe");6399 if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, reduction)) { 6400 psError(PS_ERR_UNKNOWN, false, "failed to add item reduction"); 6401 6401 psFree(md); 6402 6402 return false; … … 6435 6435 bool chipProcessedExpInsertObject(psDB *dbh, chipProcessedExpRow *object) 6436 6436 { 6437 return chipProcessedExpInsert(dbh, object->chip_id, object->exp_tag, object->guide_id, object->workdir, object->label, object->re cipe, 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); 6438 6438 } 6439 6439 … … 6533 6533 return false; 6534 6534 } 6535 if (!psMetadataAdd(md, PS_LIST_TAIL, "re cipe", PS_DATA_STRING, NULL, object->recipe)) {6536 psError(PS_ERR_UNKNOWN, false, "failed to add item re cipe");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"); 6537 6537 psFree(md); 6538 6538 return false; … … 6582 6582 return false; 6583 6583 } 6584 char* re cipe = psMetadataLookupPtr(&status, md, "recipe");6585 if (!status) { 6586 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item re cipe");6584 char* reduction = psMetadataLookupPtr(&status, md, "reduction"); 6585 if (!status) { 6586 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item reduction"); 6587 6587 return false; 6588 6588 } … … 6598 6598 } 6599 6599 6600 return chipProcessedExpRowAlloc(chip_id, exp_tag, guide_id, workdir, label, re cipe, expgroup, dvodb);6600 return chipProcessedExpRowAlloc(chip_id, exp_tag, guide_id, workdir, label, reduction, expgroup, dvodb); 6601 6601 } 6602 6602 psArray *chipProcessedExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 7722 7722 static void camPendingExpRowFree(camPendingExpRow *object); 7723 7723 7724 camPendingExpRow *camPendingExpRowAlloc(psS64 cam_id, psS64 chip_id, const char *workdir, const char *label, const char *re cipe, const char *expgroup, const char *dvodb)7724 camPendingExpRow *camPendingExpRowAlloc(psS64 cam_id, psS64 chip_id, const char *workdir, const char *label, const char *reduction, const char *expgroup, const char *dvodb) 7725 7725 { 7726 7726 camPendingExpRow *_object; … … 7733 7733 _object->workdir = psStringCopy(workdir); 7734 7734 _object->label = psStringCopy(label); 7735 _object->re cipe = psStringCopy(recipe);7735 _object->reduction = psStringCopy(reduction); 7736 7736 _object->expgroup = psStringCopy(expgroup); 7737 7737 _object->dvodb = psStringCopy(dvodb); … … 7744 7744 psFree(object->workdir); 7745 7745 psFree(object->label); 7746 psFree(object->re cipe);7746 psFree(object->reduction); 7747 7747 psFree(object->expgroup); 7748 7748 psFree(object->dvodb); … … 7772 7772 return false; 7773 7773 } 7774 if (!psMetadataAdd(md, PS_LIST_TAIL, "re cipe", PS_DATA_STRING, NULL, "64")) {7775 psError(PS_ERR_UNKNOWN, false, "failed to add item re cipe");7774 if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, "64")) { 7775 psError(PS_ERR_UNKNOWN, false, "failed to add item reduction"); 7776 7776 psFree(md); 7777 7777 return false; … … 7800 7800 } 7801 7801 7802 bool camPendingExpInsert(psDB * dbh, psS64 cam_id, psS64 chip_id, const char *workdir, const char *label, const char *re cipe, const char *expgroup, const char *dvodb)7802 bool camPendingExpInsert(psDB * dbh, psS64 cam_id, psS64 chip_id, const char *workdir, const char *label, const char *reduction, const char *expgroup, const char *dvodb) 7803 7803 { 7804 7804 psMetadata *md = psMetadataAlloc(); … … 7823 7823 return false; 7824 7824 } 7825 if (!psMetadataAdd(md, PS_LIST_TAIL, "re cipe", PS_DATA_STRING, NULL, recipe)) {7826 psError(PS_ERR_UNKNOWN, false, "failed to add item re cipe");7825 if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, reduction)) { 7826 psError(PS_ERR_UNKNOWN, false, "failed to add item reduction"); 7827 7827 psFree(md); 7828 7828 return false; … … 7861 7861 bool camPendingExpInsertObject(psDB *dbh, camPendingExpRow *object) 7862 7862 { 7863 return camPendingExpInsert(dbh, object->cam_id, object->chip_id, object->workdir, object->label, object->re cipe, object->expgroup, object->dvodb);7863 return camPendingExpInsert(dbh, object->cam_id, object->chip_id, object->workdir, object->label, object->reduction, object->expgroup, object->dvodb); 7864 7864 } 7865 7865 … … 7954 7954 return false; 7955 7955 } 7956 if (!psMetadataAdd(md, PS_LIST_TAIL, "re cipe", PS_DATA_STRING, NULL, object->recipe)) {7957 psError(PS_ERR_UNKNOWN, false, "failed to add item re cipe");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"); 7958 7958 psFree(md); 7959 7959 return false; … … 7998 7998 return false; 7999 7999 } 8000 char* re cipe = psMetadataLookupPtr(&status, md, "recipe");8001 if (!status) { 8002 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item re cipe");8000 char* reduction = psMetadataLookupPtr(&status, md, "reduction"); 8001 if (!status) { 8002 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item reduction"); 8003 8003 return false; 8004 8004 } … … 8014 8014 } 8015 8015 8016 return camPendingExpRowAlloc(cam_id, chip_id, workdir, label, re cipe, expgroup, dvodb);8016 return camPendingExpRowAlloc(cam_id, chip_id, workdir, label, reduction, expgroup, dvodb); 8017 8017 } 8018 8018 psArray *camPendingExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 8126 8126 static void camProcessedExpRowFree(camProcessedExpRow *object); 8127 8127 8128 camProcessedExpRow *camProcessedExpRowAlloc(psS64 cam_id, psS64 chip_id, const char *workdir, const char *label, const char *re cipe, 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)8128 camProcessedExpRow *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) 8129 8129 { 8130 8130 camProcessedExpRow *_object; … … 8137 8137 _object->workdir = psStringCopy(workdir); 8138 8138 _object->label = psStringCopy(label); 8139 _object->re cipe = psStringCopy(recipe);8139 _object->reduction = psStringCopy(reduction); 8140 8140 _object->expgroup = psStringCopy(expgroup); 8141 8141 _object->dvodb = psStringCopy(dvodb); … … 8164 8164 psFree(object->workdir); 8165 8165 psFree(object->label); 8166 psFree(object->re cipe);8166 psFree(object->reduction); 8167 8167 psFree(object->expgroup); 8168 8168 psFree(object->dvodb); … … 8194 8194 return false; 8195 8195 } 8196 if (!psMetadataAdd(md, PS_LIST_TAIL, "re cipe", PS_DATA_STRING, NULL, "64")) {8197 psError(PS_ERR_UNKNOWN, false, "failed to add item re cipe");8196 if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, "64")) { 8197 psError(PS_ERR_UNKNOWN, false, "failed to add item reduction"); 8198 8198 psFree(md); 8199 8199 return false; … … 8302 8302 } 8303 8303 8304 bool camProcessedExpInsert(psDB * dbh, psS64 cam_id, psS64 chip_id, const char *workdir, const char *label, const char *re cipe, 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)8304 bool 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) 8305 8305 { 8306 8306 psMetadata *md = psMetadataAlloc(); … … 8325 8325 return false; 8326 8326 } 8327 if (!psMetadataAdd(md, PS_LIST_TAIL, "re cipe", PS_DATA_STRING, NULL, recipe)) {8328 psError(PS_ERR_UNKNOWN, false, "failed to add item re cipe");8327 if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, reduction)) { 8328 psError(PS_ERR_UNKNOWN, false, "failed to add item reduction"); 8329 8329 psFree(md); 8330 8330 return false; … … 8443 8443 bool camProcessedExpInsertObject(psDB *dbh, camProcessedExpRow *object) 8444 8444 { 8445 return camProcessedExpInsert(dbh, object->cam_id, object->chip_id, object->workdir, object->label, object->re cipe, 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); 8446 8446 } 8447 8447 … … 8536 8536 return false; 8537 8537 } 8538 if (!psMetadataAdd(md, PS_LIST_TAIL, "re cipe", PS_DATA_STRING, NULL, object->recipe)) {8539 psError(PS_ERR_UNKNOWN, false, "failed to add item re cipe");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"); 8540 8540 psFree(md); 8541 8541 return false; … … 8660 8660 return false; 8661 8661 } 8662 char* re cipe = psMetadataLookupPtr(&status, md, "recipe");8663 if (!status) { 8664 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item re cipe");8662 char* reduction = psMetadataLookupPtr(&status, md, "reduction"); 8663 if (!status) { 8664 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item reduction"); 8665 8665 return false; 8666 8666 } … … 8756 8756 } 8757 8757 8758 return camProcessedExpRowAlloc(cam_id, chip_id, workdir, label, re cipe, 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); 8759 8759 } 8760 8760 psArray *camProcessedExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 12827 12827 static void detRunRowFree(detRunRow *object); 12828 12828 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)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 *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) 12830 12830 { 12831 12831 detRunRow *_object; … … 12844 12844 _object->telescope = psStringCopy(telescope); 12845 12845 _object->exp_type = psStringCopy(exp_type); 12846 _object->reduction = psStringCopy(reduction); 12846 12847 _object->filter = psStringCopy(filter); 12847 12848 _object->airmass_min = airmass_min; … … 12876 12877 psFree(object->telescope); 12877 12878 psFree(object->exp_type); 12879 psFree(object->reduction); 12878 12880 psFree(object->filter); 12879 12881 psFree(object->registered); … … 12938 12940 return false; 12939 12941 } 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 } 12940 12947 if (!psMetadataAdd(md, PS_LIST_TAIL, "filter", PS_DATA_STRING, NULL, "64")) { 12941 12948 psError(PS_ERR_UNKNOWN, false, "failed to add item filter"); … … 13041 13048 } 13042 13049 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)13050 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 *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) 13044 13051 { 13045 13052 psMetadata *md = psMetadataAlloc(); … … 13091 13098 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_type", PS_DATA_STRING, NULL, exp_type)) { 13092 13099 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"); 13093 13105 psFree(md); 13094 13106 return false; … … 13207 13219 bool detRunInsertObject(psDB *dbh, detRunRow *object) 13208 13220 { 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); 13210 13222 } 13211 13223 … … 13330 13342 return false; 13331 13343 } 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 } 13332 13349 if (!psMetadataAdd(md, PS_LIST_TAIL, "filter", PS_DATA_STRING, NULL, object->filter)) { 13333 13350 psError(PS_ERR_UNKNOWN, false, "failed to add item filter"); … … 13479 13496 return false; 13480 13497 } 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 } 13481 13503 char* filter = psMetadataLookupPtr(&status, md, "filter"); 13482 13504 if (!status) { … … 13570 13592 } 13571 13593 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); 13573 13595 } 13574 13596 psArray *detRunSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) -
trunk/ippdb/src/ippdb.h
r13739 r13937 2755 2755 char *workdir; 2756 2756 char *label; 2757 char *re cipe;2757 char *reduction; 2758 2758 char *expgroup; 2759 2759 char *dvodb; … … 2771 2771 const char *workdir, 2772 2772 const char *label, 2773 const char *re cipe,2773 const char *reduction, 2774 2774 const char *expgroup, 2775 2775 const char *dvodb … … 2808 2808 const char *workdir, 2809 2809 const char *label, 2810 const char *re cipe,2810 const char *reduction, 2811 2811 const char *expgroup, 2812 2812 const char *dvodb … … 3172 3172 char *workdir; 3173 3173 char *label; 3174 char *re cipe;3174 char *reduction; 3175 3175 char *expgroup; 3176 3176 char *dvodb; … … 3188 3188 const char *workdir, 3189 3189 const char *label, 3190 const char *re cipe,3190 const char *reduction, 3191 3191 const char *expgroup, 3192 3192 const char *dvodb … … 3225 3225 const char *workdir, 3226 3226 const char *label, 3227 const char *re cipe,3227 const char *reduction, 3228 3228 const char *expgroup, 3229 3229 const char *dvodb … … 3843 3843 char *workdir; 3844 3844 char *label; 3845 char *re cipe;3845 char *reduction; 3846 3846 char *expgroup; 3847 3847 char *dvodb; … … 3858 3858 const char *workdir, 3859 3859 const char *label, 3860 const char *re cipe,3860 const char *reduction, 3861 3861 const char *expgroup, 3862 3862 const char *dvodb … … 3894 3894 const char *workdir, 3895 3895 const char *label, 3896 const char *re cipe,3896 const char *reduction, 3897 3897 const char *expgroup, 3898 3898 const char *dvodb … … 4056 4056 char *workdir; 4057 4057 char *label; 4058 char *re cipe;4058 char *reduction; 4059 4059 char *expgroup; 4060 4060 char *dvodb; … … 4087 4087 const char *workdir, 4088 4088 const char *label, 4089 const char *re cipe,4089 const char *reduction, 4090 4090 const char *expgroup, 4091 4091 const char *dvodb, … … 4139 4139 const char *workdir, 4140 4140 const char *label, 4141 const char *re cipe,4141 const char *reduction, 4142 4142 const char *expgroup, 4143 4143 const char *dvodb, … … 6600 6600 char *telescope; 6601 6601 char *exp_type; 6602 char *reduction; 6602 6603 char *filter; 6603 6604 psF32 airmass_min; … … 6636 6637 const char *telescope, 6637 6638 const char *exp_type, 6639 const char *reduction, 6638 6640 const char *filter, 6639 6641 psF32 airmass_min, … … 6693 6695 const char *telescope, 6694 6696 const char *exp_type, 6697 const char *reduction, 6695 6698 const char *filter, 6696 6699 psF32 airmass_min, -
trunk/ippdb/tests/alloc.c
r13739 r13937 610 610 exit(EXIT_FAILURE); 611 611 } 612 if (strncmp(object->re cipe, "a string", MAX_STRING_LENGTH)) {612 if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) { 613 613 psFree(object); 614 614 exit(EXIT_FAILURE); … … 680 680 exit(EXIT_FAILURE); 681 681 } 682 if (strncmp(object->re cipe, "a string", MAX_STRING_LENGTH)) {682 if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) { 683 683 psFree(object); 684 684 exit(EXIT_FAILURE); … … 843 843 exit(EXIT_FAILURE); 844 844 } 845 if (strncmp(object->re cipe, "a string", MAX_STRING_LENGTH)) {845 if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) { 846 846 psFree(object); 847 847 exit(EXIT_FAILURE); … … 884 884 exit(EXIT_FAILURE); 885 885 } 886 if (strncmp(object->re cipe, "a string", MAX_STRING_LENGTH)) {886 if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) { 887 887 psFree(object); 888 888 exit(EXIT_FAILURE); … … 1327 1327 detRunRow *object; 1328 1328 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 ); 1330 1330 1331 1331 if (!object) { … … 1370 1370 } 1371 1371 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)) { 1372 1376 psFree(object); 1373 1377 exit(EXIT_FAILURE); -
trunk/ippdb/tests/insert.c
r13739 r13937 463 463 } 464 464 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)) { 466 466 exit(EXIT_FAILURE); 467 467 } -
trunk/ippdb/tests/insertobject.c
r13739 r13937 674 674 } 675 675 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); 677 677 if (!object) { 678 678 exit(EXIT_FAILURE); -
trunk/ippdb/tests/metadatafromobject.c
r13739 r13937 708 708 exit(EXIT_FAILURE); 709 709 } 710 if (strncmp(psMetadataLookupPtr(&status, md, "re cipe"), "a string", MAX_STRING_LENGTH)) {710 if (strncmp(psMetadataLookupPtr(&status, md, "reduction"), "a string", MAX_STRING_LENGTH)) { 711 711 psFree(md); 712 712 exit(EXIT_FAILURE); … … 791 791 exit(EXIT_FAILURE); 792 792 } 793 if (strncmp(psMetadataLookupPtr(&status, md, "re cipe"), "a string", MAX_STRING_LENGTH)) {793 if (strncmp(psMetadataLookupPtr(&status, md, "reduction"), "a string", MAX_STRING_LENGTH)) { 794 794 psFree(md); 795 795 exit(EXIT_FAILURE); … … 974 974 exit(EXIT_FAILURE); 975 975 } 976 if (strncmp(psMetadataLookupPtr(&status, md, "re cipe"), "a string", MAX_STRING_LENGTH)) {976 if (strncmp(psMetadataLookupPtr(&status, md, "reduction"), "a string", MAX_STRING_LENGTH)) { 977 977 psFree(md); 978 978 exit(EXIT_FAILURE); … … 1021 1021 exit(EXIT_FAILURE); 1022 1022 } 1023 if (strncmp(psMetadataLookupPtr(&status, md, "re cipe"), "a string", MAX_STRING_LENGTH)) {1023 if (strncmp(psMetadataLookupPtr(&status, md, "reduction"), "a string", MAX_STRING_LENGTH)) { 1024 1024 psFree(md); 1025 1025 exit(EXIT_FAILURE); … … 1538 1538 bool status; 1539 1539 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); 1541 1541 if (!object) { 1542 1542 exit(EXIT_FAILURE); … … 1586 1586 } 1587 1587 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)) { 1588 1592 psFree(md); 1589 1593 exit(EXIT_FAILURE); -
trunk/ippdb/tests/objectfrommetadata.c
r13739 r13937 1073 1073 exit(EXIT_FAILURE); 1074 1074 } 1075 if (!psMetadataAddStr(md, PS_LIST_TAIL, "re cipe", 0, NULL, "a string")) {1075 if (!psMetadataAddStr(md, PS_LIST_TAIL, "reduction", 0, NULL, "a string")) { 1076 1076 psFree(md); 1077 1077 exit(EXIT_FAILURE); … … 1112 1112 exit(EXIT_FAILURE); 1113 1113 } 1114 if (strncmp(object->re cipe, "a string", MAX_STRING_LENGTH)) {1114 if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) { 1115 1115 psFree(object); 1116 1116 exit(EXIT_FAILURE); … … 1191 1191 exit(EXIT_FAILURE); 1192 1192 } 1193 if (!psMetadataAddStr(md, PS_LIST_TAIL, "re cipe", 0, NULL, "a string")) {1193 if (!psMetadataAddStr(md, PS_LIST_TAIL, "reduction", 0, NULL, "a string")) { 1194 1194 psFree(md); 1195 1195 exit(EXIT_FAILURE); … … 1230 1230 exit(EXIT_FAILURE); 1231 1231 } 1232 if (strncmp(object->re cipe, "a string", MAX_STRING_LENGTH)) {1232 if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) { 1233 1233 psFree(object); 1234 1234 exit(EXIT_FAILURE); … … 1489 1489 exit(EXIT_FAILURE); 1490 1490 } 1491 if (!psMetadataAddStr(md, PS_LIST_TAIL, "re cipe", 0, NULL, "a string")) {1491 if (!psMetadataAddStr(md, PS_LIST_TAIL, "reduction", 0, NULL, "a string")) { 1492 1492 psFree(md); 1493 1493 exit(EXIT_FAILURE); … … 1524 1524 exit(EXIT_FAILURE); 1525 1525 } 1526 if (strncmp(object->re cipe, "a string", MAX_STRING_LENGTH)) {1526 if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) { 1527 1527 psFree(object); 1528 1528 exit(EXIT_FAILURE); … … 1559 1559 exit(EXIT_FAILURE); 1560 1560 } 1561 if (!psMetadataAddStr(md, PS_LIST_TAIL, "re cipe", 0, NULL, "a string")) {1561 if (!psMetadataAddStr(md, PS_LIST_TAIL, "reduction", 0, NULL, "a string")) { 1562 1562 psFree(md); 1563 1563 exit(EXIT_FAILURE); … … 1657 1657 exit(EXIT_FAILURE); 1658 1658 } 1659 if (strncmp(object->re cipe, "a string", MAX_STRING_LENGTH)) {1659 if (strncmp(object->reduction, "a string", MAX_STRING_LENGTH)) { 1660 1660 psFree(object); 1661 1661 exit(EXIT_FAILURE); … … 2382 2382 exit(EXIT_FAILURE); 2383 2383 } 2384 if (!psMetadataAddStr(md, PS_LIST_TAIL, "reduction", 0, NULL, "a string")) { 2385 psFree(md); 2386 exit(EXIT_FAILURE); 2387 } 2384 2388 if (!psMetadataAddStr(md, PS_LIST_TAIL, "filter", 0, NULL, "a string")) { 2385 2389 psFree(md); … … 2494 2498 } 2495 2499 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)) { 2496 2504 psFree(object); 2497 2505 exit(EXIT_FAILURE);
Note:
See TracChangeset
for help on using the changeset viewer.
