Changeset 16195
- Timestamp:
- Jan 22, 2008, 5:35:42 PM (18 years ago)
- Location:
- trunk/ippTasks
- Files:
-
- 11 edited
-
camera.pro (modified) (2 diffs)
-
chip.pro (modified) (2 diffs)
-
detrend.norm.pro (modified) (6 diffs)
-
detrend.process.pro (modified) (3 diffs)
-
detrend.reject.pro (modified) (2 diffs)
-
detrend.resid.pro (modified) (4 diffs)
-
detrend.stack.pro (modified) (2 diffs)
-
notes.txt (modified) (2 diffs)
-
pantasks.pro (modified) (1 diff)
-
register.pro (modified) (3 diffs)
-
summit.copy.pro (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/camera.pro
r16173 r16195 122 122 book getword camPendingExp $pageName exp_tag -var EXP_TAG 123 123 book getword camPendingExp $pageName cam_id -var CAM_ID 124 book getword camPendingExp $pageName workdir -var WORKDIR 124 book getword camPendingExp $pageName workdir -var WORKDIR_TEMPLATE 125 125 book getword camPendingExp $pageName dvodb -var DVODB 126 126 book getword camPendingExp $pageName dbname -var DBNAME … … 130 130 set.host.for.camera $camera FPA 131 131 132 # output log from filerule 133 if ("$WORKDIR" == "NULL") 134 $outpath = `pwd` 135 else 136 $outpath = `ipp_datapath.pl $WORKDIR` 137 end 138 sprintf outpath "%s/%s" $outpath $EXP_TAG 139 sprintf outroot "%s/%s.cm.%s" $outpath $EXP_TAG $CAM_ID 132 # raw workdir examples: 133 # file://data/@HOST@.0/gpc1/20080130 134 # neb:///@HOST@-vol0/gpc1/20080130 (need to supply volname?, or are we re-defining this each time?) 135 set.workdir.by.camera $CAMERA FPA $WORKDIR_TEMPLATE $default_host WORKDIR 136 # out workdir examples: 137 # file://data/ipp004.0/gpc1/20080130 138 # neb:///ipp004-vol0/gpc1/20080130 139 140 ## generate outroot specific to this exposure (& chip) 141 sprintf outroot "%s/%s/%s.cm.%s" $WORKDIR $EXP_TAG $EXP_TAG $CAM_ID 142 143 ## generate output log based on filerule (convert the URI to a PATH) 140 144 $logfile = `ipp_filename.pl --filerule LOG.EXP --camera $CAMERA --class_id NONE --basename $outroot` 141 145 if ("$logfile" == "") 142 $logfile = $outroot.log 146 echo "WARNING: logfile not defined in camera.pro:146" 147 break 143 148 end 144 149 145 150 stdout $logfile 146 151 stderr $logfile 147 exec mkdir -p $outpath148 152 149 $run = camera_exp.pl --exp_tag $EXP_TAG --cam_id $CAM_ID --camera $CAMERA 150 if ("$WORKDIR" != "NULL") 151 $run = $run --workdir $WORKDIR 152 end 153 $run = camera_exp.pl --exp_tag $EXP_TAG --cam_id $CAM_ID --camera $CAMERA --outroot $outroot 153 154 if ("$REDUCTION" != "NULL") 154 155 $run = $run --reduction $REDUCTION -
trunk/ippTasks/chip.pro
r16173 r16195 121 121 book getword chipPendingImfile $pageName exp_tag -var EXP_TAG 122 122 book getword chipPendingImfile $pageName chip_id -var CHIP_ID 123 book getword chipPendingImfile $pageName workdir -var WORKDIR 123 book getword chipPendingImfile $pageName workdir -var WORKDIR_TEMPLATE 124 124 book getword chipPendingImfile $pageName class_id -var CLASS_ID 125 125 book getword chipPendingImfile $pageName uri -var URI … … 130 130 set.host.for.camera $camera $class_id 131 131 132 ## generate output log based on filerule 133 if ("$WORKDIR" == "NULL") 134 $outpath = `pwd` 135 else 136 $outpath = `ipp_datapath.pl $WORKDIR` 137 end 138 sprintf outpath "%s/%s" $outpath $EXP_TAG 139 sprintf outroot "%s/%s.ch.%s" $outpath $EXP_TAG $CHIP_ID 132 # raw workdir examples: 133 # file://data/@HOST@.0/gpc1/20080130 134 # neb:///@HOST@-vol0/gpc1/20080130 (need to supply volname?, or are we re-defining this each time?) 135 set.workdir.by.camera $CAMERA $CLASS_ID $WORKDIR_TEMPLATE $default_host WORKDIR 136 # out workdir examples: 137 # file://data/ipp004.0/gpc1/20080130 138 # neb:///ipp004-vol0/gpc1/20080130 139 140 ## generate outroot specific to this exposure (& chip) 141 sprintf outroot "%s/%s/%s.ch.%s" $WORKDIR $EXP_TAG $EXP_TAG $CHIP_ID 142 143 ## generate output log based on filerule (convert the URI to a PATH) 140 144 $logfile = `ipp_filename.pl --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $outroot` 141 145 if ("$logfile" == "") 142 sprintf logfile "%s.%s.log" $outroot $CLASS_ID 146 echo "WARNING: logfile not defined in chip.pro:152" 147 break 143 148 end 144 149 145 150 stdout $logfile 146 151 stderr $logfile 147 exec mkdir -p $outpath148 152 149 $run = chip_imfile.pl --exp_id $EXP_ID --chip_id $CHIP_ID --class_id $CLASS_ID --exp_tag $EXP_TAG --uri $URI --camera $CAMERA 150 if ("$WORKDIR" != "NULL") 151 $run = $run --workdir $WORKDIR 152 end 153 $run = chip_imfile.pl --exp_id $EXP_ID --chip_id $CHIP_ID --class_id $CLASS_ID --exp_tag $EXP_TAG --uri $URI --camera $CAMERA --outroot $outroot 153 154 if ("$REDUCTION" != "NULL") 154 155 $run = $run --reduction $REDUCTION -
trunk/ippTasks/detrend.norm.pro
r16173 r16195 153 153 book getword detPendingNormStatImfile $pageName iteration -var ITERATION 154 154 book getword detPendingNormStatImfile $pageName camera -var CAMERA 155 book getword detPendingNormStatImfile $pageName workdir -var WORKDIR 155 book getword detPendingNormStatImfile $pageName workdir -var WORKDIR_TEMPLATE 156 156 book getword detPendingNormStatImfile $pageName dbname -var DBNAME 157 157 … … 159 159 set.host.for.camera $camera FPA 160 160 161 if ("$WORKDIR" == "NULL") 162 $outpath = `pwd` 163 else 164 $outpath = `ipp_datapath.pl $WORKDIR` 165 end 166 $outpath = $outpath/$CAMERA.$DET_TYPE.$DET_ID 167 $logfile = $outpath/$CAMERA.$DET_TYPE.norm.$DET_ID.$ITERATION.log 161 # set workdir (interpolate host; see camera.pro for examples) 162 set.workdir.by.camera $CAMERA FPA $WORKDIR_TEMPLATE $default_host WORKDIR 163 164 ## generate outroot specific to this exposure (& chip) 165 sprintf outroot "%s/%s.%s.%s/%s.%s.norm.%s.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $CAMERA $DET_TYPE $DET_ID $ITERATION 166 167 ## generate output log (NOT based on filerule?) 168 $logfile = "$outroot.log" 169 $logfile = `ipp_datapath.pl $logfile` 170 168 171 stdout $logfile 169 172 stderr $logfile 170 exec mkdir -p $outpath 171 172 $run = detrend_norm_calc.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE 173 if ("$WORKDIR" != "NULL") 174 $run = $run --workdir $WORKDIR 175 end 173 174 $run = detrend_norm_calc.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE --outroot $outroot 176 175 add_standard_args run 177 176 … … 271 270 book getword detPendingNormImfile $pageName class_id -var CLASS_ID 272 271 book getword detPendingNormImfile $pageName norm -var NORM 273 book getword detPendingNormImfile $pageName workdir -var WORKDIR 272 book getword detPendingNormImfile $pageName workdir -var WORKDIR_TEMPLATE 274 273 book getword detPendingNormImfile $pageName dbname -var DBNAME 275 274 … … 277 276 set.host.for.camera $camera $class_id 278 277 279 # XXX use ipp_filename.pl to lookup output file names 280 if ("$WORKDIR" == "NULL") 281 $outpath = `pwd` 282 else 283 $outpath = `ipp_datapath.pl $WORKDIR` 284 end 285 $outpath = $outpath/$CAMERA.$DET_TYPE.$DET_ID 286 $logfile = $outpath/$CAMERA.$DET_TYPE.norm.$DET_ID.$ITERATION.$CLASS_ID.log 278 # set workdir (interpolate host; see camera.pro for examples) 279 set.workdir.by.camera $CAMERA $CLASS_ID $WORKDIR_TEMPLATE $default_host WORKDIR 280 281 ## generate outroot specific to this stack (& chip) 282 sprintf outroot "%s/%s.%s.%s/%s.%s.norm.%s.%s.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $CAMERA $DET_TYPE $DET_ID $ITERATION $CLASS_ID 283 284 ## generate output log (NOT based on filerule?) 285 $logfile = "$outroot.log" 286 $logfile = `ipp_datapath.pl $logfile` 287 287 288 stdout $logfile 288 289 stderr $logfile 289 exec mkdir -p $outpath 290 291 $run = detrend_norm_apply.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --value $NORM --input_uri $URI --camera $CAMERA --det_type $DET_TYPE 292 if ("$WORKDIR" != "NULL") 293 $run = $run --workdir $WORKDIR 294 end 290 291 $run = detrend_norm_apply.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --value $NORM --input_uri $URI --camera $CAMERA --det_type $DET_TYPE --outroot $outroot 295 292 add_standard_args run 296 293 … … 387 384 book getword detPendingNormExp $pageName det_type -var DET_TYPE 388 385 book getword detPendingNormExp $pageName camera -var CAMERA 389 book getword detPendingNormExp $pageName workdir -var WORKDIR 386 book getword detPendingNormExp $pageName workdir -var WORKDIR_TEMPLATE 390 387 book getword detPendingNormExp $pageName dbname -var DBNAME 391 388 … … 393 390 set.host.for.camera $camera FPA 394 391 395 # XXX add $WORKDIR/$LOG_DIR 396 if ("$WORKDIR" == "NULL") 397 $outpath = `pwd` 398 else 399 $outpath = `ipp_datapath.pl $WORKDIR` 400 end 401 $outpath = $outpath/$CAMERA.$DET_TYPE.$DET_ID 402 $logfile = $outpath/$CAMERA.$DET_TYPE.norm.$DET_ID.$ITERATION.log 392 # set workdir (interpolate host; see camera.pro for examples) 393 set.workdir.by.camera $CAMERA FPA $WORKDIR_TEMPLATE $default_host WORKDIR 394 395 ## generate outroot specific to this exposure (& chip) 396 sprintf outroot "%s/%s.%s.%s/%s.%s.norm.%s.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $CAMERA $DET_TYPE $DET_ID $ITERATION 397 398 ## generate output log (NOT based on filerule?) 399 $logfile = "$outroot.log" 400 $logfile = `ipp_datapath.pl $logfile` 401 403 402 stdout $logfile 404 403 stderr $logfile 405 exec mkdir -p $outpath 406 407 $run = detrend_norm_exp.pl --det_id $DET_ID --iteration $ITERATION --camera $CAMERA --det_type $DET_TYPE 408 if ("$WORKDIR" != "NULL") 409 $run = $run --workdir $WORKDIR 410 end 404 405 $run = detrend_norm_exp.pl --det_id $DET_ID --iteration $ITERATION --camera $CAMERA --det_type $DET_TYPE --outroot $outroot 411 406 add_standard_args run 412 407 -
trunk/ippTasks/detrend.process.pro
r16173 r16195 143 143 book getword detPendingProcessedImfile $pageName uri -var URI 144 144 book getword detPendingProcessedImfile $pageName camera -var CAMERA 145 book getword detPendingProcessedImfile $pageName workdir -var WORKDIR 145 book getword detPendingProcessedImfile $pageName workdir -var WORKDIR_TEMPLATE 146 146 book getword detPendingProcessedImfile $pageName dbname -var DBNAME 147 147 book getword detPendingProcessedImfile $pageName reduction -var REDUCTION … … 150 150 set.host.for.camera $camera $class_id 151 151 152 ## output log filename 153 if ("$WORKDIR" == "NULL") 154 $outpath = `pwd` 155 else 156 $outpath = `ipp_datapath.pl $WORKDIR` 157 end 158 sprintf outpath "%s/%s.%s.%s/%s" $outpath $CAMERA $DET_TYPE $DET_ID $EXP_TAG 159 sprintf outroot "%s/%s.detproc.%s" $outpath $EXP_TAG $DET_ID 152 # see chip.pro for examples 153 set.workdir.by.camera $CAMERA $CLASS_ID $WORKDIR_TEMPLATE $default_host WORKDIR 154 155 ## generate outroot specific to this exposure (& chip) 156 sprintf outroot "%s/%s.%s.%s/%s/%s.detproc.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID 157 158 ## generate output log based on filerule (convert the URI to a PATH) 160 159 $logfile = `ipp_filename.pl --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $outroot` 161 160 if ("$logfile" == "") 162 sprintf logfile "%s.%s.log" $outroot $CLASS_ID 161 echo "WARNING: logfile not defined in detrend.process.pro:161" 162 break 163 163 end 164 164 165 165 stdout $logfile 166 166 stderr $logfile 167 exec mkdir -p $outpath 168 169 $run = detrend_process_imfile.pl --det_id $DET_ID --exp_id $EXP_ID --det_type $DET_TYPE --class_id $CLASS_ID --exp_tag $EXP_TAG --input_uri $URI --camera $CAMERA 170 if ("$WORKDIR" != "NULL") 171 $run = $run --workdir $WORKDIR 172 end 167 168 $run = detrend_process_imfile.pl --det_id $DET_ID --exp_id $EXP_ID --det_type $DET_TYPE --class_id $CLASS_ID --exp_tag $EXP_TAG --input_uri $URI --camera $CAMERA --outroot $outroot 173 169 if ("$REDUCTION" != "NULL") 174 170 $run = $run --reduction $REDUCTION … … 269 265 book getword detPendingProcessedExp $pageName camera -var CAMERA 270 266 book getword detPendingProcessedExp $pageName exp_tag -var EXP_TAG 271 book getword detPendingProcessedExp $pageName workdir -var WORKDIR 267 book getword detPendingProcessedExp $pageName workdir -var WORKDIR_TEMPLATE 272 268 book getword detPendingProcessedExp $pageName dbname -var DBNAME 269 book getword detPendingProcessedExp $pageName reduction -var REDUCTION 273 270 274 271 # specify choice of local or remote host based on camera and chip (class_id) 275 272 set.host.for.camera $camera FPA 276 273 277 # XXX push this into the filerules? 278 if ("$WORKDIR" == "NULL") 279 $outpath = `pwd` 280 else 281 $outpath = `ipp_datapath.pl $WORKDIR` 282 end 283 sprintf outpath "%s/%s.%s.%s/%s" $outpath $CAMERA $DET_TYPE $DET_ID $EXP_TAG 284 sprintf outroot "%s/%s.detproc.%s" $outpath $EXP_TAG $DET_ID 274 # set workdir (interpolate host; see camera.pro for examples) 275 set.workdir.by.camera $CAMERA FPA $WORKDIR_TEMPLATE $default_host WORKDIR 276 277 ## generate outroot specific to this exposure (& chip) 278 sprintf outroot "%s/%s.%s.%s/%s/%s.detproc.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID 279 280 ## generate output log based on filerule (convert the URI to a PATH) 285 281 $logfile = `ipp_filename.pl --filerule LOG.EXP --camera $CAMERA --class_id NONE --basename $outroot` 286 282 if ("$logfile" == "") 287 $logfile = $outroot.log 283 echo "WARNING: logfile not defined in detrend.process.pro:282" 284 break 288 285 end 289 286 290 287 stdout $logfile 291 288 stderr $logfile 292 exec mkdir -p $outpath 293 294 $run = detrend_process_exp.pl --det_id $DET_ID --exp_id $EXP_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA 295 if ("$WORKDIR" != "NULL") 296 $run = $run --workdir $WORKDIR 289 290 $run = detrend_process_exp.pl --det_id $DET_ID --exp_id $EXP_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA --outroot $outroot 291 if ("$REDUCTION" != "NULL") 292 $run = $run --reduction $REDUCTION 297 293 end 298 294 add_standard_args run -
trunk/ippTasks/detrend.reject.pro
r16173 r16195 122 122 book getword detRejectExp $pageName mode -var MODE 123 123 book getword detRejectExp $pageName camera -var CAMERA 124 book getword detRejectExp $pageName workdir -var WORKDIR 124 book getword detRejectExp $pageName workdir -var WORKDIR_TEMPLATE 125 125 book getword detRejectExp $pageName dbname -var DBNAME 126 126 … … 128 128 set.host.for.camera $camera FPA 129 129 130 if ("$WORKDIR" == "NULL") 131 $outroot = `pwd` 132 else 133 $outroot = `ipp_datapath.pl $WORKDIR` 134 end 135 sprintf outroot "%s/%s.%s.%s" $outroot $CAMERA $DET_TYPE $DET_ID 136 sprintf logfile "%s/%s.%s.%s.%s.detreject.log" $outroot $CAMERA $DET_TYPE $DET_ID $ITERATION 130 # set workdir (interpolate host; see camera.pro for examples) 131 set.workdir.by.camera $CAMERA FPA $WORKDIR_TEMPLATE $default_host WORKDIR 132 133 ## generate outroot specific to this exposure (& chip) 134 sprintf outroot "%s/%s.%s.%s/%s/%s.detreject.%s.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID $ITERATION 135 136 ## generate output log based on filerule (convert the URI to a PATH) 137 $logfile = $outroot.log 138 $logfile = `ipp_datapath.pl $logfile` 139 137 140 stdout $logfile 138 141 stderr $logfile 139 exec mkdir -p $outroot140 142 141 $run = detrend_reject_exp.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE --camera $CAMERA 142 if ("$WORKDIR" != "NULL") 143 $run = $run --workdir $WORKDIR 144 end 143 $run = detrend_reject_exp.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE --camera $CAMERA --outroot $outroot 145 144 add_standard_args run 146 145 -
trunk/ippTasks/detrend.resid.pro
r16173 r16195 143 143 book getword detPendingResidImfile $pageName det_uri -var DET_URI 144 144 book getword detPendingResidImfile $pageName camera -var CAMERA 145 book getword detPendingResidImfile $pageName workdir -var WORKDIR 145 book getword detPendingResidImfile $pageName workdir -var WORKDIR_TEMPLATE 146 146 book getword detPendingResidImfile $pageName dbname -var DBNAME 147 147 book getword detPendingResidImfile $pageName reduction -var REDUCTION … … 150 150 set.host.for.camera $camera $class_id 151 151 152 # XXX use ipp_filename.pl to lookup output file names 153 if ("$WORKDIR" == "NULL") 154 $outpath = `pwd` 155 else 156 $outpath = `ipp_datapath.pl $WORKDIR` 157 end 158 sprintf outpath "%s/%s.%s.%s/%s" $outpath $CAMERA $DET_TYPE $DET_ID $EXP_TAG 159 sprintf outroot "%s/%s.detresid.%s.%s" $outpath $EXP_TAG $DET_ID $ITERATION 152 # set workdir (interpolate host; see camera.pro for examples) 153 set.workdir.by.camera $CAMERA $CLASS_ID $WORKDIR_TEMPLATE $default_host WORKDIR 154 155 ## generate outroot specific to this exposure (& chip) 156 sprintf outroot "%s/%s.%s.%s/%s/%s.detresid.%s.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID $ITERATION 157 158 ## generate output log based on filerule (convert the URI to a PATH) 160 159 $logfile = `ipp_filename.pl --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $outroot` 161 160 if ("$logfile" == "") 162 sprintf logfile "%s.%s.log" $outroot $CLASS_ID 161 echo "WARNING: logfile not defined in detrend.resid.pro:161" 162 break 163 163 end 164 164 165 165 stdout $logfile 166 166 stderr $logfile 167 exec mkdir -p $outpath 168 169 $run = detrend_resid.pl --det_id $DET_ID --iteration $ITERATION --exp_id $EXP_ID --exp_tag $EXP_TAG --class_id $CLASS_ID --det_type $DET_TYPE --detrend $DET_URI --input_uri $URI --camera $CAMERA --mode $MODE 170 if ("$WORKDIR" != "NULL") 171 $run = $run --workdir $WORKDIR 172 end 167 168 $run = detrend_resid.pl --det_id $DET_ID --iteration $ITERATION --exp_id $EXP_ID --exp_tag $EXP_TAG --class_id $CLASS_ID --det_type $DET_TYPE --detrend $DET_URI --input_uri $URI --camera $CAMERA --mode $MODE --outroot $outroot 173 169 if ("$REDUCTION" != "NULL") 174 170 $run = $run --reduction $REDUCTION … … 272 268 book getword detPendingResidExp $pageName include -var INCLUDE 273 269 book getword detPendingResidExp $pageName camera -var CAMERA 274 book getword detPendingResidExp $pageName workdir -var WORKDIR 270 book getword detPendingResidExp $pageName workdir -var WORKDIR_TEMPLATE 275 271 book getword detPendingResidExp $pageName dbname -var DBNAME 276 272 … … 278 274 set.host.for.camera $camera FPA 279 275 280 # XXX use ipp_filename.pl to lookup output file names 281 if ("$WORKDIR" == "NULL") 282 $outpath = `pwd` 283 else 284 $outpath = `ipp_datapath.pl $WORKDIR` 285 end 286 sprintf outpath "%s/%s.%s.%s/%s" $outpath $CAMERA $DET_TYPE $DET_ID $EXP_TAG 287 sprintf outroot "%s/%s.detresid.%s.%s" $outpath $EXP_TAG $DET_ID $ITERATION 276 # set workdir (interpolate host; see camera.pro for examples) 277 set.workdir.by.camera $CAMERA FPA $WORKDIR_TEMPLATE $default_host WORKDIR 278 279 ## generate outroot specific to this exposure (& chip) 280 sprintf outroot "%s/%s.%s.%s/%s/%s.detresid.%s.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID $ITERATION 281 282 ## generate output log based on filerule (convert the URI to a PATH) 288 283 $logfile = `ipp_filename.pl --filerule LOG.IMFILE --camera $CAMERA --class_id NONE --basename $outroot` 284 if ("$logfile" == "") 285 echo "WARNING: logfile not defined in detrend.process.pro:285" 286 break 287 end 289 288 290 289 stdout $logfile 291 290 stderr $logfile 292 exec mkdir -p $outpath 293 294 $run = detrend_reject_imfile.pl --det_id $DET_ID --iteration $ITERATION --exp_id $EXP_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA 295 if ("$WORKDIR" != "NULL") 296 $run = $run --workdir $WORKDIR 297 end 291 292 $run = detrend_reject_imfile.pl --det_id $DET_ID --iteration $ITERATION --exp_id $EXP_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA --outroot $outroot 298 293 add_standard_args run 299 294 -
trunk/ippTasks/detrend.stack.pro
r16173 r16195 123 123 book getword detPendingStackedImfile $pageName class_id -var CLASS_ID 124 124 book getword detPendingStackedImfile $pageName camera -var CAMERA 125 book getword detPendingStackedImfile $pageName workdir -var WORKDIR 125 book getword detPendingStackedImfile $pageName workdir -var WORKDIR_TEMPLATE 126 126 book getword detPendingStackedImfile $pageName dbname -var DBNAME 127 127 book getword detPendingStackedImfile $pageName reduction -var REDUCTION … … 130 130 set.host.for.camera $camera $class_id 131 131 132 if ("$WORKDIR" == "NULL")133 $outpath = `pwd`134 else 135 $outpath = `ipp_datapath.pl $WORKDIR`136 end137 sprintf outpath "%s/%s.%s.%s" $outpath $CAMERA $DET_TYPE $DET_ID 138 sprintf outroot "%s/%s.%s.%s.%s" $outpath $CAMERA $DET_TYPE $DET_ID $ITERATION132 # set workdir (interpolate host; see camera.pro for examples) 133 set.workdir.by.camera $CAMERA FPA $WORKDIR_TEMPLATE $default_host WORKDIR 134 135 ## generate outroot specific to this exposure (& chip) 136 sprintf outroot "%s/%s.%s.%s/%s.%s.%s.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $CAMERA $DET_TYPE $DET_ID $ITERATION 137 138 ## generate output log based on filerule (convert the URI to a PATH) 139 139 $logfile = `ipp_filename.pl --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $outroot` 140 140 if ("$logfile" == "") 141 sprintf logfile "%s.%s.log" $outroot $CLASS_ID 141 echo "WARNING: logfile not defined in detrend.stack.pro:141" 142 break 142 143 end 143 144 144 145 stdout $logfile 145 146 stderr $logfile 146 exec mkdir -p $outpath147 147 148 # save the pageName for future reference below 149 options $pageName 150 151 $run = detrend_stack.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --det_type $DET_TYPE --camera $CAMERA 152 if ("$WORKDIR" != "NULL") 153 $run = $run --workdir $WORKDIR 154 end 148 $run = detrend_stack.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --det_type $DET_TYPE --camera $CAMERA --outroot $outroot 155 149 if ("$REDUCTION" != "NULL") 156 150 $run = $run --reduction $REDUCTION 157 151 end 158 152 add_standard_args run 153 154 # save the pageName for future reference below 155 options $pageName 159 156 160 157 # create the command line -
trunk/ippTasks/notes.txt
r16173 r16195 1 1 2 2008.01.18 2 proposal to clean scripts/tasks up somewhat wrt names: 3 4 * scripts do NOT use workdir to change the workdir in the db 5 * thus, what is supplied is actually the outputRoot 6 * require the output root for the scripts 7 * have the calling tasks construct the outputRoot 8 ** replace -workdir with -outroot 9 10 some filename rules : 11 12 * the db entry WORKDIR is the most abstract version: 13 path://GPC-@HOST@/20080130 14 file://data/@HOST@.0/gpc1/20080130 15 neb:///@HOST@/gpc1/20080130 16 neb://gpc1/20080130 17 XXX have nebulous distinguish between neb:///host/path and 18 neb://path? 19 20 * the db WORKDIR entry is carried from step to step unless 21 over-ridden with a -queue command 22 23 * psLib-based binaries (ppImage, etc) may be passed URIs, but not 24 files with the @HOST@ abstraction 25 26 * IPP perl scripts may be passed URIs, but not files with the @HOST@ 27 abstraction 28 29 * nebulous : convert neb:///@HOST@/path/name 30 31 *** examples: 32 33 * this tells ppImage to use the ipp004 version for both input and output: 34 ppImage -file neb:///ipp004-v0/gpc1/20080130/o4414g0001o/o4414g0001o.XY01.fits neb:///ipp004-v0/gpc1/20080130/o4414g0001o/o4414g0001o.XY01 35 36 * we already know the hostname at this point; include it in the call 37 chip_imfile.pl --uri neb:///ipp004-v0/gpc1/20080130/o4414g0001o/o4414g0001o.XY01.fits --workdir neb:///ipp004-v0/gpc1/20080130/ 38 39 40 41 42 43 2008.01.21 3 44 4 45 I'm working on the summit.copy.pro interaction with nebulous (and … … 25 66 host. 26 67 68 * specific output filenames 69 70 In both ippTasks and ippScripts, there are references to files 71 which must correctly located on the host. 72 73 * workdir choice of output directory. 74 75 the 76 27 77 * dsget output target: 28 78 29 79 dsget is called by pantasks in the task 'dsget'. currently, dsget 30 80 accepts a --filename argument which specifies the output filename 31 to use. we have to tell t 81 to use. in the nebulous context, this is of the form 82 neb://top/next/stuff, without any host-specific information. To 83 target the file instance to a specific host, we pass dsget the 84 --volume (name) argument. The volumes refer to the specific 85 devices (potentially more than one per host), and the names can 86 then be chosen to include the host. 32 87 33 34 * choice of output directory.35 36 the37 38 39 88 2007.10.11 40 89 -
trunk/ippTasks/pantasks.pro
r16173 r16195 342 342 343 343 macro set.workdir.by.camera 344 if ($0 != 6) 345 echo "USAGE: set.workdir.by.camera (camera) (class_id) (template) (default) (varname)" 346 echo " uses global variable NEBULOUS to determine if nebulous is active" 347 break 348 end 349 350 local host default template camera classID varname 351 $camera = $1 352 $classID = $2 353 $template = $3 354 $default = $4 355 $varname = $5 356 357 # missing camera and/or chiphosts table results in host = NULL 358 book getword chiphosts $camera $classID -var host 359 360 if ("$host" == "NULL") 361 strsub $template @HOST@ $default -var $$varname 362 else 363 strsub $template @HOST@ $host -var $$varname 364 end 365 end 366 367 macro set.volume.by.camera 344 368 if ($0 != 3) 345 echo "USAGE: set.workdir.by.camera (camera) (class_id)" 346 break 347 end 369 echo "USAGE: set.volume.by.camera (camera) (class_id) (template) (default) (varname)" 370 echo " uses global variable NEBULOUS to determine if nebulous is active" 371 break 372 end 373 374 local host default template camera classID varname 375 $camera = $1 376 $classID = $2 377 $template = $3 378 $default = $4 379 $varname = $5 348 380 349 381 # missing camera and/or chiphosts table results in host = NULL 350 book getword chiphosts $1 $2 -var $host 351 352 if ($NEBULOUS) 353 if ("$host" == "NULL") 354 $workdir = $workdir_default 355 $volume = "NULL" 356 return 357 end 358 strsub $workdir_template @HOST@ $host -var workdir 359 strsub $volume_template @HOST@ $host -var volume 360 return 361 end 362 363 if ("$host" == "NULL") 364 $workdir = $workdir_default 365 return 366 end 367 strsub $workdir_template @HOST@ $host -var workdir 382 book getword chiphosts $camera $classID -var host 383 384 if (not($NEBULOUS)) 385 $$varname = "NULL" 386 return 387 end 388 389 if ("$host" == "NULL") 390 $$varname = $default 391 return 392 end 393 394 strsub $template @HOST@ $host -var $$varname 368 395 end 369 396 -
trunk/ippTasks/register.pro
r16174 r16195 137 137 book setword regPendingImfile $pageName pantaskState RUN 138 138 139 book getword regPendingImfile $pageName exp_id -var EXP_ID139 book getword regPendingImfile $pageName exp_id -var EXP_ID 140 140 book getword regPendingImfile $pageName tmp_exp_name -var TMP_EXP_NAME 141 book getword regPendingImfile $pageName tmp_camera -var TMP_CAMERA 141 142 book getword regPendingImfile $pageName tmp_class_id -var TMP_CLASS_ID 142 book getword regPendingImfile $pageName uri -var URI143 book getword regPendingImfile $pageName workdir -var WORKDIR_TEMPLATE144 book getword regPendingImfile $pageName dbname -var DBNAME143 book getword regPendingImfile $pageName uri -var URI 144 book getword regPendingImfile $pageName workdir -var WORKDIR_TEMPLATE 145 book getword regPendingImfile $pageName dbname -var DBNAME 145 146 146 147 # EXP_TAG is used to generate the unique, but human-readable, filenames … … 148 149 149 150 # specify choice of remote host 150 set.host.for.camera $camera $class_id 151 152 # we need to set the workdir based on 1) nebulous or not? 2) chip/host relationship 153 # this function uses workdir_template, workdir_default, volume_template, volume_default, 154 # it sets workdir and volume 155 ### this function needs to be improved: it is using fixed input and output var names 156 ### do we want these types of small outputs to go to a common filesystem? 157 set.workdir.by.camera $CAMERA $TMP_CLASS_ID $WORKDIR_TEMPLATE 158 159 ## generate output log based on filerule XXX put this in a function? 160 $outroot = `ipp_datapath.pl $WORKDIR` 161 sprintf outroot "%s/%s" $outroot $EXP_TAG 162 sprintf logfile "%s/%s.reg.log" $outroot $TMP_CLASS_ID 151 set.host.for.camera $TMP_CAMERA $TMP_CLASS_ID 152 153 # raw workdir examples: 154 # file://data/@HOST@.0/gpc1/20080130 155 # neb:///@HOST@-vol0/gpc1/20080130 (need to supply volname?, or are we re-defining this each time?) 156 set.workdir.by.camera $TMP_CAMERA $TMP_CLASS_ID $WORKDIR_TEMPLATE $default_host WORKDIR 157 # out workdir examples: 158 # file://data/ipp004.0/gpc1/20080130 159 # neb:///ipp004-vol0/gpc1/20080130 160 161 ## generate output log based on filerule 162 sprintf logfile "%s/%s/%s.%s.reg.log" $WORKDIR $EXP_TAG $EXP_TAG $TMP_CLASS_ID 163 $logfile = `ipp_datapath.pl $logfile` 164 163 165 stdout $logfile 164 166 stderr $logfile 165 exec mkdir -p $outroot 167 168 $run = register_imfile.pl --exp_id $EXP_ID --tmp_class_id $TMP_CLASS_ID --tmp_exp_name $TMP_EXP_NAME --uri $URI 169 add_standard_args run 166 170 167 171 # save the pageName for future reference below 168 172 options $pageName 169 170 $run = register_imfile.pl --exp_id $EXP_ID --tmp_class_id $TMP_CLASS_ID --tmp_exp_name $TMP_EXP_NAME --uri $URI171 add_standard_args run172 173 173 174 # create the command line … … 254 255 255 256 book setword regPendingExp $pageName pantaskState RUN 256 book getword regPendingExp $pageName exp_id -var EXP_ID257 book getword regPendingExp $pageName exp_id -var EXP_ID 257 258 book getword regPendingExp $pageName tmp_exp_name -var TMP_EXP_NAME 258 book getword regPendingExp $pageName workdir -var WORKDIR 259 book getword regPendingExp $pageName dbname -var DBNAME 259 book getword regPendingExp $pageName tmp_camera -var TMP_CAMERA 260 book getword regPendingExp $pageName workdir -var WORKDIR_TEMPLATE 261 book getword regPendingExp $pageName dbname -var DBNAME 260 262 261 263 # EXP_TAG is used to generate the unique, but human-readable, filenames 262 264 sprintf EXP_TAG "%s.%s" $TMP_EXP_NAME $EXP_ID 263 265 264 # specify choice of remote host:(need to choose based on chips) 265 if ($parallel) 266 host anyhost 267 else 268 host local 269 end 266 # specify choice of remote host 267 set.host.for.camera $TMP_CAMERA $TMP_CLASS_ID 268 269 # raw workdir examples: 270 # file://data/@HOST@.0/gpc1/20080130 271 # neb:///@HOST@-vol0/gpc1/20080130 (need to supply volname?, or are we re-defining this each time?) 272 set.workdir.by.camera $TMP_CAMERA $TMP_CLASS_ID $WORKDIR_TEMPLATE $default_host WORKDIR 273 # out workdir examples: 274 # file://data/ipp004.0/gpc1/20080130 275 # neb:///ipp004-vol0/gpc1/20080130 270 276 271 277 ## generate output log based on filerule 272 $outroot = `ipp_datapath.pl $WORKDIR`273 sprintf outroot "%s/%s" $outroot $EXP_TAG274 sprintf logfile "%s/%s.reg.log" $outroot $EXP_TAG 278 sprintf logfile "%s/%s/%s.reg.log" $WORKDIR $EXP_TAG $EXP_TAG 279 $logfile = `ipp_datapath.pl $logfile` 280 275 281 stdout $logfile 276 282 stderr $logfile 277 exec mkdir -p $outroot 283 284 $run = register_exp.pl --exp_id $EXP_ID --exp_tag $EXP_TAG 285 add_standard_args run 278 286 279 287 # save the pageName for future reference below 280 288 options $pageName 281 282 $run = register_exp.pl --exp_id $EXP_ID --exp_tag $EXP_TAG283 add_standard_args run284 289 285 290 # create the command line -
trunk/ippTasks/summit.copy.pro
r16174 r16195 18 18 # the templates are used if we have a class_id/host relationship; if none is found, the default values are used 19 19 # XXX not sure how to handle the .N value if we need to use more than one 20 # XXX this stuff should all be placed in a 'site' config file 20 21 if ($NEBULOUS) 21 $ workdir_default = neb://22 $workdir_template = neb:// 23 $ volume_default= ipp004-v024 $volume_template = @HOST@-v022 $default_host = ipp004 23 $workdir_template = neb:///@HOST@-v0 24 $default_volume = ipp004-v0 25 $volume_template = 25 26 else 26 $ workdir_default = /data/ipp004.0/27 $default_host = ipp004 27 28 $workdir_template = /data/@HOST@.0/ 28 29 end … … 278 279 book getword pzPendingImfile $pageName camera -var $CAMERA 279 280 281 set.host.by.camera $CAMERA $CLASS_ID 282 host anyhost 283 280 284 # 2007-08-30T05:09:59Z 281 285 substr $DATEOBS 0 4 YEAR … … 284 288 285 289 # we need to set the workdir based on 1) nebulous or not? 2) chip/host relationship 286 # this function uses workdir_template, workdir_default, volume_template, volume_default,290 # this function uses workdir_template, default_host, volume_template, volume_default, 287 291 # it sets workdir and volume 288 set.workdir.by.camera $CAMERA $CLASS_ID 292 set.workdir.by.camera $CAMERA $CLASS_ID $workdir_template $default_host workdir_base 293 set.volume.by.camera $CAMERA $CLASS_ID $volume_template $default_volume volume 289 294 290 295 # figure out filename 291 # XXXX this filename needs to use nebulous names 292 $FILENAME = $workdir/$CAMERA/$YEAR/$MONTH/$DAY/$EXP_NAME/$EXP_NAME.$CLASS_ID.fits 293 $FILEROOT = $workdir_template/$CAMERA/$YEAR/$MONTH/$DAY 296 # XXX may need to use sprintf here 297 $FILENAME = $workdir_base/$CAMERA/$YEAR$MONTH$DAY/$EXP_NAME/$EXP_NAME.$CLASS_ID.fits 298 $workdir = $workdir_template/$CAMERA/$YEAR$MONTH$DAY 299 # workdir examples: 300 # file://data/@HOST@.0/gpc1/20080130 301 # neb://gpc1/20080130 (need to supply volname?, or are we re-defining this each time?) 294 302 295 303 book setword pzPendingImfile $pageName filename $FILENAME 296 297 set.host.by.camera $CAMERA $CLASS_ID298 host anyhost299 304 300 305 # store the pageName with this job 301 306 options $pageName 302 options $ FILEROOT307 options $workdir 303 308 304 309 $run = dsget --uri $URI --filename $FILENAME --bytes $BYTES … … 330 335 # these are functions of (at least) EXP_TYPE and SURVEY_ID, both of which should come from the data store 331 336 337 # we saved the workdir so we can pass it to pztool 338 $workdir = $options:1 339 332 340 # update the database with the success 333 $run = pztool -copydone -exp_name $EXP_NAME -inst $CAMERA -telescope $TELESCOPE -class $CLASS -class_id $CLASS_ID -uri $FILENAME -workdir $options:1 341 # for the moment, let's not propagate these 342 $run = pztool -copydone -exp_name $EXP_NAME -inst $CAMERA -telescope $TELESCOPE -class $CLASS -class_id $CLASS_ID -uri $FILENAME -workdir $workdir -end_stage reg 334 343 # tess_id, dvodb, workdir, end_stage 335 344
Note:
See TracChangeset
for help on using the changeset viewer.
