Changeset 25744
- Timestamp:
- Oct 2, 2009, 12:03:23 PM (17 years ago)
- Location:
- branches/eam_branches/20090715
- Files:
-
- 1 deleted
- 66 edited
- 6 copied
-
DataStore/lib/DataStore/Utils.pm (modified) (1 diff)
-
DataStore/scripts/dsget (modified) (1 diff)
-
DataStore/scripts/dsproductls (modified) (1 diff)
-
DataStoreServer/scripts/dsprodtool (modified) (11 diffs)
-
DataStoreServer/scripts/dsreg (modified) (1 diff)
-
DataStoreServer/scripts/installscripts (modified) (1 diff)
-
DataStoreServer/web/cgi/index.txt (deleted)
-
DataStoreServer/web/cgi/index.txt.template (copied) (copied from trunk/DataStoreServer/web/cgi/index.txt.template )
-
Ohana/src/getstar/src/dvoImagesAtCoords.c (modified) (3 diffs)
-
Ohana/src/relphot/src/StarOps.c (modified) (3 diffs)
-
Ohana/src/relphot/src/relphot_objects.c (modified) (1 diff)
-
PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm (modified) (10 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.txt (modified) (1 diff)
-
dbconfig/pstamp.md (modified) (1 diff)
-
doc/misc/docgen.pl (modified) (1 prop)
-
extperl/Params-Validate-0.92.tar.gz (copied) (copied from trunk/extperl/Params-Validate-0.92.tar.gz )
-
hardware (modified) (1 prop)
-
ippScripts/scripts/dist_component.pl (modified) (1 diff)
-
ippScripts/scripts/dist_make_fileset.pl (modified) (6 diffs)
-
ippScripts/scripts/magic_destreak_revert.pl (modified) (1 diff, 1 prop)
-
ippTasks/addstar.pro (modified) (2 diffs)
-
ippTasks/camera.pro (modified) (2 diffs)
-
ippTasks/chip.pro (modified) (2 diffs)
-
ippTasks/destreak.pro (modified) (2 diffs)
-
ippTasks/fake.pro (modified) (2 diffs)
-
ippTasks/pantasks.pro (modified) (2 diffs)
-
ippTasks/rcserver.pro (modified) (2 diffs)
-
ippTasks/warp.pro (modified) (2 diffs)
-
ippTests/tap (modified) (1 prop)
-
ippTools/share/Makefile.am (modified) (1 diff)
-
ippTools/share/disttool_pendingfileset.sql (modified) (1 diff)
-
ippTools/share/disttool_revertcomponent.sql (modified) (1 prop)
-
ippTools/share/disttool_revertrun.sql (modified) (1 prop)
-
ippTools/share/pstamptool_listjob.sql (copied) (copied from trunk/ippTools/share/pstamptool_listjob.sql )
-
ippTools/share/pxadmin_create_tables.sql (modified) (1 diff)
-
ippTools/src/chiptool.c (modified) (2 diffs)
-
ippTools/src/chiptoolConfig.c (modified) (1 diff)
-
ippTools/src/difftool.c (modified) (2 diffs)
-
ippTools/src/difftoolConfig.c (modified) (1 diff)
-
ippTools/src/pstamptool.c (modified) (3 diffs)
-
ippTools/src/pstamptoolConfig.c (modified) (1 diff)
-
ippTools/src/regtool.c (modified) (2 diffs)
-
ippTools/src/regtoolConfig.c (modified) (1 diff)
-
ippTools/src/stacktool.c (modified) (2 diffs)
-
ippTools/src/stacktoolConfig.c (modified) (1 diff)
-
ippTools/src/warptool.c (modified) (2 diffs)
-
ippTools/src/warptoolConfig.c (modified) (1 diff)
-
ppStack/src/ppStackLoop.c (modified) (6 diffs)
-
psconfig/tagsets/ipp-2.9.perl (modified) (2 diffs)
-
pstamp/scripts/Makefile.am (modified) (1 diff)
-
pstamp/scripts/pstamp_finish.pl (modified) (4 diffs)
-
pstamp/scripts/pstamp_job_run.pl (modified) (4 diffs)
-
pstamp/scripts/pstamp_request_file (copied) (copied from trunk/pstamp/scripts/pstamp_request_file )
-
pstamp/scripts/pstamp_results_file.pl (modified) (2 diffs)
-
pstamp/scripts/pstampparse.pl (modified) (12 diffs)
-
pstamp/src/Makefile.am (modified) (1 diff)
-
pstamp/src/ppstamp.h (modified) (1 diff)
-
pstamp/src/ppstampMakeStamp.c (modified) (9 diffs)
-
pstamp/src/pstamp.h (modified) (1 diff)
-
pstamp/src/pstampGetROI.c (modified) (1 diff)
-
pstamp/src/pstampint.h (copied) (copied from trunk/pstamp/src/pstampint.h )
-
pstamp/src/pstamprequest.c (modified) (1 diff)
-
pstamp/test/asteroid.txt (modified) (1 diff)
-
pstamp/test/byskycell.txt (copied) (copied from trunk/pstamp/test/byskycell.txt )
-
pstamp/test/gpc1_sample.txt (modified) (1 diff)
-
pstamp/test/pstamp_req_create (modified) (1 diff)
-
pswarp/src/pswarpDefine.c (modified) (1 diff)
-
pswarp/src/pswarpLoop.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20090715/DataStore/lib/DataStore/Utils.pm
r19275 r25744 42 42 $BYTE_FIELD = qr/^\d+$/; 43 43 $MD5_FIELD = qr/^[0-9a-f]{32}$/; 44 %KNOWN_FILE_TYPES = map { $_ => 1 } qw( chip psrequest psresults pstamp chipproc warp stack diff ipp-mops table text xml tgz );45 %KNOWN_FILESET_TYPES = map { $_ => 1 } qw( OBJECT BIAS DARK SKYFLAT DOMEFLAT OOF SHACKHARTMANN PSREQUEST PSRESULTS IPP-MOPS XRAY FOCUS MOPS_DETECTABILITY_QUERY MOPS_DETECTABILITY_RESPONSE MOPS_TRANSIENT_DETECTIONS LED notset IPP_PSPS );46 %KNOWN_PRODUCT_TYPES = map { $_ => 1 } qw( image dump psrequest psresults table );44 %KNOWN_FILE_TYPES = map { $_ => 1 } qw( chip psrequest psresults pstamp chipproc warp stack diff ipp-mops table text xml tgz fits ); 45 %KNOWN_FILESET_TYPES = map { $_ => 1 } qw( OBJECT BIAS DARK SKYFLAT DOMEFLAT OOF SHACKHARTMANN PSREQUEST PSRESULTS IPP-MOPS XRAY FOCUS MOPS_DETECTABILITY_QUERY MOPS_DETECTABILITY_RESPONSE MOPS_TRANSIENT_DETECTIONS LED notset IPP_PSPS IPP-DIST); 46 %KNOWN_PRODUCT_TYPES = map { $_ => 1 } qw( image dump psrequest psresults table ipp-dist ipp-misc); 47 47 48 48 =pod -
branches/eam_branches/20090715/DataStore/scripts/dsget
r25397 r25744 207 207 if (defined $copies and $copies > 1) { 208 208 foreach (1 .. ($copies - 1)) { 209 $neb->replicate($filename , 'any')209 $neb->replicate($filename) 210 210 or die "failed to replicate $filename failed: $!"; 211 211 } -
branches/eam_branches/20090715/DataStore/scripts/dsproductls
r25624 r25744 59 59 60 60 print "# uri fileset datetime type\n"; 61 my $num = 0;62 61 foreach my $fs (@$data) { 63 $num++;64 if (!defined $fs->uri) {65 # Somewhow we get here occasaionally I don't know why yet66 print STDERR "uri is not defined! skipping fs: $num\n";67 next;68 }69 62 print $fs->uri, " ", $fs->fileset, " ", $fs->datetime, " ", $fs->type; 70 63 if ($extra) { -
branches/eam_branches/20090715/DataStoreServer/scripts/dsprodtool
r24196 r25744 12 12 use PS::IPP::Metadata::Config; 13 13 use File::Copy; 14 15 use Term::ReadKey; 14 16 15 17 use PS::IPP::Config qw($PS_EXIT_SUCCESS … … 36 38 my $dsroot; 37 39 my $dbname; 40 my $dbpass; 38 41 39 42 my $add; … … 78 81 } else { 79 82 $product = $del; 83 if (! -t STDIN) { 84 die "cannot delete product from script\n"; 85 } 86 print "*** Delete the Data Store Product $product? ***\n"; 87 print "*** to delete $product answer YES, and give password ***\n"; 88 print "*** WARNING this action is permanant *** \n"; 89 print "Delete? (YES/[n]): "; 90 91 my $line = ReadLine(0); 92 chomp $line; 93 exit 1 if !$line or ($line ne "YES"); 94 95 print "password: "; 96 ReadMode('noecho'); 97 $line = ReadLine(0); 98 ReadMode('normal'); 99 print "\n"; 100 chomp $line; 101 $dbpass = $line; 80 102 } 81 103 … … 93 115 } 94 116 95 my $root_index_script = "$dsroot/index.txt ";117 my $root_index_script = "$dsroot/index.txt.template"; 96 118 if (!stat($root_index_script)) { 97 119 $err .= "Data Store not found at '$dsroot'.\n" … … 106 128 unless defined $dbname; 107 129 my $dbuser = metadataLookupStr($siteConfig, 'DS_DBUSER'); 108 my $dbpass = metadataLookupStr($siteConfig, 'DS_DBPASSWORD');130 $dbpass = metadataLookupStr($siteConfig, 'DS_DBPASSWORD') if !$dbpass; 109 131 exit ($PS_EXIT_CONFIG_ERROR) unless defined $dbserver and $dbname and $dbuser and $dbpass; 110 132 111 133 my $dsn = "DBI:mysql:host=$dbserver;database=$dbname"; 112 113 my $dbh = DBI->connect($dsn, $dbuser, $dbpass) or die "Cannot connect to server\n";114 115 134 116 135 my $product_dir = "$dsroot/$product"; … … 118 137 119 138 if ($del) { 139 my $dbh = DBI->connect($dsn, $dbuser, $dbpass) or die "Cannot connect to server\n"; 120 140 # 121 141 # delete product … … 129 149 } 130 150 my $prod_id = $prod_row->{prod_id}; 131 132 # if requested, remove the product directory133 if ($remove) {134 if (system "rm -r $product_dir") {135 die("failed to remove $product_dir");136 }137 } else {138 # otherwise just zap the index script139 unlink("$index_script_name");140 }141 151 142 152 … … 152 162 $dbh->do("DELETE from dsProduct where prod_id = $prod_id"); 153 163 164 print "Product $product deleted.\n"; 165 166 # if requested, remove the product directory 167 if ($remove) { 168 print "Removing files from $product.\n"; 169 if (system "rm -r $product_dir") { 170 die("failed to remove $product_dir"); 171 } 172 } else { 173 # otherwise just zap the index script 174 unlink("$index_script_name"); 175 } 176 154 177 exit 0; 155 178 … … 158 181 # add a new product 159 182 # 183 my $dbh = DBI->connect($dsn, $dbuser, $dbpass) or die "Cannot connect to server\n"; 184 160 185 my $stmt = $dbh->prepare("SELECT prod_id FROM dsProduct WHERE prod_name = \'$product\'"); 161 186 $stmt->execute(); … … 167 192 168 193 # set up the product directory 194 # if there is an old index file delete it 195 if (-e $index_script_name ) { 196 if (!unlink($index_script_name)) { 197 die("failed trying to remove old $index_script_name"); 198 } 199 } 169 200 if (! -e $product_dir) { 170 201 $we_created_dir = 1; … … 172 203 die("failed trying to make product directory $product_dir"); 173 204 } 174 } 175 if (-e $index_script_name ) {176 if (!unlink($index_script_name)) {177 die("failed trying to remove old $index_script_name");178 }179 } 205 } else { 206 # directory alrady exists make sure that it's empty 207 my @dirlist = glob("$product_dir/*"); 208 die ("existing product directory $product_dir is not empty") if scalar @dirlist; 209 } 210 180 211 if (!copy($root_index_script, $index_script_name)) { 181 212 print STDERR "failed trying to copy($root_index_script, $index_script_name)"; -
branches/eam_branches/20090715/DataStoreServer/scripts/dsreg
r24196 r25744 203 203 $new_last_fs = $new_newest->{fileset_name}; 204 204 } else { 205 $new_last_fs = "none";205 $new_last_fs = undef; 206 206 } 207 207 $stmt->finish(); 208 $dbh->do("UPDATE dsProduct SET last_fs = \'$new_last_fs\' WHERE prod_id = $prod_id");208 $dbh->do("UPDATE dsProduct SET last_fs = ? WHERE prod_id = $prod_id", undef, ($new_last_fs)); 209 209 } 210 210 $dbh->commit(); -
branches/eam_branches/20090715/DataStoreServer/scripts/installscripts
r20217 r25744 56 56 # index.txt file for the root of the data store. 57 57 my @dsroot_list = qw( 58 index.txt 58 index.txt.template 59 59 ); 60 60 -
branches/eam_branches/20090715/Ohana/src/getstar/src/dvoImagesAtCoords.c
r25406 r25744 1 1 # include "dvoImagesAtCoords.h" 2 3 // We'd like to do this but since pstamp gets built later this won't work 4 // so just redefine the macro 5 // # include "pstamp.h" 6 #define PSTAMP_NO_OVERLAP 28 2 7 3 8 static int readPoints(char *filename, Point **pointsOut); … … 19 24 Npoints = readPoints(argv[1], &points); 20 25 if (!Npoints) { 21 exit( 0);26 exit(1); 22 27 } 23 28 … … 49 54 if (MatchCoords (dbImages, NdbImages, points, Npoints)) { 50 55 ListImagesAtCoords(dbImages, points, Npoints); 56 exit(0); 57 } else { 58 exit(PSTAMP_NO_OVERLAP); 51 59 } 52 // XXX: should we exit with nonzero status if no matches were found?53 exit (0);54 60 } 55 61 -
branches/eam_branches/20090715/Ohana/src/relphot/src/StarOps.c
r21508 r25744 193 193 for (i = 0; i < Ncatalog; i++) { 194 194 for (j = 0; j < catalog[i].Naverage; j++) { 195 196 // update average photometry for each of the average filters 195 197 for (Ns = 0; Ns < Nsecfilt; Ns++) { 196 198 … … 207 209 if (isnan(Msys)) continue; 208 210 209 // XXX this is a hack for the 2MASS search; better to save an average value? 210 if (catalog[i].measure[m].psfQual < 0.85) continue; 211 // XXX only apply this filter for psphot data from GPC1 for now... 212 if (0 && (catalog[i].measure[m].photcode > 10000) && (catalog[i].measure[m].photcode < 10500)) { 213 if (catalog[i].measure[m].psfQual < 0.85) continue; 214 } 211 215 212 216 list[N] = Msys - catalog[i].measure[m].Mcal; … … 224 228 catalog[i].secfilt[Nsecfilt*j+Ns].Ncode = N; 225 229 catalog[i].secfilt[Nsecfilt*j+Ns].Nused = stats.Nmeas; 230 } 231 232 // update average flags based on the detection stats. 233 // XXX we need to clean this up -- this is a serious set of hacks... 234 if (0) { 235 int Galaxy2MASS, GalaxySDSS, goodPS1, nEXT, nPSF, good2MASS; 236 237 Galaxy2MASS = FALSE; // best guess for galaxy based on 2MASS J measurements (gal_contam == measure.flags[0x00400000 | 0x00800000]) 238 GalaxySDSS = FALSE; // best guess for galaxy based on SDSS measurements (XXX need to fix SDSS flags) 239 goodPS1 = FALSE; // true if any PS1 measurements have psfQual > 0.85 240 good2MASS = FALSE; // true if 2MASS J measurements have significant detections 241 nEXT = nPSF = 0; // number of PS1 PSF vs EXT measurements 242 243 m = catalog[i].average[j].measureOffset; 244 for (k = 0; k < catalog[i].average[j].Nmeasure; k++, m++) { 245 246 // PS1 data : 247 if ((catalog[i].measure[m].photcode >= 10000) && (catalog[i].measure[m].photcode <= 10500)) { 248 if (catalog[i].measure[m].psfQual > 0.85) { 249 goodPS1 = TRUE; 250 if (!isnan(catalog[i].measure[m].Map)) { 251 if (catalog[i].measure[m].M - catalog[i].measure[m].Map > 0.5) { 252 nEXT ++; 253 } else { 254 nPSF ++; 255 } 256 } 257 } 258 } 259 260 // 2MASS data: 261 if (catalog[i].measure[m].photcode == 2011) { 262 if (catalog[i].measure[m].photFlags & 0x00c00000) { 263 Galaxy2MASS = TRUE; 264 } 265 if (catalog[i].measure[m].photFlags & 0x00000007) { 266 good2MASS = TRUE; 267 } 268 } 269 } 270 271 if (nEXT && (nEXT > nPSF)) { 272 catalog[i].average[j].flags |= 0x00010000; 273 } 274 if (goodPS1) { 275 catalog[i].average[j].flags |= 0x00020000; 276 } 277 if (Galaxy2MASS) { 278 catalog[i].average[j].flags |= 0x00040000; 279 } 280 if (good2MASS) { 281 catalog[i].average[j].flags |= 0x00080000; 282 } 226 283 } 227 284 } -
branches/eam_branches/20090715/Ohana/src/relphot/src/relphot_objects.c
r25035 r25744 68 68 69 69 if (VERBOSE) fprintf (stderr, "saving catalog %s\n", catalog.filename); 70 71 // we can optionally convert output format here 72 // but it would be better to define a dvo crawler program to do this 73 // catalog.catformat = DVO_FORMAT_PS1_V1; 70 74 dvo_catalog_save (&catalog, VERBOSE); 71 75 dvo_catalog_unlock (&catalog); -
branches/eam_branches/20090715/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm
r25406 r25744 34 34 my $img_type = shift; # required 35 35 my $id = shift; # required unless req_type eq bycoord or byskycell 36 my $tess_id = shift; 36 37 my $component= shift; # class_id or skycell_id 37 38 my $inverse = shift; 39 my $need_magic = shift; 38 40 my $x = shift; 39 41 my $y = shift; … … 41 43 my $mjd_max = shift; 42 44 my $filter = shift; 45 my $label = shift; 43 46 my $verbose = shift; 44 47 45 48 46 49 # we die in response to bad data in request files 47 die "Unknown req_type: $req_type" if ($req_type ne "byid") and ($req_type ne "byexp") 48 and ($req_type ne "bycoord") and ($req_type ne "bydiff"); 50 die "Unknown req_type: $req_type" 51 if ($req_type ne "byid") and 52 ($req_type ne "byexp") and 53 ($req_type ne "bycoord") and 54 ($req_type ne "bydiff") and 55 ($req_type ne "byskycell"); 56 57 my $dateobs_begin; 58 my $dateobs_end; 59 if (!iszero($mjd_min)) { 60 $dateobs_begin = mjd_to_dateobs($mjd_min); 61 } 62 if (!iszero($mjd_max)) { 63 $dateobs_end = mjd_to_dateobs($mjd_max); 64 } 49 65 50 66 if (($req_type eq "byid") and ($img_type eq "diff")) { … … 95 111 # regtool -dbname $image_db -processedimfile -time_begin $mjd_min -time_end = $mjd_max -filter $filter 96 112 # 97 my $results = lookup_bycoord($ipprc, $image_db, $x, $y, $ mjd_min, $mjd_max, $filter, $verbose);113 my $results = lookup_bycoord($ipprc, $image_db, $x, $y, $dateobs_begin, $dateobs_end, $filter, $verbose); 98 114 99 115 # now take the results and lookup byexp … … 102 118 $req_type = "byexp"; 103 119 $id = $results->{exp_name}; 104 } 105 106 my $results = lookup($ipprc, $image_db, $req_type, $img_type, $id, $component, $verbose); 120 } elsif ($req_type eq "byskycell") { 121 if (($img_type eq "raw") or ($img_type eq "chip")) { 122 print STDERR "REQ_TYPE byskycell not supported for IMG_TYPE raw or chip\n"; 123 return undef; 124 } 125 if (!$tess_id or !$component) { 126 print STDERR "component and tess_id are required for REQ_TYPE byskycell\n"; 127 return undef; 128 } 129 } 130 131 my $results = lookup($ipprc, $image_db, $req_type, $img_type, $id, $tess_id, $component, $need_magic, $dateobs_begin, $dateobs_end, $filter, $label, $verbose); 107 132 108 133 return $results; … … 115 140 my $img_type = shift; 116 141 my $id = shift; 142 my $tess_id = shift; 117 143 my $component= shift; 144 my $need_magic = shift; 145 my $dateobs_begin = shift; 146 my $dateobs_end = shift; 147 my $filter = shift; 148 my $label = shift; 118 149 my $verbose = shift; 119 150 … … 139 170 my $skycell_id; 140 171 141 # special class_id value "null" means ignore 142 if ($component and ($component eq "null")) { 172 if (isnull($component)) { 143 173 $component = undef; 144 174 } 145 175 176 my $magic_arg = $need_magic ? " -destreaked" : ""; 146 177 if ($img_type eq "raw") { 147 178 $class_id = $component; … … 196 227 } elsif ($req_type eq "byexp") { 197 228 $command .= " -exp_name $id"; 229 } elsif ($req_type eq "byskycell") { 230 $command .= " -tess_id $tess_id -skycell_id $skycell_id"; 198 231 } else { 199 232 die "Unknown req_type supplied: $req_type"; 200 233 } 234 235 if ($img_type ne "stack") { 236 $command .= $magic_arg; 237 $command .= " -dateobs_begin $dateobs_begin" if $dateobs_begin; 238 $command .= " -dateobs_end $dateobs_end" if $dateobs_end; 239 } 240 241 $command .= " -filter $filter" if !isnull($filter); 242 $command .= " -label $label" if !isnull($label); 201 243 202 244 # run the tool and parse the output … … 386 428 my $x = shift; 387 429 my $y = shift; 388 my $ mjd_min = shift;389 my $ mjd_max= shift;430 my $dateobs_begin = shift; 431 my $dateobs_end = shift; 390 432 my $filter = shift; 391 433 my $verbose = shift; … … 403 445 404 446 my $args; 405 if ($mjd_min) { 406 my $dateobs_min = mjd_to_dateobs($mjd_min); 407 $args .= " -dateobs_begin $dateobs_min"; 408 } 409 if ($mjd_max) { 410 my $dateobs_max = mjd_to_dateobs($mjd_max); 411 $args .= " -dateobs_end $dateobs_max"; 412 } 413 if ($filter) { 447 if (!isnull($dateobs_begin)) { 448 $args .= " -dateobs_begin $dateobs_begin"; 449 } 450 if (!isnull($dateobs_end)) { 451 $args .= " -dateobs_end $dateobs_end"; 452 } 453 if (!isnull($filter)) { 414 454 $args .= " -filter $filter"; 415 455 } … … 567 607 my ($sec, $min, $hr, $day, $mon, $year) = gmtime($ticks); 568 608 569 return sprintf "'%4d-%02d-%02d %02d:%02d:%02d'", $year+1900, $mon+1, $day, $hr, $min, $sec; 609 return sprintf "'%4d-%02d-%02dT%02d:%02d:%02dZ'", $year+1900, $mon+1, $day, $hr, $min, $sec; 610 } 611 612 sub isnull { 613 my $val = shift; 614 615 return (!defined($val) or (lc($val) eq "null")); 616 } 617 618 sub iszero { 619 my $val = shift; 620 return (!defined($val) or ($val == 0)); 570 621 } 571 622 -
branches/eam_branches/20090715/archive/ducttape
- Property svn:mergeinfo changed
/trunk/archive/ducttape merged: 25738
- Property svn:mergeinfo changed
-
branches/eam_branches/20090715/catalyst
- Property svn:mergeinfo changed
/trunk/catalyst merged: 25738
- Property svn:mergeinfo changed
-
branches/eam_branches/20090715/catalyst/2007.0-specs
- Property svn:mergeinfo changed
/trunk/catalyst/2007.0-specs removed
- Property svn:mergeinfo changed
-
branches/eam_branches/20090715/catalyst/2008.0-specs
- Property svn:mergeinfo changed
/trunk/catalyst/2008.0-specs removed
- Property svn:mergeinfo changed
-
branches/eam_branches/20090715/catalyst/2008.0-specs/hardened
- Property svn:mergeinfo changed
/trunk/catalyst/2008.0-specs/hardened removed
- Property svn:mergeinfo changed
-
branches/eam_branches/20090715/dbconfig/changes.txt
r25624 r25744 1298 1298 1299 1299 ALTER TABLE distRun ADD COLUMN magic_ds_id BIGINT AFTER stage_id; 1300 1301 ALTER TABLE pstampJob ADD COLUMN options BIGINT; -
branches/eam_branches/20090715/dbconfig/pstamp.md
r25624 r25744 39 39 exp_id S64 0 40 40 outputBase STR 255 41 options S64 64 41 42 END -
branches/eam_branches/20090715/doc/misc/docgen.pl
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/20090715/hardware
- Property svn:mergeinfo changed
/trunk/hardware merged: 25738
- Property svn:mergeinfo changed
-
branches/eam_branches/20090715/ippScripts/scripts/dist_component.pl
r25022 r25744 164 164 or ($file_rule =~ /.JPEG2/)); 165 165 166 if ($stage eq "diff") { 167 next if $file_rule =~ /CONV/; 168 } 169 166 170 my $file_name = $file->{name}; 167 171 my $base = basename($file_name); -
branches/eam_branches/20090715/ippScripts/scripts/dist_make_fileset.pl
r25624 r25744 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, $filter); 42 43 my ($dbname, $save_temps, $verbose, $no_update, $logfile); 43 44 … … 50 51 'dest_id=s' => \$dest_id, # id for the product 51 52 'product_name=s' => \$product_name, # location of the data store directory for this product 53 'label=s' => \$label, 54 'filter=s' => \$filter, 52 55 'ds_dbhost=s' => \$ds_dbhost, # database host for the datastore database 53 56 'ds_dbname=s' => \$ds_dbname, # database name for the datastore database … … 60 63 61 64 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 62 pod2usage( -msg => "Required options: --dist_id --dist_dir --target_id --stage --stage_id -- dest_id --ds_dbhost --ds_dbname",65 pod2usage( -msg => "Required options: --dist_id --dist_dir --target_id --stage --stage_id --label --filter --dest_id --ds_dbhost --ds_dbname", 63 66 -exitval => 3) unless 64 67 defined $dist_id and … … 67 70 defined $stage and 68 71 defined $stage_id and 72 defined $label and 73 defined $filter and 69 74 defined $dest_id and 70 75 defined $product_name and … … 147 152 148 153 { 149 # XXX: need to chose an appropriate file set type 150 my $command = "$dsreg --add $fileset_name --product $product_name --type notset --list $listFileName"; 154 my $command = "$dsreg --add $fileset_name --product $product_name --type IPP-DIST --list $listFileName"; 151 155 152 156 # the data store will refer to the distribution bundle via symlinks back to distRun.outdir … … 157 161 158 162 $command .= " --ps0 $target_id --ps1 $stage --ps2 $stage_id --ps3 $prod_col_3"; 159 160 $command .= " --dbname $ds_dbname"; # XXX: notyet --dbhost $ds_dbhost 163 $command .= " --ps4 $label --ps5 $filter"; 164 165 $command .= " --dbname $ds_dbname --dbhost $ds_dbhost"; 161 166 162 167 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = -
branches/eam_branches/20090715/ippScripts/scripts/magic_destreak_revert.pl
- Property svn:mergeinfo changed
/trunk/ippScripts/scripts/magic_destreak_revert.pl merged: 25676,25738
r25624 r25744 193 193 revert_files($replace, $image, $mask, $weight, $sources, $astrom, $bimage, $bmask, $bweight, $bsources, $bastrom); 194 194 195 if ($stage eq "diff" ) {195 if ($stage eq "diff" and $inverse) { 196 196 my $name = "PPSUB.INVERSE"; 197 197 $image = $ipprc->filename($name, $path_base); - Property svn:mergeinfo changed
-
branches/eam_branches/20090715/ippTasks/addstar.pro
r25402 r25744 23 23 active true 24 24 end 25 task addstar.revert 26 active true 27 end 25 28 end 26 29 … … 30 33 end 31 34 task addstar.exp.run 35 active false 36 end 37 task addstar.revert 32 38 active false 33 39 end -
branches/eam_branches/20090715/ippTasks/camera.pro
r24596 r25744 23 23 active true 24 24 end 25 task camera.revert 26 active true 27 end 25 28 end 26 29 … … 30 33 end 31 34 task camera.exp.run 35 active false 36 end 37 task camera.revert 32 38 active false 33 39 end -
branches/eam_branches/20090715/ippTasks/chip.pro
r24596 r25744 26 26 active true 27 27 end 28 task chip.revert 29 active true 30 end 28 31 end 29 32 … … 36 39 end 37 40 task chip.advanceexp 41 active false 42 end 43 task chip.revert 38 44 active false 39 45 end -
branches/eam_branches/20090715/ippTasks/destreak.pro
r25625 r25744 172 172 173 173 task.exec 174 stdout $LOGSUBDIR/destreak.run.log 175 stderr $LOGSUBDIR/destreak.run.log 174 176 book npages magicToDS -var N 175 177 if ($N == 0) break … … 362 364 363 365 task.exec 366 stdout $LOGSUBDIR/destreak.revert.run.log 367 stderr $LOGSUBDIR/destreak.revert.run.log 368 364 369 book npages magicDSToRevert -var N 365 370 if ($N == 0) break -
branches/eam_branches/20090715/ippTasks/fake.pro
r24596 r25744 26 26 active true 27 27 end 28 task fake.revert 29 active true 30 end 28 31 end 29 32 … … 36 39 end 37 40 task fake.advanceexp 41 active false 42 end 43 task fake.revert 38 44 active false 39 45 end -
branches/eam_branches/20090715/ippTasks/pantasks.pro
r25625 r25744 1 1 ## pantasks.pro : globals and support macros : -*- sh -*- 2 2 3 # globals that may be modified by the user -- only init if not set 4 if ($?NEBULOUS == 0) set NEBULOUS = 0 5 if ($?NETWORK == 0) set NETWORK = 1 6 if ($?PARALLEL == 0) set PARALLEL = 1 7 if ($?VERBOSE == 0) set VERBOSE = 1 8 if ($?LABEL:n == 0) set LABEL:n = 0 9 if ($?POLLLIMIT == 0) set POLLLIMIT = 32 10 if ($?KEEP_FAILURES == 0) set KEEP_FAILURES = 0 11 12 if ($?LOGDIR == 0) 13 $LOGDIR = `pwd` 14 $LOGDIR = $LOGDIR/pantasks_logs 15 mkdir $LOGDIR 16 end 17 3 18 # globals used to control system behavior : these should be in uppercase 4 $NEBULOUS = 05 $NETWORK = 16 $PARALLEL = 17 $VERBOSE = 18 $LABEL:n = 09 $POLLLIMIT = 3210 $LOGDIR = `pwd`11 $LOGDIR = $LOGDIR/pantasks_logs12 mkdir $LOGDIR13 $KEEP_FAILURES = 014 15 19 $LOADPOLL = 1.0 16 20 $LOADEXEC = 5.0 … … 144 148 for i 0 $LABEL:n 145 149 echo $LABEL:$i 150 end 151 end 152 153 macro save.labels 154 if ($0 != 1) 155 echo "USAGE: save.labels" 156 break 157 end 158 if ($?LABEL:n == 0) 159 echo "no labels defined" 160 end 161 if ($LABEL:n == 0) 162 echo "no labels defined" 163 end 164 165 exec rm -f labels.list 166 local i 167 for i 0 $LABEL:n 168 exec echo $LABEL:$i >> labels.list 169 end 170 end 171 172 macro load.labels 173 if ($0 != 1) 174 echo "USAGE: load.labels" 175 break 176 end 177 178 file labels.list found 179 if (not($found)) 180 echo "no saved labels in labels.list" 181 return 182 end 183 184 list mylabels -x "cat labels.list" 185 local i 186 for i 0 $mylabels:n 187 add.label $mylabels:$i 146 188 end 147 189 end -
branches/eam_branches/20090715/ippTasks/rcserver.pro
r25625 r25744 129 129 book getword rcPendingFS $pageName stage -var STAGE 130 130 book getword rcPendingFS $pageName stage_id -var STAGE_ID 131 book getword rcPendingFS $pageName label -var LABEL 132 book getword rcPendingFS $pageName filter -var FILTER 131 133 book getword rcPendingFS $pageName dist_dir -var DIST_DIR 132 134 # book getword rcPendingFS $pageName clean -var CLEAN … … 147 149 book setword rcPendingFS $pageName pantaskState RUN 148 150 149 $run = dist_make_fileset.pl --dist_id $DIST_ID --target_id $TARGET_ID --stage $STAGE --stage_id $STAGE_ID -- dest_id $DEST_ID --product_name $PRODUCT_NAME --ds_dbhost $DS_DBHOST --ds_dbname $DS_DBNAME --dist_dir $DIST_DIR151 $run = dist_make_fileset.pl --dist_id $DIST_ID --target_id $TARGET_ID --stage $STAGE --stage_id $STAGE_ID --label $LABEL --filter $FILTER --dest_id $DEST_ID --product_name $PRODUCT_NAME --ds_dbhost $DS_DBHOST --ds_dbname $DS_DBNAME --dist_dir $DIST_DIR 150 152 151 153 add_standard_args run -
branches/eam_branches/20090715/ippTasks/warp.pro
r24596 r25744 49 49 active true 50 50 end 51 task warp.revert.overlap 52 active true 53 end 54 task warp.revert.warped 55 active true 56 end 51 57 end 52 58 … … 66 72 end 67 73 task warp.advancerun 74 active false 75 end 76 task warp.revert.overlap 77 active false 78 end 79 task warp.revert.warped 68 80 active false 69 81 end -
branches/eam_branches/20090715/ippTests/tap
- Property svn:mergeinfo changed
/trunk/ippTests/tap merged: 25738
- Property svn:mergeinfo changed
-
branches/eam_branches/20090715/ippTools/share/Makefile.am
r25624 r25744 195 195 pstamptool_completedreq.sql \ 196 196 pstamptool_datastore.sql \ 197 pstamptool_listjob.sql \ 197 198 pstamptool_pendingjob.sql \ 198 199 pstamptool_pendingreq.sql \ -
branches/eam_branches/20090715/ippTools/share/disttool_pendingfileset.sql
r25624 r25744 4 4 distRun.stage, 5 5 stage_id, 6 distTarget.label, 7 distTarget.filter, 6 8 CONCAT_WS('.', distRun.outroot, CONVERT(distRun.dist_id, CHAR)) as dist_dir, 7 9 rcDestination.name AS product_name, -
branches/eam_branches/20090715/ippTools/share/disttool_revertcomponent.sql
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/20090715/ippTools/share/disttool_revertrun.sql
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/20090715/ippTools/share/pxadmin_create_tables.sql
r25624 r25744 1249 1249 exp_id BIGINT, 1250 1250 outputBase VARCHAR(255), 1251 options BIGINT, 1251 1252 PRIMARY KEY(job_id, req_id), 1252 1253 KEY(job_id), -
branches/eam_branches/20090715/ippTools/src/chiptool.c
r25400 r25744 603 603 PXOPT_COPY_STR(config->args, where, "-reduction", "chipRun.reduction", "=="); 604 604 pxAddLabelSearchArgs (config, where, "-label", "chipRun.label", "LIKE"); 605 PXOPT_COPY_S64(config->args, where, "-magicked", "chipRun.magicked", "=="); 605 PXOPT_COPY_S64(config->args, where, "-magicked", "chipProcessedImfile.magicked", "=="); 606 607 PXOPT_LOOKUP_U64(magicked, config->args, "-magicked", false, false); 608 PXOPT_LOOKUP_BOOL(destreaked, config->args, "-destreaked", false); 609 PXOPT_LOOKUP_BOOL(not_destreaked, config->args, "-not_destreaked", false); 606 610 607 611 if (!psListLength(where->list) && … … 631 635 // don't list faulted rows 632 636 psStringAppend(&query, " %s", "AND chipProcessedImfile.fault = 0"); 637 } 638 if (not_destreaked) { 639 if (destreaked) { 640 psError(PXTOOLS_ERR_DATA, true, "providing -not_destreaked and -destreaked makes no sense"); 641 return false; 642 } 643 if (magicked) { 644 psError(PXTOOLS_ERR_DATA, true, "providing -not_destreaked and -magicked makes no sense"); 645 return false; 646 } 647 psStringAppend(&query, " AND chipProcessedImfile.magicked = 0"); 648 } 649 if (destreaked) { 650 psStringAppend(&query, " AND chipProcessedImfile.magicked != 0"); 633 651 } 634 652 -
branches/eam_branches/20090715/ippTools/src/chiptoolConfig.c
r25400 r25744 158 158 psMetadataAddStr(processedimfileArgs, PS_LIST_TAIL, "-reduction", 0, "search by reduction class", NULL); 159 159 psMetadataAddStr(processedimfileArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "search by chipRun label (LIKE comparison)", NULL); 160 psMetadataAddBool(processedimfileArgs, PS_LIST_TAIL, "-magicked", 0, "search by magicked status", false); 160 161 psMetadataAddBool(processedimfileArgs, PS_LIST_TAIL, "-destreaked", 0, "search for destreaked images", false); 162 psMetadataAddBool(processedimfileArgs, PS_LIST_TAIL, "-not_destreaked", 0, "search for images that have not been destreaked", false); 163 psMetadataAddS64(processedimfileArgs, PS_LIST_TAIL, "-magicked", 0, "search by magicked value", 0); 161 164 psMetadataAddU64(processedimfileArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); 162 165 psMetadataAddBool(processedimfileArgs, PS_LIST_TAIL, "-all", 0, "list everything without search terms", false); -
branches/eam_branches/20090715/ippTools/src/difftool.c
r25624 r25744 665 665 PXOPT_COPY_S64(config->args, where, "-diff_id", "diffSkyfile.diff_id", "=="); 666 666 PXOPT_COPY_STR(config->args, where, "-skycell_id", "diffInputSkyfile.skycell_id", "=="); 667 PXOPT_COPY_S64(config->args, where, "-diff_skyfile_id", "diffInputSkyfile.diff_skyfile_id", "==");667 PXOPT_COPY_S64(config->args, where, "-diff_skyfile_id", "diffInputSkyfile.diff_skyfile_id", "=="); 668 668 PXOPT_COPY_STR(config->args, where, "-tess_id", "diffRun.tess_id", "=="); 669 669 PXOPT_COPY_S16(config->args, where, "-fault", "diffSkyfile.fault", "=="); 670 PXOPT_COPY_S64(config->args, where, "-exp_id", "rawInput.exp_id", "=="); 671 PXOPT_COPY_STR(config->args, where, "-exp_name", "rawInput.exp_name", "=="); 672 PXOPT_COPY_STR(config->args, where, "-warp_id", "warpInput.warp_id", "=="); 673 670 PXOPT_COPY_S64(config->args, where, "-magicked", "diffSkyfile.magicked", "=="); 671 pxAddLabelSearchArgs (config, where, "-label", "diffRun.label", "LIKE"); 672 673 PXOPT_LOOKUP_BOOL(template, config->args, "-template", false); 674 if (!template) { 675 PXOPT_COPY_S64(config->args, where, "-exp_id", "rawInput.exp_id", "=="); 676 PXOPT_COPY_STR(config->args, where, "-exp_name", "rawInput.exp_name", "=="); 677 PXOPT_COPY_STR(config->args, where, "-warp_id", "warpInput.warp_id", "=="); 678 PXOPT_COPY_TIME(config->args, where, "-dateobs_begin", "rawInput.dateobs", ">="); 679 PXOPT_COPY_TIME(config->args, where, "-dateobs_end", "rawInput.dateobs", "<="); 680 PXOPT_COPY_STR(config->args, where, "-filter", "rawInput.filter", "=="); 681 } else { 682 PXOPT_COPY_S64(config->args, where, "-exp_id", "rawTemplate.exp_id", "=="); 683 PXOPT_COPY_STR(config->args, where, "-exp_name", "rawTemplate.exp_name", "=="); 684 PXOPT_COPY_STR(config->args, where, "-warp_id", "warpTemplate.warp_id", "=="); 685 PXOPT_COPY_TIME(config->args, where, "-dateobs_begin", "rawTemplate.dateobs", ">="); 686 PXOPT_COPY_TIME(config->args, where, "-dateobs_end", "rawTemplate.dateobs", "<="); 687 PXOPT_COPY_STR(config->args, where, "-filter", "rawTemplate.filter", "=="); 688 } 689 690 PXOPT_LOOKUP_BOOL(all, config->args, "-all", false); 674 691 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); 675 692 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 693 694 PXOPT_LOOKUP_U64(magicked, config->args, "-magicked", false, false); 695 PXOPT_LOOKUP_BOOL(destreaked, config->args, "-destreaked", false); 696 PXOPT_LOOKUP_BOOL(not_destreaked, config->args, "-not_destreaked", false); 676 697 677 698 psString query = pxDataGet("difftool_skyfile.sql"); … … 685 706 psStringAppend(&query, " WHERE %s", whereClause); 686 707 psFree(whereClause); 708 } else if (!all) { 709 psError(PXTOOLS_ERR_DATA, true, "search parameters or -all are required"); 687 710 } 688 711 psFree(where); 712 713 if (not_destreaked) { 714 if (destreaked) { 715 psError(PXTOOLS_ERR_DATA, true, "providing -not_destreaked and -destreaked makes no sense"); 716 return false; 717 } 718 if (magicked) { 719 psError(PXTOOLS_ERR_DATA, true, "providing -not_destreaked and -magicked makes no sense"); 720 return false; 721 } 722 psStringAppend(&query, " AND diffSkyfile.magicked = 0"); 723 } 724 if (destreaked) { 725 psStringAppend(&query, " AND diffSkyfile.magicked != 0"); 726 } 727 689 728 690 729 // treat limit == 0 as "no limit" -
branches/eam_branches/20090715/ippTools/src/difftoolConfig.c
r25624 r25744 123 123 // -diffskyfile 124 124 psMetadata *diffskyfileArgs = psMetadataAlloc(); 125 psMetadataAddS64(diffskyfileArgs, PS_LIST_TAIL, "-diff_id", 0, "search by diff ID", 0); 126 psMetadataAddStr(diffskyfileArgs , PS_LIST_TAIL, "-skycell_id", 0, "define skycell ID", NULL); 127 psMetadataAddS64(diffskyfileArgs, PS_LIST_TAIL, "-diff_skyfile_id", 0, "search by diff_skyfile_id ID", 0); 128 psMetadataAddStr(diffskyfileArgs, PS_LIST_TAIL, "-tess_id", 0, "define tessellation ID", NULL); 129 psMetadataAddS64(diffskyfileArgs, PS_LIST_TAIL, "-exp_id", 0, "define exposure ID", 0); 130 psMetadataAddStr(diffskyfileArgs , PS_LIST_TAIL, "-exp_name", 0, "define exposure name", NULL); 131 psMetadataAddStr(diffskyfileArgs , PS_LIST_TAIL, "-warp_id", 0, "define warp_id", NULL); 132 psMetadataAddU64(diffskyfileArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); 133 psMetadataAddBool(diffskyfileArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); 134 psMetadataAddS16(diffskyfileArgs, PS_LIST_TAIL, "-fault", 0, "define fault code", 0); 125 psMetadataAddS64(diffskyfileArgs, PS_LIST_TAIL, "-diff_id", 0, "search by diff ID", 0); 126 psMetadataAddStr(diffskyfileArgs , PS_LIST_TAIL, "-skycell_id", 0, "search by skycell ID", NULL); 127 psMetadataAddS64(diffskyfileArgs, PS_LIST_TAIL, "-diff_skyfile_id", 0, "search by diff_skyfile_id ID", 0); 128 psMetadataAddStr(diffskyfileArgs, PS_LIST_TAIL, "-tess_id", 0, "search by tessellation ID", NULL); 129 psMetadataAddStr(diffskyfileArgs , PS_LIST_TAIL, "-warp_id", 0, "search by warp_id", NULL); 130 psMetadataAddBool(diffskyfileArgs, PS_LIST_TAIL, "-template", 0, "apply exposure args to template of bothways diff", false); 131 psMetadataAddS64(diffskyfileArgs, PS_LIST_TAIL, "-exp_id", 0, "search by exposure ID", 0); 132 psMetadataAddStr(diffskyfileArgs , PS_LIST_TAIL, "-exp_name", 0, "search by exposure name", NULL); 133 psMetadataAddTime(diffskyfileArgs, PS_LIST_TAIL, "-dateobs_begin", 0, "search for exposures by time (>=)", NULL); 134 psMetadataAddTime(diffskyfileArgs, PS_LIST_TAIL, "-dateobs_end", 0, "search for exposures by time (<=)", NULL); 135 psMetadataAddStr(diffskyfileArgs, PS_LIST_TAIL, "-filter", 0, "search for filter", NULL); 136 psMetadataAddS64(diffskyfileArgs, PS_LIST_TAIL, "-magicked", 0, "search by magicked value", 0); 137 psMetadataAddBool(diffskyfileArgs, PS_LIST_TAIL, "-destreaked", 0, "search for destreaked images", false); 138 psMetadataAddBool(diffskyfileArgs, PS_LIST_TAIL, "-not_destreaked", 0, "search for images that are not destreaked", false); 139 psMetadataAddStr(diffskyfileArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "search by diffRun label (LIKE comparison)", NULL); 140 psMetadataAddS16(diffskyfileArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 141 142 psMetadataAddBool(diffskyfileArgs, PS_LIST_TAIL, "-all", 0, "search without arguments", false); 143 psMetadataAddU64(diffskyfileArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); 144 psMetadataAddBool(diffskyfileArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); 135 145 136 146 // -revertdiffskyfile -
branches/eam_branches/20090715/ippTools/src/pstamptool.c
r25624 r25744 544 544 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); 545 545 PXOPT_LOOKUP_S64(exp_id, config->args, "-exp_id", false, false); 546 PXOPT_LOOKUP_S64(options, config->args, "-options", false, false); 546 547 547 548 // unless the job is being inserted with stop state require outputBase … … 568 569 fault, 569 570 exp_id, 570 outputBase 571 outputBase, 572 options 571 573 )) { 572 574 psError(PS_ERR_UNKNOWN, false, "database error"); … … 592 594 PS_ASSERT_PTR_NON_NULL(config, false); 593 595 594 PXOPT_LOOKUP_S64(req_id, config->args, "-req_id", false, false); 595 PXOPT_LOOKUP_S64(job_id, config->args, "-job_id", false, false); 596 psMetadata *where = psMetadataAlloc(); 597 PXOPT_COPY_S64(config->args, where, "-job_id", "job_id", "=="); 598 PXOPT_COPY_S64(config->args, where, "-req_id", "req_id", "=="); 599 PXOPT_COPY_S64(config->args, where, "-fault", "fault", "=="); 596 600 597 601 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); 598 602 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 599 603 600 psString query = NULL; 601 602 if (!req_id && !job_id) { 603 fprintf(stderr, "either req_id or job_id must be specified\n"); 604 if (!psListLength(where->list)) { 605 fprintf(stderr, "search arguments are required\n"); 604 606 exit (1); 605 607 } 606 608 607 if (req_id) { 608 psStringAppend(&query, 609 "SELECT" 610 " pstampJob.*, pstampRequest.name, pstampRequest.outProduct" 611 " FROM pstampJob" 612 " JOIN pstampRequest USING(req_id)" 613 " WHERE req_id = %" PRId64, req_id 614 ); 615 } else { 616 psStringAppend(&query, 617 "SELECT" 618 " pstampJob.*, pstampRequest.name, pstampRequest.outProduct" 619 " FROM pstampJob" 620 " JOIN pstampRequest USING(req_id)" 621 " WHERE job_id = %" PRId64, job_id 622 ); 623 } 609 psString query = pxDataGet("pstamptool_listjob.sql"); 610 if (!query) { 611 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 612 return false; 613 } 614 615 // use psDBGenerateWhereSQL because the SQL yields an intermediate table 616 if (psListLength(where->list)) { 617 psString whereClause = psDBGenerateWhereConditionSQL(where, "pstampJob"); 618 psStringAppend(&query, " WHERE %s", whereClause); 619 psFree(whereClause); 620 } 621 psFree(where); 624 622 625 623 // treat limit == 0 as "no limit" -
branches/eam_branches/20090715/ippTools/src/pstamptoolConfig.c
r25624 r25744 105 105 // -addjob 106 106 psMetadata *addjobArgs = psMetadataAlloc(); 107 psMetadataAddS64(addjobArgs, PS_LIST_TAIL, "-req_id", 0, "define job req_id", 0); 108 psMetadataAddStr(addjobArgs, PS_LIST_TAIL, "-rownum", 0, "define job rownum", NULL); 109 psMetadataAddStr(addjobArgs, PS_LIST_TAIL, "-job_type", 0, "define job job_type", "stamp"); 110 psMetadataAddStr(addjobArgs, PS_LIST_TAIL, "-outputBase", 0, "define job outputBase", NULL); 111 psMetadataAddStr(addjobArgs, PS_LIST_TAIL, "-state", 0, "new state", "run"); 112 psMetadataAddS64(addjobArgs, PS_LIST_TAIL, "-exp_id", 0, "exposure id", 0); 113 psMetadataAddS16(addjobArgs, PS_LIST_TAIL, "-fault", 0, "new result", 0); 107 psMetadataAddS64(addjobArgs, PS_LIST_TAIL, "-req_id", 0, "define job req_id", 0); 108 psMetadataAddStr(addjobArgs, PS_LIST_TAIL, "-rownum", 0, "define job rownum", NULL); 109 psMetadataAddStr(addjobArgs, PS_LIST_TAIL, "-job_type", 0, "define job job_type", "stamp"); 110 psMetadataAddStr(addjobArgs, PS_LIST_TAIL, "-outputBase", 0, "define job outputBase", NULL); 111 psMetadataAddStr(addjobArgs, PS_LIST_TAIL, "-state", 0, "define state", "run"); 112 psMetadataAddS64(addjobArgs, PS_LIST_TAIL, "-exp_id", 0, "define exposure id", 0); 113 psMetadataAddS64(addjobArgs, PS_LIST_TAIL, "-options", 0, "define options", 0); 114 psMetadataAddS16(addjobArgs, PS_LIST_TAIL, "-fault", 0, "define job result", 0); 114 115 115 116 // -listjob 116 117 psMetadata *listjobArgs = psMetadataAlloc(); 117 psMetadataAddS64(listjobArgs, PS_LIST_TAIL, "-req_id", 0, "define request", 0); 118 psMetadataAddS64(listjobArgs, PS_LIST_TAIL, "-job_id", 0, "define job", 0); 119 psMetadataAddU64(listjobArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); 120 psMetadataAddBool(listjobArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); 118 psMetadataAddS64(listjobArgs, PS_LIST_TAIL, "-req_id", 0, "select by request ID", 0); 119 psMetadataAddS64(listjobArgs, PS_LIST_TAIL, "-job_id", 0, "select by job ID", 0); 120 psMetadataAddS16(listjobArgs, PS_LIST_TAIL, "-fault", 0, "select by fault", 0); 121 psMetadataAddU64(listjobArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); 122 psMetadataAddBool(listjobArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); 121 123 122 124 // -pendingjob -
branches/eam_branches/20090715/ippTools/src/regtool.c
r25624 r25744 333 333 PXOPT_COPY_TIME(config->args, where, "-dateobs_begin", "dateobs", ">="); 334 334 PXOPT_COPY_TIME(config->args, where, "-dateobs_end", "dateobs", "<="); 335 PXOPT_COPY_STR(config->args, where, "-filter", "filter", "=="); 336 PXOPT_COPY_S64(config->args, where, "-magicked", "magicked", "=="); 337 338 PXOPT_LOOKUP_S64(magicked, config->args, "-magicked", false, false); 339 PXOPT_LOOKUP_BOOL(destreaked, config->args, "-destreaked", false); 340 PXOPT_LOOKUP_BOOL(not_destreaked, config->args, "-not_destreaked", false); 335 341 336 342 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); … … 360 366 psStringAppend(&query, " %s", "AND rawImfile.fault = 0"); 361 367 } 368 369 if (not_destreaked) { 370 if (destreaked) { 371 psError(PXTOOLS_ERR_DATA, true, "providing -not_destreaked and -destreaked makes no sense"); 372 return false; 373 } 374 if (magicked) { 375 psError(PXTOOLS_ERR_DATA, true, "providing -not_destreaked and -magicked makes no sense"); 376 return false; 377 } 378 psStringAppend(&query, " AND rawImfile.magicked = 0"); 379 } 380 if (destreaked) { 381 psStringAppend(&query, " AND rawImfile.magicked != 0"); 382 } 383 362 384 363 385 // add the ORDER BY statement if desired -
branches/eam_branches/20090715/ippTools/src/regtoolConfig.c
r25624 r25744 136 136 ADD_OPT(Str, processedimfileArgs, "-exp_name", "search by exposure name", NULL); 137 137 ADD_OPT(Str, processedimfileArgs, "-class_id", "search by class ID", NULL); 138 ADD_OPT(Str, processedimfileArgs, "-filter", "search by filter", NULL); 138 139 ADD_OPT(Time, processedimfileArgs, "-dateobs_begin", "search for exposures by time (>=)", NULL); 139 140 ADD_OPT(Time, processedimfileArgs, "-dateobs_end", "search for exposures by time (<)", NULL); 141 ADD_OPT(S64, processedimfileArgs, "-magicked", "search by magicked value", 0); 142 ADD_OPT(Bool, processedimfileArgs, "-destreaked", "only return imfiles that have been destreaked", false); 143 ADD_OPT(Bool, processedimfileArgs, "-not_destreaked", "only return imfiles that have not been destreaked", false); 140 144 ADD_OPT(U64, processedimfileArgs, "-limit", "limit result set to N items", 0); 141 145 ADD_OPT(Bool, processedimfileArgs, "-faulted", "only return imfiles with a fault status set", false); -
branches/eam_branches/20090715/ippTools/src/stacktool.c
r25624 r25744 859 859 860 860 psMetadata *where = psMetadataAlloc(); 861 PXOPT_COPY_S64(config->args, where, "-warp_id", "warpRun.warp_id", "==");862 861 PXOPT_COPY_S64(config->args, where, "-stack_id", "stackSumSkyfile.stack_id", "=="); 863 PXOPT_COPY_S64(config->args, where, "-exp_id", "rawExp.exp_id", "==");864 PXOPT_COPY_STR(config->args, where, "-exp_name", "rawExp.exp_name", "==");865 862 PXOPT_COPY_STR(config->args, where, "-tess_id", "stackRun.tess_id", "=="); 866 863 PXOPT_COPY_STR(config->args, where, "-skycell_id", "stackRun.skycell_id", "=="); 864 PXOPT_COPY_STR(config->args, where, "-filter", "stackRun.filter", "LIKE"); 865 PXOPT_COPY_STR(config->args, where, "-label", "stackRun.label", "=="); 866 PXOPT_COPY_S16(config->args, where, "-fault", "stackSumSkyfile.fault", "=="); 867 868 // The following three selectors are incompatible with the sql so omit them 869 // PXOPT_COPY_S64(config->args, where, "-warp_id", "warpRun.warp_id", "=="); 870 // PXOPT_COPY_S64(config->args, where, "-exp_id", "rawExp.exp_id", "=="); 871 // PXOPT_COPY_STR(config->args, where, "-exp_name", "rawExp.exp_name", "=="); 872 873 PXOPT_LOOKUP_BOOL(all, config->args, "-all", false); 867 874 868 875 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); … … 879 886 psStringAppend(&query, " WHERE %s", whereClause); 880 887 psFree(whereClause); 881 } 888 } else if (!all) { 889 psError(PXTOOLS_ERR_DATA, true, "search parameters or -all are required"); 890 return false; 891 } 892 882 893 psFree(where); 883 894 -
branches/eam_branches/20090715/ippTools/src/stacktoolConfig.c
r25624 r25744 164 164 psMetadata *sumskyfileArgs= psMetadataAlloc(); 165 165 psMetadataAddS64(sumskyfileArgs, PS_LIST_TAIL, "-stack_id", 0, "search by stack ID", 0); 166 psMetadataAddS64(sumskyfileArgs, PS_LIST_TAIL, "-warp_id", 0, "search by warp ID", 0);167 166 psMetadataAddStr(sumskyfileArgs, PS_LIST_TAIL, "-tess_id", 0, "search by tess ID", 0); 168 167 psMetadataAddStr(sumskyfileArgs, PS_LIST_TAIL, "-skycell_id", 0, "search by skycell ID", 0); 168 #ifdef notdef 169 // These don't work so omit (for now) We probably should create a different mode for this type of search. 170 psMetadataAddS64(sumskyfileArgs, PS_LIST_TAIL, "-warp_id", 0, "search by warp ID", 0); 169 171 psMetadataAddS64(sumskyfileArgs, PS_LIST_TAIL, "-exp_id", 0, "search by exposure ID", 0); 170 172 psMetadataAddStr(sumskyfileArgs, PS_LIST_TAIL, "-exp_name", 0, "search by exposure name", NULL); 173 #endif 174 psMetadataAddStr(sumskyfileArgs, PS_LIST_TAIL, "-label", 0, "search by stackRun.label", NULL); 175 psMetadataAddStr(sumskyfileArgs, PS_LIST_TAIL, "-filter", 0, "search by filter (LIKE comparison)", NULL); 176 psMetadataAddS16(sumskyfileArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 171 177 psMetadataAddU64(sumskyfileArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); 172 178 psMetadataAddBool(sumskyfileArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); 179 psMetadataAddBool(sumskyfileArgs, PS_LIST_TAIL, "-all", 0, "enable search without arguments", false); 173 180 174 181 // -revertsumskyfile -
branches/eam_branches/20090715/ippTools/src/warptool.c
r25400 r25744 1198 1198 PXOPT_COPY_STR(config->args, where, "-exp_name", "rawExp.exp_name", "=="); 1199 1199 PXOPT_COPY_S64(config->args, where, "-fake_id", "fakeRun.fake_id", "=="); 1200 PXOPT_COPY_TIME(config->args, where, "-dateobs_begin", "rawExp.dateobs", ">="); 1201 PXOPT_COPY_TIME(config->args, where, "-dateobs_end", "rawExp.dateobs", "<="); 1202 PXOPT_COPY_STR(config->args, where, "-filter", "rawExp.filter", "=="); 1203 PXOPT_COPY_S64(config->args, where, "-magicked", "warpSkyfile.magicked", "=="); 1204 pxAddLabelSearchArgs (config, where, "-label", "warpRun.label", "LIKE"); 1205 1206 PXOPT_LOOKUP_U64(magicked, config->args, "-magicked", false, false); 1207 PXOPT_LOOKUP_BOOL(destreaked, config->args, "-destreaked", false); 1208 PXOPT_LOOKUP_BOOL(not_destreaked, config->args, "-not_destreaked", false); 1209 1210 PXOPT_LOOKUP_BOOL(all, config->args, "-all", false); 1200 1211 1201 1212 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); … … 1213 1224 psStringAppend(&query, " AND %s", whereClause); 1214 1225 psFree(whereClause); 1226 } else if (!all) { 1227 psError(PXTOOLS_ERR_DATA, true, "search parameters or -all are required"); 1228 return false; 1215 1229 } 1216 1230 psFree(where); 1231 1232 if (not_destreaked) { 1233 if (destreaked) { 1234 psError(PXTOOLS_ERR_DATA, true, "providing -not_destreaked and -destreaked makes no sense"); 1235 return false; 1236 } 1237 if (magicked) { 1238 psError(PXTOOLS_ERR_DATA, true, "providing -not_destreaked and -magicked makes no sense"); 1239 return false; 1240 } 1241 psStringAppend(&query, " AND warpSkyfile.magicked = 0"); 1242 } 1243 if (destreaked) { 1244 psStringAppend(&query, " AND warpSkyfile.magicked != 0"); 1245 } 1217 1246 1218 1247 // treat limit == 0 as "no limit" -
branches/eam_branches/20090715/ippTools/src/warptoolConfig.c
r25400 r25744 215 215 psMetadataAddStr(warpedArgs, PS_LIST_TAIL, "-exp_name", 0, "search by exposure tag", 0); 216 216 psMetadataAddS64(warpedArgs, PS_LIST_TAIL, "-fake_id", 0, "search by phase 3 version of exposure tag", 0); 217 psMetadataAddTime(warpedArgs, PS_LIST_TAIL, "-dateobs_begin", 0, "search for exposures by time (>=)", NULL); 218 psMetadataAddTime(warpedArgs, PS_LIST_TAIL, "-dateobs_end", 0, "search for exposures by time (<=)", NULL); 219 psMetadataAddStr(warpedArgs, PS_LIST_TAIL, "-filter", 0, "search for exposures by filter", NULL); 220 psMetadataAddBool(warpedArgs, PS_LIST_TAIL, "-destreaked", 0, "search for destreaked images", false); 221 psMetadataAddBool(warpedArgs, PS_LIST_TAIL, "-not_destreaked", 0, "search for images that have not been destreaked", false); 222 psMetadataAddS64(warpedArgs, PS_LIST_TAIL, "-magicked", 0, "search by magicked value", 0); 223 psMetadataAddS16(warpedArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 224 psMetadataAddStr(warpedArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "search by warpRun label", NULL); 225 226 psMetadataAddBool(warpedArgs, PS_LIST_TAIL, "-all", 0, "search without arguments", false); 217 227 psMetadataAddU64(warpedArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); 218 228 psMetadataAddBool(warpedArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); -
branches/eam_branches/20090715/ppStack/src/ppStackLoop.c
r23576 r25744 80 80 return false; 81 81 } 82 psLogMsg("ppStack", PS_LOG_INFO, "Stage 2: Generate Convolutions and Save: %f sec",83 psTimerClear("PPSTACK_STEPS"));84 82 ppStackMemDump("convolve"); 85 psLogMsg("ppStack", PS_LOG_INFO, "Stage 4: Make Initial Stack: %f sec", psTimerClear("PPSTACK_STEPS"));83 psLogMsg("ppStack", PS_LOG_INFO, "Stage 3: Make Initial Stack: %f sec", psTimerClear("PPSTACK_STEPS")); 86 84 87 85 … … 94 92 return false; 95 93 } 96 psLogMsg("ppStack", PS_LOG_INFO, "Stage 5: Pixel Rejection: %f sec", psTimerClear("PPSTACK_STEPS"));94 psLogMsg("ppStack", PS_LOG_INFO, "Stage 4: Pixel Rejection: %f sec", psTimerClear("PPSTACK_STEPS")); 97 95 ppStackMemDump("reject"); 98 96 … … 106 104 return false; 107 105 } 108 psLogMsg("ppStack", PS_LOG_INFO, "Stage 6: Final Stack: %f sec", psTimerClear("PPSTACK_STEPS"));106 psLogMsg("ppStack", PS_LOG_INFO, "Stage 5: Final Stack: %f sec", psTimerClear("PPSTACK_STEPS")); 109 107 ppStackMemDump("final"); 110 108 … … 118 116 return false; 119 117 } 120 psLogMsg("ppStack", PS_LOG_INFO, "Stage 7: WCS & JPEGS: %f sec", psTimerClear("PPSTACK_STEPS"));118 psLogMsg("ppStack", PS_LOG_INFO, "Stage 6: WCS & JPEGS: %f sec", psTimerClear("PPSTACK_STEPS")); 121 119 ppStackMemDump("cleanup"); 122 120 … … 131 129 return false; 132 130 } 133 psLogMsg("ppStack", PS_LOG_INFO, "Stage 8: Photometry Analysis: %f sec", psTimerClear("PPSTACK_STEPS"));131 psLogMsg("ppStack", PS_LOG_INFO, "Stage 7: Photometry Analysis: %f sec", psTimerClear("PPSTACK_STEPS")); 134 132 ppStackMemDump("photometry"); 135 133 … … 142 140 return false; 143 141 } 144 psLogMsg("ppStack", PS_LOG_INFO, "Stage 9: Final output: %f sec", psTimerClear("PPSTACK_STEPS"));142 psLogMsg("ppStack", PS_LOG_INFO, "Stage 8: Final output: %f sec", psTimerClear("PPSTACK_STEPS")); 145 143 ppStackMemDump("finish"); 146 144 -
branches/eam_branches/20090715/psconfig/tagsets/ipp-2.9.perl
r25624 r25744 3 3 00 Module::Build Module-Build-0.2806.tar.gz 0.2806 4 4 01 ExtUtils::MakeMaker ExtUtils-MakeMaker-6.31.tar.gz 0 5 02 Params::Validate Params-Validate-0.9 1.tar.gz 0.775 02 Params::Validate Params-Validate-0.92.tar.gz 0.92 6 6 # 02 Apache::Test Apache-Test-1.29.tar.gz 1.29 7 7 03 DateTime::TimeZone DateTime-TimeZone-0.59.tar.gz 0 … … 82 82 78 SQL::Interp SQL-Interp-1.06.tar.gz 83 83 79 Log::Dispatch::Email::MailSend Log-Dispatch-2.22.tar.gz 84 80 Abstract::Meta::Class Abstract-Meta-Class-0.1 1.tar.gz84 80 Abstract::Meta::Class Abstract-Meta-Class-0.13.tar.gz 85 85 81 DBIx::Connection DBIx-Connection-0.13.tar.gz 86 86 82 Simple::SAX::Serializer Simple-SAX-Serializer-0.05.tar.gz 87 87 83 Test::Distribution Test-Distribution-2.00.tar.gz 88 84 Test::DBUnit Test ::DBUnit-0.20.tar.gz88 84 Test::DBUnit Test-DBUnit-0.20.tar.gz 0.20 -
branches/eam_branches/20090715/pstamp/scripts/Makefile.am
r25406 r25744 11 11 pstamp_parser_run.pl \ 12 12 pstamp_queue_requests.pl \ 13 pstamp_request_file \ 13 14 pstamp_results_file.pl \ 14 15 pstamp_revert_request.pl \ -
branches/eam_branches/20090715/pstamp/scripts/pstamp_finish.pl
r25624 r25744 81 81 my $fileset = $req_name; 82 82 83 84 # Here we invoke the assumption that the output for the request is placed in the85 # fileset directory directly86 # my $out_dir = "$outputDataStoreRoot/$product/$fileset";87 88 # now we are assuming that the output directory is the dirname of the request file89 # XXX: put this in the database90 91 83 print STDERR "product: $product REQ_NAME: $req_name $out_dir\n" if $verbose; 92 84 … … 216 208 217 209 # ra_deg and dec_deg are the coordinates of center of the stamp 218 # XXX: parse the stamp header to find it 219 print $tdf "0.0|0.0|"; 210 # XXX do this more cleanly 211 my (undef, $ra_deg, $dec_deg) = split " ", `echo $out_dir/$img_name | fields -x -1 RA_DEG DEC_DEG`; 212 $ra_deg = 0.0 if (!$ra_deg); 213 $dec_deg = 0.0 if (!$dec_deg); 214 print $tdf "$ra_deg|$dec_deg|"; 220 215 221 216 print $tdf "$exp_info|"; … … 302 297 303 298 if ($rownum eq 0) { 304 my $dummy_rowinfo = "0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0| ";299 my $dummy_rowinfo = "0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|"; 305 300 return (undef, $dummy_rowinfo, "none"); 306 301 } … … 313 308 my $tess_id = $row->{TESS_ID}; 314 309 $tess_id = "null" if !$tess_id; 310 my $comment = $row->{COMMENT}; 311 $comment = "null" if !$comment; 312 my $label = $row->{LABEL}; 313 $label = "null" if !$label; 315 314 316 315 # This is ugly, error prone and hard to change. 317 316 # Create a results file module and provide a list of the names (we have the data in the columns) 318 317 my $rowinfo = "$row->{PROJECT}|$row->{JOB_TYPE}|$row->{REQ_TYPE}|$row->{IMG_TYPE}|"; 319 $rowinfo .= "$row->{ID}|$tess_id|$component|$ row->{OPTION_MASK}|$row->{MJD_MIN}|$row->{MJD_MAX}|";318 $rowinfo .= "$row->{ID}|$tess_id|$component|$label|$row->{OPTION_MASK}|$row->{MJD_MIN}|$row->{MJD_MAX}|"; 320 319 $rowinfo .= "$row->{REQFILT}|$row->{COORD_MASK}|$row->{CENTER_X}|$row->{CENTER_Y}|"; 321 $rowinfo .= "$row->{WIDTH}|$row->{HEIGHT}"; 320 $rowinfo .= "$row->{WIDTH}|$row->{HEIGHT}|"; 321 $rowinfo .= $comment; 322 322 323 323 return ($row, $rowinfo, $row->{PROJECT}); -
branches/eam_branches/20090715/pstamp/scripts/pstamp_job_run.pl
r25406 r25744 16 16 use PS::IPP::PStamp::RequestFile qw( :standard ); 17 17 use IPC::Cmd 0.36 qw( can_run run ); 18 use POSIX; 18 19 19 20 use PS::IPP::Metadata::Config; … … 93 94 run(command => $command, verbose => $verbose); 94 95 95 if ($success) { 96 my $exitStatus; 97 if (WIFEXITED($error_code)) { 98 $exitStatus = WEXITSTATUS($error_code); 99 } else { 100 print STDERR "ppstamp failed error_code: $error_code\n"; 101 $exitStatus = $PS_EXIT_SYS_ERROR; 102 } 103 104 if ($exitStatus == 0) { 96 105 my $dir = dirname($outputBase); 97 106 … … 133 142 close F; 134 143 $jobStatus = $PS_EXIT_SUCCESS; 135 } else { 136 $jobStatus = $error_code >> 8; 137 my_die( "ppstamp failed with error code: $jobStatus", $job_id, $jobStatus); 144 } elsif ($exitStatus == $PSTAMP_NO_OVERLAP) { 145 $jobStatus = $PSTAMP_NO_OVERLAP 146 } else { 147 my_die( "ppstamp failed with error code: $exitStatus", $job_id, $exitStatus); 138 148 } 139 149 } elsif ($jobType eq "get_image") { … … 162 172 { 163 173 my $command = "$pstamptool -updatejob -job_id $job_id -state stop"; 174 $command .= " -fault $jobStatus" if $jobStatus; 164 175 $command .= " -dbname $dbname" if $dbname; 165 176 $command .= " -dbserver $dbserver" if $dbserver; -
branches/eam_branches/20090715/pstamp/scripts/pstamp_results_file.pl
r25022 r25744 90 90 { name => 'TESS_ID', type => '64A', writetype => TSTRING }, 91 91 { name => 'COMPONENT', type => '64A', writetype => TSTRING }, 92 { name => 'LABEL', type => '64A', writetype => TSTRING }, 92 93 93 94 # output parameters … … 104 105 { name => 'WIDTH', type => 'D', writetype => TDOUBLE }, 105 106 { name => 'HEIGHT', type => 'D', writetype => TDOUBLE }, 107 { name => 'COMMENT', type => '64A', writetype => TSTRING }, 106 108 ]; 107 109 -
branches/eam_branches/20090715/pstamp/scripts/pstampparse.pl
r25624 r25744 16 16 use File::Basename qw(basename); 17 17 use Carp; 18 use POSIX qw( strftime );18 use POSIX; 19 19 20 20 my $verbose; … … 72 72 } 73 73 74 # list_job is a deugging mode 74 75 $no_update = 1 if $mode eq "list_job"; 75 76 … … 185 186 } 186 187 my $req_type = $row->{REQ_TYPE}; 187 $stage = $row->{IMG_TYPE};188 my $id = $row->{ID};188 $stage = $row->{IMG_TYPE}; 189 my $id = $row->{ID}; 189 190 my $component = $row->{COMPONENT}; 190 191 my $filter = $row->{REQFILT}; 191 my $tess_id = $row->{TESS_ID}; 192 193 my $filter = $row->{REQFILT}; 192 194 my $mjd_min = $row->{MJD_MIN}; 193 195 my $mjd_max = $row->{MJD_MAX}; 196 my $label = $row->{LABEL}; 194 197 195 198 my $option_mask= $row->{OPTION_MASK}; … … 222 225 my_die("job_type is list_uri but mode is $mode", $PS_EXIT_PROG_ERROR) if ($job_type eq "list_uri") and ($mode ne "list_uri"); 223 226 224 225 227 my $image_db = $proj_hash->{dbname}; 226 228 my $camera = $proj_hash->{camera}; … … 228 230 229 231 # Temporary hack so that MOPS can get at non-magicked data 230 if ($product eq "mops-pstamp-results") {232 if ($product and ($product eq "mops-pstamp-results")) { 231 233 $need_magic = 0; 232 234 } … … 269 271 my ($x, $y); 270 272 271 $imageList = locate_images($ipprc, $image_db, $req_type, $stage, $id, $ search_component,272 $inverse, $ skycenter, $x, $y, $mjd_min, $mjd_max, $filter, $verbose);273 $imageList = locate_images($ipprc, $image_db, $req_type, $stage, $id, $tess_id, $search_component, 274 $inverse, $need_magic, $x, $y, $mjd_min, $mjd_max, $filter, $label, $verbose); 273 275 274 276 if (!$imageList or !@$imageList) { … … 305 307 my $num_jobs = 0; 306 308 my $rownum = $row->{ROWNUM}; 309 my $option_mask = $row->{OPTION_MASK}; 307 310 my $components = $row->{components}; 308 311 … … 346 349 if (($stage ne "stack") and ($need_magic and !$image->{magicked})) { 347 350 # XXX: should we add a faulted job so the client can know what happened if no images come back? 351 # This test is made in locate_images now so this code never runs. This leads to no feedback 352 # to users, but speeds up processing significatnly 348 353 print STDERR "skipping non-magicked image $imagefile\n" if $verbose; 349 354 … … 369 374 $args .= " -file $imagefile"; 370 375 371 if (($ row->{OPTION_MASK}& $PSTAMP_SELECT_MASK) && $image->{mask} ) {376 if (($option_mask & $PSTAMP_SELECT_MASK) && $image->{mask} ) { 372 377 $args .= " -mask $image->{mask}"; 373 378 } 374 if (($ row->{OPTION_MASK}& $PSTAMP_SELECT_WEIGHT) and $image->{weight} ) {379 if (($option_mask & $PSTAMP_SELECT_WEIGHT) and $image->{weight} ) { 375 380 $args .= " -variance $image->{weight}"; 376 381 } … … 407 412 $num_jobs++; 408 413 my $command = "$pstamptool -addjob -req_id $req_id -job_type $row->{JOB_TYPE}" 409 . " -outputBase $output_base -rownum $rownum -state $newState ";414 . " -outputBase $output_base -rownum $rownum -state $newState -options $option_mask"; 410 415 $command .= " -fault $fault" if $fault; 411 416 $command .= " -exp_id $exp_id" if $exp_id; … … 542 547 run(command => $command, verbose => $verbose); 543 548 unless ($success) { 544 print STDERR @$stderr_buf; 545 my $rc = $error_code >> 8; 546 my_die( "dvoImagesAtCoords failed: $rc", $PS_EXIT_UNKNOWN_ERROR); 549 # don't fail if the program exited normally and exit status was PSTAMP_NO_OVERLAP 550 # That just means that the coordinate didn't match any image/skycell 551 if (!WIFEXITED($error_code) || (WEXITSTATUS($error_code) ne $PSTAMP_NO_OVERLAP)) { 552 print STDERR @$stderr_buf; 553 my $rc = WIFEXITED($error_code) ? WEXITSTATUS($error_code) : $PS_EXIT_SYS_ERROR; 554 my_die( "dvoImagesAtCoords failed: $rc", $rc); 555 } 547 556 } 548 557 # now we have a list of row numbers and components … … 659 668 return 0 if ($r1->{IMG_TYPE} ne $r2->{IMG_TYPE}); 660 669 return 0 if ($r1->{ID} ne $r2->{ID}); 670 return 0 if ($r1->{TESS_ID} ne $r2->{TESS_ID}); 671 return 0 if ($r1->{REQFILT} ne $r2->{REQFILT}); 672 return 0 if ($r1->{LABEL} ne $r2->{LABEL}); 673 return 0 if ($r1->{MJDMIN} ne $r2->{MJDMAX}); 674 return 0 if ($r1->{MJDMAX} ne $r2->{MJDMAX}); 661 675 return 0 if ($r1->{inverse} ne $r2->{inverse}); 662 676 -
branches/eam_branches/20090715/pstamp/src/Makefile.am
r19229 r25744 1 1 bin_PROGRAMS = ppstamp pstamprequest pstampdump 2 3 include_HEADERS = \ 4 pstamp.h 2 5 3 6 noinst_HEADERS = \ 4 7 ppstamp.h \ 8 pstampint.h \ 5 9 pstampErrorCodes.h 6 10 -
branches/eam_branches/20090715/pstamp/src/ppstamp.h
r25406 r25744 6 6 #endif 7 7 8 #include "pstamp .h"8 #include "pstampint.h" 9 9 #include "ppstampOptions.h" 10 10 -
branches/eam_branches/20090715/pstamp/src/ppstampMakeStamp.c
r25624 r25744 48 48 } 49 49 50 static bool copyMetadata(pmFPAfile *output, pmFPAfile *input, pmChip *inChip, ppstampOptions *options )50 static bool copyMetadata(pmFPAfile *output, pmFPAfile *input, pmChip *inChip, ppstampOptions *options, pmAstromObj *center) 51 51 { 52 52 pmChip *outChip; … … 61 61 // since some of the keywords might be duplicated we may not want to copy both 62 62 63 // copy the fpa concepts64 outChip->parent->concepts = psMetadataCopy(outChip->parent->concepts, inChip->parent->concepts);65 66 63 pmHDU *inHDU = pmHDUFromChip(inChip); 67 64 pmHDU *outHDU = pmHDUGetHighest(output->fpa, outChip, NULL); … … 73 70 } 74 71 72 // copy the fpa concepts 73 pmConceptsCopyFPA(output->fpa, input->fpa, false, false); 74 pmConceptsCopyChip(outChip, inChip, false); 75 pmCell *outCell = outChip->cells->data[0]; // The only output cell 76 77 if (inChip->cells->n == 1) { 78 pmConceptsCopyCell(outCell, inChip->cells->data[0]); 79 // Need to fix up the trimsec and biassec to correspond to the output 80 psMetadataItem *trimsec = psMetadataLookup(outCell->concepts, "CELL.TRIMSEC"); 81 psFree(trimsec->data.V); 82 trimsec->data.V = NULL; 83 psMetadataItem *biassec = psMetadataLookup(outCell->concepts, "CELL.BIASSEC"); 84 psFree(biassec->data.V); 85 biassec->data.V = psListAlloc(NULL); 86 } else { 87 psList *inCells = psArrayToList(inChip->cells); // Input cells 88 pmConceptsAverageCells(outCell, inCells, NULL, NULL, false); 89 psFree(inCells); 90 } 75 91 76 92 // If input had WCS convert it for stamp … … 93 109 } 94 110 111 psMetadataAddF64(outHDU->header, PS_LIST_TAIL, "RA_DEG", PS_META_REPLACE, "Right Ascension of stamp center", RAD_TO_DEG(center->sky->r)); 112 psMetadataAddF64(outHDU->header, PS_LIST_TAIL, "DEC_DEG", PS_META_REPLACE, "Declination of stamp center", RAD_TO_DEG(center->sky->d)); 113 95 114 ppstampVersionMetadata(outHDU->header, options); 96 115 … … 178 197 179 198 static int makeStamp(pmConfig *config, ppstampOptions *options, pmFPAfile *input, 180 pmChip *inChip, pmFPAview *view )199 pmChip *inChip, pmFPAview *view, pmAstromObj *center) 181 200 { 182 201 int status = false; … … 285 304 286 305 if (status) { 287 status = copyMetadata(output, input, inChip, options );306 status = copyMetadata(output, input, inChip, options, center); 288 307 } 289 308 return status ? PS_EXIT_SUCCESS : PS_EXIT_UNKNOWN_ERROR; … … 360 379 { 361 380 pmAstromObj *pt = pmAstromObjAlloc(); 362 363 if (!options->roip.celestialCenter) {364 // Center was specified in chip coordinates, transform to the sky and the TP365 chipToSky(center, fpa, chip);366 }367 381 368 382 // calculate the four corners of the bounding box in sky coordinates, translate them to … … 470 484 center->chip->yErr = 0; 471 485 onChip = true; 486 chipToSky(center, input->fpa, chip); 472 487 } 473 488 } … … 573 588 case PPSTAMP_ON: 574 589 case PPSTAMP_PARTIALLY_ON: 575 returnval = makeStamp(config, options, input, chip, view );590 returnval = makeStamp(config, options, input, chip, view, center); 576 591 allDone = true; 577 592 foundOverlap = true; -
branches/eam_branches/20090715/pstamp/src/pstamp.h
r25624 r25744 1 1 #ifndef PSTAMP_H 2 2 #define PSTAMP_H 3 4 #include <stdio.h>5 #include <string.h>6 #include <strings.h> // for strcasecmp7 #include <unistd.h> // for unlink8 #include "pslib.h"9 #include "psmodules.h"10 #include "pstampErrorCodes.h"11 12 typedef enum {13 PSTAMP_UNKNOWN = -1,14 PSTAMP_RAW,15 PSTAMP_CHIP,16 PSTAMP_WARP,17 PSTAMP_DIFF,18 PSTAMP_STACK19 } pstampImageType;20 21 22 // command modes for pstampparse23 typedef enum {24 PSP_MODE_UNKNOWN = 0,25 PSP_MODE_QUEUE_JOB,26 PSP_MODE_LIST_URI,27 PSP_MODE_LIST_JOB28 } pspMode;29 3 30 4 // error codes returned to users in results flie -
branches/eam_branches/20090715/pstamp/src/pstampGetROI.c
r18243 r25744 3 3 #endif 4 4 5 #include "pstamp .h"5 #include "pstampint.h" 6 6 #include "pstampROI.h" 7 7 #include "ohana.h" -
branches/eam_branches/20090715/pstamp/src/pstamprequest.c
r21243 r25744 1 1 #include <pslib.h> 2 2 #include <string.h> 3 #include "pstamp .h"3 #include "pstampint.h" 4 4 #include "pstampROI.h" 5 5 -
branches/eam_branches/20090715/pstamp/test/asteroid.txt
r25406 r25744 16 16 # 17 17 18 19 18 # These coordinates get stamps from warp and diff images that show a moving object that mops found. 20 19 21 # ROWNUM PROJECT JOB_TYPE OPTION_MASK REQ_TYPE IMG_TYPE ID TESS_ID COMPONENT COORD_MASK CENTER_X CENTER_Y WIDTH HEIGHT REQFILT MJD_MIN MJD_MAX 22 23 1 gpc1 stamp 3 bydiff warp 362483 NULL NULL 2 284.688522833822 -3.86916140936841 200 200 null 0 0 24 2 gpc1 stamp 3 bydiff diff 362483 NULL NULL 2 284.688522833822 -3.86916140936841 200 200 null 0 0 25 3 gpc1 stamp 1027 bydiff warp 362483 NULL NULL 2 284.688522833822 -3.86916140936841 200 200 null 0 0 26 4 gpc1 stamp 1027 bydiff diff 362483 NULL NULL 2 284.688522833822 -3.86916140936841 200 200 null 0 0 20 # ID | ROI Specification | JOB Specification | Images of interest specification 21 # ROWNUM CENTER_X CENTER_Y WIDTH HEIGHT COORD_MASK JOB_TYPE OPTION_MASK PROJECT REQ_TYPE IMG_TYPE ID TESS_ID COMPONENTLABEL REQFILT MJD_MIN MJD_MAX | COMMENT 22 # 23 1 284.688522833822 -3.86916140936841 200 200 2 stamp 3 gpc1 bydiff warp 362483 NULL NULL null null 0 0 | 24 2 284.688522833822 -3.86916140936841 200 200 2 stamp 3 gpc1 bydiff diff 362483 NULL NULL null null 0 0 | 25 3 284.688522833822 -3.86916140936841 200 200 2 stamp 1027 gpc1 bydiff warp 362483 NULL NULL null null 0 0 | 26 4 284.688522833822 -3.86916140936841 200 200 2 stamp 1027 gpc1 bydiff diff 362483 NULL NULL null null 0 0 | 27 27 28 28 -
branches/eam_branches/20090715/pstamp/test/gpc1_sample.txt
r25624 r25744 15 15 # subsequent lines define the rows in the table 16 16 17 # ROWNUM PROJECT JOB_TYPE OPTION_MASK REQ_TYPE IMG_TYPE ID TESS_ID COMPONENT COORD_MASK CENTER_X CENTER_Y WIDTH HEIGHT REQFILT MJD_MIN MJD_MAX 17 ## ID | ROI Specification | JOB Specification | Images of interest specification 18 # ROWNUM CENTER_X CENTER_Y WIDTH HEIGHT COORD_MASK JOB_TYPE OPTION_MASK PROJECT REQ_TYPE IMG_TYPE ID TESS_ID COMPONENT LABEL REQFILT MJD_MIN MJD_MAX | COMMENT 18 19 # warps from various epochs for one of the SN candidates. Specifiying the skycell speeds up processing 19 1 gpc1 stamp 1 byid warp 6245 null skycell.077 2 242.400666 55.273513 200 200 null 0 0 20 2 gpc1 stamp 1 byid warp 6254 null skycell.077 2 242.400666 55.273513 200 200 null 0 0 21 3 gpc1 stamp 1 byid warp 6264 null skycell.077 2 242.400666 55.273513 200 200 null 0 0 22 4 gpc1 stamp 1 byid warp 6317 null skycell.077 2 242.400666 55.273513 200 200 null 0 0 23 5 gpc1 stamp 1 byid warp 6324 null skycell.077 2 242.400666 55.273513 200 200 null 0 0 24 6 gpc1 stamp 1 byid warp 6465 null skycell.077 2 242.400666 55.273513 200 200 null 0 0 25 7 gpc1 stamp 1 byid warp 6466 null skycell.077 2 242.400666 55.273513 200 200 null 0 0 26 20 1 242.400666 55.273513 200 200 2 stamp 1 gpc1 byid warp 6245 null skycell.077 null null 0 0 | 21 2 242.400666 55.273513 200 200 2 stamp 1 gpc1 byid warp 6254 null skycell.077 null null 0 0 | 22 3 242.400666 55.273513 200 200 2 stamp 1 gpc1 byid warp 6264 null skycell.077 null null 0 0 | 23 4 242.400666 55.273513 200 200 2 stamp 1 gpc1 byid warp 6317 null skycell.077 null null 0 0 | 24 5 242.400666 55.273513 200 200 2 stamp 1 gpc1 byid warp 6324 null skycell.077 null null 0 0 | 25 6 242.400666 55.273513 200 200 2 stamp 1 gpc1 byid warp 6465 null skycell.077 null null 0 0 | 26 7 242.400666 55.273513 200 200 2 stamp 1 gpc1 byid warp 6466 null skycell.077 null null 0 0 | 27 27 28 28 # get a specific warp 29 10 gpc1 stamp 1 byid warp 6316 null skycell.077 2 242.400666 55.273513 200 200 null 0 029 10 242.400666 55.273513 200 200 2 stamp 1 gpc1 byid warp 6316 null skycell.077 null null 0 0 | 30 30 31 31 # get stamps from all warps for exposure (only destreaked ones will succeed) 32 11 gpc1 stamp 1 byexp warp o4973g0123o null skycell.077 2 242.400666 55.273513 200 200 null 0 032 11 242.400666 55.273513 200 200 2 stamp 1 gpc1 byexp warp o4973g0123o null skycell.077 null null 0 0 | 33 33 34 34 # get stamps from all chipRuns for exposure (only destreaked ones will succeed) 35 35 # add the mask and weight images as well 36 12 gpc1 stamp 7 byexp chip o4973g0123o null null 2 242.400666 55.273513 200 200 null 0 036 12 242.400666 55.273513 200 200 2 stamp 7 gpc1 byexp chip o4973g0123o null skycell.077 null null 0 0 | 37 37 38 38 # get the corresponding diff 39 13 gpc1 stamp 1 byexp diff o4973g0123o null null 2 242.400666 55.273513 200 200 null 0 039 13 242.400666 55.273513 200 200 2 stamp 1 gpc1 byexp diff o4973g0123o null null null null 0 0 | 40 40 41 # get the stack that was the templa e for that stack42 14 gpc1 stamp 1 byid stack 14031 null null 2 242.400666 55.273513 200 200 null 0 043 # 41 # get the stack that was the template for that stack 42 14 242.400666 55.273513 200 200 2 stamp 1 gpc1 byid stack 14031 null null null null 0 0 | 43 44 44 # get the same stamp by go through the diff 45 15 gpc1 stamp 1 bydiff stack 193939 null null 2 242.400666 55.273513 200 200 null 0 0 46 45 15 242.400666 55.273513 200 200 2 stamp 1 gpc1 bydiff stack 193939 null null null null 0 0 | -
branches/eam_branches/20090715/pstamp/test/pstamp_req_create
r25022 r25744 1 1 #!/usr/bin/env perl 2 3 print STDERR "This script is obsolete. See ../scripts/pstamp_request_file\n"; 4 exit 1; 2 5 3 6 # create a Postage Stamp Request file from a textual description -
branches/eam_branches/20090715/pswarp/src/pswarpDefine.c
r21323 r25744 65 65 int numCols = psMetadataLookupS32(NULL, hdu->header, "NAXIS1"); ///< Number of columns 66 66 int numRows = psMetadataLookupS32(NULL, hdu->header, "NAXIS2"); ///< Number of rows 67 if ((numCols == 0) || (numRows == 0)) { 68 psError(PS_ERR_UNKNOWN, false, "skycell has invalid dimensions %d x %d", numCols, numRows); 69 psFree(view); 70 return false; 71 } 67 72 68 73 pmCell *target = pmFPAviewThisCell(view, output->fpa); ///< Target cell -
branches/eam_branches/20090715/pswarp/src/pswarpLoop.c
r25624 r25744 397 397 } 398 398 399 pmModelClassSetLimits(PM_MODEL_LIMITS_STRICT); 400 399 401 // measure the PSF using these sources 400 402 if (!psphotReadoutFindPSF(config, view, sources)) {
Note:
See TracChangeset
for help on using the changeset viewer.
