Changeset 35789
- Timestamp:
- Jul 10, 2013, 12:08:57 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
-
dbconfig/chip.md (modified) (1 diff)
-
ippScripts/scripts/chip_imfile.pl (modified) (10 diffs)
-
ippTasks/chip.pro (modified) (2 diffs)
-
ippTools/share/chiptool_change_exp_state.sql (modified) (1 diff)
-
ippTools/share/chiptool_completely_processed_exp.sql (modified) (1 diff)
-
ippTools/share/pxadmin_create_tables.sql (modified) (2 diffs)
-
ippTools/share/pxadmin_drop_tables.sql (modified) (1 diff)
-
ippTools/src/chiptool.c (modified) (2 diffs)
-
ippTools/src/chiptoolConfig.c (modified) (2 diffs)
-
ippTools/src/pxchip.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dbconfig/chip.md
r29902 r35789 20 20 maskfrac_magic F32 0.0 21 21 maskfrac_advisory F32 0.0 22 update_mode S16 0 22 23 note STR 255 23 24 END -
trunk/ippScripts/scripts/chip_imfile.pl
r35770 r35789 45 45 # Parse the command-line arguments 46 46 my ( $exp_id, $chip_id, $class_id, $chip_imfile_id, $uri, $camera, $outroot, $dbname, $run_state, $reduction, $threads, $verbose, 47 $no_update, $save_temps, $no_op, $redirect, $magicked, $deburned );47 $no_update, $save_temps, $no_op, $redirect, $magicked, $deburned, $update_mode ); 48 48 49 49 GetOptions( … … 58 58 'reduction=s' => \$reduction, # Reduction class 59 59 'run-state=s' => \$run_state, # current state of the run (new, update) 60 'update-mode=s' => \$update_mode, # update_mode if non-zero do not use configdump 60 61 'magicked=s' => \$magicked, # magicked state of input file 61 62 'deburned=s' => \$deburned, # does deburned image exist? … … 147 148 my $outputBin2; 148 149 my $dump_config = 1; 149 my $do_stats = 1; 150 151 # Note: We currently always do_stats because we need the quality flags 152 # If run_state eq 'update' using the same file name wipes out the stats from the original processing which 153 # is arguably a bug. Since they are already in the database in that case this probably isn't a big 154 # deal 155 my $do_stats = 1; 150 156 $outputStats = prepare_output("PPIMAGE.STATS", $outroot, $class_id, 1); 157 151 158 my $do_binned_images = 1; 152 159 … … 155 162 $configuration = prepare_output("PPIMAGE.CONFIG", $outroot, $class_id, 1); 156 163 } else { 157 $configuration = $ipprc->filename('PPIMAGE.CONFIG', $outroot, $class_id) 164 # If update_mode is non-zero we are going to update with current recipes. 165 # In this case dump the new configuration. 166 if ($update_mode) { 167 $configuration = prepare_output("PPIMAGE.CONFIG", $outroot, $class_id, 1); 168 } else { 169 $configuration = $ipprc->filename('PPIMAGE.CONFIG', $outroot, $class_id) 158 170 or &my_die("Missing entry from camera config: PPIMAGE.CONFIG", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR); 159 if ($ipprc->file_exists($configuration)) { 160 $dump_config = 0; 161 } else { 162 print STDERR "WARNING: Config dump file $configuration is missing. Using current recipes and file rules.\n"; 163 164 # XXX: should we create a new config dump file? 165 # I vote yes but only if we can distingusing between temporarily unavailable and GONE. 166 my $gone = 0; 167 if (storage_object_exists($configuration, \$gone)) { 168 if ($gone) { 169 $configuration = prepare_output('PPIMAGE.CONFIG', $outroot, $class_id, 1); 170 # if we dump the config we need to insure that the config dump represents 171 # the full processing 172 } else { 173 # file is temporarily not available. Don't dump config. 174 $dump_config = 0; 171 if ($ipprc->file_exists($configuration)) { 172 $dump_config = 0; 173 } else { 174 print STDERR "WARNING: Config dump file $configuration is missing. Using current recipes and file rules.\n"; 175 176 # XXX: should we create a new config dump file? 177 # I vote yes but only if we can distingusing between temporarily unavailable and GONE. 178 my $gone = 0; 179 if (storage_object_exists($configuration, \$gone)) { 180 if ($gone) { 181 $configuration = prepare_output('PPIMAGE.CONFIG', $outroot, $class_id, 1); 182 # if we dump the config we need to insure that the config dump represents 183 # the full processing 184 } else { 185 # file is temporarily not available. Don't dump config. 186 $dump_config = 0; 187 } 175 188 } 176 189 } … … 185 198 or &my_die("failed to delete existing destreak backup weight file", $exp_id, $chip_id, $class_id, $PS_EXIT_UNKNOWN_ERROR); 186 199 187 # don't do binned images when updating unless we are starting from scratch.188 $do_binned_images = 0 unless $dump_config;200 # don't do binned images when updating 201 $do_binned_images = 0; 189 202 } 190 203 if ($do_binned_images) { … … 219 232 my $do_photom = metadataLookupBool($recipeData, 'PHOTOM'); 220 233 if ($do_photom and ($run_state eq 'update')) { 221 # If previous p hotometry outputs are ok skip runningphotometry234 # If previous psf file is ok skip photometry 222 235 if ($dump_config || rerun_photometry($outroot, $class_id)) { 223 236 carp "Will rerun photometry\n"; … … 562 575 $command .= " -class_id $class_id"; 563 576 $command .= " -dbname $dbname" if defined $dbname; 577 # XXX: if we had a quality problem on this re-run we are not saving that fact in the DB... 578 # to change this we need to modify chiptool -tofullimfile to supprot -set_quality and then add 579 #$command .= " -set_quality $quality" if $quality; 564 580 } 565 581 … … 600 616 601 617 my $update_sources_if_gone = 0; # set this to regenerate sources if gone. 602 # We no longer do this as of 2012-12 618 # We no longer do this as of 2012-12 since cleanup deletes them 603 619 my $make_sources = 0; 604 620 my $sources_available = 0; … … 635 651 if (storage_object_exists($outputPsf, \$gone)) { 636 652 # object exists, but no instances are available. If they are permanently gone 637 # re name the storage object653 # remake it 638 654 if ($gone) { 639 655 carp "WARNING: PSF storage object exists but all instances are permanently gone"; … … 641 657 } 642 658 } else { 659 # object completely missing remake it 643 660 $make_psf = 1; 644 661 } -
trunk/ippTasks/chip.pro
r27926 r35789 154 154 book getword chipPendingImfile $pageName state -var RUN_STATE 155 155 book getword chipPendingImfile $pageName path_base -var PATH_BASE 156 book getword chipPendingImfile $pageName update_mode -var UPDATE_MODE 156 157 157 158 if ($RAW_MAGICKED > 0) … … 189 190 $run = $run --reduction $REDUCTION 190 191 end 192 if ($UPDATE_MODE) 193 $run = $run --update-mode $UPDATE_MODE 194 end 195 191 196 add_standard_args run 192 197 -
trunk/ippTools/share/chiptool_change_exp_state.sql
r33245 r35789 5 5 UPDATE chipRun 6 6 JOIN rawExp using(exp_id) 7 SET chipRun.state = '%s' 7 SET chipRun.state = '%s', chipRun.update_mode = 0 8 8 -- set magicked hook %s 9 9 WHERE -
trunk/ippTools/share/chiptool_completely_processed_exp.sql
r26567 r35789 15 15 end_stage, 16 16 imfile_magicked as magicked, 17 0 as update_mode, 17 18 note 18 19 FROM -
trunk/ippTools/share/pxadmin_create_tables.sql
r35770 r35789 1 eREATE TABLE dbversion (1 CREATE TABLE dbversion ( 2 2 schema_version VARCHAR(64), 3 3 updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP … … 299 299 maskfrac_magic FLOAT, 300 300 maskfrac_advisory FLOAT, 301 update_mode SMALLINT DEFAULT 0, 301 302 note VARCHAR(255), 302 303 PRIMARY KEY(chip_id), -
trunk/ippTools/share/pxadmin_drop_tables.sql
r35227 r35789 115 115 DROP TABLE IF EXISTS survey; 116 116 DROP TABLE IF EXISTS lapGroup; 117 DROP TABLE IF EXISTS mergedvodbCopy; 118 DROP TABLE IF EXISTS mergedvodbProcessed; 119 DROP TABLE IF EXISTS mergedvodbRun; 117 120 118 121 SET FOREIGN_KEY_CHECKS=1 -
trunk/ippTools/src/chiptool.c
r35691 r35789 2018 2018 PXOPT_LOOKUP_STR(class_id, config->args, "-class_id", false, false); 2019 2019 PXOPT_LOOKUP_STR(label, config->args, "-set_label", false, false); 2020 PXOPT_LOOKUP_S16(update_mode, config->args, "-set_update_mode", false, false); 2020 2021 2021 2022 psString query = pxDataGet("chiptool_setimfiletoupdate.sql"); … … 2029 2030 psStringAppend(&setHook, "\n , chipRun.label = '%s'", label); 2030 2031 } 2032 // always set update_mode. If user has not supplied it zero is the right answer. 2033 psStringAppend(&setHook, "\n, chipRun.update_mode = %d", update_mode); 2031 2034 2032 2035 if (class_id) { -
trunk/ippTools/src/chiptoolConfig.c
r35573 r35789 52 52 53 53 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_workdir", 0, "define workdir (required)", NULL); 54 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_label", 0, "define label (required)", NULL);54 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_label", 0, "define label", NULL); 55 55 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_reduction", 0, "define reduction class", NULL); 56 56 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_expgroup", 0, "define exposure group", NULL); … … 107 107 psMetadataAddStr(setimfiletoupdateArgs, PS_LIST_TAIL, "-class_id", 0, "search by class_id", NULL); 108 108 psMetadataAddStr(setimfiletoupdateArgs, PS_LIST_TAIL, "-set_label", 0,"new value for label", NULL); 109 psMetadataAddS16(setimfiletoupdateArgs, PS_LIST_TAIL, "-set_update_mode", 0,"new value for update_mode", 0); 109 110 110 111 // -pendingimfile -
trunk/ippTools/src/pxchip.c
r33334 r35789 283 283 NAN, 284 284 NAN, 285 0, // update_mode 285 286 note 286 287 )
Note:
See TracChangeset
for help on using the changeset viewer.
