Changeset 26236 for branches/eam_branches/20091113
- Timestamp:
- Nov 20, 2009, 4:13:39 PM (17 years ago)
- Location:
- branches/eam_branches/20091113
- Files:
-
- 3 deleted
- 67 edited
- 14 copied
-
DataStore/lib/DataStore/File.pm (modified) (2 diffs)
-
DataStore/lib/DataStore/FileSet.pm (modified) (2 diffs)
-
DataStore/lib/DataStore/Product.pm (modified) (2 diffs)
-
DataStore/lib/DataStore/Root.pm (modified) (2 diffs)
-
DataStore/scripts/dsfilesetls (modified) (3 diffs)
-
DataStore/scripts/dsget (modified) (5 diffs)
-
DataStore/scripts/dsgetfileset (modified) (4 diffs)
-
DataStore/scripts/dsleech (modified) (5 diffs)
-
DataStore/scripts/dsproductls (modified) (5 diffs)
-
DataStore/scripts/dsrootls (modified) (4 diffs)
-
DataStoreServer/scripts/dsprodtool (modified) (2 diffs)
-
Ohana/src/getstar/src/MatchCoords.c (modified) (1 diff)
-
PS-IPP-Config/lib/PS/IPP/Config.pm (modified) (2 diffs)
-
PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm (modified) (11 diffs)
-
archive/ducttape (modified) (1 prop)
-
catalyst (modified) (1 prop)
-
catalyst/2007.0-specs (modified) (1 prop)
-
catalyst/2008.0-specs (modified) (1 prop)
-
catalyst/2008.0-specs/hardened (modified) (1 prop)
-
dbconfig/changes.1.1.56 (deleted)
-
dbconfig/changes.txt (modified) (3 diffs)
-
dbconfig/config.md (modified) (1 diff)
-
doc/latex/html.sty (copied) (copied from trunk/doc/latex/html.sty )
-
doc/latex/panstarrs.cls (modified) (7 diffs)
-
doc/latex/panstarrs.def (modified) (6 diffs)
-
doc/latex/panstarrsl2h.def (copied) (copied from trunk/doc/latex/panstarrsl2h.def )
-
doc/latex/psmisc.sty (copied) (copied from trunk/doc/latex/psmisc.sty )
-
doc/latex/psreport.def (modified) (1 diff)
-
doc/latex/spec.def (copied) (copied from trunk/doc/latex/spec.def )
-
doc/manual/Makefile (copied) (copied from trunk/doc/manual/Makefile )
-
extperl/Attribute-Handlers-0.87.tar.gz (copied) (copied from trunk/extperl/Attribute-Handlers-0.87.tar.gz )
-
extperl/ExtUtils-CBuilder-0.27.tar.gz (copied) (copied from trunk/extperl/ExtUtils-CBuilder-0.27.tar.gz )
-
hardware (modified) (1 prop)
-
ippMonitor/def/chipProcessedImfile.d (modified) (1 diff)
-
ippScripts/scripts/dist_bundle.pl (modified) (3 diffs)
-
ippScripts/scripts/dist_make_fileset.pl (modified) (5 diffs)
-
ippScripts/scripts/magic_destreak_revert.pl (modified) (1 prop)
-
ippScripts/scripts/magic_tree.pl (modified) (2 diffs)
-
ippTasks/ipphosts.mhpcc.config (modified) (1 diff)
-
ippTasks/rcserver.pro (modified) (4 diffs)
-
ippTasks/site.mhpcc.pro (modified) (1 diff)
-
ippTests/tap (modified) (1 prop)
-
ippTools/configure.ac (modified) (3 diffs)
-
ippTools/share/Makefile.am (modified) (2 diffs)
-
ippTools/share/chiptool_processedimfile.sql (modified) (1 diff)
-
ippTools/share/difftool_definewarpstack_part1.sql (modified) (1 diff)
-
ippTools/share/difftool_inputskyfile.sql (modified) (4 diffs)
-
ippTools/share/disttool_definebyquery_camera.sql (modified) (1 diff)
-
ippTools/share/disttool_definebyquery_chip.sql (modified) (1 diff)
-
ippTools/share/disttool_definebyquery_diff.sql (modified) (1 diff)
-
ippTools/share/disttool_definebyquery_fake.sql (modified) (1 diff)
-
ippTools/share/disttool_definebyquery_raw.sql (modified) (1 diff)
-
ippTools/share/disttool_definebyquery_stack.sql (modified) (1 diff)
-
ippTools/share/disttool_definebyquery_warp.sql (modified) (1 diff)
-
ippTools/share/disttool_pendingfileset.sql (modified) (1 diff)
-
ippTools/share/disttool_updateinterest.sql (copied) (copied from trunk/ippTools/share/disttool_updateinterest.sql )
-
ippTools/share/pstamptool_revertjob.sql (modified) (1 diff)
-
ippTools/share/stacktool_definebyquery_part1.sql (deleted)
-
ippTools/share/stacktool_definebyquery_part2.sql (deleted)
-
ippTools/share/stacktool_definebyquery_select.sql (copied) (copied from trunk/ippTools/share/stacktool_definebyquery_select.sql )
-
ippTools/src/difftool.c (modified) (28 diffs)
-
ippTools/src/difftoolConfig.c (modified) (3 diffs)
-
ippTools/src/disttool.c (modified) (8 diffs)
-
ippTools/src/disttool.h (modified) (1 diff)
-
ippTools/src/disttoolConfig.c (modified) (3 diffs)
-
ippTools/src/faketool.c (modified) (2 diffs)
-
ippTools/src/faketoolConfig.c (modified) (1 diff)
-
ippTools/src/magictool.c (modified) (2 diffs)
-
ippTools/src/pstamptool.c (modified) (2 diffs)
-
ippTools/src/pxadmin.c (modified) (2 diffs)
-
ippTools/src/stacktool.c (modified) (4 diffs)
-
psconfig/tagsets/ipp-2.9.dist (modified) (1 diff)
-
psconfig/tagsets/ipp-2.9.perl (modified) (1 diff)
-
pstamp/scripts/pstamp_get_image_job.pl (modified) (4 diffs)
-
pstamp/scripts/pstamp_job_run.pl (modified) (1 diff)
-
pstamp/scripts/pstamp_parser_run.pl (modified) (2 diffs)
-
pstamp/scripts/pstampparse.pl (modified) (9 diffs)
-
pstamp/src/pstampdump.c (modified) (1 diff)
-
pstamp/test/byskycell.txt (modified) (2 diffs)
-
pstamp/test/getimage.txt (copied) (copied from trunk/pstamp/test/getimage.txt )
-
pstamp/test/ps1-0811001.txt (copied) (copied from trunk/pstamp/test/ps1-0811001.txt )
-
pstamp/test/ps1-0905001-all.txt (copied) (copied from trunk/pstamp/test/ps1-0905001-all.txt )
-
pstamp/test/ps1-0905001-diff.txt (copied) (copied from trunk/pstamp/test/ps1-0905001-diff.txt )
-
pstamp/test/ps1-0905001-warp.txt (copied) (copied from trunk/pstamp/test/ps1-0905001-warp.txt )
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20091113/DataStore/lib/DataStore/File.pm
r17552 r26236 233 233 optional => 1, 234 234 }, 235 no_proxy => { 236 type => SCALAR, 237 optional => 1, 238 }, 235 239 }, 236 240 ); … … 245 249 $ua = LWP::UserAgent->new; 246 250 } 251 252 # load proxy environment variables (if any) 253 if (!$p{no_proxy}) { 254 $ua->env_proxy; 255 } 256 247 257 my $request = HTTP::Request->new(GET => $self->uri); 248 258 my $filename = $p{filename}; -
branches/eam_branches/20091113/DataStore/lib/DataStore/FileSet.pm
r17637 r26236 189 189 { 190 190 ua_args => { 191 optional => 1, 192 }, 193 no_proxy => { 194 type => SCALAR, 191 195 optional => 1, 192 196 }, … … 201 205 $ua = LWP::UserAgent->new; 202 206 } 207 208 if (!$p{no_proxy}) { 209 # load proxy environment variables (if any) 210 $ua->env_proxy; 211 } 212 203 213 my $request = HTTP::Request->new(GET => $self->uri); 204 214 my $response = $ua->request($request); -
branches/eam_branches/20091113/DataStore/lib/DataStore/Product.pm
r17637 r26236 172 172 optional => 1, 173 173 }, 174 no_proxy => { 175 type => SCALAR, 176 optional => 1, 177 }, 174 178 }, 175 179 ); … … 182 186 $ua = LWP::UserAgent->new; 183 187 } 188 189 if (!$p{no_proxy}) { 190 # load proxy environment variables (if any) 191 $ua->env_proxy; 192 } 184 193 185 194 my $request; -
branches/eam_branches/20091113/DataStore/lib/DataStore/Root.pm
r17637 r26236 136 136 optional => 1, 137 137 }, 138 no_proxy => { 139 type => SCALAR, 140 optional => 1, 141 }, 138 142 }, 139 143 ); … … 145 149 } else { 146 150 $ua = LWP::UserAgent->new; 151 } 152 153 if (!$p{no_proxy}) { 154 # load proxy environment variables (if any) 155 $ua->env_proxy; 147 156 } 148 157 -
branches/eam_branches/20091113/DataStore/scripts/dsfilesetls
r17752 r26236 16 16 use Pod::Usage qw( pod2usage ); 17 17 18 my ($uri, $timeout );18 my ($uri, $timeout, $no_proxy); 19 19 20 20 GetOptions( 21 21 'uri|u=s' => \$uri, 22 22 'timeout|t=s' => \$timeout, 23 'no-proxy' => \$no_proxy, 23 24 ) or pod2usage( 2 ); 24 25 … … 31 32 # default http request timeout is 30s 32 33 $timeout ||= 30; 34 $no_proxy = 0 if !defined $no_proxy; 33 35 34 36 my $response = DataStore::FileSet->new( uri => $uri )->request( 35 37 ua_args => { timeout => $timeout }, 38 no_proxy => $no_proxy, 36 39 ); 37 40 … … 91 94 Optional. 92 95 96 =item * --no-proxy 97 98 Do not load proxy environment variables. 99 100 Optional. 101 93 102 =back 94 103 -
branches/eam_branches/20091113/DataStore/scripts/dsget
r25692 r26236 28 28 $timeout, 29 29 @xattrs, 30 $no_proxy, 30 31 ); 31 32 … … 44 45 'timeout|t=s' => \$timeout, 45 46 'xattr|x=s' => \@xattrs, 47 'no-proxy' => \$no_proxy, 46 48 ) or pod2usage( 2 ); 47 49 … … 80 82 # default http request timeout is 30s 81 83 $timeout ||= 30; 84 $no_proxy = 0 if !defined $no_proxy; 82 85 83 86 my %p = ( … … 140 143 filename => $tmpfilename, 141 144 ua_args => { timeout => $timeout }, 145 no_proxy => $no_proxy, 142 146 ); 143 147 … … 302 306 Optional. 303 307 308 =item * --no-proxy 309 310 Do not load proxy environment variables. 311 312 Optional. 313 304 314 =item * --copies <n> 305 315 -
branches/eam_branches/20091113/DataStore/scripts/dsgetfileset
r25574 r26236 17 17 use File::Basename qw( basename ); 18 18 19 my ($uri, $outdir, $timeout, $ verbose);19 my ($uri, $outdir, $timeout, $no_proxy, $verbose); 20 20 21 21 GetOptions( … … 23 23 'outdir|o=s' => \$outdir, 24 24 'timeout|t=s' => \$timeout, 25 'no-proxy' => \$no_proxy, 25 26 'verbose|v' => \$verbose, 26 27 ) or pod2usage( 2 ); … … 34 35 # default http request timeout is 30s 35 36 $timeout ||= 30; 37 $no_proxy = 0 if !defined $no_proxy; 36 38 37 39 my $response = DataStore::FileSet->new( uri => $uri )->request( 38 40 ua_args => { timeout => $timeout }, 41 no_proxy => $no_proxy, 39 42 ); 40 43 … … 117 120 Optional. 118 121 122 =item * --no-proxy 123 124 Do not load proxy environment variables. 125 126 Optional. 127 119 128 =back 120 129 -
branches/eam_branches/20091113/DataStore/scripts/dsleech
r17739 r26236 18 18 use Pod::Usage qw( pod2usage ); 19 19 20 my ($dir, $uri, $last_fileset, $overwrite, $recall, $remember, $verbose, $timeout );20 my ($dir, $uri, $last_fileset, $overwrite, $recall, $remember, $verbose, $timeout, $no_proxy); 21 21 22 22 GetOptions( … … 28 28 'remember' => \$remember, 29 29 'verbose|v' => \$verbose, 30 'timeout|t' => \$timeout, 30 'timeout|t=i' => \$timeout, 31 'no-proxy' => \$no_proxy, 31 32 ) or pod2usage( 2 ); 32 33 … … 39 40 # default http request timeout is 30s 40 41 $timeout ||= 30; 42 $no_proxy = 0 if !defined $no_proxy; 41 43 42 44 my %p = ( … … 65 67 my $response = DataStore::Product->new(%p)->request( 66 68 ua_args => { timeout => $timeout }, 69 no_proxy => $no_proxy, 67 70 ); 68 71 … … 281 284 Optional. 282 285 286 =item * --no-proxy 287 288 Do not load proxy environment variables. 289 290 Optional. 291 283 292 =back 284 293 -
branches/eam_branches/20091113/DataStore/scripts/dsproductls
r25631 r26236 16 16 use Pod::Usage qw( pod2usage ); 17 17 18 my ($uri, $last_fileset, $timeout, $extra );18 my ($uri, $last_fileset, $timeout, $extra, $no_proxy); 19 19 20 20 GetOptions( … … 22 22 'last_fileset|l=s' => \$last_fileset, 23 23 'timeout|t=s' => \$timeout, 24 'extra|e' => \$extra, 24 'extra|e' => \$extra, 25 'no-proxy' => \$no_proxy, 25 26 ) or pod2usage( 2 ); 26 27 … … 33 34 # default http request timeout is 30s 34 35 $timeout ||= 30; 36 $no_proxy = 0 if !defined $no_proxy; 35 37 36 38 my %p = ( … … 42 44 my $response = DataStore::Product->new(%p)->request( 43 45 ua_args => { timeout => $timeout }, 46 no_proxy => $no_proxy, 44 47 ); 45 48 … … 111 114 Optional. 112 115 116 =item * --no-proxy 117 118 Do not load proxy environment variables. 119 120 Optional. 121 113 122 =back 114 123 -
branches/eam_branches/20091113/DataStore/scripts/dsrootls
r17739 r26236 16 16 use Pod::Usage qw( pod2usage ); 17 17 18 my ($uri, $timeout );18 my ($uri, $timeout, $no_proxy); 19 19 20 20 GetOptions( 21 21 'uri|u=s' => \$uri, 22 'timeout|t' => \$timeout, 22 'timeout|t=i' => \$timeout, 23 'no-proxy' => \$no_proxy, 23 24 ) or pod2usage( 2 ); 24 25 … … 31 32 # default http request timeout is 30s 32 33 $timeout ||= 30; 34 $no_proxy = 0 if !defined $no_proxy; 33 35 34 36 my %p = ( … … 38 40 my $response = DataStore::Root->new(%p)->request( 39 41 ua_args => { timeout => $timeout }, 42 no_proxy => $no_proxy, 40 43 ); 41 44 … … 93 96 Optional. 94 97 98 =item * --no-proxy 99 100 Do not load proxy environment variables. 101 102 Optional. 103 95 104 =back 96 105 -
branches/eam_branches/20091113/DataStoreServer/scripts/dsprodtool
r25668 r26236 67 67 68 68 # will exit if neither or both -add and -del were specified 69 $err .= "Must specify either --add or --del.\n" 69 show_usage( "Must specify either --add or --del.") 70 70 unless $add xor $del; 71 71 … … 79 79 } 80 80 81 } els e{81 } elsif ($del) { 82 82 $product = $del; 83 83 if (! -t STDIN) { -
branches/eam_branches/20091113/Ohana/src/getstar/src/MatchCoords.c
r25208 r26236 55 55 } 56 56 57 #ifdef notdef 58 printf("%d %8.1f %8.1f %s\n", i, x, y, dbImages[i].name); 59 #endif 60 57 61 if ((x >= xmin && x <= xmax) && (y >= ymin && y <= ymax)) { 58 62 totalMatches++; -
branches/eam_branches/20091113/PS-IPP-Config/lib/PS/IPP/Config.pm
r26085 r26236 16 16 use File::Spec 0.87; 17 17 use File::Temp qw( tempfile ); 18 use IO::Handle;19 18 20 19 use PS::IPP::Metadata::Config 1.00; … … 696 695 print STDERR " redirect stdout to $filename succeded on try $try\n"; 697 696 } 698 # turn off buffering of output so that output from this script doesn't appear later699 # that output from execed programs700 STDOUT->autoflush(1);701 697 open STDERR, ">>$filename" or ( carp "failed to redirect stderr to $filename" and return undef ); 702 STDERR->autoflush(1);703 698 704 699 return 1; -
branches/eam_branches/20091113/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm
r25793 r26236 84 84 85 85 my $image = $results->[0]; 86 if ( ($img_type eq "raw") or ($img_type eq "chip")) {87 $req_type = "by exp";88 $id = $image->{exp_ name};86 if ($img_type eq "raw") { 87 $req_type = "byid"; 88 $id = $image->{exp_id}; 89 89 return undef if !$id; 90 # fall through and lookup byexp 90 # fall through and lookup byid 91 } elsif ($img_type eq "chip") { 92 $req_type = "byid"; 93 $id = $image->{chip_id}; 94 return undef if !$id; 95 # fall through and lookup byid 91 96 } elsif ($img_type eq "warp") { 92 97 $req_type = "byid"; … … 171 176 } 172 177 178 # note $magic_arg may be cleared below depending on $req_type 173 179 my $magic_arg = $need_magic ? " -destreaked" : ""; 180 174 181 my $component_args; 175 182 if ($img_type eq "raw") { … … 229 236 $command .= " $id_opt $id"; 230 237 $command .= $component_args if $component_args; 238 # don't include -destreaked if lookup is byid. Let pstampparse check so that the 239 # error code returned to the client for a given component is 'not destreaked' 240 # instead of 'not found' 241 $magic_arg = ""; 231 242 } elsif ($req_type eq "byexp") { 232 243 $command .= " -exp_name $id"; 233 244 $command .= $component_args if $component_args; 245 # don't include -destreaked if lookup is byexp. Let pstampparse check so that the error code gives 246 # the reason as 'not destreaked' 247 $magic_arg = ""; 234 248 } elsif ($req_type eq "byskycell") { 235 249 die "tess_id and component are required for byskycell" if !$tess_id or ! $skycell_id; … … 237 251 } elsif ($req_type eq "bycoord") { 238 252 $command .= " -radius 3.0 -ra $x -decl $y"; 253 if ($img_type ne "raw") { 254 $command .= " -tess_id $tess_id" if $tess_id; 255 $command .= " -skycell_id $skycell_id" if $skycell_id; 256 } 239 257 } else { 240 258 die "Unknown req_type supplied: $req_type"; … … 299 317 # (we do this here for raw stage) 300 318 $out->{image} = $image->{uri}; 319 301 320 if ($set_class_id) { 302 321 $class_id = $image->{class_id}; 303 322 $out->{component} = $class_id; 323 } else { 324 $out->{component} = $image->{skycell_id}; 304 325 } 305 326 my $stage_id; … … 307 328 $stage_id = $image->{exp_id}; 308 329 } elsif ($img_type eq "chip") { 309 $stage_id = $image->{chip };330 $stage_id = $image->{chip_id}; 310 331 } elsif ($img_type eq "warp") { 311 332 $stage_id = $image->{warp_id}; … … 315 336 $stage_id = $image->{stack_id}; 316 337 } 317 $ image->{stage_id} = $stage_id;318 $ image->{stage} = $img_type;319 $ image->{image_db} = $image_db;338 $out->{stage_id} = $stage_id; 339 $out->{stage} = $img_type; 340 $out->{image_db} = $image_db; 320 341 321 342 # find the mask and weight images … … 402 423 } 403 424 404 my ($warp_id, $exp_id, $exp_name );425 my ($warp_id, $exp_id, $exp_name, $chip_id, $cam_id); 405 426 if ($inverse and !$image->{bothways}) { 406 427 print STDERR "Inverse images requested for diffRun that is not bothways. Ignoring.\n"; … … 411 432 $exp_id = $image->{exp_id_2}; 412 433 $exp_name = $image->{exp_name_2}; 434 $chip_id = $image->{chip_id_2}; 435 $cam_id = $image->{cam_id_2}; 413 436 } else { 414 437 $warp_id = $image->{warp1}; 415 438 $exp_id = $image->{exp_id_1}; 416 439 $exp_name = $image->{exp_name_1}; 440 $chip_id = $image->{chip_id_1}; 441 $cam_id = $image->{cam_id_1}; 417 442 } 418 443 # XXX difftool currently returns max long long for null … … 422 447 $image->{exp_id} = $exp_id; 423 448 $image->{exp_name} = $exp_name; 449 $image->{chip_id} = $chip_id; 450 $image->{cam_id} = $cam_id; 424 451 } else { 425 452 print STDERR "unexpected result warp_id not defined\n"; … … 561 588 } 562 589 563 # If there are multiple cam runs for this exposure, take the last one 564 # assuming that it has the best astrometry 565 my $camdata = pop @$camruns; 590 # If there are multiple cam runs for this exposure, take the last completed one 591 # on the assumption that it has the best astrometry. 592 my $camdata; 593 while ($camdata = pop @$camruns) { 594 last if (($camdata->{quality} eq 0) and ($camdata->{fault} eq 0)); 595 } 566 596 if (!$camdata) { 567 597 # no cam runs for this exposure id therefore best astrometry is whatever is in the header -
branches/eam_branches/20091113/archive/ducttape
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/20091113/catalyst
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/20091113/catalyst/2007.0-specs
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/20091113/catalyst/2008.0-specs
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/20091113/catalyst/2008.0-specs/hardened
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/20091113/dbconfig/changes.txt
r26015 r26236 16 16 -- Version 1.1.22 --> 1.1.23 17 17 -- Adding support for reduction classes (which are used to specify recipes for parts of the pipeline). 18 #Adding 'reduction' to detRun19 #Renaming 'recipe' in {chip,cam}{Pending,Processed}Exp to 'reduction'18 -- Adding 'reduction' to detRun 19 -- Renaming 'recipe' in {chip,cam}{Pending,Processed}Exp to 'reduction' 20 20 21 21 alter table detRun add column reduction varchar(64) NULL DEFAULT NULL after exp_type; … … 82 82 alter table stackSumSkyfile add column hostname varchar(64) after dtime_stack; 83 83 84 #alter table warpSkyfile add column ( dtime_warp float, hostname varchar(64) );84 -- alter table warpSkyfile add column ( dtime_warp float, hostname varchar(64) ); 85 85 alter table warpSkyfile add column dtime_warp float after bg_stdev; 86 86 alter table warpSkyfile add column hostname varchar(64) after dtime_warp; … … 1424 1424 ALTER TABLE publishClient ADD COLUMN active TINYINT DEFAULT 0 AFTER client_id; 1425 1425 1426 #add outdir to allow spreading files over multiple hosts1426 -- add outdir to allow spreading files over multiple hosts 1427 1427 ALTER TABLE distRun ADD COLUMN outdir VARCHAR(255) AFTER outroot; 1428 1428 ALTER TABLE distComponent ADD COLUMN outdir VARCHAR(255) AFTER state; 1429 1429 1430 #populate the existing runs (except for bills' test runs)1430 -- populate the existing runs (except for bills' test runs) 1431 1431 UPDATE distRun SET outdir = CONCAT_WS('.', outroot, dist_id) WHERE outroot not like '%@HOST@%'; 1432 1432 UPDATE distRun join distComponent using(dist_id) SET distComponent.outdir = CONCAT_WS('.', distRun.outroot, dist_id); -
branches/eam_branches/20091113/dbconfig/config.md
r25835 r26236 2 2 pkg_name STR ippdb 3 3 pkg_namespace STR ippdb 4 pkg_version STR 1.1.5 64 pkg_version STR 1.1.57 5 5 END -
branches/eam_branches/20091113/doc/latex/panstarrs.cls
r26114 r26236 11 11 \NeedsTeXFormat{LaTeX2e} 12 12 \ProvidesClass{panstarrs}[2003/06/29 LaTeX class for PanSTARRS] 13 \LoadClass[12pt]{article} 14 \RequirePackage{tocloft,ifthen,fancyhdr,vmargin} 15 \RequirePackage{hyperref,times,amsmath,amssymb} 13 \LoadClass[11pt,letterpaper]{article} 14 \RequirePackage{tocloft,ifthen,fancyhdr,vmargin,longtable} 15 \RequirePackage{html} 16 \RequirePackage[colorlinks,ps2pdf,bookmarks=true,bookmarksnumbered=true,plainpages=false]{hyperref} %avoid ``destination with the same identifier'' errors 17 \RequirePackage{times,amsmath,amssymb,multirow} 16 18 \RequirePackage{color,fullpage,boxedminipage,acronym,epsfig} 19 \RequirePackage{psmisc} 20 \RequirePackage{fancyvrb} 17 21 18 22 % -- panstarrs definitions-- 19 23 \DeclareOption{panstarrs}{\input{panstarrs.def}} 24 \DeclareOption{spec}{\input{spec.def}} 20 25 21 26 % -- page layout options -- … … 29 34 \textheight=9.0in 30 35 \textwidth=7.35in 31 \headheight=1 2pt36 \headheight=15pt 32 37 \headsep = 24pt 33 38 \footskip=30pt … … 38 43 \addtolength{\cftfignumwidth}{2em} 39 44 40 % -- section numbering -- 41 \let\@section=\section \let\@subsection=\subsection 42 \let\@subsubsection=\subsubsection 43 \def\section{\renewcommand{\thefigure}{\thesection -\arabic{figure}} \setcounter{figure}{0} \@section} 44 \def\subsection{\renewcommand{\thefigure}{\thesubsection -\arabic{figure}} \setcounter{figure}{0} \@subsection} 45 \def\subsubsection{\renewcommand{\thefigure}{\thesubsubsection -\arabic{figure}} \setcounter{figure}{0} \@subsubsection} 46 \def\paragraph{\@startsection{paragraph}{4}{\z@}% 47 {-3.5ex\@plus -1ex \@minus -.2ex}% 48 {1.5ex \@plus .2ex}% 49 {\normalsize\bf}} 50 \def\subparagraph{\@startsection{subparagraph}{5}{\z@}% 51 {-3.5ex\@plus -1ex \@minus -.2ex}% 52 {1.5ex \@plus .2ex}% 53 {\normalsize\bf}} 54 \def\subsubparagraph{\@startsection{subsubparagraph}{6}{\z@}% 55 {-3.5ex\@plus -1ex \@minus -.2ex}% 56 {1.5ex \@plus .2ex}% 57 {\normalsize\it}} 58 \let\subsubsubsection=\paragraph 45 % % -- SRS section numbering / plain enumerate types -- 46 % \let\@section=\section 47 % \let\@subsection=\subsection 48 % \let\@subsubsection=\subsubsection 49 % 50 % \def\section{ 51 % % uncomment these to label figures by section number 52 % % \renewcommand{\thefigure}{\thesection -\arabic{figure}} 53 % % \setcounter{figure}{0} 54 % \@section 55 % } 56 % 57 % \def\subsection{ 58 % % uncomment these to label figures by section number 59 % % \renewcommand{\thefigure}{\thesubsection -\arabic{figure}} 60 % % \setcounter{figure}{0} 61 % \@subsection 62 % } 63 % 64 % \def\subsubsection{ 65 % % uncomment these to label figures by section number 66 % % \renewcommand{\thefigure}{\thesubsubsection -\arabic{figure}} 67 % % \setcounter{figure}{0} 68 % \@subsubsection 69 % } 70 % 71 % \def\paragraph{ 72 % \@startsection{paragraph}{4}{\z@}% 73 % {-3.5ex\@plus -1ex \@minus -.2ex}% 74 % {1.5ex \@plus .2ex}% 75 % {\normalsize\bf} 76 % } 77 % 78 % \def\subparagraph{ 79 % \@startsection{subparagraph}{5}{\z@}% 80 % {-3.5ex\@plus -1ex \@minus -.2ex}% 81 % {1.5ex \@plus .2ex}% 82 % {\normalsize\bf} 83 % } 84 % 85 % \def\subsubparagraph{ 86 % \@startsection{subsubparagraph}{6}{\z@}% 87 % {-3.5ex\@plus -1ex \@minus -.2ex}% 88 % {1.5ex \@plus .2ex}% 89 % {\normalsize\it} 90 % } 91 % 92 % \let\subsubsubsection=\paragraph 93 % \let\subsubsubsubsection=\subparagraph 94 59 95 60 96 % -- section display -- 61 \setcounter{secnumdepth}{ 4} % lowest level at which counters are displayed97 \setcounter{secnumdepth}{5} % lowest level at which counters are displayed 62 98 \setcounter{tocdepth}{3} % lowest level to be included in toc 63 99 … … 71 107 \newcommand\thesubtitle{} 72 108 \newcommand\thedistribution{Approved for Public Release -- Distribution is Unlimited} 109 \newcommand\theaudience{panstarrs team} 73 110 74 111 \newcommand{\docnumber}[1]{\renewcommand\thedocnumber{#1} } … … 80 117 \newcommand{\subtitle}[1]{ \renewcommand\thesubtitle{#1} } 81 118 \newcommand{\distribution}[1]{ \renewcommand\thedistribution{#1} } 119 \newcommand{\audience}[1]{ \renewcommand\theaudience{#1} } 120 121 %%%%%%%%%%%%%%%%%%%% start of time code %%%%%%%%%%%%%%%%%%%% 122 % 123 % Code for printing the time by Michael Doob <mdoob@cc.umanitoba.ca> 124 % 125 \newcount\hour \newcount\minute 126 \hour=\time \divide \hour by 60 127 \minute=\time 128 \loop \ifnum \minute > 59 \advance \minute by -60 \repeat 129 \def\nowtwelve{\ifnum \hour<13 \number\hour:% % supresses leading 0's 130 \ifnum \minute<10 0\fi% % so add it it 131 \number\minute 132 \ifnum \hour<12 \ A.M.\else \ P.M.\fi 133 \else \advance \hour by -12 \number\hour:% % supresses leading 0's 134 \ifnum \minute<10 0\fi% % add it in 135 \number\minute \ P.M.\fi} 136 \def\nowtwentyfour{\ifnum \hour<10 0\fi% % need a leading 0 137 \number\hour:% % supresses leading 0's 138 \ifnum \minute<10 0\fi% % add it in 139 \number\minute} 140 \def\now{\nowtwelve} 141 %%%%%%%%%%%%%%%%%%%% end of time code %%%%%%%%%%%%%%%%%%%% 142 82 143 83 144 % -- MAKETITLE -- … … 101 162 102 163 \def\@maketitle{ 103 \pagenumbering{roman}104 \thispagestyle{empty}105 \unitlength 1.0in106 \begin{picture}(0.0,0.0)(0.0,9.375)107 \small108 109 \put (7.50, 9.85){\makebox(0,0)[br]{\small {\bf Pan-STARRS Document Control}}}110 \put (7.50, 9.70){\makebox(0,0)[br]{\small {\bf \thedocnumber-\theversion}}}111 112 \put (4.006, 8.30){\line(1,0){0.1}} % put the macron on Manoa113 \put (0.50, 8.10){\makebox(0,0)[bl]{\fontA UNIVERSITY OF HAWAII AT MANOA}}114 \put (0.50, 7.88){\makebox(0,0)[bl]{\fontB Institute for Astrononmy}}115 116 \put (0.50, 7.83){\line(1,0){6.5}}117 \put (0.50, 7.63){\makebox(0,0)[bl]{\small {\bf Pan-STARRS Project Management System}}}118 119 \put (3.75, 5.25){\makebox(0,0)[bc]{\large {\bf \@title}}}120 \put (3.75, 5.00){\makebox(0,0)[bc]{\large {\bf \thesubtitle}}}121 122 \put (2.15, 4.75){\makebox(0,0)[l]{{\bf Grant AwardNo. }}}123 \put (2.15, 4.57){\makebox(0,0)[l]{{\bf Prepared For }}}124 \put (2.15, 4.39){\makebox(0,0)[l]{{\bf Prepared By }}}125 \put (2.15, 4.21){\makebox(0,0)[l]{{\bf Document No. }}}126 \put (2.15, 4.03){\makebox(0,0)[l]{{\bf Document Date }}}127 \put (2.15, 3.85){\makebox(0,0)[l]{{\bf Revision }}}128 129 \put (3.75, 4.75){\makebox(0,0)[l]{{\bf : F29601-02-1-0268}}}130 \put (3.75, 4.57){\makebox(0,0)[l]{{\bf : Pan-STARRS Team}}}131 \put (3.75, 4.39){\makebox(0,0)[l]{{\bf : \@author}}}132 \put (3.75, 4.21){\makebox(0,0)[l]{{\bf : \thedocnumber-\theversion}}}133 \put (3.75, 4.03){\makebox(0,0)[l]{{\bf : \today}}}134 \put (3.75, 3.85){\makebox(0,0)[l]{{\bf : \theversion}}}135 136 \put (3.75, 2.50){\makebox(0,0)[c]{{\bf DISTRIBUTION STATEMENT}}}137 \put (3.75, 2.30){\makebox(0,0)[c]{{\bf \thedistribution}}}138 139 \put (3.75, 1.30){\makebox(0,0)[bc]{\scriptsize {\bf\copyright Institute for Astronomy, University of Hawaii}}}140 \put (3.75, 1.15){\makebox(0,0)[bc]{\scriptsize {\bf2680 Woodlawn Drive, Honolulu, Hawaii 96822}}}141 \put (3.75, 1.00){\makebox(0,0)[bc]{\scriptsize {\bfAn Equal Opportunity/Affirmative Action Institution}}}142 \end{picture}143 144 \pagebreak145 \unitlength 1.0in146 \begin{picture}(0.0,0.0)(0.5,9.375)147 \small148 149 \put (1.00, 8.50){\makebox(0,0)[l]{Submitted By:}}150 \put (1.00, 8.00){\line(1,0){5.5}}151 \put (6.70, 8.00){\line(1,0){0.8}}152 \put (1.00, 7.90){\makebox(0,0)[l]{[Insert Signature Block of Authorized Developer Representative]}}153 \put (6.70, 7.90){\makebox(0,0)[l]{Date}}154 155 \put (1.00, 7.00){\makebox(0,0)[l]{Approved By:}}156 \put (1.00, 6.50){\line(1,0){5.5}}157 \put (6.70, 6.50){\line(1,0){0.8}}158 \put (1.00, 6.40){\makebox(0,0)[l]{[Insert Signature Block of Customer Developer Representative]}}159 \put (6.70, 6.40){\makebox(0,0)[l]{Date}}160 161 \end{picture}162 \pagebreak164 \pagenumbering{roman} 165 \thispagestyle{empty} 166 \unitlength 1.0in 167 \begin{picture}(0.0,0.0)(0.0,9.375) 168 \small 169 170 \put (7.50, 9.85){\makebox(0,0)[br]{\small {\bf Pan-STARRS Document Control}}} 171 \put (7.50, 9.70){\makebox(0,0)[br]{\small {\bf \thedocnumber-\theversion}}} 172 173 \put (4.006, 8.30){\line(1,0){0.1}} % put the macron on Manoa 174 \put (0.50, 8.10){\makebox(0,0)[bl]{\fontA UNIVERSITY OF HAWAII AT MANOA}} 175 \put (0.50, 7.88){\makebox(0,0)[bl]{\fontB Institute for Astrononmy}} 176 177 \put (0.50, 7.83){\line(1,0){6.5}} 178 \put (0.50, 7.63){\makebox(0,0)[bl]{\small {\bf Pan-STARRS Project Management System}}} 179 180 \put (3.75, 5.25){\makebox(0,0)[bc]{\large {\bf \@title}}} 181 \put (3.75, 5.00){\makebox(0,0)[bc]{\large {\bf \thesubtitle}}} 182 183 \put (2.15, 4.75){\makebox(0,0)[l]{{\bf Coop. Agreement No. }}} 184 \put (2.15, 4.57){\makebox(0,0)[l]{{\bf Prepared For }}} 185 \put (2.15, 4.39){\makebox(0,0)[l]{{\bf Prepared By }}} 186 \put (2.15, 4.21){\makebox(0,0)[l]{{\bf Document No. }}} 187 \put (2.15, 4.03){\makebox(0,0)[l]{{\bf Document Date }}} 188 \put (2.15, 3.85){\makebox(0,0)[l]{{\bf Revision }}} 189 190 \put (3.75, 4.75){\makebox(0,0)[l]{{\bf : FA9451-06-2-0338}}} 191 \put (3.75, 4.57){\makebox(0,0)[l]{{\bf : \theaudience}}} 192 \put (3.75, 4.39){\makebox(0,0)[l]{{\bf : \@author}}} 193 \put (3.75, 4.21){\makebox(0,0)[l]{{\bf : \thedocnumber-\theversion}}} 194 \put (3.75, 4.03){\makebox(0,0)[l]{{\bf : \today}}} 195 \put (3.75, 3.85){\makebox(0,0)[l]{{\bf : \theversion}}} 196 197 \put (3.75, 2.50){\makebox(0,0)[c]{{\bf DISTRIBUTION STATEMENT}}} 198 \put (3.75, 2.30){\makebox(0,0)[c]{{\bf \thedistribution}}} 199 200 \put (3.75, 1.30){\makebox(0,0)[bc]{\footnotesize {\copyright Institute for Astronomy, University of Hawaii}}} 201 \put (3.75, 1.15){\makebox(0,0)[bc]{\footnotesize {2680 Woodlawn Drive, Honolulu, Hawaii 96822}}} 202 \put (3.75, 1.00){\makebox(0,0)[bc]{\footnotesize {An Equal Opportunity/Affirmative Action Institution}}} 203 \end{picture} 204 205 \pagebreak 206 \unitlength 1.0in 207 \begin{picture}(0.0,0.0)(0.5,9.375) 208 \small 209 210 \put (1.00, 8.50){\makebox(0,0)[l]{Submitted By:}} 211 \put (1.00, 8.00){\line(1,0){5.5}} 212 \put (6.70, 8.00){\line(1,0){0.8}} 213 \put (1.00, 7.90){\makebox(0,0)[l]{[Insert Signature Block of Authorized Developer Representative]}} 214 \put (6.70, 7.90){\makebox(0,0)[l]{Date}} 215 216 \put (1.00, 7.00){\makebox(0,0)[l]{Approved By:}} 217 \put (1.00, 6.50){\line(1,0){5.5}} 218 \put (6.70, 6.50){\line(1,0){0.8}} 219 \put (1.00, 6.40){\makebox(0,0)[l]{[Insert Signature Block of Customer Developer Representative]}} 220 \put (6.70, 6.40){\makebox(0,0)[l]{Date}} 221 222 \end{picture} 223 \pagebreak 163 224 } 164 225 … … 174 235 % Make verbatim use a \footnotesize font (to allow 110-character lines) 175 236 \let\oldverbatim@font=\verbatim@font 176 \def\verbatim@font{\oldverbatim@font\ footnotesize}237 \def\verbatim@font{\oldverbatim@font\scriptsize} 177 238 178 239 \def\RevisionsStart{ -
branches/eam_branches/20091113/doc/latex/panstarrs.def
r26114 r26236 6 6 % LaTeX variables (cntl sequences) for entities significant to Pan-STARRS. 7 7 \newcommand{\PS}{Pan-STARRS} 8 \newcommand{\pipelinename}{Image Processing Pipeline}9 \newcommand{\thisdocument}{\PS/ \pipelinename\ Software Design Description}10 8 \newcommand\Object{\ensuremath{f}} % an object 11 9 \newcommand\ObjectSet{\ensuremath{\mathbf{f}}} % a set of objects … … 27 25 \newcommand\AngularPitch{\ensuremath{p_{\text{\scriptsize pixel}}}} % angular pitch of a pixel (e.g. 0.3 arcsec) 28 26 27 \def\degree{\hbox{$^\circ$}} 28 \def\arcmin{\hbox{$^\prime$}} 29 \def\arcsec{\hbox{$^{\prime\prime}$}} 30 29 31 % 30 32 % Typsetting documentation … … 37 39 % \begin{verbatim}...\end{verbatim} for longer blocks 38 40 % 41 39 42 \def\uncatcodespecials{\def\do##1{\catcode`##1=12}\dospecials}% 40 43 {\catcode`\`=\active\gdef`{\relax\lq}}% this line inhibits Spanish … … 44 47 \spaceskip=0pt \xspaceskip=0pt % just in case... 45 48 \catcode`\`=\active 46 \ obeylines \uncatcodespecials \obeyspaces49 \uncatcodespecials \obeyspaces 47 50 \catcode`\{=1\catcode`\}=2 48 51 }% … … 51 54 \spaceskip=0pt \xspaceskip=0pt % just in case... 52 55 \catcode`\`=\active 53 \ obeylines \uncatcodespecials \obeyspaces56 \uncatcodespecials \obeyspaces 54 57 }% 55 58 … … 60 63 \def\CODE{\begingroup\SETUPC@DE\D@CODE}% 61 64 62 \newcommand\note[1]{{\bf #1}} 63 \newcommand\tbd[1]{\textbf{[{\color{red}#1}]}} 65 \newcommand\note[1]{\textbf{\color{red}#1}} 66 %\newcommand\tbd[1]{\textbf{\color{red}#1 (TBD)}} 67 %\newcommand\tbr[1]{\textbf{\color{blue}#1 (TBR)}} 64 68 \newcommand\TBD[1]{\par\tbd{#1}\par} 69 \renewcommand\comment[1]{\footnote{{\color{red}#1}}} 65 70 66 71 \newcommand{\file}[1]{\textit{#1}}% 72 73 % 74 % embedded software function prototypes and datatypes 75 % 76 77 \DefineVerbatimEnvironment% 78 {prototype}{Verbatim}{fontsize=\footnotesize} 79 80 \DefineVerbatimEnvironment% 81 {datatype}{Verbatim}{fontsize=\footnotesize} 67 82 68 83 %------------------------------------------------------------------------------ -
branches/eam_branches/20091113/doc/latex/psreport.def
r26114 r26236 36 36 \put (3.75, 5.00){\makebox(0,0)[bc]{\Large {\bf \@title}}} 37 37 38 \put (3.75, 4.70){\makebox(0,0)[bc]{\small {\bf \@author}}} 39 \put (3.75, 4.53){\makebox(0,0)[bc]{\small {\bf \thegroup}}} 40 \put (3.75, 4.36){\makebox(0,0)[bc]{\small {\bf \theorganization}}} 41 \put (3.75, 4.19){\makebox(0,0)[bc]{\small {\bf \today}}} 38 % \put (3.75, 4.70){\makebox(0,0)[bc]{\small {\bf \@author}}} 39 % \put (3.75, 4.53){\makebox(0,0)[bc]{\small {\bf \thegroup}}} 40 % \put (3.75, 4.36){\makebox(0,0)[bc]{\small {\bf \theorganization}}} 41 % \put (3.75, 4.19){\makebox(0,0)[bc]{\small {\bf \today}}} 42 \put (3.75, 4.70){\makebox(0,0)[bc]{\normalsize {\bf \@author}}} 43 \put (3.75, 4.53){\makebox(0,0)[bc]{\normalsize {\bf \thegroup}}} 44 \put (3.75, 4.36){\makebox(0,0)[bc]{\normalsize {\bf \theorganization}}} 45 \put (3.75, 4.19){\makebox(0,0)[bc]{\normalsize {\bf \today}}} 46 42 47 43 48 \put (3.75, 1.26){\makebox(0,0)[bc]{\scriptsize {\bf \copyright Institute for Astronomy}}} -
branches/eam_branches/20091113/hardware
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/20091113/ippMonitor/def/chipProcessedImfile.d
r24867 r26236 39 39 FIELD rawExp.exp_time, 5, %.2f, exp_time 40 40 FIELD rawExp.airmass, 5, %.4f, airmass 41 FIELD chipProcessedImfile.quality, 5, %d, quality 41 42 FIELD chipProcessedImfile.bg, 5, %.2f, backgnd 42 43 FIELD chipProcessedImfile.bg_stdev, 5, %.2f, stdev -
branches/eam_branches/20091113/ippScripts/scripts/dist_bundle.pl
r26044 r26236 60 60 # Parse the command-line arguments 61 61 my ($camera, $stage, $stage_id, $component, $path_base, $chip_path_base, $clean); 62 my ($outdir, $run_state, $data_state, $magicked, $no_magic, $poor_quality, $results_file );62 my ($outdir, $run_state, $data_state, $magicked, $no_magic, $poor_quality, $results_file, $prefix); 63 63 my ($dbname, $save_temps, $verbose, $no_update, $logfile); 64 64 65 65 GetOptions( 66 'results_file=s' => \$results_file, # camera for evaluating file rules66 'results_file=s' => \$results_file, # ouptput file name for results 67 67 'camera=s' => \$camera, # camera for evaluating file rules 68 68 'stage=s' => \$stage, # raw, chip, warp, or diff … … 77 77 'magicked' => \$magicked, # magicked state for this component 78 78 'outdir=s' => \$outdir, # "directory" for outputs 79 'prefix=s' => \$prefix, # "prefix" to apply to filenames 79 80 'clean' => \$clean, # create clean distribution 80 81 'save-temps' => \$save_temps, # Save temporary files? … … 276 277 my $tbase = basename($path_base); 277 278 $tbase .= ".$component" if $component; 278 $file_name = "$tbase.tgz";279 $file_name = ($prefix ? $prefix : "") . "$tbase.tgz"; 279 280 my $tarfile = "$outdir/$file_name"; 280 281 -
branches/eam_branches/20091113/ippScripts/scripts/dist_make_fileset.pl
r26015 r26236 40 40 # Parse the command-line arguments 41 41 my ($dist_id, $dist_dir, $target_id, $stage, $stage_id, $dest_id, $product_name, $ds_dbhost, $ds_dbname); 42 my ($label, $d ist_group, $filter);42 my ($label, $data_group, $filter); 43 43 my ($dbname, $save_temps, $verbose, $no_update, $logfile); 44 44 … … 52 52 'product_name=s' => \$product_name, # location of the data store directory for this product 53 53 'label=s' => \$label, 54 'd ist_group=s' => \$dist_group,54 'data_group=s' => \$data_group, 55 55 'filter=s' => \$filter, 56 56 'ds_dbhost=s' => \$ds_dbhost, # database host for the datastore database … … 64 64 65 65 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 66 pod2usage( -msg => "Required options: --dist_id --dist_dir --target_id --stage --stage_id --d ist_group --filter --dest_id --ds_dbhost --ds_dbname",66 pod2usage( -msg => "Required options: --dist_id --dist_dir --target_id --stage --stage_id --data_group --filter --dest_id --ds_dbhost --ds_dbname", 67 67 -exitval => 3) unless 68 68 defined $dist_id and … … 71 71 defined $stage and 72 72 defined $stage_id and 73 defined $d ist_group and73 defined $data_group and 74 74 defined $filter and 75 75 defined $dest_id and … … 164 164 165 165 $command .= " --ps0 $target_id --ps1 $stage --ps2 $stage_id --ps3 $prod_col_3"; 166 $command .= " --ps4 $d ist_group --ps5 $filter";166 $command .= " --ps4 $data_group --ps5 $filter"; 167 167 168 168 $command .= " --dbname $ds_dbname --dbhost $ds_dbhost"; -
branches/eam_branches/20091113/ippScripts/scripts/magic_destreak_revert.pl
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/20091113/ippScripts/scripts/magic_tree.pl
r24174 r26236 158 158 159 159 # Relative coordinates of centre of the field 160 my $x = $naxis1 - $crpix1;161 my $y = $naxis2 - $crpix2;160 my $x = $naxis1/2 - $crpix1; 161 my $y = $naxis2/2 - $crpix2; 162 162 163 163 # Coordinates on tangent plane … … 168 168 169 169 # Coordinates on rotated celestial sphere 170 my $phi = atan2($eta,$xi) + pi/2; 171 my $theta = atan(180 / pi / sqrt($xi**2 + $eta**2)); 170 my ($phi, $theta); 171 if ($xi == 0 and $eta == 0) { 172 $phi = 0; 173 $eta = 0; 174 } else { 175 $phi = atan2($eta,$xi) + pi/2; 176 my $denominator = sqrt($xi**2 + $eta**2); 177 &my_die("denominator is zero!!", $magic_id, $PS_EXIT_PROG_ERROR) if $denominator == 0; 178 $theta = atan(180 / pi / $denominator); 179 } 172 180 173 181 # Coordinates on celestial sphere -
branches/eam_branches/20091113/ippTasks/ipphosts.mhpcc.config
r26015 r26236 15 15 sky08 STR ipp047 16 16 sky09 STR ipp015 17 sky10 STR ipp016 17 # sky10 STR ipp016 18 sky10 STR ipp042 18 19 sky11 STR ipp017 19 20 sky12 STR ipp018 -
branches/eam_branches/20091113/ippTasks/rcserver.pro
r26015 r26236 80 80 end 81 81 add_poll_args run 82 add_poll_labels run 82 83 command $run 83 84 end … … 129 130 book getword rcPendingFS $pageName stage -var STAGE 130 131 book getword rcPendingFS $pageName stage_id -var STAGE_ID 131 book getword rcPendingFS $pageName d ist_group -var DIST_GROUP132 book getword rcPendingFS $pageName data_group -var DATA_GROUP 132 133 book getword rcPendingFS $pageName filter -var FILTER 133 134 book getword rcPendingFS $pageName dist_dir -var DIST_DIR 134 # book getword rcPendingFS $pageName clean -var CLEAN135 135 book getword rcPendingFS $pageName dest_id -var DEST_ID 136 136 book getword rcPendingFS $pageName product_name -var PRODUCT_NAME … … 147 147 book setword rcPendingFS $pageName pantaskState RUN 148 148 149 $run = dist_make_fileset.pl --dist_id $DIST_ID --target_id $TARGET_ID --stage $STAGE --stage_id $STAGE_ID --d ist_group $DIST_GROUP --filter $FILTER --dest_id $DEST_ID --product_name $PRODUCT_NAME --ds_dbhost $DS_DBHOST --ds_dbname $DS_DBNAME --dist_dir $DIST_DIR149 $run = dist_make_fileset.pl --dist_id $DIST_ID --target_id $TARGET_ID --stage $STAGE --stage_id $STAGE_ID --data_group $DATA_GROUP --filter $FILTER --dest_id $DEST_ID --product_name $PRODUCT_NAME --ds_dbhost $DS_DBHOST --ds_dbname $DS_DBNAME --dist_dir $DIST_DIR 150 150 151 151 add_standard_args run … … 198 198 end 199 199 add_poll_args run 200 add_poll_labels run 200 201 command $run 201 202 end -
branches/eam_branches/20091113/ippTasks/site.mhpcc.pro
r25456 r26236 10 10 controller exit true 11 11 12 controller host add ipp014 12 # controller host add ipp014 13 controller host add ipp021 13 14 controller host add ipp015 14 15 controller host add ipp023 -
branches/eam_branches/20091113/ippTests/tap
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/20091113/ippTools/configure.ac
r25851 r26236 1 1 AC_PREREQ(2.61) 2 2 3 AC_INIT([ipptools], [1.1.5 6], [ipp-support@ifa.hawaii.edu])3 AC_INIT([ipptools], [1.1.57], [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.5 6])20 PKG_CHECK_MODULES([IPPDB], [ippdb >= 1.1.57]) 21 21 22 22 PXTOOLS_CFLAGS="${PSLIB_CFLAGS=} ${PSMODULES_CFLAGS=} ${IPPDB_CFLAGS=}" … … 59 59 60 60 IPPDB_VERSION=`$PKG_CONFIG --modversion ippdb` 61 AC_DEFINE_UNQUOTED(IPPDB_VERSION, $IPPDB_VERSION, [Version of ippdb])61 AC_DEFINE_UNQUOTED(IPPDB_VERSION, ["$IPPDB_VERSION"], [Version of ippdb]) 62 62 63 63 AC_CONFIG_FILES([ -
branches/eam_branches/20091113/ippTools/share/Makefile.am
r26089 r26236 138 138 disttool_revertfileset.sql \ 139 139 disttool_toadvance.sql \ 140 disttool_updateinterest.sql \ 140 141 disttool_updatercrun.sql \ 141 142 faketool_change_exp_state.sql \ … … 247 248 stacktool_definebyquery_insert_random_part1.sql \ 248 249 stacktool_definebyquery_insert_random_part2.sql \ 249 stacktool_definebyquery_part1.sql \ 250 stacktool_definebyquery_part2.sql \ 250 stacktool_definebyquery_select.sql \ 251 251 stacktool_definebyquery_test.sql \ 252 252 stacktool_donecleanup.sql \ -
branches/eam_branches/20091113/ippTools/share/chiptool_processedimfile.sql
r25791 r26236 10 10 chipProcessedImfile.magicked, 11 11 chipProcessedImfile.data_state, 12 chipProcessedImfile.fault, 13 chipProcessedImfile.quality, 12 14 chipRun.state, 13 15 chipRun.workdir, -
branches/eam_branches/20091113/ippTools/share/difftool_definewarpstack_part1.sql
r25516 r26236 25 25 JOIN chipRun USING(chip_id) 26 26 WHERE warp1 IS NOT NULL 27 AND warpRun.state = 'full' 28 -- warp where hook %s 27 29 ) AS diffExp USING(exp_id, warp_id) 28 30 WHERE -
branches/eam_branches/20091113/ippTools/share/difftool_inputskyfile.sql
r24677 r26236 27 27 JOIN chipRun 28 28 USING(chip_id) 29 JOIN chipProcessedImfile30 USING(chip_id)31 29 JOIN rawExp 32 ON chipRun.exp_id = rawExp.exp_id 33 WHERE 34 -- diffRun.state = 'new' AND 35 warpRun.state = 'full' 36 AND warpRun.state = 'full' 37 AND fakeRun.state = 'full' 38 AND camRun.state = 'full' 39 AND chipRun.state = 'full' 30 USING(exp_id) 40 31 -- where hook %s 41 32 UNION … … 67 58 JOIN chipRun 68 59 USING(chip_id) 69 JOIN chipProcessedImfile70 USING(chip_id)71 60 JOIN rawExp 72 ON chipRun.exp_id = rawExp.exp_id 73 WHERE 74 -- diffRun.state = 'new' AND 75 warpRun.state = 'full' 76 AND fakeRun.state = 'full' 77 AND camRun.state = 'full' 78 AND chipRun.state = 'full' 61 USING(exp_id) 79 62 -- where hook %s 80 63 UNION … … 107 90 USING(chip_id) 108 91 JOIN rawExp 109 ON chipRun.exp_id = rawExp.exp_id 110 WHERE 111 (diffRun.state = 'new' or diffRun.state = 'full') 92 USING(exp_id) 112 93 -- where hook %s 113 94 UNION … … 140 121 USING(chip_id) 141 122 JOIN rawExp 142 ON chipRun.exp_id = rawExp.exp_id 143 WHERE 144 (diffRun.state = 'new' or diffRun.state = 'full') 123 USING(exp_id) 145 124 -- where hook %s 146 125 ) as Foo 126 -- template where hook %s -
branches/eam_branches/20091113/ippTools/share/disttool_definebyquery_camera.sql
r25835 r26236 15 15 AND camRun.dist_group = distTarget.dist_group 16 16 JOIN rcInterest USING(target_id) 17 LEFT JOIN distRun ON distRun.stage = 'camera' 18 AND camRun.cam_id = distRun.stage_id 19 AND distRun.clean = distTarget.clean 17 LEFT JOIN distRun ON camRun.cam_id = distRun.stage_id 18 AND distRun.target_id = distTarget.target_id 20 19 -- JOIN hook %s 21 20 WHERE distTarget.state = 'enabled' -
branches/eam_branches/20091113/ippTools/share/disttool_definebyquery_chip.sql
r25835 r26236 14 14 AND rawExp.filter = distTarget.filter 15 15 JOIN rcInterest USING(target_id) 16 LEFT JOIN distRun ON distRun.stage = 'chip' 17 AND distRun.stage_id = chipRun.chip_id 18 AND distRun.clean = distTarget.clean 16 LEFT JOIN distRun ON distRun.stage_id = chipRun.chip_id 17 AND distRun.target_id = distTarget.target_id 19 18 -- JOIN hook %s 20 19 WHERE distTarget.state = 'enabled' -
branches/eam_branches/20091113/ippTools/share/disttool_definebyquery_diff.sql
r25835 r26236 16 16 JOIN rawExp USING(exp_id) 17 17 JOIN distTarget ON distTarget.stage = 'diff' 18 AND diffRun.dist_group = distTarget.dist_group19 18 AND distTarget.filter = rawExp.filter 19 AND distTarget.dist_group = diffRun.dist_group 20 20 JOIN rcInterest USING(target_id) 21 LEFT JOIN distRun ON distRun.stage = 'diff' AND(distRun.stage_id = diff_id)22 AND distRun.clean = distTarget.clean21 LEFT JOIN distRun ON (distRun.stage_id = diff_id) 22 AND distTarget.target_id = distRun.target_id 23 23 -- JOIN hook %s 24 24 WHERE distTarget.state = 'enabled' -
branches/eam_branches/20091113/ippTools/share/disttool_definebyquery_fake.sql
r25835 r26236 15 15 AND rawExp.filter = distTarget.filter 16 16 JOIN rcInterest USING(target_id) 17 LEFT JOIN distRun ON distRun.stage = 'fake' AND(distRun.stage_id = fake_id)18 AND distRun. clean = distTarget.clean17 LEFT JOIN distRun ON (distRun.stage_id = fake_id) 18 AND distRun.target_id = distTarget.target_id 19 19 WHERE distTarget.state = 'enabled' 20 20 AND rcInterest.state = 'enabled' -
branches/eam_branches/20091113/ippTools/share/disttool_definebyquery_raw.sql
r25835 r26236 13 13 AND rawExp.filter = distTarget.filter 14 14 JOIN rcInterest USING(target_id) 15 LEFT JOIN distRun ON distRun.stage = 'raw' AND distRun.stage_id = exp_id16 AND distRun. clean = distTarget.clean15 LEFT JOIN distRun ON distRun.stage_id = exp_id 16 AND distRun.target_id = distTarget.target_id 17 17 -- JOIN hook for magicked stuff %s 18 18 WHERE distTarget.state = 'enabled' -
branches/eam_branches/20091113/ippTools/share/disttool_definebyquery_stack.sql
r25835 r26236 15 15 AND stackRun.filter = distTarget.filter 16 16 JOIN rcInterest USING(target_id) 17 LEFT JOIN distRun ON distRun.stage = 'stack' AND(distRun.stage_id = stack_id)18 AND distRun. clean = distTarget.clean17 LEFT JOIN distRun ON (distRun.stage_id = stack_id) 18 AND distRun.target_id = distTarget.target_id 19 19 -- JOIN hook %s 20 20 WHERE distTarget.state = 'enabled' -
branches/eam_branches/20091113/ippTools/share/disttool_definebyquery_warp.sql
r25835 r26236 17 17 AND rawExp.filter = distTarget.filter 18 18 JOIN rcInterest USING(target_id) 19 LEFT JOIN distRun ON distRun.stage = 'warp' AND(distRun.stage_id = warp_id)20 AND distRun. clean = distTarget.clean19 LEFT JOIN distRun ON (distRun.stage_id = warp_id) 20 AND distRun.target_id = distTarget.target_id 21 21 WHERE distTarget.state = 'enabled' 22 22 AND rcInterest.state = 'enabled' -
branches/eam_branches/20091113/ippTools/share/disttool_pendingfileset.sql
r26092 r26236 5 5 distRun.outdir as dist_dir, 6 6 stage_id, 7 distTarget.dist_group, 7 -- we need to get data_group here but we don't have 8 -- the right tables joined. Perhaps we need to add that column to distRun 9 distRun.label as data_group, 8 10 distTarget.filter, 9 11 rcDestination.name AS product_name, -
branches/eam_branches/20091113/ippTools/share/pstamptool_revertjob.sql
r25547 r26236 4 4 WHERE pstampRequest.state = 'run' 5 5 AND pstampJob.state = 'run' 6 # do not revert faults >= 10 those are faults due to requestor errors 7 AND pstampJob.fault < 10 6 -- fault clause goes here %s -
branches/eam_branches/20091113/ippTools/src/difftool.c
r25851 r26236 95 95 MODECASE(DIFFTOOL_MODE_IMPORTRUN, importrunMode); 96 96 MODECASE(DIFFTOOL_MODE_TOCLEANEDSKYFILE, tocleanedskyfileMode); 97 MODECASE(DIFFTOOL_MODE_TOPURGEDSKYFILE, topurgedskyfileMode);98 MODECASE(DIFFTOOL_MODE_TOSCRUBBEDSKYFILE, toscrubbedskyfileMode);97 MODECASE(DIFFTOOL_MODE_TOPURGEDSKYFILE, topurgedskyfileMode); 98 MODECASE(DIFFTOOL_MODE_TOSCRUBBEDSKYFILE, toscrubbedskyfileMode); 99 99 100 100 default: … … 210 210 PXOPT_LOOKUP_STR(state, config->args, "-state", true, false); 211 211 PXOPT_LOOKUP_STR(label, config->args, "-label", false, false); 212 212 213 213 // Copy of my hacky work around from stacktool.c 214 214 if ((state)&&(diff_id)) { … … 383 383 } 384 384 385 psString whereClause = NULL;385 psString whereClause = psStringCopy(""); 386 386 if (psListLength(where->list)) { 387 387 whereClause = psDBGenerateWhereConditionSQL(where, NULL); 388 psStringPrepend(&whereClause, "\n AND");388 psStringPrepend(&whereClause, "\n WHERE "); 389 389 } 390 390 psFree(where); 391 391 392 392 // Add condition to get only templates or only inputs 393 psString templateClause = psStringCopy(""); 393 394 { 394 psString templateClause = NULL;395 395 if (template) { 396 psStringAppend(&templateClause, " %s", " template != 0");396 psStringAppend(&templateClause, "\n WHERE %s", " template != 0"); 397 397 } else if (input) { 398 psStringAppend(&templateClause, " %s", " template = 0"); 399 } 400 if (templateClause) { 401 psStringAppend(&whereClause, "\n AND %s", templateClause); 402 } 403 psFree(templateClause); 398 psStringAppend(&templateClause, "\n WHERE %s", " template = 0"); 399 } 404 400 } 405 401 … … 412 408 } 413 409 414 if (!p_psDBRunQueryF(config->dbh, query, whereClause, whereClause, whereClause, whereClause)) { 415 psError(PS_ERR_UNKNOWN, false, "database error"); 410 if (!p_psDBRunQueryF(config->dbh, query, whereClause, whereClause, whereClause, whereClause, templateClause)) { 411 psError(PS_ERR_UNKNOWN, false, "database error"); 412 psFree(templateClause); 416 413 psFree(whereClause); 417 414 psFree(query); 418 415 return false; 419 416 } 417 psFree(templateClause); 420 418 psFree(whereClause); 421 419 psFree(query); … … 816 814 psMetadata *where = psMetadataAlloc(); 817 815 PXOPT_COPY_S64(config->args, where, "-diff_id", "diffSkyfile.diff_id", "=="); 816 PXOPT_COPY_STR(config->args, where, "-skycell_id", "diffSkyfile.skycell_id", "=="); 818 817 PXOPT_COPY_STR(config->args, where, "-label", "diffRun.label", "=="); 819 818 PXOPT_COPY_S16(config->args, where, "-fault", "fault", "=="); … … 914 913 if (magicked) { 915 914 char *query = "UPDATE diffRun SET state = '%s', magicked = %" PRId64 " WHERE diff_id = %"PRId64; 916 915 917 916 if (!p_psDBRunQueryF(config->dbh, query, state, magicked, diff_id)) { 918 917 psError(PS_ERR_UNKNOWN, false, … … 923 922 else { 924 923 char *query = "UPDATE diffRun SET state = '%s' WHERE diff_id = %"PRId64; 925 924 926 925 if (!p_psDBRunQueryF(config->dbh, query, state, diff_id)) { 927 926 psError(PS_ERR_UNKNOWN, false, … … 930 929 } 931 930 } 932 931 933 932 return true; 934 933 } … … 948 947 if (!p_psDBRunQueryF(config->dbh,query,state,label)) { 949 948 psError(PS_ERR_UNKNOWN, false, 950 "failed to change state for label %s", label);949 "failed to change state for label %s", label); 951 950 return(false); 952 951 } … … 1138 1137 1139 1138 psMetadata *expWhere = psMetadataAlloc(); 1140 psMetadata *warpWhere = psMetadataAlloc(); 1139 psMetadata *warp1Where = psMetadataAlloc(); // First set of restrictions on warp 1140 psMetadata *warp2Where = psMetadataAlloc(); // Second set of restriction on warp 1141 1141 psMetadata *stackWhere = psMetadataAlloc(); 1142 1142 1143 1143 PXOPT_COPY_S64(config->args, expWhere, "-exp_id", "exp_id", "=="); 1144 1144 PXOPT_COPY_STR(config->args, expWhere, "-filter", "filter", "=="); 1145 PXOPT_COPY_S64(config->args, warpWhere, "-warp_id", "warpRun.warp_id", "=="); 1146 PXOPT_COPY_STR(config->args, warpWhere, "-skycell_id", "warpSkyfile.skycell_id", "=="); 1147 PXOPT_COPY_STR(config->args, warpWhere, "-tess_id", "warpRun.tess_id", "=="); 1148 PXOPT_COPY_STR(config->args, warpWhere, "-warp_label", "warpRun.label", "=="); 1149 PXOPT_COPY_F32(config->args, warpWhere, "-good_frac", "warpSkyfile.good_frac", ">="); 1145 PXOPT_COPY_S64(config->args, warp1Where, "-warp_id", "warpRun.warp_id", "=="); 1146 PXOPT_COPY_STR(config->args, warp1Where, "-warp_label", "warpRun.label", "=="); 1147 PXOPT_COPY_STR(config->args, warp1Where, "-tess_id", "warpRun.tess_id", "=="); 1148 PXOPT_COPY_S64(config->args, warp2Where, "-warp_id", "warpRun.warp_id", "=="); 1149 PXOPT_COPY_STR(config->args, warp2Where, "-tess_id", "warpRun.tess_id", "=="); 1150 PXOPT_COPY_STR(config->args, warp2Where, "-skycell_id", "warpSkyfile.skycell_id", "=="); 1151 PXOPT_COPY_STR(config->args, warp2Where, "-warp_label", "warpRun.label", "=="); 1152 PXOPT_COPY_F32(config->args, warp2Where, "-good_frac", "warpSkyfile.good_frac", ">="); 1150 1153 PXOPT_COPY_STR(config->args, stackWhere, "-stack_label", "stackRun.label", "=="); 1151 1154 … … 1171 1174 } 1172 1175 1173 psString warpQuery = NULL; 1176 psString warp1Query = NULL; 1177 psString warp2Query = NULL; 1174 1178 psString stackQuery = NULL; 1175 1179 psString expQuery = NULL; … … 1183 1187 } 1184 1188 psFree(expWhere); 1185 if (psListLength(warp Where->list)) {1186 psString whereClause = psDBGenerateWhereConditionSQL(warp Where, NULL);1187 psStringAppend(&warp Query, "\n AND %s", whereClause);1189 if (psListLength(warp1Where->list)) { 1190 psString whereClause = psDBGenerateWhereConditionSQL(warp1Where, NULL); 1191 psStringAppend(&warp1Query, "\n AND %s", whereClause); 1188 1192 psFree(whereClause); 1189 1193 } else { 1190 warpQuery = psStringCopy("\n"); 1191 } 1192 psFree(warpWhere); 1193 1194 if (!available) { 1195 // diff what's available, even if warp run has some faults and is incomplete 1196 psStringAppend(&warpQuery, " AND warpRun.state = 'full'"); 1197 } 1194 warp1Query = psStringCopy("\n"); 1195 } 1196 psFree(warp1Where); 1197 if (psListLength(warp2Where->list)) { 1198 psString whereClause = psDBGenerateWhereConditionSQL(warp2Where, NULL); 1199 psStringAppend(&warp2Query, "\n AND %s", whereClause); 1200 psFree(whereClause); 1201 } else { 1202 warp2Query = psStringCopy("\n"); 1203 } 1204 psFree(warp2Where); 1198 1205 1199 1206 // don't queue for exposures that have already been diff'd unless requested … … 1214 1221 psFree(stackWhere); 1215 1222 1216 psTrace("difftool", 1, query, warp Query, diffQuery, expQuery, stackQuery);1223 psTrace("difftool", 1, query, warp1Query, warp2Query, diffQuery, expQuery, stackQuery); 1217 1224 1218 1225 if (!psDBTransaction(config->dbh)) { … … 1221 1228 } 1222 1229 1223 if (!p_psDBRunQueryF(config->dbh, query, warp Query, expQuery, diffQuery)) {1230 if (!p_psDBRunQueryF(config->dbh, query, warp1Query, warp2Query, expQuery, diffQuery)) { 1224 1231 psError(PS_ERR_UNKNOWN, false, "database error"); 1225 1232 psFree(query); … … 1281 1288 return false; 1282 1289 } 1290 psFree(warp1Query); 1283 1291 psFree(query); 1284 1292 query = NULL; … … 1312 1320 if (!p_psDBRunQuery(config->dbh, "DELETE FROM skycellsToDiff")) { 1313 1321 psError(PS_ERR_UNKNOWN, false, "database error"); 1314 psFree(warp Query);1322 psFree(warp2Query); 1315 1323 psFree(stackQuery); 1316 1324 psFree(skycell_query); … … 1323 1331 if (!mdok) { 1324 1332 psError(PXTOOLS_ERR_PROG, false, "warp_id not found --- ignoring row %ld", i); 1325 psFree(warp Query);1333 psFree(warp2Query); 1326 1334 psFree(stackQuery); 1327 1335 psFree(skycell_query); … … 1334 1342 if (!mdok) { 1335 1343 psError(PXTOOLS_ERR_PROG, false, "skycell_count not found"); 1336 psFree(warp Query);1344 psFree(warp2Query); 1337 1345 psFree(stackQuery); 1338 1346 psFree(skycell_query); … … 1345 1353 if (!mdok) { 1346 1354 psError(PXTOOLS_ERR_PROG, false, "tess_id not found"); 1347 psFree(warp Query);1355 psFree(warp2Query); 1348 1356 psFree(stackQuery); 1349 1357 psFree(skycell_query); … … 1356 1364 if (!mdok) { 1357 1365 psError(PXTOOLS_ERR_PROG, false, "filter not found"); 1358 psFree(warp Query);1366 psFree(warp2Query); 1359 1367 psFree(stackQuery); 1360 1368 psFree(skycell_query); … … 1364 1372 return false; 1365 1373 } 1366 if (!p_psDBRunQueryF(config->dbh, skycell_query, stackQuery, warp_id, filter, warp Query)) {1367 psError(PS_ERR_UNKNOWN, false, "database error"); 1368 psFree(warp Query);1374 if (!p_psDBRunQueryF(config->dbh, skycell_query, stackQuery, warp_id, filter, warp2Query)) { 1375 psError(PS_ERR_UNKNOWN, false, "database error"); 1376 psFree(warp2Query); 1369 1377 psFree(stackQuery); 1370 1378 psFree(skycell_query); … … 1377 1385 1378 1386 if (num == 0) { 1379 psTrace("difftool", PS_LOG_INFO, "no skycells with stack found for %" PRId64, warp_id);1387 psTrace("difftool", PS_LOG_INFO, "no skycells with stack found for warp_id %" PRId64, warp_id); 1380 1388 continue; 1381 1389 } … … 1383 1391 if (!available && (num != skycell_count)) { 1384 1392 psTrace("difftool", PS_LOG_INFO, "%" PRId64 " skyfiles with stack found for warp_id %" PRId64 1385 " need %" PRId64, num, warp_id, skycell_count);1393 " but need %" PRId64, num, warp_id, skycell_count); 1386 1394 continue; 1387 1395 } … … 1418 1426 if (!p_psDBRunQuery(config->dbh, query)) { 1419 1427 psError(PS_ERR_UNKNOWN, false, "database error"); 1420 psFree(warp Query);1428 psFree(warp2Query); 1421 1429 psFree(stackQuery); 1422 1430 psFree(skycell_query); … … 1432 1440 if (!p_psDBRunQuery(config->dbh, query)) { 1433 1441 psError(PS_ERR_UNKNOWN, false, "database error"); 1434 psFree(warp Query);1442 psFree(warp2Query); 1435 1443 psFree(stackQuery); 1436 1444 psFree(skycell_query); … … 1447 1455 psError(PS_ERR_UNKNOWN, false, "failed to change diffRun.state for diff_id: %" PRId64, 1448 1456 run->diff_id); 1449 psFree(warp Query);1457 psFree(warp2Query); 1450 1458 psFree(stackQuery); 1451 1459 psFree(skycell_query); … … 1461 1469 } 1462 1470 psFree(output); 1463 psFree(warp Query);1471 psFree(warp2Query); 1464 1472 psFree(stackQuery); 1465 1473 psFree(skycell_query); … … 2062 2070 return(false); 2063 2071 } 2064 2072 2065 2073 return(true); 2066 2074 } -
branches/eam_branches/20091113/ippTools/src/difftoolConfig.c
r25840 r26236 155 155 psMetadata *revertdiffskyfileArgs = psMetadataAlloc(); 156 156 psMetadataAddS64(revertdiffskyfileArgs, PS_LIST_TAIL, "-diff_id", 0, "search by diff ID", 0); 157 psMetadataAddStr(revertdiffskyfileArgs, PS_LIST_TAIL, "-skycell_id", 0, "search by skycell_id", NULL); 157 158 psMetadataAddStr(revertdiffskyfileArgs, PS_LIST_TAIL, "-label", 0, "search by label", NULL); 158 159 psMetadataAddS16(revertdiffskyfileArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); … … 192 193 psMetadataAddBool(definewarpstackArgs, PS_LIST_TAIL, "-new-templates", 0, "also search for diffs with new template", false); 193 194 psMetadataAddBool(definewarpstackArgs, PS_LIST_TAIL, "-rerun", 0, "define new run even if one exists", false); 194 psMetadataAddBool(definewarpstackArgs, PS_LIST_TAIL, "-available", 0, "define new run even if warpRun has some faults", false);195 psMetadataAddBool(definewarpstackArgs, PS_LIST_TAIL, "-available", 0, "define new run even if no stacks available for some skycells", false); 195 196 psMetadataAddBool(definewarpstackArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); 196 197 psMetadataAddBool(definewarpstackArgs, PS_LIST_TAIL, "-pretend", 0, "list results but to not queue", false); … … 328 329 PXOPT_ADD_MODE("-topurgedskyfile", "set skyfile as purged", DIFFTOOL_MODE_TOPURGEDSKYFILE, topurgedskyfileArgs); 329 330 PXOPT_ADD_MODE("-toscrubbedskyfile", "set skyfile as scrubbed", DIFFTOOL_MODE_TOSCRUBBEDSKYFILE, toscrubbedskyfileArgs); 330 331 331 332 if (!pxGetOptions(stderr, argc, argv, config, modes, argSets)) { 332 333 psError(PS_ERR_UNKNOWN, true, "option parsing failed"); -
branches/eam_branches/20091113/ippTools/src/disttool.c
r26095 r26236 52 52 static bool definetargetMode(pxConfig *config); 53 53 static bool updatetargetMode(pxConfig *config); 54 static bool listtarget Mode(pxConfig *config);54 static bool listtargetsMode(pxConfig *config); 55 55 56 56 static bool definedestinationMode(pxConfig *config); … … 100 100 MODECASE(DISTTOOL_MODE_DEFINETARGET, definetargetMode); 101 101 MODECASE(DISTTOOL_MODE_UPDATETARGET, updatetargetMode); 102 MODECASE(DISTTOOL_MODE_LISTTARGET , listtargetMode);102 MODECASE(DISTTOOL_MODE_LISTTARGETS, listtargetsMode); 103 103 MODECASE(DISTTOOL_MODE_DEFINEDESTINATION, definedestinationMode); 104 104 MODECASE(DISTTOOL_MODE_UPDATEDESTINATION, updatedestinationMode); … … 1311 1311 } 1312 1312 1313 static bool listtarget Mode(pxConfig *config)1313 static bool listtargetsMode(pxConfig *config) 1314 1314 { 1315 1315 PS_ASSERT_PTR_NON_NULL(config, false); … … 1551 1551 PXOPT_COPY_STR(config->args, where, "-dist_group", "dist_group", "LIKE"); 1552 1552 PXOPT_COPY_STR(config->args, where, "-filter", "filter", "LIKE"); 1553 PXOPT_COPY_STR(config->args, where, "-stage", "stage", "=="); 1553 // if stage is all don't add it to the query (match all stages) 1554 if (stage && strcmp(stage, "all")) { 1555 PXOPT_COPY_STR(config->args, where, "-stage", "stage", "=="); 1556 } 1554 1557 1555 1558 psString query = pxDataGet("disttool_defineinterest.sql"); … … 1611 1614 PXOPT_COPY_S64(config->args, where, "-dest_id", "dest_id", "=="); 1612 1615 PXOPT_COPY_S64(config->args, where, "-target_id", "target_id", "=="); 1616 PXOPT_COPY_STR(config->args, where, "-dest_name", "rcDestination.name", "LIKE"); 1617 PXOPT_COPY_STR(config->args, where, "-filter", "filter", "LIKE"); 1618 PXOPT_COPY_STR(config->args, where, "-dist_group", "dist_group", "LIKE"); 1613 1619 1614 1620 PXOPT_LOOKUP_STR(state, config->args, "-set_state", false, false); … … 1618 1624 return false; 1619 1625 } 1620 psString query = NULL; 1621 psStringAppend(&query, "UPDATE rcInterest SET state = '%s'", state); 1626 psString query = pxDataGet("disttool_updateinterest.sql"); 1622 1627 1623 1628 if (psListLength(where->list)) { … … 1633 1638 psFree(where); 1634 1639 1635 if (!p_psDBRunQuery (config->dbh, query)) {1640 if (!p_psDBRunQueryF(config->dbh, query, state)) { 1636 1641 psError(PS_ERR_UNKNOWN, false, "database error"); 1637 1642 psFree(query); … … 1639 1644 } 1640 1645 psFree(query); 1646 1647 psS64 numUpdated = psDBAffectedRows(config->dbh); 1648 printf("updated %" PRId64 " interests\n", numUpdated); 1641 1649 1642 1650 return true; -
branches/eam_branches/20091113/ippTools/src/disttool.h
r26088 r26236 47 47 DISTTOOL_MODE_DEFINETARGET, 48 48 DISTTOOL_MODE_UPDATETARGET, 49 DISTTOOL_MODE_LISTTARGET ,49 DISTTOOL_MODE_LISTTARGETS, 50 50 DISTTOOL_MODE_DEFINEINTEREST, 51 51 DISTTOOL_MODE_UPDATEINTEREST, -
branches/eam_branches/20091113/ippTools/src/disttoolConfig.c
r26095 r26236 263 263 psMetadataAddStr(updatetargetArgs, PS_LIST_TAIL, "-set_state", 0, "define new state", NULL); 264 264 265 // -listtarget 266 psMetadata *listtarget Args = psMetadataAlloc();267 psMetadataAddS64(listtarget Args, PS_LIST_TAIL, "-target_id", 0, "list target with target_id", 0);268 psMetadataAddStr(listtarget Args, PS_LIST_TAIL, "-dist_group", 0, "list targets for dist_group", NULL);269 psMetadataAddStr(listtarget Args, PS_LIST_TAIL, "-filter", 0, "define filter", NULL);270 psMetadataAddStr(listtarget Args, PS_LIST_TAIL, "-stage", 0, "list targets for stage", NULL);271 psMetadataAddBool(listtarget Args, PS_LIST_TAIL,"-clean", 0, "list clean targets", false);272 psMetadataAddBool(listtarget Args, PS_LIST_TAIL,"-full", 0, "list full targets", false);273 psMetadataAddStr(listtarget Args, PS_LIST_TAIL, "-state", 0, "list targets in state", NULL);274 psMetadataAddU64(listtarget Args, PS_LIST_TAIL, "-limit", 0, "limit number of targets listed to N", 0);275 psMetadataAddBool(listtarget Args, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false);265 // -listtargets 266 psMetadata *listtargetsArgs = psMetadataAlloc(); 267 psMetadataAddS64(listtargetsArgs, PS_LIST_TAIL, "-target_id", 0, "list target with target_id", 0); 268 psMetadataAddStr(listtargetsArgs, PS_LIST_TAIL, "-dist_group", 0, "list targets for dist_group", NULL); 269 psMetadataAddStr(listtargetsArgs, PS_LIST_TAIL, "-filter", 0, "define filter", NULL); 270 psMetadataAddStr(listtargetsArgs, PS_LIST_TAIL, "-stage", 0, "list targets for stage", NULL); 271 psMetadataAddBool(listtargetsArgs, PS_LIST_TAIL,"-clean", 0, "list clean targets", false); 272 psMetadataAddBool(listtargetsArgs, PS_LIST_TAIL,"-full", 0, "list full targets", false); 273 psMetadataAddStr(listtargetsArgs, PS_LIST_TAIL, "-state", 0, "list targets in state", NULL); 274 psMetadataAddU64(listtargetsArgs, PS_LIST_TAIL, "-limit", 0, "limit number of targets listed to N", 0); 275 psMetadataAddBool(listtargetsArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); 276 276 277 277 // -defineinterest … … 293 293 psMetadataAddS64(updateinterestArgs, PS_LIST_TAIL, "-target_id", 0, "define target_id", 0); 294 294 psMetadataAddStr(updateinterestArgs, PS_LIST_TAIL, "-set_state", 0, "define state (required)", NULL); 295 psMetadataAddStr(updateinterestArgs, PS_LIST_TAIL, "-filter", 0, "define filter (LIKE comparison)", NULL); 296 psMetadataAddStr(updateinterestArgs, PS_LIST_TAIL, "-dest_name", 0, "define destination name", NULL); 297 psMetadataAddStr(updateinterestArgs, PS_LIST_TAIL, "-dist_group", 0, "define distribution group", NULL); 295 298 296 299 // -listinterests … … 337 340 PXOPT_ADD_MODE("-definetarget", "", DISTTOOL_MODE_DEFINETARGET, definetargetArgs); 338 341 PXOPT_ADD_MODE("-updatetarget", "", DISTTOOL_MODE_UPDATETARGET, updatetargetArgs); 339 PXOPT_ADD_MODE("-listtarget ", "", DISTTOOL_MODE_LISTTARGET, listtargetArgs);342 PXOPT_ADD_MODE("-listtargets", "", DISTTOOL_MODE_LISTTARGETS, listtargetsArgs); 340 343 341 344 PXOPT_ADD_MODE("-defineinterest", "", DISTTOOL_MODE_DEFINEINTEREST, defineinterestArgs); -
branches/eam_branches/20091113/ippTools/src/faketool.c
r25935 r26236 92 92 MODECASE(FAKETOOL_MODE_TOFULLIMFILE, tofullimfileMode); 93 93 MODECASE(FAKETOOL_MODE_TOPURGEDIMFILE, topurgedimfileMode); 94 MODECASE(FAKETOOL_MODE_TOSCRUBBEDIMFILE, toscrubbedimfileMode);94 MODECASE(FAKETOOL_MODE_TOSCRUBBEDIMFILE, toscrubbedimfileMode); 95 95 MODECASE(FAKETOOL_MODE_EXPORTRUN, exportrunMode); 96 96 MODECASE(FAKETOOL_MODE_IMPORTRUN, importrunMode); … … 123 123 124 124 psMetadata *where = psMetadataAlloc(); 125 PXOPT_COPY_S64(config->args, where, "-cam_id", "cam_id", "=="); 126 PXOPT_COPY_S64(config->args, where, "-chip_id", "chip_id", "=="); 125 127 PXOPT_COPY_S64(config->args, where, "-exp_id", "exp_id", "=="); 126 128 PXOPT_COPY_STR(config->args, where, "-exp_name", "exp_name", "=="); -
branches/eam_branches/20091113/ippTools/src/faketoolConfig.c
r25840 r26236 47 47 psMetadata *queueArgs = psMetadataAlloc(); 48 48 // XXX need to allow multiple exp_ids 49 psMetadataAddS64(queueArgs, PS_LIST_TAIL, "-cam_id", 0, "search by cam_id", 0); 50 psMetadataAddS64(queueArgs, PS_LIST_TAIL, "-chip_id", 0, "search by chip_id", 0); 49 51 psMetadataAddS64(queueArgs, PS_LIST_TAIL, "-exp_id", 0, "search by exp_id", 0); 50 52 psMetadataAddStr(queueArgs, PS_LIST_TAIL, "-exp_name", 0, "search by exp_name", NULL); -
branches/eam_branches/20091113/ippTools/src/magictool.c
r26039 r26236 580 580 581 581 if (fault > 0) { 582 char *query = "UPDATE magicRun SET fault = %d , state = 'full'WHERE magic_id = %" PRId64;582 char *query = "UPDATE magicRun SET fault = %d WHERE magic_id = %" PRId64; 583 583 if (!p_psDBRunQueryF(config->dbh, query, fault, magic_id)) { 584 584 psError(PS_ERR_UNKNOWN, false, … … 930 930 psAbort("failed to lookup value for magic_id column"); 931 931 } 932 932 933 933 whereString = NULL; 934 934 psStringAppend(&whereString, "\nAND (magic_id = %" PRId64 ")", magic_id); -
branches/eam_branches/20091113/ippTools/src/pstamptool.c
r25793 r26236 774 774 PXOPT_COPY_S64(config->args, where, "-fault", "fault", "=="); 775 775 PXOPT_COPY_S64(config->args, where, "-req_id_min", "req_id", ">="); 776 776 777 PXOPT_LOOKUP_BOOL(all, config->args, "-all", false); 777 778 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); 779 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 780 781 // By default only revert faults < 10 which are our "ipp exit codes" 782 // codes larger than that are the pstamp request interface. 783 // Don't fault those unless -fault waa provided 784 psString faultClause = ""; 785 if (!fault) { 786 faultClause = " \nAND (pstampJob.fault < 10)"; 787 } 778 788 779 789 psString query = pxDataGet("pstamptool_revertjob.sql"); … … 790 800 psFree(where); 791 801 792 if (!p_psDBRunQuery (config->dbh, query)) {802 if (!p_psDBRunQueryF(config->dbh, query, faultClause)) { 793 803 psError(PS_ERR_UNKNOWN, false, "database error"); 794 804 return false; -
branches/eam_branches/20091113/ippTools/src/pxadmin.c
r25851 r26236 114 114 psFree(query); 115 115 116 if (!insert_dbversion(config, PACKAGE_VERSION)) {116 if (!insert_dbversion(config, IPPDB_VERSION)) { 117 117 psError(PS_ERR_UNKNOWN, false, "failed to set database version"); 118 118 return false; … … 155 155 psFree(query); 156 156 157 if (!insert_dbversion(config, PACKAGE_VERSION)) {157 if (!insert_dbversion(config, IPPDB_VERSION)) { 158 158 psError(PS_ERR_UNKNOWN, false, "failed to set database version"); 159 159 return false; -
branches/eam_branches/20091113/ippTools/src/stacktool.c
r25935 r26236 150 150 PXOPT_COPY_F32(config->args, where, "-select_iq_m4_min", "camProcessedExp.iq_m4", ">="); 151 151 PXOPT_COPY_F32(config->args, where, "-select_iq_m4_max", "camProcessedExp.iq_m4", "<="); 152 152 153 153 PXOPT_COPY_STR(config->args, where, "-select_exp_type", "rawExp.exp_type", "=="); 154 154 PXOPT_COPY_F32(config->args, where, "-select_good_frac_min", "warpSkyfile.good_frac", ">="); … … 173 173 } 174 174 175 psString select = pxDataGet("stacktool_definebyquery_ part1.sql");175 psString select = pxDataGet("stacktool_definebyquery_select.sql"); 176 176 if (!select) { 177 177 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); … … 179 179 } 180 180 181 psString where1 = psStringCopy(""); 181 182 if (psListLength(where->list)) { 182 183 psString whereClause = psDBGenerateWhereConditionSQL(where, NULL); 183 psStringAppend(& select, "AND %s", whereClause);184 psStringAppend(&where1, "\nAND %s", whereClause); 184 185 psFree(whereClause); 185 186 } 186 187 187 psString groupby = pxDataGet("stacktool_definebyquery_part2.sql"); 188 if (!groupby) { 189 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 190 psFree(where); 191 return false; 192 } 193 psStringAppend(&select, " %s", groupby); 194 psFree(groupby); 188 psString where2 = psStringCopy(""); 189 if (label) { 190 psStringAppend(&where2, "\nWHERE stackRun.label = '%s'", label); 191 } 195 192 196 193 // Restriction on aggregated quantities using HAVING … … 224 221 psFree(having); 225 222 226 if (!p_psDBRunQuery (config->dbh, select)) {223 if (!p_psDBRunQueryF(config->dbh, select, where1, where2)) { 227 224 psError(PS_ERR_UNKNOWN, false, "database error"); 228 225 psFree(select); 229 psFree(where); 226 psFree(where1); 227 psFree(where2); 230 228 return false; 231 229 } 232 230 psFree(select); 231 psFree(where1); 232 psFree(where2); 233 233 234 234 psArray *output = p_psDBFetchResult(config->dbh); -
branches/eam_branches/20091113/psconfig/tagsets/ipp-2.9.dist
r25923 r26236 69 69 YNYYN ippMonitor ipp-2-9 -0 70 70 YYYYY DataStore ipp-2-9 -0 71 YYYYY DataStoreServer ipp-2-9 -0 71 72 72 73 YYYYY ppTranslate ipp-2-9 -0 -
branches/eam_branches/20091113/psconfig/tagsets/ipp-2.9.perl
r25894 r26236 31 31 26 HTML::Parser HTML-Parser-3.56.tar.gz 0 32 32 27 Digest::MD5 Digest-MD5-2.36.tar.gz 0 33 28 Net::FTP libnet-1.19.tar.gz 0 33 28 Net::FTP libnet-1.19.tar.gz 0 n 34 34 29 Compress::Zlib Compress-Zlib-2.003.tar.gz 0 35 35 30 Locale::Maketext::Simple Locale-Maketext-Simple-0.18.tar.gz 0 -
branches/eam_branches/20091113/pstamp/scripts/pstamp_get_image_job.pl
r20220 r26236 16 16 use File::Basename; 17 17 use Digest::MD5::File qw( file_md5_hex ); 18 use IPC::Cmd 0.36 qw( can_run run ); 18 19 19 use PS::IPP::Config qw($PS_EXIT_SUCCESS 20 $PS_EXIT_UNKNOWN_ERROR 21 $PS_EXIT_SYS_ERROR 22 $PS_EXIT_CONFIG_ERROR 23 $PS_EXIT_PROG_ERROR 24 $PS_EXIT_DATA_ERROR 25 $PS_EXIT_TIMEOUT_ERROR 26 metadataLookupStr 27 metadataLookupBool 28 caturi 29 ); 20 21 use PS::IPP::Config qw( :standard ); 22 30 23 my $product; 31 24 my $fileset; 32 25 33 my $uri; 34 my $out_dir; 26 my $output_base; 35 27 36 my $verbose = 1;28 my $verbose; 37 29 my $ipprc; 38 30 my $dbname; 31 my $dbserver; 39 32 my $job_id; 40 33 my $rownum; … … 47 40 'job_id=s' => \$job_id, 48 41 'rownum=s' => \$rownum, 49 'uri=s' => \$uri, 50 'out_dir=s' => \$out_dir, 42 'output_base=s' => \$output_base, 51 43 'dbname=s' => \$dbname, 44 'dbserver=s' => \$dbserver, 45 'verbose' => \$verbose, 52 46 ) or pod2usage(2); 53 47 … … 55 49 $err .= "--job_id is required\n" if (!$job_id); 56 50 $err .= "--rownum is required\n" if (!$rownum); 57 $err .= "--uri is required to specify the file list\n" if (!$uri); 58 $err .= "--out_dir is required to specify the output fileset\n" if (!$out_dir); 51 $err .= "--output_base is required to specify the output fileset\n" if (!$output_base); 59 52 60 die $errif $err;53 my_die( $err, $PS_EXIT_PROG_ERROR) if $err; 61 54 62 # collapse any multiple slashes in output_dir 63 $out_dir = File::Spec->canonpath($out_dir); 55 my $params_file = $output_base . ".mdc"; 56 if (! open(INPUT, "<$params_file") ) { 57 my_die("failed to open params file: $params_file", $PS_EXIT_UNKNOWN_ERROR); 58 } 64 59 65 my @path = split(/\//, $out_dir);60 my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files 66 61 67 my $nelem = @path; 68 if ($nelem < 2) { 69 die("$out_dir is not a valid output fileset directory"); 62 my $data = $mdcParser->parse(join "", (<INPUT>)) or my_die("failed to parse metadata config doc", $PS_EXIT_UNKNOWN_ERROR); 63 my $components = parse_md_list($data); 64 my $n = scalar @$components; 65 if ($n != 1) { 66 my_die("params file $params_file contains unexpected number of components: $n", $PS_EXIT_PROG_ERROR); 70 67 } 71 $fileset = $path[$nelem-1]; 72 $product = $path[$nelem-2]; 73 74 $_ = $out_dir; 75 my ($ds_dir) = m%(.*)/$product/$fileset%; 68 my $comp = $components->[0]; 69 my $stage = $comp->{stage}; 70 my $stage_id = $comp->{stage_id}; 71 my $component = $comp->{component}; 72 my $path_base = $comp->{path_base}; 73 my $camera = $comp->{camera}; 74 my $magicked = $comp->{magicked}; 76 75 77 76 if ($verbose) { 78 print STDERR "DS root: $ds_dir\n"; 79 print STDERR "Product: $product\n"; 80 print STDERR "Fileset: $fileset\n"; 81 print STDERR "Filelist: $uri\n"; 77 print STDERR "\nstage is $stage\n"; 78 print STDERR "stage_id is $stage_id\n"; 79 print STDERR "path_base is $path_base\n"; 80 print STDERR "path_base is $path_base\n"; 81 print STDERR "CAMERA is $camera\n"; 82 print STDERR "magicked is " . (defined $magicked ? $magicked : "undefined") . "\n"; 82 83 } 83 84 84 85 if (!stat("$ds_dir/index.txt")) { 86 $err .= "Data Store not found at '$ds_dir'.\n" 85 if (!$camera or !$path_base or !$component or !$stage_id or !$stage) { 86 my_die("failed to parse params from: $params_file", $PS_EXIT_UNKNOWN_ERROR); 87 87 } 88 88 89 show_usage("Invalid product '$product'.") 90 unless defined stat("$ds_dir/$product/index.txt"); 89 my $out_dir = dirname($output_base); 90 my $prefix = basename($output_base) . "_"; 91 my $results_file = $output_base . ".bundle_results"; 91 92 92 if (! open(INPUT, "<$uri") ) { 93 die("failed to open file list: $uri"); 93 # Look for programs we need 94 my $missing_tools; 95 my $dist_bundle = can_run('dist_bundle.pl') or (warn "Can't find dist_bundle.pl" and $missing_tools = 1); 96 if ($missing_tools) { 97 warn("Can't find required tools."); 98 exit($PS_EXIT_CONFIG_ERROR); 94 99 } 95 100 96 my $reglist = "$out_dir/reglist"; 97 if (! open(REGLIST, ">$reglist$job_id") ) { 98 die("failed to open registration list: $reglist"); 101 { 102 my $command = "$dist_bundle --camera $camera --stage $stage --stage_id $stage_id"; 103 $command .= " --component $component"; 104 $command .= " --path_base $path_base --outdir $out_dir --results_file $results_file"; 105 $command .= " --prefix $prefix"; 106 $command .= " --magicked" if $magicked; 107 $command .= " --dbname $dbname" if $dbname; 108 $command .= " --verbose" if $verbose; 109 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 110 run(command => $command, verbose => $verbose); 111 unless ($success) { 112 my_die("Unable to perform $command: $error_code", $error_code >> 8); 113 } 99 114 } 100 115 101 my @files; 102 my $num = 0; 103 while (<INPUT>) { 104 chomp; 105 my @fields = split /\|/; 106 my $pathname = shift @fields; 107 my $filetype = shift @fields; 108 my $class_id = shift @fields; 116 if (! open(RESULTS, "<$results_file")) { 117 my_die("failed to open bundle results file: $results_file", $PS_EXIT_UNKNOWN_ERROR); 118 } 109 119 110 ($pathname , my $filename) = resolvepath($pathname); 120 my $file_name; 121 my $bytes; 122 my $md5sum; 123 foreach my $line (<RESULTS>) { 124 chomp $line; 125 next if !$line; 126 next if $line =~ /bundleResults/; 127 last if $line =~ /END/; 111 128 112 if ($verbose) { 113 print STDERR "$pathname @fields\n"; 129 my ($tag, $type, $val) = split " ", $line; 130 if ($tag eq "name") { 131 $file_name = $val; 132 } elsif ($tag eq "bytes") { 133 $bytes = $val; 134 } elsif ($tag eq "md5sum") { 135 $md5sum = $val; 136 } else { 137 my_die("unexpected tag: $tag found in results file: $results_file", $PS_EXIT_PROG_ERROR); 114 138 } 139 } 115 140 116 $num++; 117 $filename = "${rownum}_${num}_$filename"; 118 my $dest_path = "$out_dir/$filename"; 119 if (! copy $pathname, "$dest_path" ) { 120 die("failed trying to copy $pathname to $out_dir"); 121 } 141 my $reglist = "$out_dir/reglist$job_id"; 142 if (! open(REGLIST, ">$reglist") ) { 143 my_die("failed to open registration list: $reglist", $PS_EXIT_UNKNOWN_ERROR); 144 } 122 145 123 # XXX is pstamp always the right file type, if not where can we get the right one? 124 print REGLIST file_registration_line($filename, $dest_path, $filetype, $class_id); 125 126 foreach my $f (@fields) { 127 print REGLIST "$f|"; 128 } 129 print REGLIST "\n"; 130 } 146 print REGLIST "$file_name|$bytes|$md5sum|tgz|\n"; 131 147 132 148 close(REGLIST); … … 134 150 exit 0; 135 151 136 sub resolvepath { 137 my $pathname = $_[0]; 152 sub my_die { 153 my $msg = shift; 154 my $rc = shift; 138 155 139 # use the basename of the unresolved file as the name of the file 140 # in order to avoid nebulous name mangled paths in the datastore 141 my $file = basename($pathname); 142 143 my $slash = index($pathname, "/"); 144 if ($slash != 0) { 145 if (!$ipprc) { 146 $ipprc = PS::IPP::Config->new(); 147 } 148 $pathname = $ipprc->file_resolve($pathname); 149 } 150 151 152 return ($pathname, $file); 156 print STDERR $msg; 157 exit $rc ? $rc : $PS_EXIT_UNKNOWN_ERROR; 153 158 } 154 155 # XXX move this to a module so the code can be shared156 sub file_registration_line {157 my $filename = shift;158 my $path = shift;159 my $filetype = shift;160 my $chipname = shift;161 $chipname = $chipname ? "$chipname|" : "";162 163 if (-e $path) {164 my @finfo = stat($path);165 die "failed to stat $path" unless (@finfo); # XXX clean up166 my $bytes = $finfo[7];167 my $md5sum = file_md5_hex($path);168 169 return "$filename|$bytes|$md5sum|$filetype|$chipname";170 } else {171 die "$filename not found at $path";172 }173 } -
branches/eam_branches/20091113/pstamp/scripts/pstamp_job_run.pl
r25712 r26236 148 148 } 149 149 } elsif ($jobType eq "get_image") { 150 my_die( "get_image jobs not working right now", $job_id, $PS_EXIT_PROG_ERROR);151 150 152 151 my $uri = ""; 153 my $command = "$pstamp_get_image_job --job_id $job_id -- uri $uri --out_dir$outputBase --rownum $rownum";152 my $command = "$pstamp_get_image_job --job_id $job_id --output_base $outputBase --rownum $rownum"; 154 153 $command .= " --dbname $dbname" if $dbname; 155 154 $command .= " --dbserver $dbserver" if $dbserver; 155 $command .= " --verbose" if $verbose; 156 156 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 157 157 run(command => $command, verbose => $verbose); -
branches/eam_branches/20091113/pstamp/scripts/pstamp_parser_run.pl
r25319 r26236 13 13 use Getopt::Long qw( GetOptions ); 14 14 use File::Basename qw( basename dirname); 15 use File::Copy; 15 16 use POSIX qw( strftime ); 16 17 use Carp; … … 119 120 unlink $new_uri or my_die("failed to unlink $new_uri", $req_id, $PS_EXIT_UNKNOWN_ERROR); 120 121 } 121 if (! symlink$uri, $new_uri) {122 my_die ("failed to linkrequest file $uri to workdir $workdir", $req_id, $PS_EXIT_UNKNOWN_ERROR);122 if (! copy $uri, $new_uri) { 123 my_die ("failed to copy request file $uri to workdir $workdir", $req_id, $PS_EXIT_UNKNOWN_ERROR); 123 124 } 124 125 } -
branches/eam_branches/20091113/pstamp/scripts/pstampparse.pl
r26083 r26236 98 98 99 99 # make sure the file contains what we are expecting 100 101 # we shouldn't get here if this is the case so just die.No need to notify the client100 # This program shouldn't have been run if the request file is bogus. 101 # No need to notify the client 102 102 my_die("$request_file_name is not a PS1_PS_REQEST", $PS_EXIT_PROG_ERROR) if $extname ne "PS1_PS_REQUEST"; 103 103 my_die("REQ_NAME not found in $request_file_name", $PS_EXIT_PROG_ERROR) if (!$req_name); … … 165 165 # XXX: TODO: sanity check all parameters 166 166 167 # XXX: TODO: We shouldn't really just die in this loop. 168 # If we encounter an error for a particular row 169 # add a job with the proper fault code. If there is a db or config error we should probably just 170 # trash the request. 167 # If we encounter an error for a particular row add a job with the proper fault code. 168 # If we encounter an error in this loop we shouldn't really just die. 169 # We only do that now in the case of I/O or DB errors or the like. 171 170 172 171 my $rownum = $row->{ROWNUM}; … … 236 235 } 237 236 238 # collect rows with the same images of interest in a list so that they239 # can be looked up together 237 # For "stamp" and "list_uri" jobs collect rows with the same images of interest in a list so that they 238 # can be looked up together. 240 239 if (@rowList) { 241 240 my $firstRow = $rowList[0]; 242 # note order of these parameters matters 243 if (same_images_of_interest($firstRow, $row)) { 241 if (($firstRow->{JOB_TYPE} ne "get_image") and same_images_of_interest($firstRow, $row)) { 244 242 245 243 # add this row to the list and move on … … 305 303 my $have_skycells = shift; 306 304 my $need_magic = shift; 305 my $mode = shift; 307 306 308 307 my $num_jobs = 0; … … 395 394 print ARGSLIST "$args\n"; 396 395 close ARGSLIST or my_die("failed to close $argslist", $PS_EXIT_UNKNOWN_ERROR); 396 397 write_params($output_base, $image); 397 398 398 399 my $newState = "run"; … … 476 477 } 477 478 } elsif ($job_type eq "get_image") { 478 print STDERR "get_image jobs not implemented yet" if $verbose; 479 foreach my $row (@$rowList) { 480 insertFakeJobForRow($row, 1, $PSTAMP_NOT_IMPLEMENTED); 481 $num_jobs++; 482 } 479 my $n = scalar @$rowList; 480 481 my_die( "error: unexpected number of rows for get_image request: $n", $PS_EXIT_PROG_ERROR) if $n != 1; 482 483 $num_jobs = queueGetImageJobs($firstRow, $imageList, $stage, $need_magic, $mode); 484 483 485 } else { 484 486 if (!$imageList or (scalar @$imageList eq 0)) { … … 582 584 583 585 foreach my $row (@$rowList) { 584 $num_jobs += queueJobsForRow($row, $stage, $thisRun, $have_skycells, $need_magic );586 $num_jobs += queueJobsForRow($row, $stage, $thisRun, $have_skycells, $need_magic, $mode); 585 587 } 586 588 } 589 } 590 return $num_jobs; 591 } 592 593 # $num_jobs = queueGetImageJobs($firstRow, $imageList, $stage, $need_magic, $mode); 594 sub queueGetImageJobs 595 { 596 my $row = shift; 597 my $imageList = shift; 598 my $stage = shift; 599 my $need_magic = shift; 600 my $mode = shift; 601 602 my $num_jobs = 0; 603 my $rownum = $row->{ROWNUM}; 604 my $option_mask = $row->{OPTION_MASK}; 605 606 # For dist_bundle we need 607 # --camera from $image 608 # --stage 609 # --stage_id from $image 610 # --component from $image 611 # --path_base 612 # --outdir global to this script 613 614 # loop over images 615 my $job_num = 0; 616 foreach my $image (@$imageList) { 617 my $stage_id = $image->{stage_id}; 618 my $component = $image->{component}; 619 620 # skip faulted components for now. Should we even be here? 621 if ($image->{fault} > 0) { 622 printf STDERR "skipping faulted component for $stage $stage_id $component\n" if $verbose; 623 next; 624 } 625 626 $job_num++; 627 628 my $imagefile = $image->{image}; 629 if (($stage ne "stack") and ($need_magic and !$image->{magicked})) { 630 # we only get here if req_type is (byid or byexp). For other types the test for magicked is performed 631 # in locate_images because it's much more efficient to do the test in the database. 632 # For these two modes we fall through to here in order to give feedback to the requestor as 633 # to why the request failed to queue jobs. 634 print STDERR "skipping non-magicked image $imagefile\n" if $verbose; 635 insertFakeJobForRow($row, $job_num, $PSTAMP_NOT_DESTREAKED); 636 $num_jobs++; 637 638 next; 639 } 640 my $exp_id = $image->{exp_id}; 641 642 my $output_base = "$out_dir/${rownum}_${job_num}"; 643 644 write_params($output_base, $image); 645 646 my $newState = "run"; 647 my $fault = 0; 648 my $dep_id; 649 650 if ($stage ne 'raw') { 651 my $run_state = $image->{state}; 652 my $data_state = $image->{data_state}; 653 $data_state = $run_state if $stage eq "stack"; 654 if (($run_state eq 'goto_purged') or ($data_state eq 'purged') or 655 ($run_state eq 'goto_scrubbed') or ($data_state eq 'scrubbed')) { 656 # image is gone and it's not coming back 657 $newState = 'stop'; 658 $fault = $PSTAMP_GONE; 659 } elsif (($data_state ne 'full') or ($run_state ne 'full' )) { 660 # don't wait for update unless the caller asks us to 661 if (!($option_mask & $PSTAMP_WAIT_FOR_UPDATE)) { 662 $newState = 'stop'; 663 $fault = $PSTAMP_NOT_AVAILABLE; 664 } else { 665 # cause the image to be re-made 666 # set up to queue an update run 667 queue_update_run(\$newState, \$fault, \$dep_id, $image->{image_db}, 668 $run_state, $stage, $image->{stage_id}, $need_magic, $image->{label}); 669 } 670 } 671 } 672 673 $num_jobs++; 674 my $command = "$pstamptool -addjob -req_id $req_id -job_type $row->{JOB_TYPE}" 675 . " -outputBase $output_base -rownum $rownum -state $newState -options $option_mask"; 676 $command .= " -fault $fault" if $fault; 677 $command .= " -exp_id $exp_id" if $exp_id; 678 $command .= " -dep_id $dep_id" if $dep_id; 679 680 if ($mode eq "list_job") { 681 # this is a debugging mode, just print the pstamptool that would have run 682 # this is sort of like the mode -noupdate that some other tools support 683 print "$command\n"; 684 } elsif (!$no_update) { 685 # mode eq "queue_job" 686 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 687 run(command => $command, verbose => $verbose); 688 unless ($success) { 689 print STDERR @$stderr_buf; 690 # XXX TODO: now what? Should we mark the error state for the request? 691 # should we keep going for other uris? If so how do we report that some 692 # of the work that the request wanted isn't going to get done 693 my_die("failed to queue job for request $req_id", $PS_EXIT_UNKNOWN_ERROR); 694 } 695 } else { 696 print "skipping command: $command\n"; 697 } 698 } 699 if ( $num_jobs == 0 ) { 700 print STDERR "no jobs for row $rownum\n" if $verbose; 701 insertFakeJobForRow($row, 1, $PSTAMP_NO_JOBS_QUEUED); 702 $num_jobs = 1; 587 703 } 588 704 return $num_jobs; … … 677 793 return 0 if ($r1->{REQ_TYPE} ne $r2->{REQ_TYPE}); 678 794 return 0 if ($r1->{IMG_TYPE} ne $r2->{IMG_TYPE}); 679 return 0 if ($r1->{ID} ne $r2->{ID});680 return 0 if ($r1->{TESS_ID} ne $r2->{TESS_ID});681 return 0 if ($r1->{REQFILT} ne $r2->{REQFILT});682 return 0 if ($r1->{LABEL} ne $r2->{LABEL});683 return 0 if ($r1->{MJD_MIN} ne $r2->{MJD_MAX});684 return 0 if ($r1->{MJD_MAX} ne $r2->{MJD_MAX});685 return 0 if ($r1->{inverse} ne $r2->{inverse});795 return 0 if ($r1->{ID} ne $r2->{ID}); 796 return 0 if ($r1->{TESS_ID} ne $r2->{TESS_ID}); 797 return 0 if ($r1->{REQFILT} ne $r2->{REQFILT}); 798 return 0 if ($r1->{LABEL} ne $r2->{LABEL}); 799 return 0 if ($r1->{MJD_MIN} ne $r2->{MJD_MAX}); 800 return 0 if ($r1->{MJD_MAX} ne $r2->{MJD_MAX}); 801 return 0 if ($r1->{inverse} ne $r2->{inverse}); 686 802 687 803 if (defined($r1->{COMPONENT})) { … … 759 875 } 760 876 877 sub write_params { 878 my $output_base = shift; 879 my $image = shift; 880 881 # write the contents of this "image" as a metadata config doc 882 # Simply treat all values as strings. This is ok since we are only going to 883 # read it from another perl script 884 my $mdc_file = "${output_base}.mdc"; 885 open P, ">$mdc_file" or my_die("failed to open $mdc_file", $PS_EXIT_UNKNOWN_ERROR); 886 887 print P "params METADATA\n"; 888 889 foreach my $key (keys %$image) { 890 my $value = $image->{$key}; 891 if (defined $value) { 892 printf P " %-20s STR %s\n", $key, $value; 893 } else { 894 printf P " %-20s STR NULL\n", $key; 895 } 896 } 897 898 print P "END\n"; 899 close P or my_die("failed to close $mdc_file", $PS_EXIT_UNKNOWN_ERROR); 900 } 901 761 902 sub my_die 762 903 { -
branches/eam_branches/20091113/pstamp/src/pstampdump.c
r25321 r26236 131 131 } 132 132 if (!simple) { 133 printf("ROW_%d METADATA\n", i );133 printf("ROW_%d METADATA\n", i+1); 134 134 printf("%s", str); 135 135 printf("END\n"); -
branches/eam_branches/20091113/pstamp/test/byskycell.txt
r25767 r26236 1 1 # Sample Postage stamp request description file 2 # This can be parsed by the program pstamp_req_create to build a 3 # PS1_PSTAMP_REQUEST binary table 2 # This can be parsed by the program pstamp_request_file to build a PS1_PSTAMP_REQUEST binary table 4 3 5 4 # First line of data is for the extension header … … 7 6 # 8 7 # Note that value for REQ_NAME may be overriden by a command line 9 # argument to pstamp_req _create.8 # argument to pstamp_request_create. 10 9 # Blank and comment lines are ignored 11 10
Note:
See TracChangeset
for help on using the changeset viewer.
