Changeset 39224
- Timestamp:
- Dec 3, 2015, 4:14:24 PM (11 years ago)
- Location:
- branches/eam_branches/ipp-20151113
- Files:
-
- 10 deleted
- 47 edited
- 3 copied
-
. (modified) (1 prop)
-
Nebulous/nebclient (modified) (1 prop)
-
Ohana (modified) (1 prop)
-
Ohana/src/libohana/test (modified) (1 prop)
-
PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm (modified) (6 diffs)
-
ippScripts/scripts/addstar_multi_run.pl (modified) (4 diffs)
-
ippScripts/scripts/addstar_run.pl (modified) (2 diffs)
-
ippScripts/scripts/warp_skycell.pl (modified) (1 diff)
-
ippTasks/addstar.pro (modified) (1 diff)
-
ippToPsps (modified) (1 prop)
-
ippToPsps/config/bundle.pl (copied) (copied from trunk/ippToPsps/config/bundle.pl )
-
ippToPsps/config/schema_browser.vot (modified) (1 diff)
-
ippToPsps/config/tables.IN.vot (modified) (1 diff)
-
ippToPsps/jython/batch.py (modified) (1 diff)
-
ippToPsps/jython/cleanup.py (modified) (1 diff)
-
ippToPsps/jython/diffbatch.py (modified) (5 diffs)
-
ippToPsps/jython/dvo.py (modified) (8 diffs)
-
ippToPsps/jython/dvoobjects.py (modified) (1 diff)
-
ippToPsps/jython/forcedgalaxybatch.py (modified) (5 diffs)
-
ippToPsps/jython/gpc1db.py (modified) (8 diffs)
-
ippToPsps/jython/ipptopspsdb.py (modified) (8 diffs)
-
ippToPsps/jython/loader.py (modified) (1 diff)
-
ippToPsps/jython/queue.py (modified) (3 diffs)
-
ippToPsps/jython/scratchdb.py (modified) (2 diffs)
-
ippToPsps/jython/skychunk.py (modified) (1 diff)
-
ippToPsps/test (modified) (1 prop)
-
ippToPsps/test/fulltest.sh (modified) (1 diff)
-
ippToPsps/test/gpc1schema.sql (modified) (1 diff)
-
ippToPsps/test/mkgpc1data.dvo (modified) (1 diff)
-
ippToPsps/test/sascheck.v0.sql (deleted)
-
ippToPsps/test/sascheck.v1.sql (deleted)
-
ippToPsps/test/sascheck.v2.sql (deleted)
-
ippToPsps/test/sascheck.v3.sql (deleted)
-
ippToPsps/test/sascheck.v4.sql (deleted)
-
ippToPsps/test/sascheck.v5.sql (deleted)
-
ippToPsps/test/sascheck.v6.sql (deleted)
-
ippToPsps/test/sascheck.v7.sql (deleted)
-
ippToPsps/test/sascheck.v8.sql (deleted)
-
ippToPsps/test/sascheck.v9.sql (deleted)
-
ippToPsps/test/testscripts (copied) (copied from trunk/ippToPsps/test/testscripts )
-
ippTools/src/pstamptool.c (modified) (1 diff)
-
ippTools/src/pstamptoolConfig.c (modified) (1 diff)
-
ippTools/src/pxtools.h (modified) (1 diff)
-
ippconfig/recipes/fitstypes.mdc (modified) (1 diff)
-
ippconfig/tc3/format_ps2.config (modified) (1 diff)
-
ippconfig/tc3/format_tc1.config (modified) (6 diffs)
-
ppNoiseMap (modified) (1 prop)
-
ppSim (modified) (1 prop)
-
psLib (modified) (1 prop)
-
psModules (modified) (1 prop)
-
pstamp/scripts/pstamp_checkdependent.pl (modified) (1 diff)
-
tools/bills/adddeltacolumns (modified) (4 diffs)
-
tools/bills/comparep2detections (modified) (1 diff)
-
tools/bills/comparestackdetections (modified) (6 diffs)
-
tools/bills/concatsmf (modified) (1 diff)
-
tools/bills/joinstackcmf (modified) (4 diffs)
-
tools/dvodb_calib/HDFV2calib/run.dvolens (modified) (1 diff)
-
tools/dvodb_calib/HDFV2calib/run.relphot (modified) (1 diff)
-
tools/dvodb_calib/SAS40calib (copied) (copied from trunk/tools/dvodb_calib/SAS40calib )
-
tools/releasecalib/scripts/extractinfo (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20151113
- Property svn:mergeinfo changed
/trunk (added) merged: 39137-39165,39167-39181,39186,39189,39191-39192,39209-39210,39216-39217
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20151113/Nebulous/nebclient
- Property svn:ignore
-
old new 20 20 nebclient.pc 21 21 stamp-h1 22 test-driver
-
- Property svn:ignore
-
branches/eam_branches/ipp-20151113/Ohana
- Property svn:mergeinfo changed
/trunk/Ohana (added) merged: 39138-39139,39141-39144,39161-39162,39167-39169,39171-39172,39181,39217
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20151113/Ohana/src/libohana/test
- Property svn:ignore
-
old new 7 7 string 8 8 typetest 9 sprintf_floats
-
- Property svn:ignore
-
branches/eam_branches/ipp-20151113/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm
r38370 r39224 746 746 my $mask_base; 747 747 if ($want_astrom) { 748 if ($selectedAstrom) { 748 if ($out->{cam_path_base}) { 749 # XXX Cheating here 750 my $astromSource = 'PSASTRO.OUTPUT'; 751 $out->{astrom} = $ipprc->filename($astromSource, $out->{cam_path_base}); 752 } elsif ($selectedAstrom) { 749 753 $out->{astrom} = $selectedAstrom; 750 754 $out->{cam_path_base} = $selectedAstrom; … … 763 767 } 764 768 } 769 # XXX: cheating here 765 770 # XXX: do this right by looking at the recipe 766 771 $mask_base = $out->{cam_path_base}; … … 1471 1476 if (!$astromSource) { 1472 1477 if ($camera eq "GPC1") { 1473 # CHEATER !1478 # XXX: CHEATER ! 1474 1479 $astromSource = "PSASTRO.OUTPUT"; 1475 1480 } else { … … 1489 1494 } 1490 1495 1491 # XXX: Is this code correct if ASTROM.SOURCE ne "PSASTRO.OUTPUT" 1496 # XXX: Is this code correct if ASTROM.SOURCE ne "PSASTRO.OUTPUT" ? 1492 1497 my $astromFile = $ipprc->filename($astromSource, $camRoot); 1493 1498 if (!$astromFile) { … … 1939 1944 my $now = gettimeofday(); 1940 1945 my $dtime_tool = $now - $start_tool; 1941 print "Time to run $program: $dtime_tool\n"; 1946 # XXX: shouldn't this be if $verbose? 1947 print "Time to run $program: $dtime_tool\n" ; # if $verbose; 1942 1948 1943 1949 my $buf = join "", @$stdout_buf; … … 1953 1959 1954 1960 my $dtime_parse = gettimeofday() - $start_parse; 1955 print "Time to parse results from $program: $dtime_parse\n"; 1961 # XXX: shouldn't this be if $verbose? 1962 print "Time to parse results from $program: $dtime_parse\n" ; # if $verbose; 1956 1963 1957 1964 return $results; -
branches/eam_branches/ipp-20151113/ippScripts/scripts/addstar_multi_run.pl
r38584 r39224 39 39 my $minidvodb_path; 40 40 41 my ( $label,$camera, $stage, $stage_id, $ outroot, $stageroot, $dbname, $reduction, $dvodb, $minidvodb, $minidvodb_name, $minidvodb_group, $image_only, $verbose, $no_update,41 my ( $label,$camera, $stage, $stage_id, $use_diff_inv, $outroot, $stageroot, $dbname, $reduction, $dvodb, $minidvodb, $minidvodb_name, $minidvodb_group, $image_only, $verbose, $no_update, 42 42 $no_op, $redirect, $save_temps); 43 43 GetOptions( … … 46 46 'stage|s=s' => \$stage, # Camera 47 47 'stage_id|w=s' => \$stage_id, 48 'use_diff_inv' => \$use_diff_inv, #use inv images for diff cmf? 48 49 'dbname|d=s' => \$dbname, # Database name 49 50 'outroot|w=s' => \$outroot, # output file base name … … 137 138 print "there are $num_components\n"; 138 139 foreach my $comp (@$components) { 139 my $mparsed = $comp->{stageroot};140 my $mparsed = $comp->{stageroot}; 140 141 141 if (!defined($mparsed)) { 142 &my_die("Unable to parse stageroot", $stage_id,$stage,$label, $PS_EXIT_PROG_ERROR); 143 } #but just to make sure, have it grab a minidvodb_name, to make sure it's not junk. 144 print "found a value for stageroot:$mparsed\n"; 145 my $fpaObjects = $mparsed.'.cmf'; 146 my $realFile = $ipprc->file_resolve($fpaObjects); 147 if (!defined($realFile)) { 148 &my_die("unable to resolve real file from $mparsed",$stage_id, $stage, $label, 7); 142 if (!defined($mparsed)) { 143 &my_die("Unable to parse stageroot", $stage_id,$stage,$label, $PS_EXIT_PROG_ERROR); 144 } #but just to make sure, have it grab a minidvodb_name, to make sure it's not junk. 145 print "found a value for stageroot:$mparsed\n"; 146 my $fpaObjects = $mparsed.'.cmf'; 147 my $realFile = $ipprc->file_resolve($fpaObjects); 148 if (!defined($realFile)) { 149 &my_die("unable to resolve real file from $mparsed",$stage_id, $stage, $label, 7); 150 } 151 printf TEMPLIST "$realFile = $fpaObjects\n"; 152 if ($stage =~ /diff/) { # hardwired for now$use_diff_inv) { 153 print "finding the inv.cmf files\n"; 154 my $fpaObjectsInv = $mparsed.'.inv.cmf'; 155 my $realFileInv = $ipprc->file_resolve($fpaObjectsInv); 156 if (!defined($realFileInv)) { 157 &my_die("unable to resolve real file from $mparsed",$stage_id, $stage, $label, 7); 158 } 159 printf TEMPLIST "$realFileInv = $fpaObjectsInv\n"; 160 } 161 149 162 } 150 printf TEMPLIST "$realFile = $fpaObjects\n"; 151 } 152 } 153 154 } 155 163 164 } 165 } 156 166 close(TEMPLIST); 157 167 print "saved $temp_file here\n"; … … 238 248 if ($stage =~ /diff/) { 239 249 $command .= " -accept-astrom"; 250 if ($use_diff_inv) { 251 $command .= " -diff-inv"; 252 } 240 253 } 254 241 255 if ($stage =~ /fullforce/) { 242 256 $command .= " -accept-astrom -xrad"; -
branches/eam_branches/ipp-20151113/ippScripts/scripts/addstar_run.pl
r39045 r39224 388 388 my $ffSummary = $metadata->[0]; 389 389 my $filter = $ffSummary->{filter}; 390 my $sta ck_id = $ffSummary->{stack_id};390 my $stage_id = $ffSummary->{stage_id}; 391 391 392 392 $filter =~ s/\.00000//; … … 399 399 $command .= " $realFile "; 400 400 $command .= " -p $photcode "; 401 $command .= " -image-id $sta ck_id ";401 $command .= " -image-id $stage_id "; 402 402 } 403 403 -
branches/eam_branches/ipp-20151113/ippScripts/scripts/warp_skycell.pl
r37077 r39224 223 223 my $wrote_astrom = 0; 224 224 foreach my $imfile (@$imfiles) { 225 my $image = $i mfile->{uri}; # Image name225 my $image = $ipprc->filename ("PPIMAGE.CHIP", $imfile->{chip_path_base}, $imfile->{class_id}); # Image name 226 226 my $weight = $ipprc->filename ("PPIMAGE.CHIP.VARIANCE", $imfile->{chip_path_base}, $imfile->{class_id}); # Mask name 227 227 -
branches/eam_branches/ipp-20151113/ippTasks/addstar.pro
r38943 r39224 483 483 end 484 484 if ("$STAGE" == "diff") 485 $run = $run --stage_id $STAGE_ID --stage_extra1 $STAGE_EXTRA1 485 #$run = $run --stage_id $STAGE_ID --stage_extra1 $STAGE_EXTRA1 486 $run = $run --use_diff_inv --stage_id $STAGE_ID --stage_extra1 $STAGE_EXTRA1 486 487 end 487 488 if ("$STAGE" == "fullforce") -
branches/eam_branches/ipp-20151113/ippToPsps
- Property svn:ignore
-
old new 14 14 install-sh 15 15 Doxyfile 16 compile
-
- Property svn:ignore
-
branches/eam_branches/ipp-20151113/ippToPsps/config/schema_browser.vot
r39082 r39224 123 123 <TABLE name="ForcedMeanObject"> </TABLE> 124 124 </RESOURCE> 125 126 <RESOURCE name="ForcedGalaxyModelView"> 127 <TABLE name="ObjectThin"> </TABLE> 128 <TABLE name="ForcedGalaxyShape"> </TABLE> 129 </RESOURCE> 130 125 131 </RESOURCE> 126 132 -
branches/eam_branches/ipp-20151113/ippToPsps/config/tables.IN.vot
r39131 r39224 862 862 863 863 <TABLE name="ForcedGalaxyShapeFlags"> 864 <DESCRIPTION>Contains information flag values that define ForcedGalaxyShape chisq surface fit failu ers.</DESCRIPTION>864 <DESCRIPTION>Contains information flag values that define ForcedGalaxyShape chisq surface fit failures.</DESCRIPTION> 865 865 <PARAM arraysize="1" datatype="char" ucd="meta.bib.author" name="Author" value="PSPS"></PARAM> 866 866 <FIELD name="name" arraysize="100" datatype="char"> -
branches/eam_branches/ipp-20151113/ippToPsps/jython/batch.py
r39094 r39224 104 104 105 105 # create DVO tables (scratch database) 106 self.scratchDb.createDvoTables()106 ### XXX self.scratchDb.createDvoTables() <-- remove this 107 107 108 108 # dump stuff to the log -
branches/eam_branches/ipp-20151113/ippToPsps/jython/cleanup.py
r36697 r39224 50 50 self.clean("FW") 51 51 self.clean("FO") 52 self.clean("FG") 52 53 53 54 self.checkClientStatus() -
branches/eam_branches/ipp-20151113/ippToPsps/jython/diffbatch.py
r39134 r39224 141 141 142 142 # look up the path base once 143 pathBase = gpc1Db.getDiffStagePathBase( skychunk.dvoLabel,int(diffSkyFileID))143 pathBase = gpc1Db.getDiffStagePathBase(int(diffSkyFileID)) 144 144 145 145 # select the two (possible) cmf files (.cmf and .inv.cmf) … … 336 336 else: 337 337 fluxScaleStr = "-1" 338 detIDoffset = self.posImageDetCount 338 detIDoffset = self.posImageDetCount[num] 339 339 340 340 if isPosFile or self.haveNegFits[num]: … … 723 723 self.haveSrcPos = {} 724 724 self.haveNegFits = {} 725 self.posImageDetCount = 0725 self.posImageDetCount = {} 726 726 727 727 for num in self.number: … … 742 742 ## if we have a negative image (inv.cmf), load that as well: 743 743 self.haveNegFits[num] = 0 744 self.posImageDetCount[num] = 0 744 745 if not self.negFits[num] == None: 745 746 fileNameNeg = self.negFits[num].getPath() … … 759 760 760 761 posTableName = "SkyChip_psf_" + str(num) 761 self.posImageDetCount = self.scratchDb.getRowCount(posTableName) 762 # self.posImageDetCount[num] = self.scratchDb.getMaxIPP_IDET(posTableName) 763 self.posImageDetCount[num] = self.scratchDb.getRowCount(posTableName) 762 764 763 765 ## use stilts to get a list of the tables from the header -
branches/eam_branches/ipp-20151113/ippToPsps/jython/dvo.py
r38995 r39224 72 72 # response = raw_input("(y/n) ") 73 73 # if response == "y": 74 self.resetAllTables() 74 self.resetAllTables() ## called if we need to change DVOs 75 75 76 76 ''' … … 95 95 self.correctDvo = True 96 96 if not self.loadSkyTable(): 97 self.correctDvo = False 98 return 99 if not self.loadPhotcodes(): 100 self.correctDvo = False 101 return 102 if not self.loadImages(): 97 103 self.correctDvo = False 98 104 return … … 298 304 return False 299 305 300 # update the two meta tables, Images andSkyTable301 self.loadSkyTable() 306 # update the SkyTable 307 self.loadSkyTable() ## in setSkyArea 302 308 303 309 # set bounding-box coords … … 508 514 def sync(self): 509 515 510 # go no further if we've already partly ingested a different DVO 511 if not self.correctDvo: return False 512 513 # check we have something to do 514 if len(self.regionsToPurge) < 1 and len(self.regionsToIngest) < 1: 515 self.logger.infoPair("Nothing to ingest or purge", "finished ingest") 516 return True 517 518 # make sure we have an up-to-date Images table 519 self.loadImages() 520 521 # purge stuff 522 self.purgeRegions(self.regionsToPurge) 523 524 totalRegions = len(self.regionsToIngest) 525 if totalRegions > 0: self.logger.infoSeparator() 526 527 # now loop through all regions and ingest to MySQL 528 ingestedRegionsCount = 0 529 regionCount = 1 530 for region in self.regionsToIngest: 531 532 self.logger.infoTitle("Region %d of %d: %s" % (regionCount, totalRegions, region)) 533 if self.ingestRegion(region): ingestedRegionsCount += 1 534 regionCount += 1 535 536 self.logger.infoSeparator() 537 self.logger.infoPair("Ingested", "%d DVO regions (out of %d)" % (ingestedRegionsCount, len(self.regionsToIngest))) 538 539 # update lists after attempted sync 540 self.setSkyArea(self.minRa, self.maxRa, self.minDec, self.maxDec) 541 self.printSummary() 516 print "---- sync is disabled ----" 517 os._exit(3) 518 519 ### XXX # go no further if we've already partly ingested a different DVO 520 ### XXX if not self.correctDvo: return False 521 ### XXX 522 ### XXX # check we have something to do 523 ### XXX if len(self.regionsToPurge) < 1 and len(self.regionsToIngest) < 1: 524 ### XXX self.logger.infoPair("Nothing to ingest or purge", "finished ingest") 525 ### XXX return True 526 ### XXX 527 ### XXX # make sure we have an up-to-date Images table 528 ### XXX self.loadImages() 529 ### XXX 530 ### XXX # purge stuff 531 ### XXX self.purgeRegions(self.regionsToPurge) 532 ### XXX 533 ### XXX totalRegions = len(self.regionsToIngest) 534 ### XXX if totalRegions > 0: self.logger.infoSeparator() 535 ### XXX 536 ### XXX # now loop through all regions and ingest to MySQL 537 ### XXX ingestedRegionsCount = 0 538 ### XXX regionCount = 1 539 ### XXX for region in self.regionsToIngest: 540 ### XXX 541 ### XXX self.logger.infoTitle("Region %d of %d: %s" % (regionCount, totalRegions, region)) 542 ### XXX if self.ingestRegion(region): ingestedRegionsCount += 1 543 ### XXX regionCount += 1 544 ### XXX 545 ### XXX self.logger.infoSeparator() 546 ### XXX self.logger.infoPair("Ingested", "%d DVO regions (out of %d)" % (ingestedRegionsCount, len(self.regionsToIngest))) 547 ### XXX 548 ### XXX # update lists after attempted sync 549 ### XXX self.setSkyArea(self.minRa, self.maxRa, self.minDec, self.maxDec) 550 ### XXX self.printSummary() 542 551 543 552 return True … … 667 676 includes purging detections outside sky area 668 677 ''' 669 def nativeIngestDetections(self, boxId, boxDim ):678 def nativeIngestDetections(self, boxId, boxDim, myBatchType): 670 679 671 680 # clear the 'ingested' field for all boxes owned by this host … … 688 697 689 698 # make sure we have an up-to-date Images table 690 self.loadImages() 699 self.loadImages() # this is in nativeIngestDetections (remove?) 691 700 692 701 # the box dimensions are the area used to select the items of … … 695 704 # to grab all detections / objects which are contributed by an 696 705 # item with the center in the given box 697 dR_border = self.skychunk.BORDER / math.cos(math.radians(boxDim['DEC'])) 698 dD_border = self.skychunk.BORDER 699 700 #This is a terrible hack but I'm tired of it taking a decade to ingest the FW skycells. 701 702 #if self.batchType == "ST": 703 # dR_border = .4 / math.cos(math.radians(boxDim['DEC'])) 704 # dD_border = .4 705 #if self.batchType == "FW": 706 # dR_border = .4 / math.cos(math.radians(boxDim['DEC'])) 707 # dD_border = .4 708 709 706 707 # P2 and DF need to use a full GPC1 exposure radius: 708 myBorder = self.skychunk.BORDER_GPC1 709 710 # ST and FW need to use just a skycell 711 if myBatchType == "ST" : 712 myBorder = self.skychunk.BORDER_SKYCELL 713 if myBatchType == "FW" : 714 myBorder = self.skychunk.BORDER_SKYCELL 715 716 dR_border = myBorder / math.cos(math.radians(boxDim['DEC'])) 717 dD_border = myBorder 710 718 711 719 minRA = boxDim['minRA'] - dR_border … … 788 796 else: 789 797 cmd += " -photcode-start 12000 -photcode-end 12500" 790 ## if (useFW == 1): 791 ## if (self.config.camera == "simtest"): 792 ## print "need photcodes for non gpc1 camera" 793 ## else: 794 ## print "need photcode for warp for gpc1 camera, default is no selection, should work, could be slow" 798 799 if (useST + useP2 + useDF + useFW > 1): 800 self.logger.errorPair("multiple batch types in a run", "NOW ILLEGAL") 801 os._exit(5) 795 802 796 803 ## dvopsps can take a very long time. try 2 or 3 times to re-establish communication with the db before proceeding? -
branches/eam_branches/ipp-20151113/ippToPsps/jython/dvoobjects.py
r38883 r39224 28 28 # declare DVO file types of interest 29 29 self.ingestFileTypes = ['cpt', 'cps'] 30 self.loadPhotcodes() 30 self.loadPhotcodes() # need to load photcodes when generating OB and other object-like batches 31 31 32 32 ''' -
branches/eam_branches/ipp-20151113/ippToPsps/jython/forcedgalaxybatch.py
r39127 r39224 72 72 73 73 ''' 74 Generate ippObjID and make it an index 75 ''' 76 def addIppObjID (self, tableName): 77 sql = "ALTER TABLE " + tableName + " ADD COLUMN ippObjID BIGINT" 78 self.scratchDb.execute(sql) 79 80 sql = "CREATE INDEX ippObjID_index ON " + tableName + " ( ippObjID ) "; 81 self.scratchDb.execute(sql) 82 83 sql = "UPDATE " + tableName + " set ippObjID = (OBJ_ID + (CAT_ID << 32))" 84 self.scratchDb.execute(sql) 85 86 ''' 74 87 Overriden from batch base class to import directly from DVO for forced galaxy shape parameters 75 88 ''' … … 101 114 self.logger.infoPair("0 rows for ","cpq table") 102 115 return False 116 117 # add ippObjID columns and index them: 118 self.addIppObjID (cptTableName) 119 self.addIppObjID (cpqTableName) 120 103 121 return True 104 122 … … 178 196 # sqlLine.group("a." + filter[1] + "GalDecErr", "b.DEC_ERR") 179 197 180 sql = sqlLine.makeEquals("WHERE a.ippObjID = (b.OBJ_ID + (b.CAT_ID << 32))AND a.galModelType = b.MODEL_TYPE AND b.Photcode = " + str(photcode))198 sql = sqlLine.makeEquals("WHERE a.ippObjID = b.ippObjID AND a.galModelType = b.MODEL_TYPE AND b.Photcode = " + str(photcode)) 181 199 182 200 self.logger.debugPair("cpq sql: ", sql) 183 201 184 202 self.scratchDb.execute(sql) 203 204 ## # check on the status as we go: 205 ## sql = "select count(*) as N, galModelType, nFilter, count(*)*nFilter as S from ForcedGalaxyShape group by galModelType, nFilter" 206 ## rs = self.scratchDb.executeQuery(sql) 207 ## 208 ## while rs.next(): 209 ## N = rs.getInt(1) 210 ## M = rs.getInt(2) 211 ## F = rs.getInt(3) 212 ## S = rs.getInt(4) 213 ## 214 ## print "N: %d, TYPE: %d, nFilter: %d, Sum: %d" % (N, M, F, S) 185 215 186 216 ''' … … 207 237 208 238 sqlLine.group("objID", "EXT_ID") 209 sqlLine.group("ippObjID", " OBJ_ID + (CAT_ID << 32)")239 sqlLine.group("ippObjID", "ippObjID") 210 240 sqlLine.group("surveyID", str(self.surveyID)) 211 241 sqlLine.group("randomForcedGalID", "RAND("+str(self.batchID)+")") … … 215 245 sql = sqlLine.makeRaw(") SELECT ", " FROM " + cptTableName) 216 246 217 print "--- sql: " + sql247 # print "--- sql: " + sql 218 248 219 249 self.scratchDb.execute(sql) -
branches/eam_branches/ipp-20151113/ippToPsps/jython/gpc1db.py
r39049 r39224 79 79 AND addRun.stage = '" + stage + "' \ 80 80 AND addRun.state = 'full' \ 81 AND decl BETWEEN RADIANS(" + str(minDec) + ") ANDRADIANS(" + str(maxDec) + ") \82 AND ra BETWEEN RADIANS(" + str(minRA) + ") ANDRADIANS(" + str(maxRA) + ") \81 AND decl >= RADIANS(" + str(minDec) + ") AND decl < RADIANS(" + str(maxDec) + ") \ 82 AND ra >= RADIANS(" + str(minRA) + ") AND ra < RADIANS(" + str(maxRA) + ") \ 83 83 AND dateobs >= '" + tstart + "'\ 84 84 AND dateobs <= '" + tend + "'" … … 103 103 AND addRun.stage = '" + stage + "' \ 104 104 AND addRun.state = 'full' \ 105 AND decdeg BETWEEN " + str(minDec) + " AND" + str(maxDec) + " \106 AND radeg BETWEEN " + str(minRA) + " AND" + str(maxRA) + " \105 AND decdeg >= " + str(minDec) + " AND decdeg < " + str(maxDec) + " \ 106 AND radeg >= " + str(minRA) + " AND radeg < " + str(maxRA) + " \ 107 107 AND mjd_obs >= (to_days('" + tstart + "')-678941) \ 108 108 AND mjd_obs <= (to_days('" + tend + "') - 678941) " … … 121 121 JOIN mergedvodbProcessed using (merge_id) \ 122 122 JOIN diffInputSkyfile \ 123 ON (diff_id = stage_id AND diff_skyfile_id = stage_extra1 \ 124 AND stage = 'diff') \ 123 ON (diff_id = stage_id AND diff_skyfile_id = stage_extra1 AND stage = 'diff') \ 125 124 JOIN skycell using (skycell_id, tess_id) \ 126 125 JOIN warpRun on (warp1 = warp_id \ … … 137 136 AND addRun.stage = '" + stage + "' \ 138 137 AND addRun.state = 'full' \ 139 AND decdeg BETWEEN " + str(minDec) + " AND" + str(maxDec) + " \140 AND radeg BETWEEN " + str(minRA) + " AND" + str(maxRA) + " \138 AND decdeg >= " + str(minDec) + " AND decdeg < " + str(maxDec) + " \ 139 AND radeg >= " + str(minRA) + " AND radeg < " + str(maxRA) + " \ 141 140 AND dateobs >= '" + tstart + "'\ 142 141 AND dateobs <= '" + tend + "'\ … … 164 163 AND addRun.stage = '" + stage + "' \ 165 164 AND addRun.state = 'full' \ 166 AND decdeg BETWEEN " + str(minDec) + " AND" + str(maxDec) + " \167 AND radeg BETWEEN " + str(minRA) + " AND" + str(maxRA) + " \165 AND decdeg >= " + str(minDec) + " AND decdeg < " + str(maxDec) + " \ 166 AND radeg >= " + str(minRA) + " AND radeg < " + str(maxRA) + " \ 168 167 AND mjd_obs >= (to_days('" + tstart + "')-678941) \ 169 168 AND mjd_obs <= (to_days('" + tend + "') - 678941) \ … … 308 307 JOIN mergedvodbProcessed using (merge_id) \ 309 308 JOIN diffInputSkyfile \ 310 ON (diff_id = stage_id AND diff_skyfile_id = stage_extra1 \ 311 AND stage = 'diff') \ 309 ON (diff_id = stage_id AND diff_skyfile_id = stage_extra1 AND stage = 'diff') \ 312 310 JOIN skycell using (skycell_id, tess_id) \ 313 311 JOIN warpRun on (warp1 = warp_id \ … … 513 511 get diff stage cmf name 514 512 ''' 515 def getDiffStagePathBase(self, dvoDb, diffSkyfileID): 513 def getDiffStagePathBase(self, diffSkyfileID): 514 sql = "SELECT DISTINCT diffSkyfile.path_base \ 515 FROM diffInputSkyfile \ 516 JOIN diffSkyfile using (diff_id, skycell_id) \ 517 WHERE diff_skyfile_id = " + str(diffSkyfileID) 518 519 rs = self.executeQuery(sql) 520 521 if not rs.first(): 522 self.logger.errorPair("missing cmf entry diff_skyfile_id:", str(diff_skyfile_id)) 523 # self.logger.errorPair("no diff cmfs found for diff_skyfile_id = %d" %diff_skyfile_id) 524 return None 525 526 pathBase = rs.getString(1) 527 return pathBase 528 529 ''' 530 get diff stage cmf name 531 XXX EAM 20151119 : this function does too much work: you have a diffSkyfileID, that matches to a unique path_base 532 ''' 533 def getDiffStagePathBaseOldVersion(self, dvoDb, diffSkyfileID): 516 534 print "got here, diffstagecmf" 517 535 sql = "SELECT DISTINCT diffSkyfile.path_base \ 518 536 FROM mergedvodbRun join minidvodbRun using (minidvodb_id) \ 519 537 JOIN addRun using (minidvodb_name) \ 520 JOIN diffInputSkyfile on (diff_skyfile_id = stage_extra1 \ 521 AND diff_id = stage_id AND stage = 'diff') \ 522 JOIN diffSkyfile using (diff_id, skycell_id, diff_skyfile_id) \ 538 JOIN diffInputSkyfile on (diff_skyfile_id = stage_extra1 AND diff_id = stage_id AND stage = 'diff') \ 539 JOIN diffSkyfile using (diff_id, skycell_id) \ 523 540 WHERE diff_skyfile_id = " + str(diffSkyfileID) + " \ 524 541 AND minidvodbRun.state = 'merged' \ … … 561 578 ''' 562 579 get diff stage cmf name 580 XXX EAM 20151119 This function is broken AND it does too much work 563 581 ''' 564 582 def getDiffStageCmf(self, dvoDb, diffSkyfileID): -
branches/eam_branches/ipp-20151113/ippToPsps/jython/ipptopspsdb.py
r39008 r39224 324 324 AND processed = 1 \ 325 325 AND loaded_to_datastore = 1 \ 326 AND timestamp BETWEEN now() - INTERVAL " + interval + " ANDnow()"326 AND timestamp >= now() - INTERVAL " + interval + " AND timestamp < now()" 327 327 328 328 total = -1 … … 421 421 AND timestamp > '" + self.skychunk.epoch + "' \ 422 422 AND dvo_db = '" + self.skychunk.dvoLabel + "' \ 423 AND timestamp BETWEEN now() - INTERVAL " + interval + " ANDnow()"423 AND timestamp >= now() - INTERVAL " + interval + " AND timestamp < now()" 424 424 425 425 try: … … 545 545 AND dvo_db = '" + self.skychunk.dvoLabel + "' \ 546 546 AND batch_type != 'IN' \ 547 AND timestamp BETWEEN now() - INTERVAL 12 HOUR ANDnow()"547 AND timestamp >= now() - INTERVAL 12 HOUR AND timestamp < now()" 548 548 549 549 try: … … 1158 1158 1159 1159 self.skychunk.boxSize = rs.getDouble(10) 1160 # self.skychunk.halfBox = self.skychunk.boxSize/2.01161 # self.skychunk.boxSizeWithBorder = self.skychunk.boxSize + (self.skychunk.BORDER * 2)1162 1160 1163 1161 self.skychunk.basePath = rs.getString(11) … … 1240 1238 sql = "SELECT id FROM box \ 1241 1239 WHERE skychunk = '" + self.skychunk.name + "' \ 1242 AND ra_center BETWEEN " + str(minRA) + " AND" + str(maxRA) + " \1243 AND dec_center BETWEEN " + str(minDEC) + " AND" + str(maxDEC)1240 AND ra_center >= " + str(minRA) + " AND ra_center < " + str(maxRA) + " \ 1241 AND dec_center >= " + str(minDEC) + " AND dec_center < " + str(maxDEC) 1244 1242 1245 1243 # AND box_side = " + str(self.skychunk.boxSize) … … 1424 1422 FROM box \ 1425 1423 JOIN pending ON (id = box_id) \ 1426 WHERE ra_center BETWEEN " + str(minRA) + " AND" + str(maxRA) + " \1424 WHERE ra_center >= " + str(minRA) + " AND ra_center < " + str(maxRA) + " \ 1427 1425 AND batch_type = '" + batchType + "' \ 1428 1426 AND skychunk = '" + self.skychunk.name + "' \ … … 1503 1501 FROM box \ 1504 1502 JOIN pending ON (id = box_id) \ 1505 WHERE ra_center BETWEEN " + str(minRA) + " AND" + str(maxRA) + " \1503 WHERE ra_center >= " + str(minRA) + " AND ra_center < " + str(maxRA) + " \ 1506 1504 AND skychunk = '" + self.skychunk.name + "' \ 1507 1505 ORDER BY dec_center DESC" … … 1712 1710 sql = "SELECT DISTINCT stage_id \ 1713 1711 FROM all_pending \ 1714 WHERE ra_bore BETWEEN " + str(minRA) + " AND" + str(maxRA) + " \1715 AND dec_bore BETWEEN " + str(minDEC) + " AND" + str(maxDEC)1712 WHERE ra_bore >= " + str(minRA) + " AND ra_bore < " + str(maxRA) + " \ 1713 AND dec_bore >= " + str(minDEC) + " AND dec_bore < " + str(maxDEC) 1716 1714 1717 1715 try: -
branches/eam_branches/ipp-20151113/ippToPsps/jython/loader.py
r39008 r39224 172 172 if (batchType == "P2" or batchType == "ST" or batchType =="DF" or batchType == "FW"): 173 173 if self.config.resetDvo or not self.ippToPspsDb.isBoxIngested(boxId, self.scratchDb.dbHost): 174 if not self.dvo.nativeIngestDetections(boxId, boxDim ):174 if not self.dvo.nativeIngestDetections(boxId, boxDim, batchType): 175 175 self.logger.error("Unable to ingest detections with nativeIngest") 176 176 return False -
branches/eam_branches/ipp-20151113/ippToPsps/jython/queue.py
r38987 r39224 146 146 147 147 # XXX not sure why this is not done with a for-loop... 148 # answer: because python does not have a good float-style for-loop 148 149 while dec <= self.skychunk.maxDec: 149 150 while ra <= self.skychunk.maxRa: … … 158 159 159 160 ids = self.ippToPspsDb.getItemsInThisBox(minRA, maxRA, minDEC, maxDEC) 160 161 161 162 self.logger.info("| %5.1f | %5.1f | %9d | %9d |" % ( 162 163 ra, … … 165 166 len(ids))) 166 167 167 if len(ids) > 0: self.ippToPspsDb.insertPending(box_id, batchType, ids) 168 # print "inserted pending" 168 if len(ids) > 0: 169 ## for myID in ids: 170 ## print "id: %d : %10.6f - %10.6f | %10.6f - %10.6f" % (myID, minRA, maxRA, minDEC, maxDEC) 171 172 self.ippToPspsDb.insertPending(box_id, batchType, ids) 173 # print "inserted pending" 174 169 175 ra = ra + 2*dR 170 176 # print "new ra: ", ra -
branches/eam_branches/ipp-20151113/ippToPsps/jython/scratchdb.py
r39110 r39224 406 406 407 407 return size 408 409 ''' 410 Returns a row count for this table 411 ''' 412 def getMaxIPP_IDET(self, table): 413 414 sql = "SELECT MAX(IPP_IDET) FROM " + table 415 rs = self.executeQuery(sql) 416 417 if not rs.first(): 418 self.logger.exception("Could not count rows for table: '" + table + "'") 419 return 0 420 421 return rs.getInt(1) 408 422 409 423 ''' … … 655 669 def resetAllDvoTables(self): 656 670 657 # drop all dvo tables - NB detections have to be deleted prior to dvoDone due to foreign key constraint 658 self.logger.infoPair("Dropping table", self.dvoImagesTable) 659 self.dropTable(self.dvoImagesTable) 660 self.logger.infoPair("Dropping table", self.dvoSkyTable) 661 self.dropTable(self.dvoSkyTable) 662 self.logger.infoPair("Dropping table", self.dvoDoneTable) 663 self.dropTable(self.dvoDoneTable) 664 665 # blow away existing dvoDetection table & re-crate 666 if not self.resetDvoDetectionTable(): 667 self.logger.errorPair("Unable to reset scratch table", "DvoDetectionFull") 668 return False 669 670 # create dvoDone table 671 self.logger.infoPair("Creating table", self.dvoDoneTable) 672 sql = "CREATE TABLE " + self.dvoDoneTable + " (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, region VARCHAR(100), path VARCHAR(1000), modifiedDate BIGINT, size BIGINT)" 673 try: self.execute(sql) 674 except: 675 self.logger.errorPair("Unable to create table", self.dvoDoneTable) 676 return False 677 678 self.changeEngineToInnoDB(self.dvoDoneTable) 679 680 return True 671 # re-create the definition tables 672 self.createDvoTables() 673 674 # drop all dvo tables - NB detections have to be deleted prior to dvoDone due to foreign key constraint 675 self.logger.infoPair("Dropping table", self.dvoImagesTable) 676 self.dropTable(self.dvoImagesTable) 677 self.logger.infoPair("Dropping table", self.dvoSkyTable) 678 self.dropTable(self.dvoSkyTable) 679 self.logger.infoPair("Dropping table", self.dvoDoneTable) 680 self.dropTable(self.dvoDoneTable) 681 682 # blow away existing dvoDetection table & re-crate 683 if not self.resetDvoDetectionTable(): 684 self.logger.errorPair("Unable to reset scratch table", "DvoDetectionFull") 685 return False 686 687 # create dvoDone table 688 self.logger.infoPair("Creating table", self.dvoDoneTable) 689 sql = "CREATE TABLE " + self.dvoDoneTable + " (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, region VARCHAR(100), path VARCHAR(1000), modifiedDate BIGINT, size BIGINT)" 690 try: 691 self.execute(sql) 692 except: 693 self.logger.errorPair("Unable to create table", self.dvoDoneTable) 694 return False 695 696 self.changeEngineToInnoDB(self.dvoDoneTable) 697 698 return True 681 699 682 700 ''' -
branches/eam_branches/ipp-20151113/ippToPsps/jython/skychunk.py
r38763 r39224 39 39 # XXX this is a poor place to put this information -- it is completely gpc-specific. 40 40 # probably should go elsewhere. This number is scaled in loader.py by cos(dec) 41 self.BORDER = 1.65 41 self.BORDER_GPC1 = 1.65 42 self.BORDER_SKYCELL = 0.40 42 43 self.isLoaded = False 43 44 -
branches/eam_branches/ipp-20151113/ippToPsps/test
- Property svn:ignore
-
old new 8 8 stackbatch.dat 9 9 objectbatch.dat 10 diffbatch.dat 11 diffobjbatch.dat 12 forcebatch.dat 13 forcedobjectbatch.dat
-
- Property svn:ignore
-
branches/eam_branches/ipp-20151113/ippToPsps/test/fulltest.sh
r39061 r39224 561 561 562 562 rm -rf $OUTDIR/FO 563 rm -rf $OUTDIR/FG 563 564 564 565 ippjython loader.py $options $forcedobjqueuename once -simtest < /dev/null -
branches/eam_branches/ipp-20151113/ippToPsps/test/gpc1schema.sql
r39015 r39224 21 21 CREATE TABLE diffRun ( diff_id INT, tess_id CHAR(64), state CHAR(16), diff_mode INT, software_ver CHAR(16) ); 22 22 CREATE TABLE diffInputSkyfile ( diff_id INT, warp1 INT, stack2 INT, diff_skyfile_id INT, tess_id CHAR(64), skycell_id CHAR(64) ); 23 CREATE TABLE diffSkyfile ( diff_id INT, diff_skyfile_id INT, tess_id CHAR(64),skycell_id CHAR(64), path_base CHAR(255) );23 CREATE TABLE diffSkyfile ( diff_id INT, skycell_id CHAR(64), path_base CHAR(255) ); 24 24 25 25 CREATE TABLE addRun ( add_id INT, stage CHAR(64), stage_extra1 INT, state CHAR(64), stage_id INT, minidvodb_name CHAR(64) ); -
branches/eam_branches/ipp-20151113/ippToPsps/test/mkgpc1data.dvo
r39105 r39224 654 654 dbinsert diffRun (diff_id, tess_id, state, diff_mode, software_ver) values ($difID, $TESS_ID, "full", 2, "38000M") 655 655 dbinsert diffInputSkyfile (diff_id, warp1, stack2, diff_skyfile_id, tess_id, skycell_id) values ($difID, $wrpID, $stkID, $diffSkyfileID, $TESS_ID, $SKYCELL ) 656 dbinsert diffSkyfile (diff_id, diff_skyfile_id, tess_id, skycell_id, path_base) values ($difID, $diffSkyfileID, $TESS_ID, $SKYCELL, "$filename")656 dbinsert diffSkyfile (diff_id, skycell_id, path_base) values ($difID, $SKYCELL, "$filename") 657 657 end 658 658 -
branches/eam_branches/ipp-20151113/ippTools/src/pstamptool.c
r38586 r39224 817 817 PXOPT_COPY_S64(config->args, where, "-req_id", "req_id", "=="); 818 818 PXOPT_COPY_S64(config->args, where, "-dep_id", "dep_id", "=="); 819 PXOPT_COPY_STR(config->args, where, "-state", "state", "=="); 819 820 PXOPT_COPY_STR(config->args, where, "-jobType", "jobType", "=="); 820 821 PXOPT_COPY_S64(config->args, where, "-fault", "fault", "=="); -
branches/eam_branches/ipp-20151113/ippTools/src/pstamptoolConfig.c
r38586 r39224 163 163 psMetadataAddS16(listjobArgs, PS_LIST_TAIL, "-fault", 0, "select by fault", 0); 164 164 psMetadataAddStr(listjobArgs, PS_LIST_TAIL, "-jobType", 0, "select by jobType", 0); 165 psMetadataAddStr(listjobArgs, PS_LIST_TAIL, "-state", 0, "select by job state", 0); 165 166 psMetadataAddU64(listjobArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); 166 167 psMetadataAddBool(listjobArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); -
branches/eam_branches/ipp-20151113/ippTools/src/pxtools.h
r30907 r39224 206 206 207 207 #define PXOPT_COPY_PRIMITIVE(from, to, type, suffix, oldname, newname, newcomment) \ 208 {\209 psMetadataItem *item = psMetadataLookup(from, oldname);\210 if (!item) {\208 { \ 209 psMetadataItem *item = psMetadataLookup(from, oldname); \ 210 if (!item) { \ 211 211 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for %s", oldname); \ 212 return false; \213 }\214 psAssert(item->comment, "metadata item comment should be defined"); \215 \216 if (psStrcasestr(item->comment, "(found)")) {\212 return false; \ 213 } \ 214 psAssert(item->comment, "metadata item comment should be defined"); \ 215 \ 216 if (psStrcasestr(item->comment, "(found)")) { \ 217 217 if (!psMetadataAdd##suffix(to, PS_LIST_TAIL, newname, PS_META_DUPLICATE_OK, newcomment, item->data.suffix)) { \ 218 psError(PS_ERR_UNKNOWN, false, "failed to add item " newname); \219 psFree(to);\220 return false;\221 } \222 }\223 }218 psError(PS_ERR_UNKNOWN, false, "failed to add item " newname); \ 219 psFree(to); \ 220 return false; \ 221 } \ 222 } \ 223 } 224 224 225 225 #define PXOPT_COPY_V(from, to, type, suffix, oldname, newname, comment) \ -
branches/eam_branches/ipp-20151113/ippconfig/recipes/fitstypes.mdc
r38266 r39224 81 81 NOISE S32 8 82 82 END 83 83 84 # Compressed mask 84 85 COMP_MASK METADATA -
branches/eam_branches/ipp-20151113/ippconfig/tc3/format_ps2.config
r37414 r39224 3 3 # How to recognise this type 4 4 RULE METADATA 5 # IMAGESWV STR GPC DaqCom v2.05 (Mar 08 2007)5 # IMAGESWV STR GPC DaqCom v2.05 (Mar 08 2007) 6 6 ORIGIN STR PS2 7 7 CONTROLR STR STARGRASP -
branches/eam_branches/ipp-20151113/ippconfig/tc3/format_tc1.config
r38456 r39224 99 99 END 100 100 101 # Specify the cell data 102 # NOTE: A duplicate metadata entry will override the first entry 103 CELLS METADATA 104 END 105 101 106 # Specify the cell data 102 107 CELLS METADATA 103 pitch10u METADATA 108 # if the test camera is generating BIASEC,DATASEC, use this: 109 tc1raw METADATA 104 110 CELL.BIASSEC.SOURCE STR HEADER 105 111 CELL.TRIMSEC.SOURCE STR HEADER … … 107 113 CELL.TRIMSEC STR DATASEC 108 114 END 109 END 110 111 # Specify the cell data 112 CELLS METADATA 113 tc1raw METADATA 115 116 # if the test camera is NOT generating BIASEC,DATASEC, use this: 117 tc1old METADATA 114 118 CELL.BIASSEC.SOURCE STR VALUE 115 119 CELL.TRIMSEC.SOURCE STR VALUE … … 121 125 # How to translate PS concepts into FITS headers 122 126 TRANSLATION METADATA 123 FPA.FILTERID STR FILTERID124 FPA.FILTER STR FILTERID127 # FPA.FILTERID STR FILTERID 128 # FPA.FILTER STR FILTERID 125 129 FPA.RA STR RA 126 130 FPA.DEC STR DEC … … 134 138 FPA.ROTANGLE STR ROT 135 139 FPA.FOCUS STR M2Z 136 FPA.TIME STR SHUTOUTC140 # FPA.TIME STR SHUTOUTC 137 141 FPA.EXPOSURE STR EXPREQ # Requested exposure time, presumably camera exposure time 138 142 FPA.ALT STR ALT … … 180 184 CELL.EXPOSURE STR EXPTIME # Exposure time measured by shutter 181 185 CELL.DARKTIME STR DARKTIME # Exposure time for camera 182 CELL.TIME STR SHUTOUTC # Observation time186 # CELL.TIME STR SHUTOUTC # Observation time 183 187 # XXX CELL.GAIN STR GAIN # Cell gain (e/ADU) 184 188 CELL.READNOISE STR RDNOISE # Cell read noise (ADU) … … 208 212 # XXX these should come from the header, but not for now 209 213 CELL.GAIN F32 1.0 # Cell gain (e/ADU) 210 CELL.SATURATION F32 40000 # Saturation point (ADU)214 CELL.SATURATION F32 64000 # Saturation point (ADU) 211 215 212 216 ### How to get FPA coordinates from chip coordinates -
branches/eam_branches/ipp-20151113/ppNoiseMap
- Property svn:ignore
-
old new 15 15 install-sh 16 16 a.out.dSYM 17 compile
-
- Property svn:ignore
-
branches/eam_branches/ipp-20151113/ppSim
- Property svn:ignore
-
old new 15 15 test 16 16 a.out.dSYM 17 compile
-
- Property svn:ignore
-
branches/eam_branches/ipp-20151113/psLib
- Property svn:ignore
-
old new 35 35 *.da 36 36 a.out.dSYM 37 test-driver
-
- Property svn:ignore
-
branches/eam_branches/ipp-20151113/psModules
- Property svn:ignore
-
old new 29 29 psmodules-*.tar.* 30 30 a.out.dSYM 31 test-driver
-
- Property svn:ignore
-
branches/eam_branches/ipp-20151113/pstamp/scripts/pstamp_checkdependent.pl
r39054 r39224 480 480 # XXX: change tools to include cam_state (camRun.state). If it is not full the warp updates will never run. 481 481 my $cam_fault = $chip->{cam_fault}; 482 if (($chip->{camState} eq 'cleaned') or defined $cam_fault and $cam_fault > 0) { 482 if ($chip->{camState} eq 'cleaned') { 483 print STDERR "camRun for $warp_id skycell_id $skycell_id is cleaned so warp cannot be updated.\n"; 484 return $PSTAMP_GONE; 485 } 486 if (defined $cam_fault and $cam_fault > 0) { 483 487 print STDERR "camRun for $warp_id skycell_id $skycell_id is faulted: $cam_fault\n"; 484 488 return $PSTAMP_GONE; -
branches/eam_branches/ipp-20151113/tools/bills/adddeltacolumns
r39124 r39224 152 152 xPosErr X_PSF_SIG 153 153 yPosErr Y_PSF_SIG 154 pltScale PLTSCALE 155 posAngle POSANGLE 154 pltScale PLTSCALE_i 155 posAngle POSANGLE_i 156 156 ra 157 157 dec … … 163 163 expTime 164 164 airMass 165 psfFlux PSF_INST_FLUX *zpFactor/expTime /PSF_NDOF165 psfFlux PSF_INST_FLUX *zpFactor/expTime 166 166 psfFluxErr PSF_INST_FLUX_SIG *zpFactor/expTime 167 167 psfMajorFWHM PSF_FWHM_MAJ *abs(PLTSCALE) … … 171 171 psfQf PSF_QF 172 172 psfQfPerfect PSF_QF_PERFECT 173 psfChiSq PSF_CHISQ 173 psfChiSq PSF_CHISQ /PSF_NDOF 174 174 psfLikelihood # actually psfLikelihood(EXT_NSIGMA). We assume the formula is ok. 175 175 momentXX MOMENTS_XX *PLTSCALE*PLTSCALE … … 189 189 kronFluxErr KRON_FLUX_ERR *zpFactor/expTime 190 190 kronRad MOMENTS_R1 *2.5*abs(PLTSCALE) 191 sky SKY /PLTSCALE/PLTSCALE*zpFactor/expTime191 sky SKY_i /PLTSCALE/PLTSCALE*zpFactor/expTime 192 192 skyErr SKY_SIGMA /PLTSCALE/PLTSCALE*zpFactor/expTime 193 193 infoFlag FLAGS -
branches/eam_branches/ipp-20151113/tools/bills/comparep2detections
r39116 r39224 84 84 die "failed to find smf for $exp_name in sasdata\n" unless $smf; 85 85 } else { 86 # XXX: look up the smf for the exposure here 87 # die "only test mode works right now\n"; 88 my $cmd = "releasetool -listrelexp -release_name $release -exp_id $exp_id | grep path_base | awk '{print \$3}'"; 86 my $cmd = "releasetool -listrelexp -release_name $release -exp_id $exp_id | grep cam_path_base | awk '{print \$3}'"; 89 87 print "$cmd\n" if $verbose; 90 88 my $path_base = `$cmd`; -
branches/eam_branches/ipp-20151113/tools/bills/comparestackdetections
r39117 r39224 22 22 my $testdata; 23 23 24 my ($checkdeltas, $ verbose, $save_temps);24 my ($checkdeltas, $just_join, $verbose, $save_temps); 25 25 26 26 my $label = 'SAS.20141118.sc8'; … … 30 30 "testdata=s" => \$testdata, 31 31 "join=s" => \$joinType, 32 "just-join" => \$just_join, 32 33 "check" => \$checkdeltas, 33 34 "verbose|v" => \$verbose, … … 90 91 $command .= " --test" if $testdata; 91 92 $command .= " --verbose" if $verbose; 93 # FITS has a limit of 999 for the number of columns in a table 94 # If we're adding the delta columns that's too many. So skip the 95 # joins (we heed to run joinstackcmf to add some columns that we need) 96 $command .= " --skip-joins" unless $just_join; 92 97 93 98 runcommand($command); … … 112 117 $input = $outfile; 113 118 } 119 120 if ($just_join) { 121 rename ($outfile, $out) or die "failed to rename $outfile to $out\n"; 122 exit 0; 123 } 124 114 125 115 126 my @deltas; … … 141 152 142 153 if ($checkdeltas) { 154 my ($fmt, $sep); 155 if ($out =~ /fits$/) { 156 $fmt = "-fits StackObjectAttributes"; 157 $sep = ""; 158 } elsif ($out =~ /csv$/) { 159 $fmt = "-csv"; 160 $sep = ","; 161 } else { 162 die "don't know how to read $out. Use .fits or .csv\n"; 163 } 143 164 $save_temps = 1; 144 165 my ($manafile, $mananame) = tempfile( "/var/tmp/manacmds.XXXX", UNLINK => !$save_temps); … … 172 193 173 194 print $manafile "datafile $out\n"; 174 print $manafile "read -fits StackObjectAttributes"; 195 print $manafile "read $fmt"; 196 my $first = 1; 175 197 foreach my $col (@deltas) { 198 if ($sep and !$first) { 199 print $manafile $sep; 200 } else { 201 $first = 0; 202 } 176 203 print $manafile " $col"; 177 204 } -
branches/eam_branches/ipp-20151113/tools/bills/concatsmf
r39114 r39224 53 53 $path = `neb-locate -p $smf`; 54 54 if (!$path) { 55 die " ailed to find location of $smf\n";55 die "failed to find location of $smf\n"; 56 56 } 57 57 print $path if $verbose; -
branches/eam_branches/ipp-20151113/tools/bills/joinstackcmf
r39057 r39224 23 23 # for now just all or one 24 24 25 my ($stack_id, $skycal_id );25 my ($stack_id, $skycal_id, $skip_joins); 26 26 my $test; 27 27 my ($save_temps, $verbose); … … 30 30 GetOptions( 31 31 "stack_id|s=s" => \$stack_id, 32 "skip-joins" => \$skip_joins, 32 33 "test" => \$test, 33 34 "ofmt=s" => \$ofmt, … … 83 84 my $exthead = 'SkyChip'; 84 85 85 my $cmd = "$stilts tmatchn nin=5 matcher=exact values1=IPP_IDET values2=IPP_IDET values3=IPP_IDET" 86 my $cmd; 87 if ($skip_joins) { 88 $cmd = "$stilts tpipe in=$path cmd='" 89 . "addcol -after IPP_IDET STACK_ID $stack_id;" 90 . "addcol -after STACK_ID SKYCAL_ID $skycal_id;" 91 . "addcol -after SKYCAL_ID PROJ_ID $proj;" 92 . "addcol -after PROJ_ID CELL_ID $cell;" 93 . "'" 94 . " out=$output"; 95 } else { 96 $cmd = "$stilts tmatchn nin=5 matcher=exact values1=IPP_IDET values2=IPP_IDET values3=IPP_IDET" 86 97 . " values4=IPP_IDET values5=IPP_IDET" 87 98 . " fixcols=all suffix1='' suffix2=_exp suffix3=_dev suffix4=_ser suffix5='_xsrc'" … … 107 118 . " progress=none" 108 119 ; 120 } 109 121 110 122 $cmd .= " ofmt=$ofmt" if $ofmt; -
branches/eam_branches/ipp-20151113/tools/dvodb_calib/HDFV2calib/run.dvolens
r38745 r39224 20 20 set options = "" 21 21 set options = "$options -update-objects" 22 set options = "$options -region 320 340 -10 10"22 set options = "$options -region 255 275 -33 -13 " 23 23 set options = "$options -D CATDIR $catdir" 24 24 set options = "$options -update" -
branches/eam_branches/ipp-20151113/tools/dvodb_calib/HDFV2calib/run.relphot
r38745 r39224 34 34 set options = "$options -max-density 3000" 35 35 set options = "$options -cloud-limit 0.5" 36 set options = "$options -region 320 340 -10 10" 36 # set options = "$options -region 320 340 -10 10" 37 set options = "$options -region 255 275 -33 -13" 37 38 set options = "$options -boundary-tree tess.3pi.fits" 38 39 set options = "$options -D CATDIR $catdir" -
branches/eam_branches/ipp-20151113/tools/releasecalib/scripts/extractinfo
r35927 r39224 65 65 my $zpt = $clam - $mcal; 66 66 67 if ($name =~ ':') { 68 # semi colons in file name, must be a nebulous path split by ':' characters 69 # The smf name that we want is the last one 70 my @words = split ':', $name; 71 my $n = scalar @words; 72 die "cannot parse file name $name" unless $n; 73 $name = @words[$n-1]; 74 } 67 75 my ($exp_name, $exp_id, undef, $cam_id) = split '\.', $name; 68 76
Note:
See TracChangeset
for help on using the changeset viewer.
