Changeset 34735
- Timestamp:
- Nov 29, 2012, 2:15:01 PM (14 years ago)
- Location:
- branches/eam_branches/ipp-20120905
- Files:
-
- 83 edited
- 7 copied
-
. (modified) (1 prop)
-
Ohana (modified) (1 prop)
-
Ohana/src/addstar/src/psps_ids.c (modified) (2 diffs)
-
Ohana/src/libdvo/include/dvo.h (modified) (1 diff)
-
Ohana/src/opihi/cmd.astro (modified) (1 prop)
-
PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm (modified) (4 diffs)
-
ippMonitor (modified) (1 prop)
-
ippMonitor/INSTALL (modified) (1 diff)
-
ippMonitor/Makefile.in (modified) (1 diff)
-
ippMonitor/def/failedStaticsky.d (copied) (copied from trunk/ippMonitor/def/failedStaticsky.d )
-
ippMonitor/def/staticsky_failure.d (copied) (copied from trunk/ippMonitor/def/staticsky_failure.d )
-
ippMonitor/raw/czartool_labels.php (modified) (1 diff)
-
ippMonitor/raw/ipp.php (modified) (3 diffs)
-
ippMonitor/raw/ipp.stack.dat (modified) (1 diff)
-
ippMonitor/raw/site.php.in (modified) (1 diff)
-
ippScripts/scripts/background_warp.pl (modified) (3 diffs)
-
ippScripts/scripts/destreak_restore_camera.pl (modified) (2 diffs, 1 prop)
-
ippScripts/scripts/ipp_apply_burntool_single.pl (modified) (1 prop)
-
ippScripts/scripts/lap_science.pl (modified) (1 diff)
-
ippScripts/scripts/magic_destreak.pl (modified) (1 prop)
-
ippToPsps (modified) (1 prop)
-
ippToPsps/config/OB/tables.vot (modified) (8 diffs)
-
ippToPsps/config/P2/tables.vot (modified) (5 diffs)
-
ippToPsps/config/ST/tables.vot (modified) (10 diffs)
-
ippToPsps/jython/detectionbatch.py (modified) (15 diffs)
-
ippToPsps/jython/dvodetections.py (modified) (7 diffs)
-
ippToPsps/jython/ipptopspsdb.py (modified) (2 diffs)
-
ippToPsps/jython/loader.py (modified) (6 diffs)
-
ippToPsps/jython/objectbatch.py (modified) (4 diffs)
-
ippToPsps/jython/scratchdb.py (modified) (3 diffs)
-
ippToPsps/jython/stackbatch.py (modified) (19 diffs)
-
ippToPsps/src/Dvo.c (modified) (1 diff)
-
ippTools/share/bgtool_towarp.sql (modified) (1 diff)
-
ippTools/share/camtool_find_pendingimfile.sql (modified) (1 prop)
-
ippTools/share/chiptool_setimfiletoupdate.sql (modified) (1 prop)
-
ippTools/share/magicdstool_torevert_camera.sql (modified) (1 diff)
-
ippTools/share/pxadmin_create_tables.sql (modified) (1 prop)
-
ippTools/share/regtool_processedexp.sql (modified) (1 prop) ( previous)
-
ippTools/share/staticskytool_result.sql (modified) (1 diff)
-
ippTools/share/staticskytool_todo.sql (modified) (1 diff)
-
ippTools/share/warptool_towarped.sql (modified) (1 prop)
-
ippTools/src (modified) (1 prop)
-
ippTools/src/camtool.c (modified) (1 diff)
-
ippTools/src/magictool.c (modified) (1 prop)
-
ippTools/src/stacktool.c (modified) (1 diff)
-
ippTools/src/stacktoolConfig.c (modified) (1 diff)
-
ippconfig (modified) (1 prop)
-
ippconfig/recipes/nightly_science.config (modified) (2 diffs)
-
ippconfig/recipes/ppSub.config (modified) (1 diff)
-
ippconfig/recipes/psphot.config (modified) (2 diffs)
-
ippconfig/recipes/reductionClasses.mdc (modified) (1 diff, 1 prop)
-
ppImage/src (modified) (1 prop)
-
ppTranslate/documentation/ICD/Makefile (modified) (2 diffs)
-
ppTranslate/documentation/ICD/PSDC-940-005.tex (modified) (12 diffs)
-
ppTranslate/documentation/ICD/figures/basics.xfig (copied) (copied from trunk/ppTranslate/documentation/ICD/figures/basics.xfig )
-
ppTranslate/documentation/ICD/figures/exposure_ota.fig (copied) (copied from trunk/ppTranslate/documentation/ICD/figures/exposure_ota.fig )
-
ppTranslate/documentation/ICD/figures/ext_theta.fig (copied) (copied from trunk/ppTranslate/documentation/ICD/figures/ext_theta.fig )
-
ppTranslate/documentation/ICD/figures/ipp_workflow.fig (copied) (copied from trunk/ppTranslate/documentation/ICD/figures/ipp_workflow.fig )
-
ppTranslate/documentation/ICD/icd.bib (copied) (copied from trunk/ppTranslate/documentation/ICD/icd.bib )
-
ppTranslate/src/ppMops.h (modified) (1 diff)
-
ppTranslate/src/ppMopsRead.c (modified) (10 diffs)
-
ppTranslate/src/ppMopsWrite.c (modified) (6 diffs)
-
psLib/share/tai_utc.dat (modified) (2 diffs)
-
psLib/share/tai_utc.raw (modified) (1 diff)
-
psLib/src/imageops/psImageConvolve.c (modified) (1 diff)
-
psLib/src/math/psHistogram.c (modified) (1 diff)
-
psLib/src/math/psStats.c (modified) (3 diffs)
-
psModules (modified) (1 prop)
-
psModules/src/objects (modified) (1 prop)
-
psModules/src/objects/pmSourceIO.c (modified) (4 diffs)
-
psphot (modified) (1 prop)
-
psphot/src (modified) (1 prop)
-
psphot/src/psphotDeblendSatstars.c (modified) (1 diff)
-
psphot/src/psphotReplaceUnfit.c (modified) (1 diff)
-
psphot/src/psphotStackImageLoop.c (modified) (1 prop)
-
psphot/src/psphotStackMatchPSFs.c (modified) (1 diff)
-
psphot/src/psphotStackMatchPSFsUtils.c (modified) (2 diffs)
-
psphot/src/psphotStackReadout.c (modified) (2 diffs)
-
pstamp/scripts (modified) (1 prop)
-
pstamp/scripts/psmkreq (modified) (9 diffs)
-
pstamp/scripts/pstamp_checkdependent.pl (modified) (4 diffs)
-
pstamp/src/ppstampArguments.c (modified) (4 diffs)
-
pstamp/src/ppstampMakeStamp.c (modified) (15 diffs)
-
pstamp/src/ppstampOptions.c (modified) (1 diff)
-
pstamp/src/ppstampOptions.h (modified) (1 diff)
-
pstamp/src/ppstampParseCamera.c (modified) (1 diff)
-
pstamp/src/pstamp.h (modified) (1 diff)
-
psvideophot (modified) (1 prop)
-
tools/fixburntool (modified) (7 diffs)
-
tools/runwarpskycell.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120905
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20120905/Ohana
- Property svn:mergeinfo deleted
-
branches/eam_branches/ipp-20120905/Ohana/src/addstar/src/psps_ids.c
r34260 r34735 21 21 CreatePSPSStackDetectionID(int sourceID, int imageID, int detID) 22 22 { 23 // sourceID : ID of database + table that tracked the image (< 0x 100 = 256)23 // sourceID : ID of database + table that tracked the image (< 0x7f = 127) 24 24 // imageID : external ID of the image which provided the detections (< 0x1000.0000 ~ 2.7e8) 25 25 // detID : detection sequence in image (< 0x1000.0000 ~ 2.7e8) … … 27 27 assert (detID < 0x10000000); 28 28 assert (imageID < 0x10000000); 29 assert (sourceID < 0x 100);29 assert (sourceID < 0x7f); 30 30 31 31 uint64_t detectid = ((uint64_t)sourceID << 56) + ((uint64_t)imageID << 28) + (uint64_t)detID; -
branches/eam_branches/ipp-20120905/Ohana/src/libdvo/include/dvo.h
r34728 r34735 193 193 ID_PHOTOM_PASS_3 = 0x00000800, // average magnitude calculated in 3th pass 194 194 ID_PHOTOM_PASS_4 = 0x00001000, // average magnitude calculated in 4th pass 195 ID_PSPS_OBJ_EXT = 0x00002000, // In PSPS ID_SECF_OBJ_EXT is moved here so it fits within 16 bits 195 196 ID_SECF_OBJ_EXT = 0x01000000, // extended in this band 196 197 } DVOSecfiltFlags; -
branches/eam_branches/ipp-20120905/Ohana/src/opihi/cmd.astro
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20120905/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm
r34229 r34735 304 304 $skycell_id = $component; 305 305 $command = "$stacktool -sumskyfile -dbname $imagedb"; 306 # only consider stacks in full state. 307 $command .= " -state full"; 306 308 $id_opt = "-stack_id"; 307 309 $component_args = " -skycell_id $skycell_id" if $skycell_id and $skycell_id ne 'all'; … … 894 896 } else { 895 897 # skip these obsolete tesselations unless they were explicitly asked for 896 # should I do this?897 898 next if $tess_id eq "FIXNS"; 898 899 next if $tess_id eq "ALLSKY"; 900 next if $tess_id eq "RINGS.V0"; 899 901 } 900 902 next if $requested_skycell and ($skycell_id ne $requested_skycell); … … 1287 1289 1288 1290 my $id_name = $stage . "_id"; 1291 $id_name = 'exp_id' if $stage eq 'raw'; 1289 1292 1290 1293 # input list is "order by exp_id, run_id DESC" run_id is one of (chip_id, warp_id, diff_id) … … 1307 1310 my $magicked = $input->{magicked}; # this will be either stageRun.magicked or stage%file.magicked 1308 1311 my $state = $input->{state}; 1312 $state = $input->{data_state} if !defined $state; 1309 1313 1310 1314 # can't process run in these states -
branches/eam_branches/ipp-20120905/ippMonitor
- Property svn:mergeinfo changed
/trunk/ippMonitor merged: 34660,34687-34688
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20120905/ippMonitor/INSTALL
r34006 r34735 24 24 # Note: we use a 'science databases (replication) slave' and the ippMonitor read-only account to connect to that database 25 25 psconfigure --dbhost scidbs1 --dbuser ippMonitor --dbpass ippMonitor --htdocs /var/www/localhost/htdocs --site ~/ippconfig/ippmonitor.config 26 27 psconfigure --dbhost scidbm --dbuser ipp --dbpass ipp --htdocs /var/www/localhost/htdocs --site ~/ippconfig/ippmonitor.config 28 -
branches/eam_branches/ipp-20120905/ippMonitor/Makefile.in
r34466 r34735 240 240 $(DESTWWW)/lapRuns.php \ 241 241 $(DESTWWW)/lapExposures.php \ 242 $(DESTWWW)/lapStacks.php 242 $(DESTWWW)/lapStacks.php \ 243 $(DESTWWW)/failedStaticsky.php \ 244 $(DESTWWW)/staticsky_failure.php 243 245 244 246 PICTURES = \ -
branches/eam_branches/ipp-20120905/ippMonitor/raw/czartool_labels.php
r34566 r34735 465 465 createFormattedTableCell($anyFaults, $link, $str, $anyFaults, 0); 466 466 467 $link = $defaultlink;467 $link = "failedStaticsky.php?pass=" . $pass . "&proj=" . $proj . "&staticskyRun.label=" . $thisLabel . "&staticskyRun.state=".$searchState; 468 468 getStateAndFaults($db, $thisLabel, $selectedState, "staticsky", $str, $anyFaults); 469 469 createFormattedTableCell($anyFaults, $link, $str, $anyFaults, 0); -
branches/eam_branches/ipp-20120905/ippMonitor/raw/ipp.php
r30454 r34735 799 799 // echo "<b>class_id: $class_id</b><br>\n"; 800 800 // echo "<b>camera: $camera</b><br>\n"; 801 // echo "<b>filerule: $filerule</b><br>\n"; 801 802 802 803 if (! $class_id) { $class_id = "NONE"; } 803 804 805 //SCH: I set a default value for the 'camera' which is based on the 806 //'proj' parameter. 807 //It's necessary for staticsky logs and it would require to join tables 808 //back to the warpRun table 809 if (! $camera) { $camera = strtoupper($_GET['proj']); } 810 804 811 if ($basename && $camera && $filerule) { 805 806 812 // do I need to do this to the output result as well? 807 813 $basename = escapeshellarg($basename); … … 841 847 return; 842 848 } 849 echo "<b>log filename: $filename</b><br>\n"; 843 850 844 851 echo "<pre>\n"; … … 850 857 } 851 858 } 859 852 860 853 861 // expect image supplied with key=name -
branches/eam_branches/ipp-20120905/ippMonitor/raw/ipp.stack.dat
r28654 r34735 36 36 menulink | menuselect | link | Static Sky Processed Skyfile | staticskyProcessedSkyfile.php 37 37 menulink | menuselect | link | Static Sky Failed Skyfile | staticskyFailedSkyfile.php 38 menulink | menuselect | link | Static Sky Failed | failedStaticsky.php -
branches/eam_branches/ipp-20120905/ippMonitor/raw/site.php.in
r34566 r34735 47 47 $REPL_DBNAME_ISP = "ippc17 (isp)"; 48 48 49 $REPL_HOST_NEBULOUS_SECONDARY = "ipp c63.IfA.Hawaii.Edu";49 $REPL_HOST_NEBULOUS_SECONDARY = "ippdb04.IfA.Hawaii.Edu"; 50 50 $REPL_USER_NEBULOUS_SECONDARY = "ippMonitor"; 51 51 $REPL_PASSWORD_NEBULOUS_SECONDARY = "ippMonitor"; 52 $REPL_DBNAME_NEBULOUS_SECONDARY = "ippc63 (secondary nebulous / 50,000 sec behind is acceptable)"; 52 $REPL_DBNAME_NEBULOUS_SECONDARY = "ippdb04 (secondary nebulous / 50,000 sec behind is acceptable / usually stopped on Mondays and Tuesdays)"; 53 54 $REPL_HOST_NEBULOUS_TERNARY = "ippc63.IfA.Hawaii.Edu"; 55 $REPL_USER_NEBULOUS_TERNARY = "ippMonitor"; 56 $REPL_PASSWORD_NEBULOUS_TERNARY = "ippMonitor"; 57 $REPL_DBNAME_NEBULOUS_TERNARY = "ippc63 (secondary nebulous / 50,000 sec behind is acceptable / usually stopped on Mondays and Tuesdays)"; 53 58 54 59 -
branches/eam_branches/ipp-20120905/ippScripts/scripts/background_warp.pl
r33054 r34735 88 88 my $logDest = $ipprc->filename("LOG.EXP", $outroot, $skycell_id) or my_die( "Unable to get log filename", $warp_bg_id, $skycell_id, $PS_EXIT_SYS_ERROR ); 89 89 90 $ipprc->redirect_ output($logDest) or my_die( "Unable to redirect output", $warp_bg_id, $skycell_id, $PS_EXIT_SYS_ERROR ) if $redirect;90 $ipprc->redirect_to_logfile($logDest) or my_die( "Unable to redirect output", $warp_bg_id, $skycell_id, $PS_EXIT_SYS_ERROR ) if $redirect; 91 91 92 92 # Recipes to use based on reduction class … … 158 158 &my_die("Can't find input astrometry: $astrometry", $warp_bg_id, $skycell_id, $PS_EXIT_PROG_ERROR) unless $ipprc->file_exists($astrometry); 159 159 160 my $out_image = $ipprc->filename("PSWARP.OUTPUT", $outroot, $skycell_id ); 161 my $out_mask = $ipprc->filename("PSWARP.OUTPUT.MASK", $outroot, $skycell_id); 162 my $out_stats = $ipprc->filename("SKYCELL.STATS", $outroot, $skycell_id ); 163 my $out_config = $ipprc->filename("PSWARP.CONFIG", $outroot, $skycell_id); 164 my $traceDest = $ipprc->filename("TRACE.EXP", $outroot, $skycell_id); 165 166 my $skyFile = $ipprc->filename("SKYCELL.TEMPLATE", $outroot, $skycell_id ); 160 #my $out_image = $ipprc->filename("PSWARP.OUTPUT", $outroot, $skycell_id ); 161 #my $out_mask = $ipprc->filename("PSWARP.OUTPUT.MASK", $outroot, $skycell_id); 162 #my $out_stats = $ipprc->filename("SKYCELL.STATS", $outroot, $skycell_id ); 163 #my $out_config = $ipprc->filename("PSWARP.CONFIG", $outroot, $skycell_id); 164 #my $traceDest = $ipprc->filename("TRACE.EXP", $outroot, $skycell_id); 165 166 my $out_image = prepare_output("PSWARP.OUTPUT", $outroot, $skycell_id, 1); 167 my $out_mask = prepare_output("PSWARP.OUTPUT.MASK", $outroot, $skycell_id, 1); 168 my $out_stats = prepare_output("SKYCELL.STATS", $outroot, $skycell_id, 1); 169 my $out_config = prepare_output("PSWARP.CONFIG", $outroot, $skycell_id, 1); 170 my $traceDest = prepare_output("TRACE.EXP", $outroot, $skycell_id, 1); 171 172 my $skyFile = prepare_output("SKYCELL.TEMPLATE", $outroot, $skycell_id, 1); 173 167 174 $ipprc->skycell_file( $tess_dir, $skycell_id, $skyFile, $verbose ) or &my_die("Unable to generate template skycell", $warp_bg_id, $skycell_id, $PS_EXIT_SYS_ERROR); 168 175 … … 239 246 ### Pau. 240 247 248 sub prepare_output 249 { 250 my $filerule = shift; 251 my $outroot = shift; 252 my $skycell_id = shift; 253 my $delete = shift; 254 $delete = 0 if !defined $delete; 255 256 my $error; 257 my $output = $ipprc->prepare_output($filerule, $outroot, $skycell_id, $delete, \$error) 258 or &my_die("failed to prepare output file for: $filerule", $warp_bg_id, $skycell_id, $error); 259 return $output; 260 } 261 241 262 242 263 sub my_die -
branches/eam_branches/ipp-20120905/ippScripts/scripts/destreak_restore_camera.pl
- Property svn:mergeinfo changed
/trunk/ippScripts/scripts/destreak_restore_camera.pl merged: 34715
r34575 r34735 440 440 } 441 441 442 my $backup_url = shift; 442 443 my $original_url = shift; 443 my $backup_url = shift;444 444 445 445 # rename the backup as the orig … … 449 449 my $moved; 450 450 eval { 451 $moved = nebulous->move($backup_url, $original_url);451 $moved = $nebulous->move($backup_url, $original_url); 452 452 }; 453 453 if ($@ or not $moved) { - Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20120905/ippScripts/scripts/ipp_apply_burntool_single.pl
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20120905/ippScripts/scripts/lap_science.pl
r34313 r34735 671 671 # } 672 672 # Do quality checks here 673 if ($verbose) { 674 printf("TEST: %d %d %d\n",$exposure->{exp_id},$exposure->{chip_id},$exposure->{chip_component_count}); 675 } 676 # Checks to ensure we do not divide by zero. Mostly happens with old diffs, it seems. 677 if ($exposure->{chip_component_count} == 0) { 678 $exposure->{chip_component_count} = 1; 679 } 680 if ($exposure->{cam_component_count} == 0) { 681 $exposure->{cam_component_count} = 1; 682 } 683 if ($exposure->{warp_component_count} == 0) { 684 $exposure->{warp_component_count} = 1; 685 } 686 if ($exposure->{diff_component_count} == 0) { 687 $exposure->{diff_component_count} = 1; 688 } 689 673 690 my $is_bad_quality = 0; 674 691 if ((defined($exposure->{chipRun_state}))&&($exposure->{chipRun_state} eq 'full')&& -
branches/eam_branches/ipp-20120905/ippScripts/scripts/magic_destreak.pl
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20120905/ippToPsps
- Property svn:mergeinfo changed
/trunk/ippToPsps merged: 34615,34629-34631,34633,34638-34641,34649,34661,34723
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20120905/ippToPsps/config/OB/tables.vot
r34275 r34735 45 45 <DESCRIPTION> Declination error</DESCRIPTION> 46 46 </FIELD> 47 <FIELD name="cx" arraysize="1" datatype="double" unit="unknown">48 <DESCRIPTION>Cartesian x</DESCRIPTION>49 </FIELD>50 <FIELD name="cy" arraysize="1" datatype="double" unit="unknown">51 <DESCRIPTION>Cartesian y</DESCRIPTION>52 </FIELD>53 <FIELD name="cz" arraysize="1" datatype="double" unit="unknown">54 <DESCRIPTION>Cartesian z</DESCRIPTION>55 </FIELD>56 47 <FIELD name="lambda" arraysize="1" datatype="double" unit="degree"> 57 48 <DESCRIPTION> ecliptic longitude</DESCRIPTION> … … 66 57 <DESCRIPTION> galactic latitude</DESCRIPTION> 67 58 </FIELD> 68 <FIELD name="lsg" arraysize="1" datatype="double" unit="unknown">69 <DESCRIPTION>supergalactic longitude</DESCRIPTION>70 </FIELD>71 <FIELD name="bsg" arraysize="1" datatype="double" unit="unknown">72 <DESCRIPTION>supergalactic latitude</DESCRIPTION>73 </FIELD>74 59 <FIELD name="nDetections" arraysize="1" datatype="short" unit="unknown"> 75 60 <DESCRIPTION>total number of detection measurements in all filters</DESCRIPTION> … … 201 186 <DESCRIPTION> 80 pct w magnitude</DESCRIPTION> 202 187 </FIELD> 203 <FIELD name="gStackPSF Flux" arraysize="1" datatype="float" unit="mag">188 <FIELD name="gStackPSFMag" arraysize="1" datatype="float" unit="mag"> 204 189 <DESCRIPTION> g stack psf flux </DESCRIPTION> 205 190 </FIELD> 206 <FIELD name="gStackPSF FluxErr" arraysize="1" datatype="double" unit="mag">191 <FIELD name="gStackPSFMagErr" arraysize="1" datatype="double" unit="mag"> 207 192 <DESCRIPTION> estimated error in g stack psf flux</DESCRIPTION> 208 193 </FIELD> … … 216 201 <DESCRIPTION>flags for g stack</DESCRIPTION> 217 202 </FIELD> 218 <FIELD name="rStackPSFFlux" arraysize="1" datatype="float" unit="mag"> 203 <FIELD name="gStackDetectID" arraysize="1" datatype="long" unit="unknown"> 204 <DESCRIPTION>ODM detection identifier</DESCRIPTION> 205 </FIELD> 206 <FIELD name="rStackPSFMag" arraysize="1" datatype="float" unit="mag"> 219 207 <DESCRIPTION> r stack psf flux </DESCRIPTION> 220 208 </FIELD> 221 <FIELD name="rStackPSF FluxErr" arraysize="1" datatype="double" unit="mag">209 <FIELD name="rStackPSFMagErr" arraysize="1" datatype="double" unit="mag"> 222 210 <DESCRIPTION> estimated error in r stack psf flux</DESCRIPTION> 223 211 </FIELD> … … 231 219 <DESCRIPTION>flags for r stack</DESCRIPTION> 232 220 </FIELD> 233 <FIELD name="iStackPSFFlux" arraysize="1" datatype="float" unit="mag"> 221 <FIELD name="rStackDetectID" arraysize="1" datatype="long" unit="unknown"> 222 <DESCRIPTION>ODM detection identifier</DESCRIPTION> 223 </FIELD> 224 <FIELD name="iStackPSFMag" arraysize="1" datatype="float" unit="mag"> 234 225 <DESCRIPTION> i stack psf flux </DESCRIPTION> 235 226 </FIELD> 236 <FIELD name="iStackPSF FluxErr" arraysize="1" datatype="float" unit="mag">227 <FIELD name="iStackPSFMagErr" arraysize="1" datatype="float" unit="mag"> 237 228 <DESCRIPTION> estimated error in i stack psf flux</DESCRIPTION> 238 229 </FIELD> … … 246 237 <DESCRIPTION>flags for i stack</DESCRIPTION> 247 238 </FIELD> 248 <FIELD name="zStackPSFFlux" arraysize="1" datatype="float" unit="mag"> 239 <FIELD name="iStackDetectID" arraysize="1" datatype="long" unit="unknown"> 240 <DESCRIPTION>ODM detection identifier</DESCRIPTION> 241 </FIELD> 242 <FIELD name="zStackPSFMag" arraysize="1" datatype="float" unit="mag"> 249 243 <DESCRIPTION> z stack psf flux </DESCRIPTION> 250 244 </FIELD> 251 <FIELD name="zStackPSF FluxErr" arraysize="1" datatype="float" unit="mag">245 <FIELD name="zStackPSFMagErr" arraysize="1" datatype="float" unit="mag"> 252 246 <DESCRIPTION> estimated error in z stack psf flux</DESCRIPTION> 253 247 </FIELD> … … 261 255 <DESCRIPTION>flags for z stack</DESCRIPTION> 262 256 </FIELD> 263 <FIELD name="yStackPSFFlux" arraysize="1" datatype="float" unit="unknown"> 257 <FIELD name="zStackDetectID" arraysize="1" datatype="long" unit="unknown"> 258 <DESCRIPTION>ODM detection identifier</DESCRIPTION> 259 </FIELD> 260 <FIELD name="yStackPSFMag" arraysize="1" datatype="float" unit="unknown"> 264 261 <DESCRIPTION>y band stack PSF flux</DESCRIPTION> 265 262 </FIELD> 266 <FIELD name="yStackPSF FluxErr" arraysize="1" datatype="float" unit="unknown">263 <FIELD name="yStackPSFMagErr" arraysize="1" datatype="float" unit="unknown"> 267 264 <DESCRIPTION>y band stack psf flux err</DESCRIPTION> 268 265 </FIELD> … … 276 273 <DESCRIPTION>flags for y stack</DESCRIPTION> 277 274 </FIELD> 278 <FIELD name="extra" arraysize="1" datatype="float" unit="unknown"> 279 <DESCRIPTION>currently unused</DESCRIPTION> 275 <FIELD name="yStackDetectID" arraysize="1" datatype="long" unit="unknown"> 276 <DESCRIPTION>ODM detection identifier</DESCRIPTION> 277 </FIELD> 278 <FIELD name="qfPerfect" arraysize="1" datatype="float" unit="unknown"> 279 <DESCRIPTION>qf perfect</DESCRIPTION> 280 280 </FIELD> 281 281 <FIELD name="sgSep" arraysize="1" datatype="float" unit="unknown"> -
branches/eam_branches/ipp-20120905/ippToPsps/config/P2/tables.vot
r32031 r34735 404 404 <DESCRIPTION> estimated error in y</DESCRIPTION> 405 405 </FIELD> 406 <FIELD name=" instFlux" arraysize="1" datatype="float" unit="adu/s">406 <FIELD name="psfFlux" arraysize="1" datatype="float" unit="adu/s"> 407 407 <DESCRIPTION> PSF instrumental flux</DESCRIPTION> 408 408 </FIELD> 409 <FIELD name=" instFluxErr" arraysize="1" datatype="float" unit="adu/s">409 <FIELD name="psfFluxErr" arraysize="1" datatype="float" unit="adu/s"> 410 410 <DESCRIPTION> estimated error in flux</DESCRIPTION> 411 411 </FIELD> … … 425 425 <DESCRIPTION>PSF likelihood</DESCRIPTION> 426 426 </FIELD> 427 <FIELD name="psf Cf" arraysize="1" datatype="float" unit="unknown">428 <DESCRIPTION>PSF coverage factor</DESCRIPTION>427 <FIELD name="psfQf" arraysize="1" datatype="float" unit="unknown"> 428 <DESCRIPTION>PSF qf</DESCRIPTION> 429 429 </FIELD> 430 430 <FIELD name="momentXX" arraysize="1" datatype="float" unit="arcsec"> … … 437 437 <DESCRIPTION> momeny YY</DESCRIPTION> 438 438 </FIELD> 439 <FIELD name="ap Mag" arraysize="1" datatype="float" unit="magnitude">440 <DESCRIPTION> Aperture magnitude</DESCRIPTION>441 </FIELD> 442 <FIELD name="ap MagErr" arraysize="1" datatype="float" unit="magnitude">443 <DESCRIPTION> Aperture magnitudeerror</DESCRIPTION>444 </FIELD> 445 <FIELD name="kronFlux" arraysize="1" datatype="float" unit=" magnitude">439 <FIELD name="apFlux" arraysize="1" datatype="float" unit="adu/s"> 440 <DESCRIPTION> Aperture Flux</DESCRIPTION> 441 </FIELD> 442 <FIELD name="apFluxErr" arraysize="1" datatype="float" unit="adu/s"> 443 <DESCRIPTION> Aperture Flux error</DESCRIPTION> 444 </FIELD> 445 <FIELD name="kronFlux" arraysize="1" datatype="float" unit="adu/s"> 446 446 <DESCRIPTION> Kron flux</DESCRIPTION> 447 447 </FIELD> 448 <FIELD name="kronFluxErr" arraysize="1" datatype="float" unit=" magnitude">448 <FIELD name="kronFluxErr" arraysize="1" datatype="float" unit="adu/s"> 449 449 <DESCRIPTION> Kron flux error</DESCRIPTION> 450 450 </FIELD> … … 455 455 <DESCRIPTION> Kron radius error</DESCRIPTION> 456 456 </FIELD> 457 <FIELD name=" crLikelihood" arraysize="1" datatype="float" unit="unknown">458 <DESCRIPTION> Likelihood the source is a cosmic ray</DESCRIPTION>459 </FIELD> 460 <FIELD name=" extendedLikelihood" arraysize="1" datatype="float" unit="unknown">461 <DESCRIPTION> Likelihood the source is extended</DESCRIPTION>457 <FIELD name="psfQfPerfect" arraysize="1" datatype="float" unit="unknown"> 458 <DESCRIPTION>psf QF Perfect</DESCRIPTION> 459 </FIELD> 460 <FIELD name="psfChiSq" arraysize="1" datatype="float" unit="unknown"> 461 <DESCRIPTION>PSF Chi sq</DESCRIPTION> 462 462 </FIELD> 463 463 <FIELD name="infoFlag" arraysize="1" datatype="long" unit="unknown"> 464 464 <DESCRIPTION>flag indicating provenance information</DESCRIPTION> 465 465 </FIELD> 466 <FIELD name="sky" arraysize="1" datatype="float" unit="adu ">466 <FIELD name="sky" arraysize="1" datatype="float" unit="adu/s/pixel"> 467 467 <DESCRIPTION> PSF sky level at source</DESCRIPTION> 468 468 </FIELD> 469 <FIELD name="skyErr" arraysize="1" datatype="float" unit="adu ">469 <FIELD name="skyErr" arraysize="1" datatype="float" unit="adu/s/pixel"> 470 470 <DESCRIPTION> estimated error in sky</DESCRIPTION> 471 471 </FIELD> … … 539 539 </DATA> 540 540 </TABLE> 541 <TABLE name="DetectionCalib"> 542 <DESCRIPTION>VOTable description of PSPS table DetectionCalib</DESCRIPTION> 543 <PARAM arraysize="1" datatype="char" ucd="meta.bib.author" name="Author" value="PSPS"></PARAM> 544 <FIELD name="objID" arraysize="1" datatype="long" unit="unknown"> 545 <DESCRIPTION>ODM object identifier index</DESCRIPTION> 546 </FIELD> 547 <FIELD name="detectID" arraysize="1" datatype="long" unit="unknown"> 548 <DESCRIPTION>ODM detection identifier index</DESCRIPTION> 549 </FIELD> 550 <FIELD name="ippObjID" arraysize="1" datatype="long" unit="unknown"> 551 <DESCRIPTION>IPP object number</DESCRIPTION> 552 </FIELD> 553 <FIELD name="ippDetectID" arraysize="1" datatype="long" unit="unknown"> 554 <DESCRIPTION>detection ID generated by IPP</DESCRIPTION> 555 </FIELD> 556 <FIELD name="filterID" arraysize="1" datatype="unsignedByte" unit="unknown"> 557 <DESCRIPTION>filter identifier</DESCRIPTION> 558 </FIELD> 559 <FIELD name="surveyID" arraysize="1" datatype="unsignedByte" unit="unknown"> 560 <DESCRIPTION>survey identifier</DESCRIPTION> 561 </FIELD> 562 <FIELD name="ra" arraysize="1" datatype="double" unit="degrees"> 563 <DESCRIPTION>right ascension</DESCRIPTION> 564 </FIELD> 565 <FIELD name="dec" arraysize="1" datatype="double" unit="degrees"> 566 <DESCRIPTION>declination</DESCRIPTION> 567 </FIELD> 568 <FIELD name="raErr" arraysize="1" datatype="float" unit="arcsec"> 569 <DESCRIPTION>right ascension error</DESCRIPTION> 570 </FIELD> 571 <FIELD name="decErr" arraysize="1" datatype="float" unit="arcsec"> 572 <DESCRIPTION>declination error</DESCRIPTION> 573 </FIELD> 574 <FIELD name="zp" arraysize="1" datatype="float" unit="magnitude"> 575 <DESCRIPTION>zero point offset</DESCRIPTION> 576 </FIELD> 577 <FIELD name="zpErr" arraysize="1" datatype="float" unit="magnitude"> 578 <DESCRIPTION>zerop point offset error</DESCRIPTION> 579 </FIELD> 580 <FIELD name="expTime" arraysize="1" datatype="float" unit="s"> 581 <DESCRIPTION>exposure time</DESCRIPTION> 582 </FIELD> 583 <FIELD name="airMass" arraysize="1" datatype="float" unit="unknown"> 584 <DESCRIPTION>airmass</DESCRIPTION> 585 </FIELD> 586 <FIELD name="dataRelease" arraysize="1" datatype="unsignedByte" unit="unknown"> 587 <DESCRIPTION>Data release to propagate to the object</DESCRIPTION> 588 </FIELD> 589 <DATA> 590 <TABLEDATA></TABLEDATA> 591 </DATA> 592 </TABLE> 541 593 </RESOURCE> 542 594 </VOTABLE> -
branches/eam_branches/ipp-20120905/ippToPsps/config/ST/tables.vot
r32031 r34735 148 148 <DESCRIPTION>projection cell identifier</DESCRIPTION> 149 149 </FIELD> 150 <FIELD name="obsTime" arraysize="1" datatype="double">151 <DESCRIPTION> Time of mid observation (unit = day)</DESCRIPTION>152 </FIELD>153 150 <FIELD name="xPos" arraysize="1" datatype="float"> 154 151 <DESCRIPTION>measured x on CCD from PSF fit</DESCRIPTION> … … 163 160 <DESCRIPTION>estimated error in y</DESCRIPTION> 164 161 </FIELD> 165 <FIELD name=" instFlux" arraysize="1" datatype="float">162 <FIELD name="psfFlux" arraysize="1" datatype="float"> 166 163 <DESCRIPTION>PSF instrumental flux</DESCRIPTION> 167 164 </FIELD> 168 <FIELD name=" instFluxErr" arraysize="1" datatype="float">165 <FIELD name="psfFluxErr" arraysize="1" datatype="float"> 169 166 <DESCRIPTION>estimated error in instrumental flux</DESCRIPTION> 170 167 </FIELD> … … 193 190 <DESCRIPTION>PSF likelihood</DESCRIPTION> 194 191 </FIELD> 195 <FIELD name="psfCf" arraysize="1" datatype="float"> 196 <DESCRIPTION>PSF coverage factor</DESCRIPTION> 197 </FIELD> 192 <FIELD name="psfQf" arraysize="1" datatype="float"> 193 <DESCRIPTION>PSF Q factor</DESCRIPTION> 194 </FIELD> 195 <FIELD name="psfQfPerfect" arraysize="1" datatype="float"> 196 <DESCRIPTION>PSF QF Perfect</DESCRIPTION> 197 </FIELD> 198 198 <FIELD name="momentXX" arraysize="1" datatype="float"> 199 199 <DESCRIPTION> moment XX (unit = arcsec)</DESCRIPTION> … … 223 223 <DESCRIPTION> moment RH (unit = arcsec)</DESCRIPTION> 224 224 </FIELD> 225 <FIELD name="ap Mag" arraysize="1" datatype="float">226 <DESCRIPTION> Aperture magnitude (unit = magnitude)</DESCRIPTION>227 </FIELD> 228 <FIELD name="ap MagErr" arraysize="1" datatype="float">229 <DESCRIPTION> Aperture magnitude error (unit = magnitude)</DESCRIPTION>225 <FIELD name="apFlux" arraysize="1" datatype="float"> 226 <DESCRIPTION> Aperture flux (unit = adu/s)</DESCRIPTION> 227 </FIELD> 228 <FIELD name="apFluxErr" arraysize="1" datatype="float"> 229 <DESCRIPTION> Aperture flux error (unit = adu/s)</DESCRIPTION> 230 230 </FIELD> 231 231 <FIELD name="kronFlux" arraysize="1" datatype="float"> 232 <DESCRIPTION> Kron flux (unit = magnitude)</DESCRIPTION>232 <DESCRIPTION> Kron flux (unit = adu/s)</DESCRIPTION> 233 233 </FIELD> 234 234 <FIELD name="kronFluxErr" arraysize="1" datatype="float"> 235 <DESCRIPTION> Kron flux error (unit = magnitude)</DESCRIPTION>235 <DESCRIPTION> Kron flux error (unit = adu/s)</DESCRIPTION> 236 236 </FIELD> 237 237 <FIELD name="kronRad" arraysize="1" datatype="float"> 238 238 <DESCRIPTION> Kron radius (unit = arcsecs)</DESCRIPTION> 239 239 </FIELD> 240 <FIELD name=" kronRadErr" arraysize="1" datatype="float">241 <DESCRIPTION> Kron radius error (unit = arcsecs)</DESCRIPTION>240 <FIELD name="psfChiSq" arraysize="1" datatype="float"> 241 <DESCRIPTION> psf chi sq</DESCRIPTION> 242 242 </FIELD> 243 243 <FIELD name="infoFlag" arraysize="1" datatype="long"> … … 293 293 <DESCRIPTION>stack identifier</DESCRIPTION> 294 294 </FIELD> 295 <FIELD name="isophot Mag" arraysize="1" datatype="float">296 <DESCRIPTION>isophotal magnitude</DESCRIPTION>297 </FIELD> 298 <FIELD name="isophot MagErr" arraysize="1" datatype="float">299 <DESCRIPTION>estimated error in isophotal magnitude</DESCRIPTION>295 <FIELD name="isophotFlux" arraysize="1" datatype="float"> 296 <DESCRIPTION>isophotal flux</DESCRIPTION> 297 </FIELD> 298 <FIELD name="isophotFluxErr" arraysize="1" datatype="float"> 299 <DESCRIPTION>estimated error in isophotal flux</DESCRIPTION> 300 300 </FIELD> 301 301 <FIELD name="isophotMajAxis" arraysize="1" datatype="float"> … … 332 332 <DESCRIPTION>estimated error inPetrosian radius</DESCRIPTION> 333 333 </FIELD> 334 <FIELD name="pet Mag" arraysize="1" datatype="float">335 <DESCRIPTION>Petrosian magntiude</DESCRIPTION>336 </FIELD> 337 <FIELD name="pet MagErr" arraysize="1" datatype="float">338 <DESCRIPTION>estimated error in pet Mag</DESCRIPTION>334 <FIELD name="petFlux" arraysize="1" datatype="float"> 335 <DESCRIPTION>Petrosian Flux</DESCRIPTION> 336 </FIELD> 337 <FIELD name="petFluxErr" arraysize="1" datatype="float"> 338 <DESCRIPTION>estimated error in petFlux</DESCRIPTION> 339 339 </FIELD> 340 340 <FIELD name="petR50" arraysize="1" datatype="float"> … … 765 765 <DESCRIPTION>estimated error in deVaucouleurs radius</DESCRIPTION> 766 766 </FIELD> 767 <FIELD name="deV Mag" arraysize="1" datatype="float">767 <FIELD name="deVFlux" arraysize="1" datatype="float"> 768 768 <DESCRIPTION>deVaucouleurs magntiude</DESCRIPTION> 769 769 </FIELD> 770 <FIELD name="deV MagErr" arraysize="1" datatype="float">770 <FIELD name="deVFluxErr" arraysize="1" datatype="float"> 771 771 <DESCRIPTION>estimated error in deV_mag</DESCRIPTION> 772 772 </FIELD> … … 891 891 <DESCRIPTION>estimated error in Exponential fit radius</DESCRIPTION> 892 892 </FIELD> 893 <FIELD name="exp Mag" arraysize="1" datatype="float">894 <DESCRIPTION>Exponential fit magntiude</DESCRIPTION>895 </FIELD> 896 <FIELD name="exp MagErr" arraysize="1" datatype="float">897 <DESCRIPTION>estimated error in exp Mag</DESCRIPTION>893 <FIELD name="expFlux" arraysize="1" datatype="float"> 894 <DESCRIPTION>Exponential fit flux</DESCRIPTION> 895 </FIELD> 896 <FIELD name="expFluxErr" arraysize="1" datatype="float"> 897 <DESCRIPTION>estimated error in expFlux</DESCRIPTION> 898 898 </FIELD> 899 899 <FIELD name="expAb" arraysize="1" datatype="float"> … … 1017 1017 <DESCRIPTION>estimated error in Sersic radius</DESCRIPTION> 1018 1018 </FIELD> 1019 <FIELD name="ser Mag" arraysize="1" datatype="float">1020 <DESCRIPTION>Sersic magntiude</DESCRIPTION>1021 </FIELD> 1022 <FIELD name="ser MagErr" arraysize="1" datatype="float">1023 <DESCRIPTION>estimated error in ser Mag</DESCRIPTION>1019 <FIELD name="serFlux" arraysize="1" datatype="float"> 1020 <DESCRIPTION>Sersic Flux</DESCRIPTION> 1021 </FIELD> 1022 <FIELD name="serFluxErr" arraysize="1" datatype="float"> 1023 <DESCRIPTION>estimated error in serFlux</DESCRIPTION> 1024 1024 </FIELD> 1025 1025 <FIELD name="serAb" arraysize="1" datatype="float"> … … 1240 1240 </DATA> 1241 1241 </TABLE> 1242 <TABLE name="StackDetectionCalib"> 1243 <DESCRIPTION>VOTable description of PSPS table StackDetectionCalib</DESCRIPTION> 1244 <PARAM arraysize="1" datatype="char" ucd="meta.bib.author" name="Author" value="PSPS"></PARAM> 1245 <FIELD name="objID" arraysize="1" datatype="long" unit="unknown"> 1246 <DESCRIPTION>ODM object identifier index</DESCRIPTION> 1247 </FIELD> 1248 <FIELD name="stackDetectID" arraysize="1" datatype="long" unit="unknown"> 1249 <DESCRIPTION>ODM detection identifier index</DESCRIPTION> 1250 </FIELD> 1251 <FIELD name="ippObjID" arraysize="1" datatype="long" unit="unknown"> 1252 <DESCRIPTION>IPP object number</DESCRIPTION> 1253 </FIELD> 1254 <FIELD name="ippDetectID" arraysize="1" datatype="long" unit="unknown"> 1255 <DESCRIPTION>detection ID generated by IPP</DESCRIPTION> 1256 </FIELD> 1257 <FIELD name="filterID" arraysize="1" datatype="unsignedByte" unit="unknown"> 1258 <DESCRIPTION>filter identifier</DESCRIPTION> 1259 </FIELD> 1260 <FIELD name="surveyID" arraysize="1" datatype="unsignedByte" unit="unknown"> 1261 <DESCRIPTION>survey identifier</DESCRIPTION> 1262 </FIELD> 1263 <FIELD name="ra" arraysize="1" datatype="double" unit="degrees"> 1264 <DESCRIPTION>right ascension</DESCRIPTION> 1265 </FIELD> 1266 <FIELD name="dec" arraysize="1" datatype="double" unit="degrees"> 1267 <DESCRIPTION>declination</DESCRIPTION> 1268 </FIELD> 1269 <FIELD name="raErr" arraysize="1" datatype="float" unit="arcsec"> 1270 <DESCRIPTION>right ascension error</DESCRIPTION> 1271 </FIELD> 1272 <FIELD name="decErr" arraysize="1" datatype="float" unit="arcsec"> 1273 <DESCRIPTION>declination error</DESCRIPTION> 1274 </FIELD> 1275 <FIELD name="zp" arraysize="1" datatype="float" unit="magnitude"> 1276 <DESCRIPTION>zero point offset</DESCRIPTION> 1277 </FIELD> 1278 <FIELD name="zpErr" arraysize="1" datatype="float" unit="magnitude"> 1279 <DESCRIPTION>zerop point offset error</DESCRIPTION> 1280 </FIELD> 1281 <FIELD name="expTime" arraysize="1" datatype="float" unit="s"> 1282 <DESCRIPTION>exposure time</DESCRIPTION> 1283 </FIELD> 1284 <FIELD name="airMass" arraysize="1" datatype="float" unit="unknown"> 1285 <DESCRIPTION>airmass</DESCRIPTION> 1286 </FIELD> 1287 <FIELD name="dataRelease" arraysize="1" datatype="unsignedByte" unit="unknown"> 1288 <DESCRIPTION>Data release to propagate to the object</DESCRIPTION> 1289 </FIELD> 1290 <DATA> 1291 <TABLEDATA></TABLEDATA> 1292 </DATA> 1293 </TABLE> 1242 1294 </RESOURCE> 1243 1295 </VOTABLE> -
branches/eam_branches/ipp-20120905/ippToPsps/jython/detectionbatch.py
r33830 r34735 388 388 # delete all detections with PSF_INST_MAG < 17.5, as decreed by Gene 389 389 BEFORE = self.scratchDb.getRowCount(ippTableName) 390 sql = "DELETE FROM " + ippTableName + " WHERE PSF_INST_MAG < -17.5" 391 self.scratchDb.execute(sql) 390 #don't do this anymore 391 #sql = "DELETE FROM " + ippTableName + " WHERE PSF_INST_MAG < -17.5" 392 #self.scratchDb.execute(sql) 392 393 #DELETED = BEFORE - self.scratchDb.getRowCount(ippTableName) 393 results['SATDET'] = BEFORE - self.scratchDb.getRowCount(ippTableName) 394 #results['SATDET'] = BEFORE - self.scratchDb.getRowCount(ippTableName) 395 #we aren't deletng these now 396 results['SATDET'] = 0 394 397 #self.logger.infoPair("Saturated detections", "%d deleted" % DELETED) 395 398 … … 404 407 ,xPosErr \ 405 408 ,yPosErr \ 406 , instFlux \407 , instFluxErr \409 ,psfFlux \ 410 ,psfFluxErr \ 408 411 ,peakADU \ 409 412 ,psfWidMajor \ … … 411 414 ,psfTheta \ 412 415 ,psfLikelihood \ 413 ,psf Cf \416 ,psfQf \ 414 417 ,momentXX \ 415 418 ,momentXY \ 416 419 ,momentYY \ 417 ,ap Mag\420 ,apFlux \ 418 421 ,kronFlux \ 419 422 ,kronFluxErr \ 423 ,psfQfPerfect \ 424 ,psfChiSq \ 420 425 ,infoFlag \ 421 426 ,sky \ … … 447 452 ,MOMENTS_XY \ 448 453 ,MOMENTS_YY \ 449 , AP_MAG\454 ,POW(10.0, -0.4 *AP_MAG) / " + self.header['EXPTIME'] + " \ 450 455 ,KRON_FLUX / " + self.header['EXPTIME'] + " \ 451 456 ,KRON_FLUX_ERR / " + self.header['EXPTIME'] + " \ 452 ,FLAGS\ 453 ,SKY \ 454 ,SKY_SIGMA \ 457 ,PSF_QF_PERFECT \ 458 ,PSF_CHISQ \ 459 ,FLAGS2 << 32 | FLAGS \ 460 ,SKY / " + self.header['EXPTIME'] + " \ 461 ,SKY_SIGMA / " + self.header['EXPTIME'] + " \ 455 462 ,EXT_NSIGMA \ 456 463 , 0 \ … … 459 466 , " + str(self.config.dataRelease) + "\ 460 467 FROM " + ippTableName 468 # self.logger.info(sql) 461 469 self.scratchDb.execute(sql) 462 470 463 471 # now delete bad flux and bad chip positions 464 sql="DELETE FROM " + pspsTableName + " WHERE instFlux < 0.0000001" # TODO clearly a hack = 0 not allowed for instFlux 465 self.scratchDb.execute(sql) 466 472 #sql="DELETE FROM " + pspsTableName + " WHERE instFlux < 0.0000001" # TODO clearly a hack = 0 not allowed for instFlux 473 #self.scratchDb.execute(sql) 474 475 # add a instFlux = 0.0 -> 0.000001 476 sql="UPDATE " + pspsTableName + " SET psfFlux = 0.0000001 WHERE psfFlux = 0" 477 self.scratchDb.execute(sql) 478 467 479 # update cosmic ray and extended likelihoods 468 sql="UPDATE " + pspsTableName + " SET extendedLikelihood = 0, crLikelihood = 1.0 - psfLikelihood WHERE sgSep <= 0"469 self.scratchDb.execute(sql)470 sql="UPDATE " + pspsTableName + " SET crLikelihood = 0, extendedLikelihood = 1.0 - psfLikelihood WHERE sgSep > 0"471 self.scratchDb.execute(sql)480 #sql="UPDATE " + pspsTableName + " SET extendedLikelihood = 0, crLikelihood = 1.0 - psfLikelihood WHERE sgSep <= 0" 481 #self.scratchDb.execute(sql) 482 #sql="UPDATE " + pspsTableName + " SET crLikelihood = 0, extendedLikelihood = 1.0 - psfLikelihood WHERE sgSep > 0" 483 #self.scratchDb.execute(sql) 472 484 473 485 # remove detections will NULL inst flux or NULL peak ADU 474 results['NULLINSTFLUX'] = self.scratchDb.reportAndDeleteRowsWithNULLS(pspsTableName, "instFlux") 475 results['NULLPEAKADU'] = self.scratchDb.reportAndDeleteRowsWithNULLS(pspsTableName, "peakADU") 486 # leave them in at this stage- don't delete them. 487 #results['NULLINSTFLUX'] = self.scratchDb.reportAndDeleteRowsWithNULLS(pspsTableName, "instFlux") 488 #results['NULLPEAKADU'] = self.scratchDb.reportAndDeleteRowsWithNULLS(pspsTableName, "peakADU") 489 #we don't delete thos anymore 490 results['NULLINSTFLUX'] = 0; 491 results['NULLPEAKADU'] = 0; 476 492 477 493 ''' … … 504 520 505 521 ''' 522 Populates the DetectionCalib table for this OTA 523 ''' 524 def populateDetectionCalibTable(self, ota): 525 526 tableName = "DetectionCalib_" + ota 527 # drop then re-create table 528 self.scratchDb.dropTable(tableName) 529 sql = "CREATE TABLE " + tableName + " LIKE DetectionCalib" 530 try: self.scratchDb.execute(sql) 531 except: pass 532 533 # insert all detections into table 534 sql = "INSERT INTO " + tableName + " ( \ 535 objID \ 536 ,detectID \ 537 ,ippObjID \ 538 ,ippDetectID \ 539 ,filterID \ 540 ,surveyID \ 541 ) \ 542 SELECT \ 543 objID \ 544 ,detectID \ 545 ,ippObjID \ 546 ,ippDetectID \ 547 ,filterID \ 548 ,surveyID \ 549 FROM Detection_" + ota 550 self.scratchDb.execute(sql) 551 552 # insert calibration information from dvoDetections into the Table 553 sql = "UPDATE " + tableName + " AS a, " + self.scratchDb.dvoDetectionTable + " AS b \ 554 SET a.ra = b.ra, \ 555 a.dec = b.dec_, \ 556 a.raErr = b.raErr, \ 557 a.decErr = b.decErr, \ 558 a.zp = b.zp, \ 559 a.zpErr = b.zpErr, \ 560 a.expTime = b.expTime, \ 561 a.airMass = b.airMass \ 562 WHERE a.objID = b.objID AND a.detectID = b.detectID" 563 self.scratchDb.execute(sql) 564 self.scratchDb.updateAllRows(tableName, "dataRelease", str(self.config.dataRelease)) 565 566 ''' 506 567 Populates the Detection table for this OTA 507 568 ''' … … 587 648 if not self.getIDsFromDVO(): return False 588 649 650 # dec is reserved in MySQL, so STILTS replaces if with dec_, which is not the name of 651 # the column in PSPS 652 self.scratchDb.execute("ALTER TABLE DetectionCalib CHANGE dec_ `dec` double") 653 654 655 589 656 return True 590 657 … … 608 675 extension = "XY%d%d_psf" % (x, y) 609 676 self.scratchDb.createIndex(extension, "IPP_IDET") 610 677 self.logger.infoPair("created indexes on", "IPP tables") 611 678 ''' 612 679 Updates provided table with DVO IDs from DVO table … … 620 687 a.detectID = b.detectID, \ 621 688 a.objID = b.objID, \ 622 a.infoFlag = b.flags << 32| a.infoFlag \689 a.infoFlag = b.flags << 45 | a.infoFlag \ 623 690 WHERE a.ippDetectID = b.ippDetectID \ 624 691 AND b.imageID = " + str(imageID) … … 658 725 self.logger.info("| %5s | ------------- Bad astrometric solution : rejecting ------------ |" % ota) 659 726 continue 660 727 # self.logger.info("populate stuff "); 661 728 # populate remainder of tables 662 729 self.populateDetectionTable(ota, results) 663 730 # self.logger.info("successful populate "); 664 731 # now add DVO IDs 665 732 self.updateDvoIDs("Detection_" + ota, self.imageIDs[ota]) 733 # self.logger.info("updated dvoids") 666 734 results['NULLOBJID'] = self.scratchDb.reportAndDeleteRowsWithNULLS("Detection_" + ota, "objID") 667 self.updateImageID("Detection_" + ota, x, y) 735 #self.logger.info("deleted nulls") 736 self.updateImageID("Detection_" + ota, x, y) 737 # self.logger.info("updateImageId") 668 738 rowCount = self.scratchDb.getRowCount("Detection_" + ota) 739 # self.logger.info("got row count") 669 740 self.logger.info("| %5s | %13d | %13d | %13d | %13d | %13d | %13d |", 670 741 ota, … … 675 746 results['NULLOBJID'], 676 747 rowCount) 677 678 748 totalOriginal = totalOriginal + results['ORIGINALTOTAL'] 679 749 totalSatDet = totalSatDet + results['SATDET'] … … 682 752 totalNullObjID = totalNullObjID + results['NULLOBJID'] 683 753 totalDetections = totalDetections + rowCount 684 754 #self.logger.info("updated totals") 685 755 # check we have something in this Detection table TODO add this to table above 686 756 if rowCount < 1: … … 692 762 SET nDetect = %d, photoCalID = %d" % (self.scratchDb.getRowCount("Detection_" + ota), self.scratchDb.getPhotoCalID(self.imageIDs[ota])) 693 763 self.scratchDb.execute(sql) 694 764 765 #self.logger.info("updated imagedata") 695 766 self.populateSkinnyObjectTable(ota) 767 #self.logger.info("updated skinnyobject") 696 768 self.populateObjectCalColorTable(ota) 697 769 #self.logger.info("updated objectcalcolor") 770 self.populateDetectionCalibTable(ota) 771 #self.logger.info("updated detectioncalibtable") 772 698 773 # add these to list of tables to export later 699 774 self.tablesToExport.append("ImageMeta_" + ota) … … 701 776 self.tablesToExport.append("SkinnyObject_" + ota) 702 777 self.tablesToExport.append("ObjectCalColor_" + ota) 778 self.tablesToExport.append("DetectionCalib_" + ota) 703 779 tables.append("Detection_" + ota) 704 780 705 781 otaCount = otaCount + 1 706 782 #self.logger.info("end of ota") 707 783 # print totals 708 784 self.logger.info("+-------+---------------+---------------+---------------+---------------+---------------+---------------+") … … 757 833 else : regex = ".*.psf" 758 834 759 columns = "IPP_IDET X_PSF Y_PSF X_PSF_SIG Y_PSF_SIG PSF_INST_MAG PSF_INST_MAG_SIG PEAK_FLUX_AS_MAG PSF_MAJOR PSF_MINOR PSF_THETA EXT_NSIGMA PSF_QF MOMENTS_XX MOMENTS_XY MOMENTS_YY AP_MAG KRON_FLUX KRON_FLUX_ERR FLAGS SKY SKY_SIGMA EXT_NSIGMA"835 columns = "IPP_IDET X_PSF Y_PSF X_PSF_SIG Y_PSF_SIG PSF_INST_MAG PSF_INST_MAG_SIG PEAK_FLUX_AS_MAG PSF_MAJOR PSF_MINOR PSF_THETA EXT_NSIGMA PSF_QF MOMENTS_XX MOMENTS_XY MOMENTS_YY AP_MAG KRON_FLUX KRON_FLUX_ERR FLAGS FLAGS2 SKY SKY_SIGMA EXT_NSIGMA PSF_QF_PERFECT PSF_CHISQ" 760 836 761 837 return super(DetectionBatch, self).importIppTables(columns, regex) -
branches/eam_branches/ipp-20120905/ippToPsps/jython/dvodetections.py
r33686 r34735 44 44 self.importFits( 45 45 cpmPath, 46 "IMAGE_ID DET_ID OBJ_ID CAT_ID EXT_ID DB_FLAGS ",46 "IMAGE_ID DET_ID OBJ_ID CAT_ID EXT_ID DB_FLAGS PHOTCODE AIRMASS M_TIME M_CAL MAG_CAL_ERR D_RA D_DEC PLTSCALE X_CCD_ERR Y_CCD_ERR", 47 47 cpmTableName) 48 48 … … 50 50 self.scratchDb.createIndex(cpmTableName, "CAT_ID") 51 51 self.scratchDb.createIndex(cpmTableName, "OBJ_ID") 52 53 # XXX: Should we create index on PHOTCODE? 52 54 53 55 # we can now report that we have imported this table … … 60 62 self.importFits( 61 63 cptPath, 62 "OBJ_ID CAT_ID EXT_ID ",64 "OBJ_ID CAT_ID EXT_ID RA DEC", 63 65 cptTableName) 64 66 … … 67 69 self.scratchDb.createIndex(cptTableName, "OBJ_ID") 68 70 71 # SA10 72 # Columns needed for DetectionCalib and StackDetectionCalib 73 # zp = photcode.K * (AIRMASS - 1) + photcode.C_LAM * 0.001 - cpm.M_CAL 74 # zpErr = cpm.MAG_CAL_ERR 75 # airMass = cpm.AIRMASS 76 # expTime = POW(10.0, 0.4 * cpm.M_TIME) 77 # ra = cpt.RA - (cpm.D_RA / 3600.0) 78 # dec = cpt.DEC - (cpm.D_DEC / 3600.0) 79 # raErr = cpm.X_CCD_ERR * cpm.PLTSCALE 80 # decErr = cpm.Y_CCD_ERR * cpm.PLTSCALE 81 69 82 self.logger.infoPair("Adding","PSPS objIDs") 70 # first try to add a column for PSPS_OBJ_ID. catch failure and continue83 # first try to add the new columns. catch failure and continue 71 84 try: 72 sql = "ALTER TABLE " + cpmTableName + " ADD COLUMN (PSPS_OBJ_ID BIGINT) "85 sql = "ALTER TABLE " + cpmTableName + " ADD COLUMN (PSPS_OBJ_ID BIGINT), (ZP REAL), (RA FLOAT), (DEC FLOAT)" 73 86 self.scratchDb.execute(sql) 74 87 except: 75 88 self.logger.infoPair("Already added PSPS_OBJ_ID column to", cpmTableName) 76 89 77 # shove PSPS objIDs from cpt table into measurement table 78 sql = "UPDATE " + cpmTableName + " AS a, " + cptTableName + " AS b \ 79 SET a.PSPS_OBJ_ID = b.EXT_ID \ 90 # shove PSPS objIDs from cpt table and the calibrated zero point and coordinates which are formed 91 # by combining values from multiple tables into cpt table 92 sql = "UPDATE " + cpmTableName + " AS a, " + cptTableName + " AS b, " \ 93 + self.scratchDb.dvoPhotcodesTable + " AS c \ 94 SET a.PSPS_OBJ_ID = b.EXT_ID, \ 95 b.ZP = c.C_LAM * 0.001 + c.K * (b.AIRMASS - 1) - b.M_CAL, \ 96 b.RA = a.RA - (b.D_RA / 3600.0), \ 97 b.DEC = a.DEC - (b.D_DEC / 3600.0) \ 80 98 WHERE a.CAT_ID = b.CAT_ID \ 81 AND a.OBJ_ID = b.OBJ_ID" 99 AND a.OBJ_ID = b.OBJ_ID \ 100 AND b.PHOTCODE = c.CODE" 101 82 102 self.scratchDb.execute(sql) 83 103 … … 86 106 # PSPS object IDs assigned in the corresponding cpt file. This is believed to be a chip-boundary 87 107 # issue within DVO. So, for now, we take the first IMAGE_ID/DET_ID detection we find, and ignore the rest 108 # XXX: Bills 2012-10031 Does this problem still exist? 88 109 self.logger.infoPair("Merging into", self.scratchDb.dvoDetectionTable) 89 110 sql = "INSERT IGNORE INTO " + self.scratchDb.dvoDetectionTable + " (\ … … 94 115 ,objID \ 95 116 ,flags \ 117 ,zp \ 118 ,zpErr \ 119 ,airMass \ 120 ,expTime \ 121 ,ra \ 122 ,dec_ \ 123 ,raErr \ 124 ,decErr \ 96 125 ,fileID \ 97 126 ) SELECT \ … … 102 131 ,PSPS_OBJ_ID \ 103 132 ,DB_FLAGS \ 133 ,ZP \ 134 ,MAG_CAL_ERR \ 135 ,AIRMASS \ 136 ,POW(10.0, 0.4 * M_TIME) \ 137 ,RA \ 138 ,DEC \ 139 ,X_CCD_ERR*PLTSCALE \ 140 ,Y_CCD_ERR*PLTSCALE \ 104 141 , " + str(fileId) + " \ 105 142 FROM " + cpmTableName 143 106 144 try: 107 145 self.scratchDb.execute(sql) -
branches/eam_branches/ipp-20120905/ippToPsps/jython/ipptopspsdb.py
r33858 r34735 638 638 and not self.processingNow(batchType, stageID) \ 639 639 and not self.consistentlyFailed(batchType, stageID)): 640 641 self.logger.infoPair("heather:","passed logic") 640 642 641 643 sql = "INSERT INTO batch ( \ … … 652 654 '" + self.config.datastoreProduct + "' \ 653 655 )" 656 self.logger.infoPair("heather:","sql") 654 657 655 658 self.execute(sql) -
branches/eam_branches/ipp-20120905/ippToPsps/jython/loader.py
r33832 r34735 123 123 124 124 self.logger.infoPair("Boxes with unprocessed data", "%d" % len(boxIds)) 125 125 self.logger.infoPair("numAttempts", str(numAttempts)) 126 126 if len(boxIds) > 0: numAttempts = 0 127 127 128 128 for boxId in boxIds: 129 129 self.logger.infoPair("Check","client status") 130 130 if not self.checkClientStatus(): 131 131 abort = True 132 132 break 133 133 self.logger.infoPair("client status", "ok") 134 134 # get box info. if boxes have changed, break and start again 135 135 try: … … 138 138 self.logger.infoPair("Can't get details for this box", "%d" % boxId) 139 139 break 140 140 self.logger.infoPair("client status", "ok") 141 141 ids = self.ippToPspsDb.getPendingIdsForThisBox(boxId, batchType) 142 142 … … 150 150 self.logger.infoPair(batchType + " items found in this box", "%d" % len(ids)) 151 151 boxSizeWithBorder = boxDim['SIDE'] + (self.config.BORDER * 2) 152 152 self.logger.infoPair("got here", "ok") 153 153 useFullTables = 0 154 154 if batchType != "OB": … … 174 174 abort = True 175 175 break 176 176 self.logger.infoPair("processed","ok") 177 177 if abort or not self.checkClientStatus(): abort = True 178 178 elif numAttempts > 1 and not self.waitForPollTime(): break … … 188 188 # loop round IDs of all items to be processed 189 189 self.ippToPspsDb.lockBatchTable() 190 self.logger.infoPair("heather:","lockbatchtable") 190 191 unattemptedCount = 0 191 192 for id in ids: 192 193 self.logger.infoPair("heather:","in ids") 194 self.logger.infoPair("heather:id",str(id)) 193 195 batchID = self.ippToPspsDb.createNewBatch(batchType, id) 194 196 self.logger.infoPair("heather:","creatednewbatch") 197 self.logger.infoPair("heather:batchId", str(batchID)) 195 198 if batchID < 0: 196 199 unattemptedCount += 1 197 200 continue 198 201 self.logger.infoPair("heather:","passed logic") 199 202 self.ippToPspsDb.unlockTables() 203 self.logger.infoPair("heather:","unlock table") 200 204 self.ippToPspsDb.deletePendingItem(batchType, id) 205 self.logger.infoPair("heather:","deleted pending item") 201 206 202 207 # catch any raised exceptions in batch constructors … … 234 239 235 240 # if batch fails, ignore and move on to the next one 236 except: 241 except Exception, e: 242 self.logger.error("EXCEPTION: " + str(e)) 237 243 self.logger.errorPair("Problem with this %s batch (%d)" % (batchType, id), "skipping") 238 244 pass 239 245 240 246 if not self.checkClientStatus(): return False 241 247 self.logger.infoPair("checkclient status", "ok") 248 242 249 self.ippToPspsDb.lockBatchTable() 243 250 self.logger.infoPair("lockbatchtable", "ok") 244 251 self.logger.infoSeparator() 245 252 -
branches/eam_branches/ipp-20120905/ippToPsps/jython/objectbatch.py
r34466 r34735 114 114 for filter in filters: 115 115 116 sql = "UPDATE Object \ 117 JOIN " + cpsTable + " AS cps ON (cps.row = (Object.row*" + str(filterCount) + ")-(" + str(filterCount) + " - " + str(filter[0]) + ")) \ 116 filterID = self.scratchDb.getFilterID(filter[1]) 117 118 # NOTE: Manipulation of FLAGS from cpsTable is to move ID_SECF_OBJ_EXT flag (0x01000000) 119 # from bit 24 to bit 13 so that it fits into the SMALLINT Object.Flags 120 121 sql = "UPDATE Object JOIN \ 122 " + cpsTable + " AS cps ON (cps.row = (Object.row* " + str(filterCount) + ")-(" + str(filterCount) + " - " + str(filter[0]) + ")) \ 118 123 SET \ 119 124 n" + filter[1] + " = NCODE \ … … 122 127 ," + filter[1] + "MeanKronMag = MAG_KRON \ 123 128 ," + filter[1] + "MeanKronMagErr = MAG_KRON_ERR \ 124 ," + filter[1] + "StackPSF Flux = FLUX_PSF\125 ," + filter[1] + "StackPSF FluxErr = FLUX_PSF_ERR\129 ," + filter[1] + "StackPSFMag = -2.5 * log10(FLUX_PSF) + 8.9 \ 130 ," + filter[1] + "StackPSFMagErr = FLUX_PSF_ERR / FLUX_PSF \ 126 131 ," + filter[1] + "StackKronMag = -2.5 * log10(FLUX_KRON) + 8.9 \ 127 132 ," + filter[1] + "StackKronMagErr = FLUX_KRON_ERR / FLUX_KRON \ 128 133 ," + filter[1] + "20pct = MAG_20/1000 \ 129 134 ," + filter[1] + "80pct = MAG_80/1000 \ 130 ," + filter[1] + "Flags = FLAGS " 131 135 ," + filter[1] + "Flags = (0x7fff & FLAGS) | ((FLAGS >> 11) & 0x2000) \ 136 ," + filter[1] + "StackDetectID = STACK_DETECT_ID + " + str(filterID) 137 138 #self.logger.info(sql) 139 self.scratchDb.execute(sql) 140 141 self.logger.infoPair("Calculating nDetections from", "n[filters]") 142 for filter in filters: 143 # now do a sum of n[filters], but do not include the ones with -999 144 sql = "UPDATE Object \ 145 SET nDetections = nDetections + n" + filter[1] + " \ 146 WHERE n" + filter[1] + " != -999" 147 self.scratchDb.execute(sql) 132 148 133 self.scratchDb.execute(sql) 149 150 134 151 135 152 # now set to null all MeanMagErr values > 0.5 (cut set by Gene, 2012-04-12) … … 189 206 cpsTableName = self.scratchDb.getDbFriendlyTableName(self.region + ".cps") 190 207 191 self.logger.infoPair("Populating", "Object") 208 self.logger.infoPair("setting to null > 1e-38 and < 1e-38 in", "cps FLUX_KRON_ERR") 209 sql = "UPDATE " + cpsTableName + " set FLUX_KRON_ERR = NULL where FLUX_KRON_ERR < 1e-37 AND FLUX_KRON_ERR > -1e-37 " 210 211 try: 212 self.scratchDb.execute(sql) 213 except: 214 self.logger.errorPair("Couldn't squash out of range stuff", sql) 215 return False 216 217 self.logger.infoPair("setting to null > 1e-38 and < 1e-38 in", "cps FLUX_KRON") 218 sql = "UPDATE " + cpsTableName + " set FLUX_KRON = NULL where FLUX_KRON < 1e-37 AND FLUX_KRON > -1e-37 " 219 220 try: 221 self.scratchDb.execute(sql) 222 except: 223 self.logger.errorPair("Couldn't squash out of range stuff", sql) 224 return False 225 226 227 228 229 230 self.logger.infoPair("Populating", "Object s") 192 231 self.logger.infoPair("Inserting objects from", "cpt file") 193 232 … … 204 243 ,decErr \ 205 244 ,nDetections \ 206 , extra\245 ,qfPerfect \ 207 246 ,sgSep \ 208 247 ,dataRelease \ -
branches/eam_branches/ipp-20120905/ippToPsps/jython/scratchdb.py
r34466 r34735 68 68 DECLARE t REAL; \ 69 69 DECLARE z REAL; \ 70 DECLARE s INT; \ 71 SET s= SIGN(x); \ 70 72 SET x = ABS(x) / 1.4142135623731; \ 71 73 SET z=ABS(x); \ … … 75 77 SET ans = 2.0 - ans; \ 76 78 END IF; \ 79 SET ans = ans * s; \ 77 80 RETURN ans; \ 78 81 END" … … 385 388 objID BIGINT, \ 386 389 flags INT, \ 390 zp REAL, \ 391 zpErr REAL, \ 392 airMass REAL, \ 393 expTime REAL, \ 394 ra FLOAT, \ 395 dec_ FLOAT, \ 396 raErr REAL, \ 397 decErr REAL, \ 387 398 PRIMARY KEY (imageID, ippDetectID) \ 388 399 )" -
branches/eam_branches/ipp-20120905/ippToPsps/jython/stackbatch.py
r34466 r34735 76 76 self.projectioncell = self.skycell 77 77 78 # proposed new values. Need to coordinate with the SkyCell table 79 # this fits in 32 bits for 0 < tessID < 214 80 # self.skycell = str( (tessID * (10000 * 1000)) + (int(self.projectioncell) * 1000) + cellID ) 81 78 82 self.analysisVer = meta[2]; 79 83 … … 89 93 self.scratchDb.dropTable("SkinnyObject") 90 94 self.scratchDb.dropTable("ObjectCalColor") 95 self.scratchDb.dropTable("StackDetectionCalib") 91 96 92 97 # delete IPP tables … … 140 145 141 146 sql = "UPDATE StackApFlx AS a, SkyChip_xrad AS b SET \ 142 "+prefix+"flxR1=b.APER_FLUX_1 , \143 "+prefix+"flxR1Err=b.APER_FLUX_ERR_1 , \144 "+prefix+"flxR1Std=b.APER_FLUX_STDEV_1 , \147 "+prefix+"flxR1=b.APER_FLUX_1 / " + str(self.expTime) + ", \ 148 "+prefix+"flxR1Err=b.APER_FLUX_ERR_1 / " + str(self.expTime) + ", \ 149 "+prefix+"flxR1Std=b.APER_FLUX_STDEV_1 / " + str(self.expTime) + ", \ 145 150 "+prefix+"flxR1Fill=b.APER_FILL_1, \ 146 "+prefix+"flxR2=b.APER_FLUX_2 , \147 "+prefix+"flxR2Err=b.APER_FLUX_ERR_2 , \148 "+prefix+"flxR2Std=b.APER_FLUX_STDEV_2 , \151 "+prefix+"flxR2=b.APER_FLUX_2 / " + str(self.expTime) + ", \ 152 "+prefix+"flxR2Err=b.APER_FLUX_ERR_2 / " + str(self.expTime) + ", \ 153 "+prefix+"flxR2Std=b.APER_FLUX_STDEV_2 / " + str(self.expTime) + ", \ 149 154 "+prefix+"flxR2Fill=b.APER_FILL_2, \ 150 "+prefix+"flxR3=b.APER_FLUX_3 , \151 "+prefix+"flxR3Err=b.APER_FLUX_ERR_3 , \152 "+prefix+"flxR3Std=b.APER_FLUX_STDEV_3 , \155 "+prefix+"flxR3=b.APER_FLUX_3 / " + str(self.expTime) + ", \ 156 "+prefix+"flxR3Err=b.APER_FLUX_ERR_3 / " + str(self.expTime) + ", \ 157 "+prefix+"flxR3Std=b.APER_FLUX_STDEV_3 / " + str(self.expTime) + ", \ 153 158 "+prefix+"flxR3Fill=b.APER_FILL_3, \ 154 "+prefix+"flxR4=b.APER_FLUX_4 , \155 "+prefix+"flxR4Err=b.APER_FLUX_ERR_4 , \156 "+prefix+"flxR4Std=b.APER_FLUX_STDEV_4 , \159 "+prefix+"flxR4=b.APER_FLUX_4 / " + str(self.expTime) + ", \ 160 "+prefix+"flxR4Err=b.APER_FLUX_ERR_4 / " + str(self.expTime) + ", \ 161 "+prefix+"flxR4Std=b.APER_FLUX_STDEV_4 / " + str(self.expTime) + ", \ 157 162 "+prefix+"flxR4Fill=b.APER_FILL_4, \ 158 "+prefix+"flxR5=b.APER_FLUX_5 , \159 "+prefix+"flxR5Err=b.APER_FLUX_ERR_5 , \160 "+prefix+"flxR5Std=b.APER_FLUX_STDEV_5 , \163 "+prefix+"flxR5=b.APER_FLUX_5 / " + str(self.expTime) + ", \ 164 "+prefix+"flxR5Err=b.APER_FLUX_ERR_5 / " + str(self.expTime) + ", \ 165 "+prefix+"flxR5Std=b.APER_FLUX_STDEV_5 / " + str(self.expTime) + ", \ 161 166 "+prefix+"flxR5Fill=b.APER_FILL_5, \ 162 "+prefix+"flxR6=b.APER_FLUX_6 , \163 "+prefix+"flxR6Err=b.APER_FLUX_ERR_6 , \164 "+prefix+"flxR6Std=b.APER_FLUX_STDEV_6 , \167 "+prefix+"flxR6=b.APER_FLUX_6 / " + str(self.expTime) + ", \ 168 "+prefix+"flxR6Err=b.APER_FLUX_ERR_6 / " + str(self.expTime) + ", \ 169 "+prefix+"flxR6Std=b.APER_FLUX_STDEV_6 / " + str(self.expTime) + ", \ 165 170 "+prefix+"flxR6Fill=b.APER_FILL_6, \ 166 "+prefix+"flxR7=b.APER_FLUX_7 , \167 "+prefix+"flxR7Err=b.APER_FLUX_ERR_7 , \168 "+prefix+"flxR7Std=b.APER_FLUX_STDEV_7 , \171 "+prefix+"flxR7=b.APER_FLUX_7 / " + str(self.expTime) + ", \ 172 "+prefix+"flxR7Err=b.APER_FLUX_ERR_7 / " + str(self.expTime) + ", \ 173 "+prefix+"flxR7Std=b.APER_FLUX_STDEV_7 / " + str(self.expTime) + ", \ 169 174 "+prefix+"flxR7Fill=b.APER_FILL_7, \ 170 "+prefix+"flxR8=b.APER_FLUX_8 , \171 "+prefix+"flxR8Err=b.APER_FLUX_ERR_8 , \172 "+prefix+"flxR8Std=b.APER_FLUX_STDEV_8 , \175 "+prefix+"flxR8=b.APER_FLUX_8 / " + str(self.expTime) + ", \ 176 "+prefix+"flxR8Err=b.APER_FLUX_ERR_8 / " + str(self.expTime) + ", \ 177 "+prefix+"flxR8Std=b.APER_FLUX_STDEV_8 / " + str(self.expTime) + ", \ 173 178 "+prefix+"flxR8Fill=b.APER_FILL_8, \ 174 "+prefix+"flxR9=b.APER_FLUX_9 , \175 "+prefix+"flxR9Err=b.APER_FLUX_ERR_9 , \176 "+prefix+"flxR9Std=b.APER_FLUX_STDEV_9 , \179 "+prefix+"flxR9=b.APER_FLUX_9 / " + str(self.expTime) + ", \ 180 "+prefix+"flxR9Err=b.APER_FLUX_ERR_9 / " + str(self.expTime) + ", \ 181 "+prefix+"flxR9Std=b.APER_FLUX_STDEV_9 / " + str(self.expTime) + ", \ 177 182 "+prefix+"flxR9Fill=b.APER_FILL_9, \ 178 "+prefix+"flxR10=b.APER_FLUX_10 , \179 "+prefix+"flxR10Err=b.APER_FLUX_ERR_10 , \180 "+prefix+"flxR10Std=b.APER_FLUX_STDEV_10 , \183 "+prefix+"flxR10=b.APER_FLUX_10 / " + str(self.expTime) + ", \ 184 "+prefix+"flxR10Err=b.APER_FLUX_ERR_10 / " + str(self.expTime) + ", \ 185 "+prefix+"flxR10Std=b.APER_FLUX_STDEV_10 / " + str(self.expTime) + ", \ 181 186 "+prefix+"flxR10Fill=b.APER_FILL_10 \ 182 187 WHERE a.ippDetectID=b.IPP_IDET AND b.PSF_FWHM "+psfCondition … … 196 201 sql = "UPDATE StackModelFit AS a, SkyChip_xfit AS b SET \ 197 202 "+model+"Radius=b.EXT_WIDTH_MAJ, \ 198 "+model+" Mag=b.EXT_INST_MAG, \199 "+model+" MagErr=b.EXT_INST_MAG_SIG,\203 "+model+"Flux=POW(10, -0.4 * b.EXT_INST_MAG) / " + str(self.expTime) + " , \ 204 "+model+"FluxErr=ABS(b.EXT_INST_MAG_SIG) * POW(10, -0.4 * b.EXT_INST_MAG) / " + str(self.expTime) + " / 1.085736, \ 200 205 "+model+"Ab=b.EXT_WIDTH_MAJ/b.EXT_WIDTH_MIN, \ 201 206 "+model+"Phi=b.EXT_THETA, \ … … 319 324 ,skyCellID \ 320 325 ,projectionCellID \ 321 ,obsTime \322 326 ,xPos \ 323 327 ,yPos \ 324 328 ,xPosErr \ 325 329 ,yPosErr \ 326 , instFlux \327 , instFluxErr \330 ,psfFlux \ 331 ,psfFluxErr \ 328 332 ,peakFlux \ 329 333 ,sky \ … … 335 339 ,psfLikelihood \ 336 340 ,infoFlag \ 337 ,psfCf \ 341 ,psfQf \ 342 ,psfQfPerfect \ 338 343 ,momentXX \ 339 344 ,momentXY \ … … 345 350 ,momentR1 \ 346 351 ,momentRH \ 347 ,ap Mag\348 ,ap MagErr \352 ,apFlux \ 353 ,apFluxErr \ 349 354 ,kronFlux \ 350 355 ,kronFluxErr \ 351 356 ,kronRad \ 352 , kronRadErr\357 ,psfChiSq \ 353 358 ,nFrames \ 354 359 ,assocDate \ … … 359 364 ," + self.skycell + " \ 360 365 ," + self.projectioncell + " \ 361 ," + self.header['MJD-OBS'] + " \362 366 ,X_PSF \ 363 367 ,Y_PSF \ … … 367 371 ,ABS((PSF_INST_MAG_SIG*(POW(10.0, (-0.4*PSF_INST_MAG)) / " + str(self.expTime) + ")) / 1.085736) \ 368 372 ,POW(10.0, (-0.4*PEAK_FLUX_AS_MAG)) / " + str(self.expTime) + " \ 369 ,SKY \370 ,SKY_SIGMA \373 ,SKY / " + str(self.expTime) + " \ 374 ,SKY_SIGMA / " + str(self.expTime) + " \ 371 375 ,EXT_NSIGMA \ 372 376 ,PSF_MAJOR \ … … 374 378 ,PSF_THETA \ 375 379 ,psfLikelihood(EXT_NSIGMA) \ 376 , FLAGS2 << 32 | FLAGS \380 , FLAGS2 << 32 | FLAGS \ 377 381 ,PSF_QF \ 382 ,PSF_QF_PERFECT \ 378 383 ,MOMENTS_XX \ 379 384 ,MOMENTS_XY \ … … 385 390 ,MOMENTS_R1 \ 386 391 ,MOMENTS_RH \ 387 , AP_MAG\388 , NULL \392 ,POW(10.0, -0.4*AP_MAG) / " + str(self.expTime) + " \ 393 ,NULL \ 389 394 ,KRON_FLUX / " + str(self.expTime) + " \ 390 395 ,KRON_FLUX_ERR / " + str(self.expTime) + " \ 391 , MOMENTS_R1 * 2.5 \392 , NULL\396 ,MOMENTS_R1 * 2.5 \ 397 ,PSF_CHISQ \ 393 398 ,N_FRAMES \ 394 399 , '" + self.dateStr + "' \ … … 417 422 self.updateStackTypeID("StackDetection") 418 423 419 self.updateDvoIDs ("StackDetection")424 self.updateDvoIDsAndFlags("StackDetection") 420 425 421 426 sql = "ALTER IGNORE TABLE StackDetection ADD PRIMARY KEY (objID)" … … 427 432 #if deep stack and instFlux = null and err not null 428 433 sql = "UPDATE StackDetection AS a, SkyChip_psf AS b \ 429 SET instFlux = 2*b.PSF_INST_FLUX_SIG / " + str(self.expTime) + " \430 WHERE instFlux IS NULL \434 SET psfFlux = 2*b.PSF_INST_FLUX_SIG / " + str(self.expTime) + " \ 435 WHERE psfFlux IS NULL \ 431 436 AND a.ippDetectID = b.IPP_IDET \ 432 437 AND b.PSF_INST_FLUX_SIG IS NOT NULL" … … 434 439 self.scratchDb.execute(sql) 435 440 436 437 self.scratchDb.reportAndDeleteRowsWithNULLS("StackDetection", "instFlux")441 #leave null instflux in 442 #self.scratchDb.reportAndDeleteRowsWithNULLS("StackDetection", "instFlux") 438 443 439 444 self.scratchDb.reportAndDeleteRowsWithNULLS("StackDetection", "objID") … … 474 479 petRadius=b.PETRO_RADIUS \ 475 480 ,petRadiusErr=b.PETRO_RADIUS_ERR \ 476 ,pet Mag=b.PETRO_MAG\477 ,pet MagErr=b.PETRO_MAG_ERR\481 ,petFlux=POW(10.0, -0.4 * b.PETRO_MAG) /" + str(self.expTime) + " \ 482 ,petFluxErr=ABS(b.PETRO_MAG_ERR) * POW(10.0, (-0.4*b.PETRO_MAG)) / " + str(self.expTime) + " / 1.085736 \ 478 483 ,petR50=b.PETRO_RADIUS_50 \ 479 484 ,petR50Err=b.PETRO_RADIUS_50_ERR \ … … 587 592 self.scratchDb.updateAllRows("SkinnyObject", "dataRelease", str(self.config.dataRelease)) 588 593 594 ''' 595 Populates the StackDetectionCalib table 596 ''' 597 def populateStackDetectionCalib(self): 598 self.logger.infoPair("Processing table", "StackDetectionCalib") 599 tableName = "StackDetectionCalib" 600 # insert all detections into table 601 sql = "INSERT INTO " + tableName + " ( \ 602 objID \ 603 ,stackDetectID \ 604 ,ippObjID \ 605 ,ippDetectID \ 606 ,filterID \ 607 ,surveyID \ 608 ) \ 609 SELECT \ 610 objID \ 611 ,stackDetectID \ 612 ,ippObjID \ 613 ,ippDetectID \ 614 ,filterID \ 615 ,surveyID \ 616 FROM StackDetection" 617 self.scratchDb.execute(sql) 618 # insert calibration information from dvoDetections into the Table 619 sql = "UPDATE " + tableName + " AS a, " + self.scratchDb.dvoDetectionTable + " AS b \ 620 SET a.ra = b.ra, \ 621 a.dec = b.dec_, \ 622 a.raErr = b.raErr, \ 623 a.decErr = b.decErr, \ 624 a.zp = b.zp, \ 625 a.zpErr = b.zpErr, \ 626 a.expTime = b.expTime, \ 627 a.airMass = b.airMass \ 628 WHERE a.stackDetectID = b.detectID" 629 self.scratchDb.execute(sql) 630 self.scratchDb.updateAllRows(tableName, "dataRelease", str(self.config.dataRelease)) 631 632 633 634 589 635 ''' 590 636 Populates the ObjectCalColor table … … 620 666 self.scratchDb.createIndex("StackModelFit", "ippDetectID") 621 667 668 # dec is reserved in MySQL, so STILTS replaces if with dec_, which is not the name of 669 # the column in PSPS 670 self.scratchDb.execute("ALTER TABLE StackDetectionCalib CHANGE dec_ `dec` double") 671 622 672 return True 623 673 … … 645 695 sql = "UPDATE " + table + " AS a, " + self.scratchDb.dvoDetectionTable + " AS b SET \ 646 696 a.ippObjID = b.ippObjID, \ 647 a.stackDetectID = 10 * b.detectID + " + str(self.filterID) + ", \697 a.stackDetectID = b.detectID, \ 648 698 a.objID = b.objID \ 649 699 WHERE a.ippDetectID = b.ippDetectID \ 650 700 AND b.imageID = " + str(imageID) 651 652 self.scratchDb.execute(sql) 653 701 self.scratchDb.execute(sql) 702 703 ''' 704 Updates Flags 705 ''' 706 def updateDvoIDsAndFlags(self, table): 707 self.logger.infoPair("getting","imageID") 708 imageID = self.scratchDb.getImageIDFromExternID(self.header['IMAGEID']) 709 self.logger.infoPair("obtained","imageID") 710 self.logger.debug("Updating table '" + table + "' with DVO IDs...") 711 sql = "UPDATE " + table + " AS a, " + self.scratchDb.dvoDetectionTable + " AS b SET \ 712 a.ippObjID = b.ippObjID, \ 713 a.stackDetectID = b.detectID, \ 714 a.objID = b.objID, \ 715 a.infoFlag = b.flags << 45 | a.infoFlag \ 716 WHERE a.ippDetectID = b.ippDetectID \ 717 AND b.imageID = " + str(imageID) 718 self.scratchDb.execute(sql) 719 720 654 721 ''' 655 722 Does the processing, i.e. pulling stuff from IPP tables into PSPS tables … … 660 727 if not self.getIDsFromDVO(): 661 728 return False 662 729 #self.logger.infoPair("populating","StackMeta") 663 730 self.populateStackMeta() 731 #self.logger.infoPair("populating","StackDetection") 664 732 self.populateStackDetection() 665 733 666 734 if self.stackType != "NIGHTLY_STACK": 735 #self.logger.infoPair("populating","StackModelFit") 667 736 self.populateStackModelFit() 737 #self.logger.infoPair("populating","StackApFlx") 668 738 self.populateStackApFlx() 669 739 #self.logger.infoPair("populating","StackToImage") 670 740 self.populateStackToImage() 741 #self.logger.infoPair("populating","SkinnyObject") 671 742 self.populateSkinnyObject() 743 #self.logger.infoPair("populating","ObjectCalColor") 672 744 self.populateObjectCalColor() 745 #self.logger.infoPair("populating","StackDetectionCalib") 746 self.populateStackDetectionCalib() 673 747 674 748 self.setMinMaxObjID(["StackDetection"]) -
branches/eam_branches/ipp-20120905/ippToPsps/src/Dvo.c
r33765 r34735 90 90 } 91 91 else { 92 Average *ave = &dvoDetections[i].ave; 93 Measure *meas = &dvoDetections[i].meas; 94 PhotCode *code = GetPhotcodebyCode(meas->photcode); 92 95 sprintf(sql, 93 "INSERT INTO dvoDetection (imageID, ippDetectID, detectID, ippObjID, objID, flags ) VALUES (%d, %u, %lu, %lu, %lu, %u)",96 "INSERT INTO dvoDetection (imageID, ippDetectID, detectID, ippObjID, objID, flags, zp, zpErr, airMass, expTime, ra, dec_, raErr, decErr) VALUES (%d, %u, %lu, %lu, %lu, %u, %f, %f, %f, %f, %lf, %lf, %f %f)", 94 97 image->imageID, // imageID 95 dvoDetections[i].meas.detID, // ippDetectID 96 dvoDetections[i].meas.extID, // detectID 97 (uint64_t)dvoDetections[i].ave.catID*1000000000 + (uint64_t)dvoDetections[i].ave.objID, // ippObjID 98 dvoDetections[i].ave.extID, // objID 99 dvoDetections[i].meas.dbFlags); // flags 98 meas->detID, // ippDetectID 99 meas->extID, // detectID 100 (uint64_t)ave->catID*1000000000 + (uint64_t)ave->objID, // ippObjID 101 dvoDetections[i].ave.extID, // objID 102 meas->dbFlags, // flags 103 code->C * 0.001 + code->K * (meas->airmass - 1) - meas->Mcal, // zp 104 meas->dMcal, // zpErr 105 meas->airmass, 106 pow(10.0, 0.4 * meas->dt), // expTime 107 ave->R - meas->dR / 3600., // ra 108 ave->D - meas->dR / 3600., // dec 109 meas->dXccd * meas->pltscale, // estimate of raErr 110 meas->dYccd * meas->pltscale // estimate of decErr 111 ); 100 112 101 113 mysql_query(this->mysql, sql); -
branches/eam_branches/ipp-20120905/ippTools/share/bgtool_towarp.sql
r28551 r34735 1 SELECT 1 SELECT DISTINCT 2 2 warpBackgroundRun.*, 3 3 warpRun.tess_id, -
branches/eam_branches/ipp-20120905/ippTools/share/camtool_find_pendingimfile.sql
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20120905/ippTools/share/chiptool_setimfiletoupdate.sql
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20120905/ippTools/share/magicdstool_torevert_camera.sql
r30668 r34735 23 23 JOIN rawExp using(exp_id) 24 24 WHERE magicDSRun.stage = 'camera' 25 AND camProcessedExp.fault = 0 26 AND camRun.state = 'full' 25 27 AND ((magicDSRun.state = 'new' AND magicDSFile.fault > 0) 26 28 OR ((magicDSRun.state = 'goto_censored' OR magicDSRun.state = 'goto_restored') -
branches/eam_branches/ipp-20120905/ippTools/share/pxadmin_create_tables.sql
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20120905/ippTools/share/regtool_processedexp.sql
- Property svn:mime-type deleted
-
branches/eam_branches/ipp-20120905/ippTools/share/staticskytool_result.sql
r33919 r34735 7 7 stackRun.skycell_id, 8 8 count(stackRun.filter) AS num_filters, 9 TRUNCATE(skycell.radeg/15., 4) AS rahours, 10 skycell.radeg, 11 skycell.decdeg, 9 12 skycell.glong, 10 13 skycell.glat -
branches/eam_branches/ipp-20120905/ippTools/share/staticskytool_todo.sql
r33034 r34735 7 7 stackRun.tess_id, 8 8 stackRun.skycell_id, 9 TRUNCATE(skycell.radeg/15., 4) as rahours, 10 skycell.radeg, 11 skycell.decdeg, 12 skycell.glong, 13 skycell.glat, 9 14 IFNULL(Label.priority, 10000) AS priority 10 15 FROM staticskyRun 11 16 JOIN staticskyInput USING (sky_id) 12 17 JOIN stackRun USING (stack_id) 18 JOIN skycell USING(tess_id, skycell_id) 13 19 LEFT JOIN staticskyResult USING(sky_id) 14 20 LEFT JOIN Label ON staticskyRun.label = Label.label -
branches/eam_branches/ipp-20120905/ippTools/share/warptool_towarped.sql
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20120905/ippTools/src
- Property svn:mergeinfo changed
/trunk/ippTools/src merged: 34586-34587
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20120905/ippTools/src/camtool.c
r34566 r34735 970 970 psFree(where); 971 971 972 int numDeleted = psDBAffectedRows(config->dbh); 972 973 if (!psDBCommit(config->dbh)) { 973 974 psError(PS_ERR_UNKNOWN, false, "database error"); 974 975 return false; 975 976 } 976 int numUpdated = psDBAffectedRows(config->dbh); 977 psLogMsg("camtool", PS_LOG_INFO, "Updated %d camProcessedExps", numUpdated); 977 psLogMsg("camtool", PS_LOG_INFO, "Deleted %d camProcessedExps", numDeleted); 978 978 979 979 return true; -
branches/eam_branches/ipp-20120905/ippTools/src/magictool.c
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20120905/ippTools/src/stacktool.c
r34566 r34735 1115 1115 PXOPT_COPY_STR(config->args, where, "-skycell_id", "stackRun.skycell_id", "=="); 1116 1116 PXOPT_COPY_STR(config->args, where, "-filter", "stackRun.filter", "LIKE"); 1117 PXOPT_COPY_STR(config->args, where, "-state", "stackRun.state", "=="); 1117 1118 pxAddLabelSearchArgs(config, where, "-label", "stackRun.label", "LIKE"); 1118 1119 pxAddLabelSearchArgs(config, where, "-data_group", "stackRun.data_group", "LIKE"); -
branches/eam_branches/ipp-20120905/ippTools/src/stacktoolConfig.c
r34566 r34735 206 206 psMetadataAddF64(sumskyfileArgs, PS_LIST_TAIL, "-mjd_obs_begin", 0, "search by mjd_obs (average mjd_obs of inputs <=)", NAN); 207 207 psMetadataAddF64(sumskyfileArgs, PS_LIST_TAIL, "-mjd_obs_end", 0, "search by mjd_obs (average mjd_obs of inputs>=)", NAN); 208 psMetadataAddStr(sumskyfileArgs, PS_LIST_TAIL, "-state", 0, "search by state", NULL); 208 209 psMetadataAddS16(sumskyfileArgs, PS_LIST_TAIL, "-fault", 0, "search by fault code", 0); 209 210 psMetadataAddU64(sumskyfileArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); -
branches/eam_branches/ipp-20120905/ippconfig
- Property svn:mergeinfo changed
/trunk/ippconfig merged: 34608,34657-34658
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20120905/ippconfig/recipes/nightly_science.config
r34566 r34735 79 79 DIFFABLE BOOL FALSE 80 80 DIST S16 30 81 # bump the retention times for the time being 82 CHIP S16 60 83 WARP S16 60 84 DIFF S16 60 85 CHIPBG S16 60 86 WARPBG S16 60 81 87 END 82 88 TARGETS METADATA … … 211 217 REDUCTION STR STS_DATASET 212 218 # bump the retention times for the time being 213 CHIP S16 7214 WARP S16 7215 DIFF S16 7219 CHIP S16 60 220 WARP S16 60 221 DIFF S16 60 216 222 END 217 223 TARGETS METADATA -
branches/eam_branches/ipp-20120905/ippconfig/recipes/ppSub.config
r33550 r34735 90 90 # Recipe overrides for DIFF 91 91 DIFF METADATA 92 DUAL BOOL TRUE # Dual convolution? 93 INVERSE BOOL TRUE # Generate inverse subtraction? 94 PHOTOMETRY BOOL TRUE # Perform photometry? 95 96 # penalty of 1.0 97 # DUAL convolution is more sensitive to the number of kernels 98 # do not provide as many orders as for SINGLE 99 # @ISIS.WIDTHS F32 2.4 5.0 10.0 # Gaussian kernel FWHM values 100 @ISIS.WIDTHS F32 1.5 3.0 6.0 # Gaussian kernel FWHM values 101 # @ISIS.WIDTHS F32 2.0 3.0 5.0 # Gaussian kernel FWHM values 102 # @ISIS.WIDTHS F32 2.1 4.2 8.4 # Gaussian kernel FWHM values 103 @ISIS.ORDERS S32 2 2 2 # Polynomial orders for ISIS kernels 104 105 SCALE.REF F32 5.0 # FWHM reference for kernel parameter scaling 106 KERNEL.SIZE S32 15 # Kernel half-size (pixels) 107 STAMP.FOOTPRINT S32 15 # Size of stamps (pixels) 92 108 END 93 109 -
branches/eam_branches/ipp-20120905/ippconfig/recipes/psphot.config
r34566 r34735 558 558 DIFF METADATA 559 559 DIFF_STATS BOOL TRUE # Calculate diff-specific stats 560 OUTPUT.FORMAT STR PS1_DV 2# Format of output file560 OUTPUT.FORMAT STR PS1_DV3 # Format of output file 561 561 562 562 # Extended source fit parameters … … 575 575 PEAKS_NSIGMA_LIMIT_2 F32 4.0 # peak significance threshold 576 576 DIFF_STATS BOOL TRUE # Calculate diff-specific stats 577 OUTPUT.FORMAT STR PS1_DV 2# Format of output file577 OUTPUT.FORMAT STR PS1_DV3 # Format of output file 578 578 579 579 # Extended source fit parameters -
branches/eam_branches/ipp-20120905/ippconfig/recipes/reductionClasses.mdc
- Property svn:mergeinfo changed
/trunk/ippconfig/recipes/reductionClasses.mdc merged: 34658
r34575 r34735 260 260 STACK_PSPHOT STR STACK 261 261 DIFF_PPSUB STR DIFF 262 DIFF_PSPHOT STR SSTF_DIFF 263 JPEG_BIN1 STR PPIMAGE_J1 264 JPEG_BIN2 STR PPIMAGE_J2 265 FAKEPHOT STR FAKEPHOT 266 ADDSTAR STR ADDSTAR 267 PSASTRO STR DEFAULT_RECIPE 268 STACKPHOT_PSPHOT STR STACKPHOT 269 STACKPHOT_PPSUB STR STACKPHOT 270 STACKPHOT_PPSTACK STR STACKPHOT 271 STACKPHOT_SINGLE_PSPHOT STR STACKPHOT_SINGLE 272 BACKGROUND_PPBACKGROUND STR BACKGROUND 273 BACKGROUND_PSWARP STR BACKGROUND 274 PSVIDEOPHOT STR PSVIDEOPHOT 275 END 276 277 # Sweetspot reduction class 278 SWEETSPOT_WS METADATA 279 CHIP_PPIMAGE STR CHIP 280 CHIP_PSPHOT STR CHIP 281 WARP_PSWARP STR WARP 282 STACK_PPSTACK STR QUICKSTACK 283 STACK_PPSUB STR STACK 284 STACK_PSPHOT STR STACK 285 DIFF_PPSUB STR WARPSTACK 262 286 DIFF_PSPHOT STR SSTF_DIFF 263 287 JPEG_BIN1 STR PPIMAGE_J1 - Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20120905/ppImage/src
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20120905/ppTranslate/documentation/ICD/Makefile
r34566 r34735 1 SOURCE=PSDC-940-005 1 SOURCE = PSDC-940-005 2 3 FIGURES = figures/exposure_ota.eps \ 4 figures/ext_theta.eps \ 5 figures/ipp_workflow.eps 2 6 3 7 RM=/bin/rm -f 4 8 5 all: 9 figures/%.eps: figures/%.fig 10 fig2dev -L eps $< $@ 11 12 all: figures 13 latex $(SOURCE).tex 14 bibtex $(SOURCE) 6 15 latex $(SOURCE).tex 7 16 latex $(SOURCE).tex … … 12 21 @echo 13 22 23 figures: $(FIGURES) 24 14 25 clean: 15 $(RM) *.aux *.dvi *.out *.pdf *.toc *.log *~ 26 $(RM) *.aux *.dvi *.out *.pdf *.toc *.log *~ *.blg *.bbl 27 $(RM) $(FIGURES) -
branches/eam_branches/ipp-20120905/ppTranslate/documentation/ICD/PSDC-940-005.tex
r34566 r34735 2 2 \documentclass[panstarrs,spec]{panstarrs} 3 3 \usepackage{nonfloat} 4 5 \newcommand{\sccomment}[1]{% 6 \textcolor{green}{SC: #1}} 4 \usepackage{caption} 5 6 \usepackage{etoolbox} 7 \patchcmd{\thebibliography}{\chapter*}{\subsection*}{}{} 8 7 9 \newcommand{\outformatversion}{% 8 10 \texttt{PS1\_DV3}} 11 12 \newcommand{\commentFrom}[4]{% 13 \mbox{ }\\\null\hfill\begin{tabular}{|p{4in}} 14 \hline 15 \emph{Comment from {#1} (#2)}: {#3}\\ 16 \hline 17 Answer: {#4}\\ 18 \hline 19 \end{tabular}} 20 21 \newcommand{\commentFromSC}[3]{% 22 \commentFrom{SC}{#1}{#2}{#3}} 9 23 10 24 % basic document variables … … 12 26 \subtitle{Pan-STARRS IPP-MOPS ICD for PS-1} 13 27 \shorttitle{IPP-MOPS ICD} 14 \author{ Eugene Magnier, Larry Denneau, Jr., Robert Jedicke}28 \author{\parbox{3in}{Serge Chastel; Larry Denneau, Jr.; Denver Green; Robert Jedicke; Eugene Magnier}} 15 29 \audience{Pan-STARRS PMO} 16 30 \group{Pan-STARRS IPP \& MOPS} … … 26 40 \RevisionsStart 27 41 % version Date Description 28 03 & 2012 Oct 04 & \texttt{PS1\_DV3}: Fitted trails, new parameters\\ 29 \hline 30 02 & 2011 Apr 19 & Synchronization with "ICD Lite" wiki page \\ 31 \hline 32 01 & 2010 Oct 27 & New CMF Parameters \\ 33 \hline 34 00 & 2006 Mar 01 & Initial version \\ \hline 42 04 & 2012 Nov 20 & Modifications integrating DG comments/questions \\ 43 \hline 44 03 & 2012 Oct 04 & \texttt{PS1\_DV3}: Fitted trails, new parameters\\ 45 \hline 46 02 & 2011 Apr 19 & Synchronization with "ICD Lite" wiki page \\ 47 \hline 48 01 & 2010 Oct 27 & New CMF Parameters \\ 49 \hline 50 00 & 2006 Mar 01 & Initial version \\ 51 \hline 35 52 \RevisionsEnd 36 53 37 54 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 55 56 \bibliographystyle{amsplain} 57 \bibliography{icd} 38 58 39 59 \DocumentsInternal … … 116 136 \DocumentsEnd 117 137 138 \subsection{Acronyms} 139 140 \begin{table} 141 \small 142 \caption{Acronyms used in this document\label{table-acronyms}} 143 \begin{tabular}{ll} 144 \hline 145 {\bf Acronym} & {\bf Definition} \\ 146 \hline 147 ADU & Analog to Digital Units (counts in an image) \\ 148 ICRS & International Celestial Reference System \\ 149 IPP & Pan-STARRS Image Processing Pipeline \\ 150 FPA & Focal Plane Array \\ 151 MOPS & Pan-STARRS Moving Object Processing System \\ 152 MPC & Center for Astrophysics Minor Planet Center \\ 153 TTI & Transient-Time Interval (about 60 minutes) \\ 154 \hline 155 \end{tabular} 156 \end{table} 157 118 158 \section{Interface Overview} 119 159 … … 144 184 145 185 This document discusses the software interface between IPP and MOPS. 146 IPP must send transient detection descriptions to the MOPS; MOPS 147 must be able to query the IPP regarding whether a particular (RA, 148 Dec) pair could have been detected in a particular focal plane array (FPA). This document 149 defines the data to be transferred between IPP and MOPS and the 150 mechanisms to be used for that interchange. These interfaces are 151 identified as \#005 in Figure~\ref{fig:overview}. The Interfaces186 IPP must send transient detection descriptions to the MOPS; MOPS must 187 be able to query the IPP regarding whether a particular (RA, Dec) pair 188 could have been detected in a particular focal plane array (FPA). 189 This document defines the data to be transferred between IPP and MOPS 190 and the mechanisms to be used for that interchange. These interfaces 191 are identified as \#005 in Figure~\ref{fig:overview}. The Interfaces 152 192 addressed by this document are marked in the table. 153 193 … … 235 275 Though efforts have been made to avoid this from occurring, where 236 276 header keyword names are longer than the usual 8 character maximum, 237 the HIERARCH convention will be used. 277 the HIERARCH convention will be used (see the NASA webpages: 278 \htmladdnormallink{Registered FITS 279 Convention}{http://fits.gsfc.nasa.gov/registry/hierarch_keyword.html} 280 and \htmladdnormallink{4.12.4 HIERARCH Convention for Extended Keyword 281 Names}{http://heasarc.nasa.gov/docs/software/fitsio/c/f_user/node28.html}). 238 282 239 283 \subsection{IPP-MOPS Exchange} … … 241 285 MOPS requires from the IPP a stream of transient detections and their 242 286 FPA metadata obtained from processing of difference images acquired by 243 the PS-1 camera. IPP is additionally required by MOPS to be able to 244 indicate whether a set of detections (with RA, Dec, flux, length, 245 orientation, etc.) on a previously acquired FPA was detectable by the 246 PS-1 telescope. 287 the PS-1 camera. 288 289 IPP is additionally required by MOPS to be able to indicate whether a 290 set of detections (with RA, Dec, flux, length, orientation, etc.) on a 291 previously acquired FPA was detectable by the PS-1 telescope. This 292 functionality is provided through the detectability server. 247 293 248 294 \subsubsection{Conventions} … … 305 351 306 352 \begin{itemize} 307 \item{EXTNAME} - Giving a unique name for the metadata table. Such a 308 name shall contain only the characters a-z, and ``\_''. 309 \item{CMFVERSION} - A string specifying the version of the table 310 description file for this table. 353 \item{EXTNAME} - A \emph{string} giving a unique name for the metadata 354 table. Such a name shall contain only the characters a-z, A-Z, and 355 ``\_''. 356 \item{CMFVERSION} - A \emph{string} specifying the version of the 357 table description file for this table. 311 358 \end{itemize} 312 359 … … 389 436 exposure. 390 437 391 In addition to the required BINTABLE extension header keywords392 described above, the FITS header shall include the keywords shown in393 table \ref{trans-keywords}. The subsequent FITS table, with EXTNAME394 of \code{MOPS_TRANSIENT_DETECTIONS}, shall include columns whose395 definitions are listed in table \ref{trans-table}.396 397 438 {\centering% 398 \tabcaption{IPP-MOPS Transient Detection Keywords\label{trans-keywords}} 399 \begin{longtable}{|lcp{0.5in}p{3in}|} 400 \hline \hline {\bf FITS Keyword} 401 & \parbox{0.5in}{\textbf{Version}} 402 & {\bf Precision} & {\bf Description}\\ 403 \hline \hline 404 \multicolumn{4}{|l|}{\null\hspace{10mm}\textbf{Version Information}}\\ 405 \hline 406 SWSOURCE & 1+ & string & source of software (e.g., "60eb6cdc-a59c-4636-a4e0-dba66a9721fd")\\ 407 \hline 408 SWVERSN & 1+ & string & version of software (e.g., "trunk/ppMops@24658")\\ 409 \hline 410 HIERARCH\_CMFVERSION & 2+ & char(7) & PS1\_DV1 or PS1\_DV2 or PS1\_DV3 \\ 411 \hline 412 \multicolumn{4}{|l|}{\null\hspace{10mm}\textbf{Provenance Information}}\\ 413 \hline 414 EXP\_NAME & 1+ & string & Exposure name (e.g., "o1234g5678")\\ 415 \hline 416 EXP\_ID & 1+ & S64 & Exposure identifier \\ 417 \hline 418 CHIP\_ID & 1+ & S64 & Chip stage identifier \\ 419 \hline 420 CAM\_ID & 1+ & S64 & Camera stage identifier \\ 421 \hline 422 FAKE\_ID & 1+ & S64 & Fake stage identifier \\ 423 \hline 424 WARP\_ID & 1+ & S64 & Warp stage identifier \\ 425 \hline 426 DIFF\_ID & 1+ & S64 & Diff stage \\ 427 \hline 428 DIFF\_POS & 1+ & boolean & Sense of subtraction; T for forward, F for backward\\ 429 \hline 430 \multicolumn{4}{|l|}{\null\hspace{10mm}\textbf{Exposure Details}}\\ 431 \hline MJD-OBS & 0+ 432 & F64 & midpoint time of the exposure as a MJD and day fraction \\ 433 \hline 434 RA & 0+ 435 & {\tiny HH:MM:SS.SSS} & field center RA at exposure midpoint, string \\ 436 \hline 437 DEC & 0+ & 438 {\tiny sDD:MM:SS}& (s is + or -) field center declination at exposure midpoint, string \\ 439 \hline 440 EXPTIME & 0+ 441 & F64 & exposure time in seconds \\ 442 \hline 443 ROTANGLE & 0+ 444 & F64 & image rotation of the y-axis in degrees, from local N toward E \\ 445 \hline 446 FILTER & 0+ & char(3) & effective filter used for the exposure, 447 one of g, r, i, z, y, B, V, w 448 appended with '.00000'\\ 449 \hline 450 AIRMASS & 0+ & F64 451 & airmass at exposure midpoint \\ 452 \hline 453 OBSCODE & 0+ & char(5) & MPC three-character observatory code \\ 454 \hline 455 TEL\_ALT & 0+ & F64 & telescope altitude at exposure midpoint, in degrees \\ 456 \hline 457 TEL\_AZ & 0+ & F64 & telescope azimuth at exposure midpoint, in degrees \\ 458 \hline 459 SEEING & 1+ & F32 & Measured seeing at diff stage, arcsec \\ 460 \hline 461 MAGZP & 1+ & F32 & Magnitude zero point \\ 462 \hline 463 MAGZPERR & 1+ & F32 & Error in magnitude zero point \\ 464 \hline 465 ASTRORMS & 1+ & F32 & RMS of astrometric fit, arcsec \\ 466 \hline 467 COMMENT & 3+ & String & Comment associated to the exposure\\ 468 \hline 469 OBS\_MODE & 3+ & String & Observation mode (e.g. MD, 3PI...)\\ 470 \hline 471 DIFFTYPE & 3+ & String & Difference type: WW (Warp-Warp Difference), WS (Warp-Stack Difference)\\ 472 \hline 473 SKY & 3+ & F64 & Exposure average sky background \\ 474 \hline 475 SHUTOUTC & 3+ & String & Camera exposure shutter open (UTC) \\ 476 \hline 439 \tabcaption{IPP-MOPS Data Types Definition\label{table-datatypes}} 440 \begin{longtable}{|cp{5in}|} 441 \hline 442 \textbf{Alias} & \textbf{Description} \\ 443 \texttt{bool} & (Not a FITS type) An enumerated type defining a Boolean 444 value, either \texttt{true} or \texttt{false}\\ 445 \texttt{char($n$)} & (Not a FITS type) A sequence of exactly $n$ bytes that 446 can be interpreted 447 as a sequence of ASCII characters\\ 448 \texttt{HH:MM:SS.sss} & (Not a FITS type) a \texttt{char(12)} encoding 449 a time or an angle: (1) the hours \texttt{HH} are encoded with two 450 decimal figures; (2) a separator \texttt{:} between the hours and 451 the minutes; (3) the minutes \texttt{MM} are encoded with two 452 decimal figures; (4) a separator \texttt{:} between the minutes 453 and the seconds; (5) the seconds \texttt{SS} are encoded with two 454 decimal figures; (6) a separator \texttt{.} between the seconds 455 and the milli(arc)seconds; (7) 456 the milli(arc)seconds \texttt{ss} are encoded with three decimal figures; \\ 457 \texttt{sDD:MM:SS} & (Not a FITS type) a \texttt{char(9)} encoding an 458 angle. (1) \texttt{s} is either the \texttt{+} or \texttt{-} sign; 459 (2) \texttt{DD} is the number of degrees encoded with two decimal 460 figures; (3) a separator \texttt{:} between the degrees and the 461 minutes; (4) the minutes \texttt{MM} are encoded with two decimal 462 figures; (5) a separator \texttt{:} between the minutes and the 463 seconds; (6) the 464 seconds \texttt{SS} are encoded with two decimal figures;\\ 465 \texttt{enum} & (Not a FITS type) a \texttt{string} having a fixed number of 466 different values. The explicit set of values shall be expressed in 467 this ICD.\\ 468 \texttt{F32} & (FITS type) IEEE 32-bit single precision floating point real numbers \\ 469 \texttt{F64} & (FITS type) IEEE 64-bit double precision floating point real numbers \\ 470 \texttt{S16} & (FITS type) 16-bit signed integer \\ 471 \texttt{S32} & (FITS type) 32-bit signed integer \\ 472 \texttt{S64} & (FITS type) 64-bit signed integer \\ 473 \texttt{string} & (Not a FITS type) Sequence of bytes of arbitrary length 474 usually interpreted as a sequence of ASCII characters \\ 475 \texttt{U16} & (FITS type) 16-bit unsigned integer \\ 476 \texttt{U32} & (FITS type) 32-bit unsigned integer \\ 477 477 \hline 478 478 \end{longtable} 479 479 } 480 480 481 {\centering 482 \tabcaption{IPP-MOPS Transient Detection Table Columns\label{trans-table}} 483 \begin{longtable}{|lclp{3.5in}|} 481 In addition to the required BINTABLE extension header keywords 482 described above (TODO: Where? What?), the FITS header shall include the 483 keywords shown in tables relative to versioning 484 \ref{table-keywords-versioning}, data provenance 485 \ref{table-keywords-provenance}, and exposure 486 \ref{table-keywords-exposure}. The subsequent FITS table, with EXTNAME 487 of \code{MOPS_TRANSIENT_DETECTIONS}, shall include columns whose 488 definitions are listed in table \ref{table-detections} and, when trail 489 fitting has been succesfully performed, \ref{table-detections-ext}. 490 491 \begin{center} 492 \begin{longtable}{|lcp{0.5in}p{3in}|} 493 \caption{IPP-MOPS Transient Detection Keywords:\\ Version Information}\label{table-keywords-versioning}\\ 494 \hline\hline 495 \multicolumn{4}{|l|}{\null\hspace*{1in}\textbf{Version Information}}\\ 496 \hline\hline 497 {\bf FITS Keyword} 498 & \parbox{0.5in}{\textbf{Version}} 499 & {\bf Precision} 500 & {\bf Description} \\ 501 \hline 502 SWSOURCE & 1+ & \texttt{string} & source of software (e.g., "60eb6cdc-a59c-4636-a4e0-dba66a9721fd") \\ 503 \hline 504 SWVERSN & 1+ & \texttt{string} & version of software (e.g., "trunk/ppMops@24658") \\ 505 \hline 506 HIERARCH CMFVERSION & 2+ & \texttt{enum} & \texttt{PS1\_DV3} \\ 507 \hline\hline 508 \end{longtable} 509 \end{center} 510 511 \begin{center} 512 \begin{longtable}{|lcp{0.5in}p{3in}|} 513 \caption{IPP-MOPS Transient Detection Keywords:\\ Provenance Information}\label{table-keywords-provenance}\\ 514 \hline\hline 515 \multicolumn{4}{|l|}{\null\hspace{10mm}\textbf{Provenance Information}}\\ 484 516 \hline \hline 485 {\bf Column} & \textbf{Version} & {\bf Precision} & {\bf Description} \\ 486 \hline 487 RA & 1+ & F64 & detection center coordinates in degrees\\ 488 \hline 489 RA\_ERR & 1+ & F64 & error in the detection center, in degrees \\ 490 \hline 491 DEC & 1+ & F64 & detection center coordinates in degrees \\ 492 \hline 493 DEC\_ERR & 1+ & F64 & error in the detection center, in degrees \\ 494 \hline 495 MAG & 1+ & F32 & Magnitude \\ 496 \hline 497 MAG\_ERR & 1+ & F32 & Magnitude error \\ 498 \hline 499 PSF\_CHI2 & 1+ & F32 & $\chi^2$ of PSF fit \\ 500 \hline 501 PSF\_DOF & 1+ & S32 & Degrees of freedom of PSF fit \\ 502 \hline 503 CR\_SIGNIFICANCE & 1+ & F32 & Significance of Cosmic Ray \\ 504 \hline 505 EXT\_SIGNIFICANCE & 1+ & F32 & Significance of extendedness \\ 506 \hline 507 PSF\_MAJOR & 1+ & F32 & PSF major axis (pixels) \\ 508 \hline 509 PSF\_MINOR & 1+ & F32 & PSF minor axis (pixels) \\ 510 \hline 511 PSF\_THETA & 1+ & F32 & PSF position angle (deg on chip) \\ 512 \hline 513 PSF\_QUALITY & 1+ & F32 & PSF quality factor \\ 514 \hline 515 PSF\_NPIX & 1+ & S32 & Number of pixels in PSF \\ 516 \hline 517 MOMENTS\_XX & 1+ & F32 & xx moment \\ 518 \hline 519 MOMENTS\_XY & 1+ & F32 & xy moment \\ 520 \hline 521 MOMENTS\_YY & 1+ & F32 & yy moment \\ 522 \hline 523 N\_POS & 1+ & S32 & Number of positive pixels \\ 524 \hline 525 F\_POS & 1+ & F32 & Fraction of positive pixels \\ 526 \hline 527 RATIO\_BAD & 1+ & F32 & Ratio of positive pixels to negative \\ 528 \hline 529 RATIO\_MASK & 1+ & F32 & Ratio of positive pixels to masked \\ 530 \hline 531 RATIO\_ALL & 1+ & F32 & Ratio of positive pixels to all \\ 532 \hline 533 FLAGS & 1+ & U32 & Detection bit flags\footnote{See \htmladdnormallink{http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/PSPSFlags\#StackDetectionFull.infoFlagsFLAGS232FLAGS}{http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/PSPSFlags\#StackDetectionFull.infoFlagsFLAGS232FLAGS} for the meaning of each bit}\\ 534 \hline 535 DIFF\_SKYFILE\_ID & 1+ & S64 & Identifier for diff skyfile. A 536 diff\_id (for Warp-Warp difference) or a stack\_id 537 (for Warp-Stack difference) \\ 538 \hline 539 IPP\_IDET & 2+ & U32 & IPP detection identifier index \\ 540 \hline 541 PSF\_INST\_FLUX & 2+ & F32 & PSF fit instrumental magnitude \\ 542 \hline 543 PSF\_INST\_FLUX\_SIG & 2+ & F32 & Sigma of PSF instrumental magnitude \\ 544 \hline 545 AP\_MAG & 2+ & F32 & magnitude in standard aperture \\ 546 \hline 547 AP\_MAG\_RAW & 2+ & F32 & magnitude in real aperture \\ 548 \hline 549 AP\_MAG\_RADIUS & 2+ & F32 & radius used for aperture mags \\ 550 \hline 551 AP\_FLUX & 2+ & F32 & instrumental flux in standard aperture \\ 552 \hline 553 AP\_FLUX\_SIG & 2+ & F32 & aperture flux error \\ 554 \hline 555 PEAK\_FLUX\_AS\_MAG & 2+ & F32 & Peak flux expressed as magnitude \\ 556 \hline 557 CAL\_PSF\_MAG & 2+ & F32 & PSF Magnitude using supplied calibration \\ 558 \hline 559 CAL\_PSF\_MAG\_SIG & 2+ & F32 & measured scatter of zero point calibration \\ 560 \hline 561 SKY & 2+ & F32 & Sky level \\ 562 \hline 563 SKY\_SIGMA & 2+ & F32 & Sigma of sky level \\ 564 \hline 565 PSF\_QF\_PERFECT & 2+ & F32 & PSF coverage/quality factor (poor) \\ 566 \hline 567 MOMENTS\_R1 & 2+ & F32 & first radial moment \\ 568 \hline 569 MOMENTS\_RH & 2+ & F32 & half radial moment \\ 570 \hline 571 KRON\_FLUX & 2+ & F32 & Kron Flux (in 2.5 R1) \\ 572 \hline 573 KRON\_FLUX\_ERR & 2+ & F32 & Kron Flux Error \\ 574 \hline 575 KRON\_FLUX\_INNER & 2+ & F32 & Kron Flux (in 1.0 R1) \\ 576 \hline 577 KRON\_FLUX\_OUTER & 2+ & F32 & Kron Flux (in 4.0 R1) \\ 578 \hline 579 DIFF\_R\_P & 2+ & F32 & distance to positive match source \\ 580 \hline 581 DIFF\_SN\_P & 2+ & F32 & signal-to-noise of pos match src \\ 582 \hline 583 DIFF\_R\_M & 2+ & F32 & distance to negative match source \\ 584 \hline 585 DIFF\_SN\_M & 2+ & F32 & signal-to-noise of neg match src \\ 517 {\bf FITS Keyword} 518 & \parbox{0.5in}{\textbf{Version}} 519 & {\bf Precision} 520 & {\bf Description} \\ 521 \hline 522 EXP\_NAME & 1+ & \texttt{string} & Exposure name (e.g., "o1234g5678")\\ 523 \hline 524 EXP\_ID & 1+ & \texttt{S64} & Exposure identifier \\ 525 \hline 526 CHIP\_ID & 1+ & \texttt{S64} & Chip stage identifier \\ 527 \hline 528 CAM\_ID & 1+ & \texttt{S64} & Camera stage identifier \\ 529 \hline 530 FAKE\_ID & 1+ & \texttt{S64} & Fake stage identifier \\ 531 \hline 532 WARP\_ID & 1+ & \texttt{S64} & Warp stage identifier \\ 533 \hline 534 DIFF\_ID & 1+ & \texttt{S64} & Diff stage \\ 535 \hline 536 DIFF\_POS & 1+ & \texttt{bool} & Sense of subtraction; \texttt{true} for forward, 537 \texttt{false} for backward\\ 538 \hline 539 \end{longtable} 540 \end{center} 541 542 \begin{center} 543 \begin{longtable}{|lcp{0.5in}p{3in}c|} 544 \caption{IPP-MOPS Transient Detection Keywords:\\ Exposure Details}\label{table-keywords-exposure}\\ 545 \hline \hline 546 \multicolumn{5}{|l|}{\null\hspace{10mm}\textbf{Exposure Details}}\\ 547 \hline \hline {\bf FITS Keyword} 548 & \parbox{0.5in}{\textbf{Version}} & {\bf Precision} & {\bf 549 Description} 550 & \textbf{Units}\\ 551 \hline MJD-OBS & 0+ & \texttt{F64} & midpoint time of the exposure 552 as a MJD and day fraction 553 & N/A\\ 554 \hline RA & 0+ & {\tiny \texttt{HH:MM:SS.SSS}} 555 & Field center RA at exposure midpoint & N/A \\ 556 \hline DEC & 0+ & {\tiny \texttt{sDD:MM:SS}} & 557 (s is + or -) Field center declination at exposure midpoint & N/A \\ 558 \hline EXPTIME & 0+ & \texttt{F64} 559 & Exposure time & seconds \\ 560 \hline ROTANGLE & 0+ & \texttt{F64} 561 & Image rotation of the y-axis from local N toward E & degrees \\ 562 \hline FILTER & 0+ & \texttt{char(7)} & Effective filter used for 563 the exposure, one of \texttt{g}, \texttt{r}, \texttt{i}, 564 \texttt{z}, \texttt{y}, \texttt{B}, 565 \texttt{V}, \texttt{w} appended with '.00000' & N/A \\ 566 \hline AIRMASS & 0+ & \texttt{F64} 567 & Airmass at exposure midpoint & N/A\\ 568 \hline OBSCODE & 0+ & char(5) & 569 MPC 3-character observatory code (F51 for PS1) & N/A \\ 570 \hline TEL\_ALT & 0+ & \texttt{F64} & 571 Telescope altitude at exposure midpoint & degrees \\ 572 \hline TEL\_AZ & 0+ & \texttt{F64} 573 & Telescope azimuth at exposure midpoint & degrees \\ 574 \hline SEEING & 1+ & \texttt{F32} & 575 Measured seeing at diff stage & arcsec \\ 576 \hline MAGZP & 1+ & \texttt{F32} & 577 Magnitude zero point & N/A \\ 578 \hline MAGZPERR & 1+ & \texttt{F32} & 579 Error in magnitude zero point & N/A \\ 580 \hline ASTRORMS & 1+ & \texttt{F32} & 581 RMS of astrometric fit & arcsec \\ 582 \hline CMMTOBS & 3+ & \texttt{string} & 583 Comment associated to the exposure & N/A\\ 584 \hline OBS\_MODE & 3+ & \texttt{enum} & Observation modes list: 585 3PI, CNP, ESS, M31, MD, MSS, OSS, PI, STD (Note: The exposures 586 having the following PS1 observation modes are not used by MOPS: 587 CAL, PR201108, SAS2, SS, STS, STS2A, STS2B) & N/A\\ 588 \hline DIFFTYPE & 3+ & \texttt{enum} & 589 Difference type: \texttt{WW} (Warp-Warp Difference), \texttt{WS} (Warp-Stack Difference) & N/A\\ 590 \hline SKY & 3+ & \texttt{F64} & 591 Exposure average sky background & counts/pixel \\ 592 \hline SHUTOUTC & 3+ & \texttt{string} & 593 Camera exposure shutter open (UTC) & N/A \\ 594 \hline \hline 595 \end{longtable} 596 \end{center} 597 598 \begin{center} 599 \begin{longtable}{|lclp{3.5in}c|} 600 \caption{IPP-MOPS Transient Detection Table Columns:\\ Detection Details}\label{table-detections}\\ 601 \hline \hline 602 \multicolumn{5}{|l|}{\null\hspace{10mm}\textbf{Detection Details}}\\ 603 \hline \hline 604 {\bf Column} & \textbf{Version} & {\bf Precision} & {\bf Description} & \textbf{Units}\\ 605 \hline 606 RA & 1+ & F64 & Detection center coordinates & degrees\\ 607 \hline 608 RA\_ERR & 1+ & F64 & Error in the detection center & degrees \\ 609 \hline 610 DEC & 1+ & F64 & Detection center coordinates & degrees \\ 611 \hline 612 DEC\_ERR & 1+ & F64 & Error in the detection center & degrees \\ 613 \hline 614 MAG & 1+ & F32 & Filter magnitude & N/A \\ 615 \hline 616 MAG\_ERR & 1+ & F32 & Filter magnitude error & N/A \\ 617 \hline 618 PSF\_CHI2 & 1+ & F32 & $\chi^2$ of PSF fit & N/A \\ 619 \hline 620 PSF\_DOF & 1+ & S32 & Degrees of freedom of PSF fit & N/A \\ 621 \hline 622 CR\_SIGNIFICANCE & 1+ & F32 & Significance of cosmic ray (source: \emph{src/psphot/psphotSourceSize.c}) & N/A \\ 623 \hline 624 EXT\_SIGNIFICANCE & 1+ & F32 & Significance of extendedness (source: \emph{src/psphot/psphotSourceSize.c}) & N/A \\ 625 \hline 626 PSF\_MAJOR & 1+ & F32 & PSF major axis & pixels \\ 627 \hline 628 PSF\_MINOR & 1+ & F32 & PSF minor axis & pixels \\ 629 \hline 630 PSF\_THETA & 1+ & F32 & PSF position angle on chip & degrees \\ 631 \hline 632 PSF\_QUALITY & 1+ & F32 & PSF quality factor & N/A \\ 633 \hline 634 PSF\_NPIX & 1+ & S32 & Number of pixels in PSF & N/A \\ 635 \hline 636 MOMENTS\_XX & 1+ & F32 & xx moment & N/A \\ 637 \hline 638 MOMENTS\_XY & 1+ & F32 & xy moment & N/A \\ 639 \hline 640 MOMENTS\_YY & 1+ & F32 & yy moment & N/A \\ 641 \hline 642 N\_POS & 1+ & S32 & Number of positive pixels & N/A \\ 643 \hline 644 F\_POS & 1+ & F32 & Fraction of positive pixels & N/A \\ 645 \hline 646 RATIO\_BAD & 1+ & F32 & Ratio of positive pixels to negative & N/A \\ 647 \hline 648 RATIO\_MASK & 1+ & F32 & Ratio of positive pixels to masked & N/A \\ 649 \hline 650 RATIO\_ALL & 1+ & F32 & Ratio of positive pixels to all & N/A \\ 651 \hline 652 FLAGS & 1+ & U32 & Detection bit flags\footnote{See \htmladdnormallink{http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/PSPSFlags\#StackDetectionFull.infoFlagsFLAGS232FLAGS}{http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/PSPSFlags\#StackDetectionFull.infoFlagsFLAGS232FLAGS} for the meaning of each bit}. The PM\_SOURCE\_MODE\_EXTENDED\_FIT flag (at position 0x00800000) is set when the Trail Fitting is attempted. It does not mean that the Trail Fitting is successful. \\ 653 \hline DIFF\_SKYFILE\_ID & 1+ & S64 & Identifier for diff 654 skyfile. Either a diff\_id (for Warp-Warp difference) or a 655 stack\_id 656 (for Warp-Stack difference) & N/A \\ 657 \hline 658 IPP\_IDET & 2+ & U32 & IPP detection identifier index & N/A \\ 659 \hline 660 PSF\_INST\_FLUX & 2+ & F32 & PSF fit instrumental magnitude & N/A \\ 661 \hline 662 PSF\_INST\_FLUX\_SIG & 2+ & F32 & Sigma of PSF instrumental magnitude & N/A \\ 663 \hline 664 AP\_MAG & 2+ & F32 & magnitude in standard aperture (i.e. 25 pixels radius) & N/A \\ 665 \hline 666 AP\_MAG\_RAW & 2+ & F32 & magnitude in real aperture & N/A \\ 667 \hline 668 AP\_MAG\_RADIUS & 2+ & F32 & radius used for aperture mags & pixels \\ 669 \hline 670 AP\_FLUX & 2+ & F32 & instrumental flux in standard aperture & ADU \\ 671 \hline 672 AP\_FLUX\_SIG & 2+ & F32 & aperture flux error & N/A \\ 673 \hline 674 PEAK\_FLUX\_AS\_MAG & 2+ & F32 & Peak flux expressed as magnitude & N/A \\ 675 \hline 676 CAL\_PSF\_MAG & 2+ & F32 & PSF Magnitude using supplied calibration & N/A \\ 677 \hline 678 CAL\_PSF\_MAG\_SIG & 2+ & F32 & Measured standard-deviation of zero point calibration & N/A \\ 679 \hline 680 SKY & 2+ & F32 & Sky level & counts/pixel \\ 681 \hline 682 SKY\_SIGMA & 2+ & F32 & Sigma of sky level & counts/pixel\\ 683 \hline PSF\_QF\_PERFECT & 2+ & F32 & PSF coverage/quality factor 684 (poor): PSF value weighted by unmasked pixels 685 (source: psmodules/src/objects/pmSourcePhotometry.c) & N/A \\ 686 \hline 687 MOMENTS\_R1 & 2+ & F32 & first radial moment & N/A \\ 688 \hline 689 MOMENTS\_RH & 2+ & F32 & half radial moment & N/A \\ 690 \hline 691 KRON\_FLUX & 2+ & F32 & Kron Flux (that is, flux in 2.5 $\times$ first radial moment) & N/A \\ 692 \hline 693 KRON\_FLUX\_ERR & 2+ & F32 & Kron Flux Error & N/A \\ 694 \hline 695 KRON\_FLUX\_INNER & 2+ & F32 & Inner Kron Flux (that is, flux in 1.0 $\times$ first radial moment) & N/A \\ 696 \hline 697 KRON\_FLUX\_OUTER & 2+ & F32 & Outer Kron Flux (that is, flux in 4.0 $\times$ first radial moment) & N/A \\ 698 \hline 699 DIFF\_R\_P & 2+ & F32 & distance from detection to positive matching source & pixels \\ 700 \hline 701 DIFF\_SN\_P & 2+ & F32 & signal-to-noise of pos match src & N/A \\ 702 \hline 703 DIFF\_R\_M & 2+ & F32 & distance from detectionto negative match source & pixels \\ 704 \hline 705 DIFF\_SN\_M & 2+ & F32 & signal-to-noise of neg match src & N/A \\ 586 706 \hline 587 707 FLAGS2 & 2+ & U32 & psphot analysis flags (group 2)\footnote{See \htmladdnormallink{http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/PSPSFlags\#StackDetectionFull.infoFlagsFLAGS232FLAGS}{http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/PSPSFlags\#StackDetectionFull.infoFlagsFLAGS232FLAGS} for the meaning of each bit}\\ 588 708 \hline 589 N\_FRAMES & 2+ & U16 & Number of frames overlapping source center \\709 N\_FRAMES & 2+ & U16 & Number of exposures overlapping source center \\ 590 710 \hline 591 711 PADDING & 2+ & S16 & padding \\ 592 \hline 593 \multicolumn{4}{|c|}{\textbf{Extended (trail fitting) parameters}}\\ 594 \multicolumn{4}{|c|}{Values like \texttt{NaN} mean that the extended parameters are undefined for the detection}\\ 595 \hline 596 X\_EXT & 2+ & F32 & Extended model X coordinate \\ 597 \hline 598 Y\_EXT & 2+ & F32 & Extended model Y coordinate \\ 599 \hline 600 X\_EXT\_SIG & 2+ & F32 & Sigma in extended model X coordinate \\ 601 \hline 602 Y\_EXT\_SIG & 2+ & F32 & Sigma in extended model Y coordinate \\ 603 \hline 604 EXT\_INST\_MAG & 2+ & F32 & Extended fit instrumental magnitude \\ 605 \hline 606 EXT\_INST\_SIG\_MAG & 2+ & F32 & Sigma of extended fit instrumental magnitude \\ 607 \hline 608 NPARAMS & 2+ & F32 & Number of model parameters \\ 609 \hline 610 EXT\_WIDTH\_MAJ & 2+ & F32 & EXT width (major axis), length for trail \\ 611 \hline 612 EXT\_WIDTH\_MIN & 2+ & F32 & EXT width (minor axis), sigma for trail \\ 613 \hline 614 EXT\_THETA & 2+ & F32 & EXT orientation angle\\ 615 \hline 616 EXT\_WIDTH\_MAJ\_ERR & 2+ & F32 & EXT width error (major axis)\\ 617 \hline 618 EXT\_WIDTH\_MIN\_ERR & 2+ & F32 & EXT width error (minor axis)\\ 619 \hline 620 EXT\_THETA\_ERR & 2+ & F32 & EXT orientation angle (error)\\ 621 \hline 622 RA\_EXT & 3+ & F32 & Fitted centroid RA \\ 623 \hline 624 RA\_EXT\_SIGMA & 3+ & F32 & Fitted RA sigma \\ 625 \hline 626 DEC\_EXT & 3+ & F32 & Fitted centroid DEC \\ 627 \hline 628 DEC\_EXT\_SIGMA & 3+ & F32 & Fitted DEC sigma \\ 629 \hline 630 POSANG\_EXT & 3+ & F32 & Fitted position angle \\ 631 \hline 632 PLTSCALE\_EXT & 3+ & F32 & Plate scale at centroid \\ 633 \hline 634 EXT\_FLUX & 3+ & F32 & Fitted flux \\ 635 \hline 636 EXT\_CAL\_MAG & 3+ & F32 & Calibrated magnitude \\ 637 \hline 638 EXT\_MAG\_SIG & 3+ & F32 & Sigma of calibrated magnitude \\ 639 \hline 640 EXT\_CHISQ & 3+ & F32 & $\chi^2$ of fit \\ 641 \hline 642 EXT\_NDOF & 3+ & S32 & Fit degrees of freedom \\ 643 \hline 712 \hline \hline 644 713 \end{longtable} 645 } 714 \end{center} 715 716 \begin{center} 717 \begin{longtable}{|lclp{3.5in}c|} 718 \caption{IPP-MOPS Transient Detection Table Columns:\\ Extended (Trail Fitting) Details}\label{table-detections-ext}\\ 719 \hline \hline 720 \multicolumn{5}{|c|}{\textbf{Extended (trail fitting) parameters}}\\ 721 \multicolumn{5}{|c|}{Values like \texttt{NaN} mean that the extended parameters are undefined for the detection}\\ 722 \hline 723 X\_EXT & 2+ & F32 & 724 Extended model X coordinate & pixels\\ 725 \hline 726 Y\_EXT & 2+ & F32 & 727 Extended model Y coordinate & pixels \\ 728 \hline 729 X\_EXT\_SIG & 2+ & F32 & 730 Sigma in extended model X coordinate & pixels \\ 731 \hline 732 Y\_EXT\_SIG & 2+ & F32 & 733 Sigma in extended model Y coordinate & pixels \\ 734 \hline 735 EXT\_INST\_MAG & 2+ & F32 & 736 Extended fit instrumental magnitude & N/A \\ 737 \hline 738 EXT\_INST\_SIG\_MAG & 2+ & F32 & 739 Sigma of extended fit instrumental magnitude & N/A \\ 740 \hline 741 NPARAMS & 2+ & S32 & 742 Number of model parameters (see \cite{VerJedDen2012IAAaPwTF}) & N/A \\ 743 \hline 744 EXT\_WIDTH\_MAJ & 2+ & F32 & % The name is weird but it's because of normalization 745 Length of trail & pixels \\ % in the IPP: Check if MOPS want to change it 746 \hline 747 EXT\_WIDTH\_MIN & 2+ & F32 & % The name is weird but it's because of normalization 748 Sigma of trail & pixels \\ % in the IPP: Check if MOPS want to change it 749 \hline 750 EXT\_THETA & 2+ & F32 & EXT orientation angle & radians \\ 751 \hline 752 EXT\_WIDTH\_MAJ\_ERR & 2+ & F32 & EXT width error (major axis) & pixels \\ 753 \hline 754 EXT\_WIDTH\_MIN\_ERR & 2+ & F32 & EXT width error (minor axis) & pixels \\ 755 \hline 756 EXT\_THETA\_ERR & 2+ & F32 & EXT orientation angle (error) & radians \\ 757 \hline 758 RA\_EXT & 3+ & F32 & Fitted centroid RA & degrees \\ 759 \hline 760 RA\_EXT\_SIGMA & 3+ & F32 & Fitted RA sigma & degrees? \\ 761 \hline 762 DEC\_EXT & 3+ & F32 & Fitted centroid DEC & degrees \\ 763 \hline 764 DEC\_EXT\_SIGMA & 3+ & F32 & Fitted DEC sigma & degrees? \\ 765 \hline 766 POSANG\_EXT & 3+ & F32 & Fitted position angle & degrees \\ 767 \hline 768 PLTSCALE\_EXT & 3+ & F32 & Plate scale at centroid & arcsec/pixel \\ 769 \hline 770 EXT\_FLUX & 3+ & F32 & Fitted flux & ADU \\ 771 \hline 772 EXT\_CAL\_MAG & 3+ & F32 & Calibrated magnitude & N/A \\ 773 \hline 774 EXT\_MAG\_SIG & 3+ & F32 & Sigma of calibrated magnitude & N/A \\ 775 \hline 776 EXT\_CHISQ & 3+ & F32 & $\chi^2$ of fit & N/A \\ 777 \hline 778 EXT\_NDOF & 3+ & S32 & Fit degrees of freedom & N/A \\ 779 \hline 780 \end{longtable} 781 \end{center} 646 782 647 783 \subsection{MOPS Detectability Query} … … 764 900 765 901 \pagebreak 902 903 \section{Changes} 904 905 \subsection{Changes in PS1\_DV3 from PS1\_DV2} 906 907 \subsubsection{New Keywords} 908 909 \paragraph{Per Exposure (in FITS header)} 910 \begin{itemize} 911 \item CMMTOBS 912 \item OBS\_MODE 913 \item DIFFTYPE 914 \item SKY 915 \item SHUTOUTC 916 \end{itemize} 917 918 \paragraph{Per Detection (in FITS extension)} 919 \begin{itemize} 920 \item RA\_EXT 921 \item RA\_EXT\_SIGMA 922 \item DEC\_EXT 923 \item DEC\_EXT\_SIGMA 924 \item POSANG\_EXT 925 \item PLTSCALE\_EXT 926 \item EXT\_FLUX 927 \item EXT\_CAL\_MAG 928 \item EXT\_MAG\_SIG 929 \item EXT\_CHISQ 930 \item EXT\_NDOF 931 \end{itemize} 932 933 \subsubsection{Removed Keywords} 934 935 None 936 937 \subsubsection{Datatypes} 938 \begin{itemize} 939 \item NPARAMS is now a S32 and no more a F32. 940 \end{itemize} 941 942 \subsubsection{Known Bugs and Associated Fix} 943 944 \begin{itemize} 945 \item None 946 \end{itemize} 947 948 \newpage 949 766 950 \appendix 767 951 768 \section{Appendix} 952 \section{The IPP Data Workflow} 953 954 The objective of this section is to provide some details about the IPP 955 Workflow. It is intentionnally MOPS oriented in the sense that some 956 details have been voluntarily omitted. 957 958 \begin{minipage}{0.65\linewidth} 959 The IPP receives "exposures" from the telescope. An "exposure" is an 960 image of 60 OTAs (see figure~\ref{fig-exposure-otas}) taken by the 961 GPC1 camera and its associated metadata. All science exposures 962 (which are interesting MOPS) are processed in the IPP according to 963 the following stages. 964 965 The first stage is the CHIP stage. Detrending and objects detections 966 are performed on each OTA at this stage. 967 968 The second stage is the CAMERA stage. Calibration and astrometry are 969 performed on the exposure at this stage. 970 971 The third stage is the WARP stage\footnote{For simplicity and since 972 nothing is performed in this stage, the FAKE stage has been 973 ommitted.}. The image pixels are warped to fit a predefined sky 974 tessellation (it is actually a covering). Cells of the tessellation 975 are called \emph{skycells} and each pixel in a skycell has a size of 976 $0.25" \times 0.25"$. The skycell is oriented so that increasing X 977 (wrt Y) pixel coordinate corresponds to a move toward the West (wrt 978 North). 979 980 The fourth stage is the DIFF stage. The difference between two 981 skycells having the same spatial coordinates but being distant in 982 time (by less than the TTI) is computed. To avoid deconvolution, 983 the image difference can be performed in bothways When the newer 984 image is diffed with the older image, the difference image is called 985 the \emph{positive} image. When the older image is diffed with the 986 newer image, the difference image is called the \emph{negative} 987 image. 988 989 Another stage is executed in parallel of the fourth stage: the STACK 990 stage. Its products (the stacks, that is, "average" observations in 991 a skycell) can be used in the DIFF stage to compute WARP-STACK 992 differences (e.g for MD observations). STACK-WARP are not computed 993 (so far). 994 995 The fifth and last stage is the PPMOPS stage. The exposure is 996 rebuilt from the differences obtained in each skycell of the DIFF 997 stage. For detections falling in areas covered by two or more 998 skycells, the data of the detection being the nearest to a skycell 999 center are taken. 1000 \end{minipage}\hfill\begin{minipage}{0.3\linewidth} 1001 \begin{center} 1002 \includegraphics[width=\linewidth]{figures/ipp_workflow.eps} 1003 \captionof{figure}{Caption for figure} 1004 \label{fig-ipp-workflow} 1005 \end{center} 1006 \end{minipage} 1007 1008 \begin{center} 1009 \includegraphics[width=4in]{figures/exposure_ota.eps} 1010 \captionof{figure}{Exposure / OTA TODO + Move somewhere else} 1011 \label{fig-exposure-otas} 1012 \end{center} 1013 1014 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1015 \newpage 1016 \section{\texttt{ppMops} Implementation Details} 1017 \label{sec-ppmops} 1018 1019 \subsection{Source Code} 1020 \label{sec-ppmops-sourcecode} 1021 1022 The \texttt{ppMops} source code can be found at 1023 \url{https://svn.pan-starrs.ifa.hawaii.edu/repo/ipp/trunk/ppTranslate}. The 1024 SVN revision of the analyzed code as well as the corresponding 1025 software version depends on the version of this document and can be 1026 found in the History subsection (see subsection 1027 \ref{sec-ppmops-sourcecodehistory}). 1028 1029 \subsection{Source Code Analysis History} 1030 \label{sec-ppmops-sourcecodehistory} 1031 \begin{tabular}{|c|c|c|p{2in}|c|c|} 1032 \hline 1033 \parbox{.5in}{Doc Version} & Date & Author & Description & SVN Rev. & \parbox{.5in}{Software Version}\\ 1034 \hline 1035 \hline 1036 --- & 2012-09-14 & SC & Creation & 34439 & 3\footnotemark{}\\ 1037 \hline 1038 \end{tabular}\footnotetext{Modified version 3} 1039 1040 \subsection{Main} 1041 Source code: \texttt{src/ppMops.c}. 1042 1043 \texttt{ppMops} can be run on the command line independently from the 1044 IPP framework. It is functionnally made of four parts: 1045 \begin{enumerate} 1046 \item Analyzing the command-line arguments (see subsection 1047 \ref{sec-implementation-args}); 1048 \item Reading the detections from the input diff files and the exposure 1049 parameters (see subsection \ref{sec-implementation-read}); 1050 \item Removing the duplicated detections (see subsection 1051 \ref{sec-implementation-merge}); 1052 \item Writing the products (see subsection 1053 \ref{sec-implementation-write}); 1054 \end{enumerate} 1055 1056 \subsection{Command-Line Arguments Analysis} 1057 \label{sec-implementation-args} 1058 1059 Source code: \texttt{src/ppMopsArguments.c}. 1060 1061 \subsubsection{Parameters} 1062 1063 There are only two mandatory arguments: 1064 \begin{enumerate} 1065 \item The first argument is a filename. The associated file contains 1066 the list of the names of all the diff files that will be used as 1067 input. For simplicity, we will identify that list by: 1068 \texttt{list\_of\_diffs\_inputs}. 1069 \item The second argument is the name of the output file. We will call 1070 it \texttt{output\_file\_name}. 1071 \end{enumerate} 1072 1073 The following parameters can be taken from the command line arguments 1074 options (if they are provided, otherwise they take the default value): 1075 \begin{itemize} 1076 \item \texttt{exp\_name}: exposure name (default: NULL); 1077 \item \texttt{exp\_id}: Exposure identifier (IPP internal; default: 0); 1078 \item \texttt{chip\_id}: Chip stage identifier (IPP internal; default: 0); 1079 \item \texttt{cam\_id}: Camera stage identifier (IPP internal; default: 0); 1080 \item \texttt{fake\_id}: Fake stage identifier (IPP internal; default: 0); 1081 \item \texttt{warp\_id}: Warp stage identifier (IPP internal; default: 0); 1082 \item \texttt{diff\_id}: Diff stage identifier (IPP internal; default: 0); 1083 \item \texttt{inverse}: Inverse subtraction (boolean; default: false); 1084 \item \texttt{zp}: Magnitude zero point (default: NAN); 1085 \item \texttt{zp\_error}: Error in magnitude zero point (default: NAN); 1086 \item \texttt{astrom\_rms}: Astrometric solution RMS (default: NAN); 1087 \item \texttt{version}: CMF file version (default: 0); 1088 \end{itemize} 1089 1090 \subsubsection{Parameters Values Validation} 1091 \begin{itemize} 1092 \item If the list of input file names is empty, an error is displayed 1093 and \texttt{ppMops} exits. 1094 \item There is no check on the validity of the different parameters 1095 (values, files existence...). 1096 \end{itemize} 1097 1098 \subsection{Reading Detections} 1099 \label{sec-implementation-read} 1100 1101 Source code: \texttt{src/ppMopsRead.c}. 1102 1103 Each file from the \texttt{list\_of\_diffs\_inputs} is opened. A 1104 \texttt{ppMopsDetections} object is populated from the data that are 1105 read from that file. The set (namely a \texttt{psArray}) of all the 1106 valid \texttt{ppMopsDetections} objects is the product of this part. 1107 1108 The data which are extracted from each file are the following: 1109 \begin{itemize} 1110 \item From the header are extracted: 1111 \begin{itemize} 1112 \item \texttt{diffSkyfileId}: Its value is 1113 associated to the keyword \texttt{IMAGEID}. If not present or 0, the 1114 program exits with an error. 1115 \item The current diff version is derived from the value associated 1116 to EXTTYPE. If the \texttt{version} has not already been set, it 1117 is set to the value which has just been read. If it was set at 1118 some point (either through the command line, or from a previous 1119 input), the current diff version value is checked against the 1120 \texttt{version}. Different values will produce warning messages. 1121 \item \texttt{raBoresight} is given the value associated to 1122 \texttt{FPA.RA}; 1123 \item \texttt{decBoresight} is given the value associated to 1124 \texttt{FPA.DEC}; 1125 \item \texttt{filter} is given the value associated to 1126 \texttt{FPA.FILTER}; 1127 \item \texttt{airmass} is given the value associated to 1128 \texttt{AIRMASS}; 1129 \item \texttt{exptime} is given the value associated to 1130 \texttt{EXPTIME}; 1131 \item \texttt{posangle} is given the value associated to 1132 \texttt{FPA.POSANGLE}; 1133 \item \texttt{alt} is given the value associated to 1134 \texttt{FPA.ALT}; 1135 \item \texttt{az} is given the value associated to 1136 \texttt{FPA.AZ}; 1137 \item \texttt{mjd} is computed from the \texttt{mjdobs} value 1138 associated to \texttt{MJD-OBS} by: \[\mathtt{mjd} = \mathtt{mjdobs} + 1139 \frac{\mathtt{exptime}}{2*3600*24}\] 1140 \item \texttt{seeing} is initialized (note that it is modified in 1141 the loop over the valid detections) using 1142 $\mathtt{fwhm}_\mathtt{maj}$ (wrt $\mathtt{fwhm}_\mathtt{min}$) 1143 associated to the keyword \texttt{FWHM\_MAJ} (wrt 1144 \texttt{FWHM\_MIN}); 1145 \item \texttt{naxis1} is set to the value associated to 1146 \texttt{IMNAXIS1}, that is the number of columns of the original 1147 image; 1148 \item \texttt{naxis2} is set to the value associated to 1149 \texttt{IMNAXIS2}, that is the number of rows of the original 1150 image; 1151 \end{itemize} 1152 \item From the \texttt{SkyChip.psf} extension: 1153 \begin{itemize} 1154 \item This extension contains all the detections. One row is 1155 associated to each detection. 1156 \item A detection is rejected if at least one of the following 1157 parameters has an non-finite value: \texttt{x}, \texttt{y}, 1158 \texttt{ra}, \texttt{dec}, \texttt{mag}, \texttt{magErr}, 1159 \texttt{xErr}, \texttt{yErr}, \texttt{scale}, \texttt{angle}. 1160 \item A detection is rejected if its associated \texttt{flags} 1161 matches: 1162 {\small 1163 \texttt{PM\_SOURCE\_MODE\_FAIL | PM\_SOURCE\_MODE\_BADPSF | 1164 PM\_SOURCE\_MODE\_SATURATED | PM\_SOURCE\_MODE\_CR\_LIMIT | 1165 PM\_SOURCE\_MODE\_SKY\_FAILURE}} 1166 \item \texttt{x} is associated to the \texttt{X\_PSF} keyword; 1167 \item \texttt{y} is associated to the \texttt{Y\_PSF} keyword; 1168 \item \texttt{ra} is associated to the \texttt{RA\_PSF} keyword. It 1169 is converted to radians; 1170 \item \texttt{dec} is associated to the \texttt{DEC\_PSF} keyword. It 1171 is converted to radians; 1172 \item \texttt{mag} is computed from the value associated the 1173 \texttt{PSF\_INST\_MAG} keyword, namely: 1174 \[ 1175 \mathtt{mag} = \mathtt{PSF\_INST\_MAG} + \mathtt{zp} 1176 \] 1177 where \texttt{zp} is defined in the arguments list (see subsection 1178 \ref{sec-implementation-args}); 1179 \item \texttt{magErr} is associated to the 1180 \texttt{PSF\_INST\_MAG\_SIG} keyword; 1181 \item \texttt{xErr} is associated to the \texttt{X\_PSF\_SIG} 1182 keyword; 1183 \item \texttt{yErr} is associated to the \texttt{Y\_PSF\_SIG} 1184 keyword; 1185 \item \texttt{scale} is associated to the \texttt{PLTSCALE} 1186 keyword; 1187 \item \texttt{angle} is associated to the \texttt{POSANGLE} 1188 keyword; 1189 \item \texttt{flags} is associated to the \texttt{FLAGS} keyword; 1190 \item \texttt{raErr} is defined by: 1191 \[ 1192 \mathtt{raErr} = \frac{\mathtt{scale}}{3600} 1193 \sqrt{\cos^2(\mathtt{angle}) \mathtt{xErr}^2 + 1194 \sin^2(\mathtt{angle}) \mathtt{yErr}^2} 1195 \] 1196 \item \texttt{decErr} is defined by: 1197 \[ 1198 \mathtt{decErr} = \frac{\mathtt{scale}}{3600} 1199 \sqrt{\sin^2(\mathtt{angle}) \mathtt{xErr}^2 + 1200 \cos^2(\mathtt{angle}) \mathtt{yErr}^2} 1201 \] 1202 \end{itemize} 1203 \item \texttt{seeing} is defined as the product of the mean of 1204 $\mathtt{fwhm}_\mathtt{maj}$ and $\mathtt{fwhm}_\mathtt{min}$ by the 1205 mean of the \texttt{scale} values for valid detections, that is: 1206 \[ 1207 \mathtt{seeing} = \frac{\mathtt{fwhm}_\mathtt{maj} + 1208 \mathtt{fwhm}_\mathtt{min}}{2} \times \frac{\sum_{\mathtt{valid\ 1209 detections}}(scale)}{\#(\mathtt{valid\ detections})} 1210 \] 1211 \item The number of valid detections is also kept (but not used). 1212 \item For each row of the \texttt{SkyChip.xfit} extension: 1213 \begin{itemize} 1214 \item This extension contains only a subset of the detections. Each 1215 row contains the index of the current detection which is the value 1216 associated to the keyword \texttt{IPP\_IDET}; 1217 \item Note that detections parameters whose index could not be found 1218 in the \texttt{SkyChip.xfit} extension are set to NaN. 1219 \item The following columns are extracted \texttt{X\_EXT}, 1220 \texttt{Y\_EXT}, \texttt{X\_EXT\_SIG}, \texttt{Y\_EXT\_SIG}, 1221 \texttt{EXT\_INST\_MAG}, \texttt{EXT\_INST\_MAG\_SIG}, 1222 \texttt{NPARAMS}, \texttt{EXT\_WIDTH\_MAJ}, \texttt{EXT\_WIDTH\_MIN}, 1223 \texttt{EXT\_THETA}, \texttt{EXT\_WIDTH\_MAJ\_ERR}, 1224 \texttt{EXT\_WIDTH\_MIN\_ERR}, and \texttt{EXT\_THETA\_ERR}. No check is 1225 performed on them at this stage. 1226 \end{itemize} 1227 \end{itemize} 1228 1229 At the end of this stage, all input files have been used to populate a 1230 collection of sets of detections. Let us call that collection $({\cal 1231 D}_{i})_{i \in \{1..n\}}$. Each of those sets contains data read 1232 from one file and it is important to note that only a few checks have 1233 been performed on the data (more precisely, only non-masked detections 1234 which have defined values have been inserted). The following cases can 1235 therefore happen: (1) Any ${\cal D}_i$ can be "empty", that is, does 1236 not contain any valdiated detection; (2) Some parameters like 1237 \texttt{seeing} can have an undefined value (e.g. \texttt{NaN}). 1238 1239 \subsection{Merging Detections} 1240 \label{sec-implementation-merge} 1241 1242 Source code: \texttt{src/ppMopsMerge.c}. 1243 1244 That part of the code essentially uses a kd-tree implementation to 1245 compare distances between detections. The collection of sets of 1246 detections will be called $({\cal D}_{i})_{i \in \{1..n\}}$ (see 1247 previous section). 1248 1249 \subsubsection{Checks} 1250 \label{sec-implementation-merge-checks} 1251 1252 Checks are performed on data that have been extracted from FITS files 1253 headers. Namely, they are: 1254 \begin{itemize} 1255 \item \texttt{raBoresight} constancy across all the detections; 1256 \item \texttt{decBoresight} constancy across all the detections; 1257 \item \texttt{filter} constancy across all the detections; 1258 \item \texttt{airmass} constancy across all the detections; 1259 \item \texttt{exptime} constancy across all the detections; 1260 \item \texttt{posangle} constancy across all the detections; 1261 \item \texttt{alt} constancy across all the detections; 1262 \item \texttt{az} constancy across all the detections; 1263 \item \texttt{mjd} constancy across all the detections; 1264 \end{itemize} 1265 1266 Any inconsistency displays an error and the program exits. 1267 1268 \subsubsection{kd-Tree Merging} 1269 \label{sec-implementation-merge-kdtree} 1270 1271 All valid detections are inserted into a kd-tree (using the 1272 \texttt{psTree} implementation). \texttt{ra} and \texttt{dec} are used 1273 as keys for the nearest neighbor search. An iteration over all valid 1274 detections is then performed. 1275 1276 The detection in a 1 arcsec neighborhood around the current valid 1277 detection which is the closest to the image center is chosen as the 1278 best candidate for the source. Then, the best of the candidates is 1279 chosen as the source. All other detections are considered duplicates, 1280 and marked as invalid, then removed from the detections set to which 1281 they belong. 1282 1283 Note that \texttt{numGood} which is supposed to give the number of 1284 valid detections is not updated. 1285 1286 \subsection{Writing Final Product} 1287 \label{sec-implementation-write} 1288 1289 Source code: \texttt{src/ppMopsWrite.c}. 1290 1291 To resolve any ambiguity, we will note the parameter named 1292 \texttt{param} which was built for the set of detections ${\cal 1293 D}_{i}$ will be denoted by ${\cal D}_{i}(\mathtt{param})$. 1294 1295 Note that, except for the parameters that have been checked at the 1296 merge stage (see paragraph~\ref{sec-implementation-merge-checks}), 1297 there is no guarantee that ${\cal D}_{i}(\mathtt{param}) = {\cal 1298 D}_{j}(\mathtt{param})$ when $i \neq j$. There is no guarantee to 1299 that ${\cal D}_{i}(\mathtt{param})$ is defined (in the mathematical 1300 sense), e.g. it could be \texttt{NaN}... 1301 1302 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1303 \subsubsection{Exposure Parameters: Header Details} 1304 \label{sec-implementation-write-header} 1305 1306 The first set of detections among the $({\cal D}_{i})_i$ that contains 1307 at least one valid detection is chosen. To fix ideas, let us denote 1308 it by ${\cal D}_{i_0}$. 1309 1310 The following parameters are written to the product FITS header: 1311 1312 \begin{itemize} 1313 \item \texttt{SWSOURCE} (Software source): Constructed from the SVN 1314 repository value. Generated when compiled. 1315 \item \texttt{SWVERSN} (Software version): Constructed from the SVN 1316 version value. Generated when compiled. 1317 \item \texttt{EXP\_NAME} (Exposure name): Set by \texttt{exp\_name} 1318 argument value; 1319 \item \texttt{EXP\_ID} (Exposure identifier): Set by \texttt{exp\_id} 1320 argument value; 1321 \item \texttt{CHIP\_ID} (Chip stage identifier): Set by 1322 \texttt{chip\_id} argument value; 1323 \item \texttt{CAM\_ID} (Cam stage identifier): Set by \texttt{cam\_id} 1324 argument value; 1325 \item \texttt{FAKE\_ID} (Fake stage identifier): Set by 1326 \texttt{fake\_id} argument value; 1327 \item \texttt{WARP\_ID} (Warp stage identifier): Set by 1328 \texttt{warp\_id} argument value; 1329 \item \texttt{DIFF\_ID} (Diff stage identifier): Set by 1330 \texttt{diff\_id} argument value; 1331 \item \texttt{DIFF\_POS} (Positive subtraction): Set by 1332 \texttt{inverse} argument value; 1333 \item \texttt{MJD-OBS} (MJD of exposure midpoint): Set by ${\cal 1334 D}_{i_0}(\mathtt{mjd})$. Uniqueness guaranteed by 1335 \ref{sec-implementation-merge-checks}; 1336 \item \texttt{RA} (Right Ascension of boresight): Set by ${\cal 1337 D}_{i_0}(\mathtt{raBoresight})$. Uniqueness guaranteed by 1338 \ref{sec-implementation-merge-checks}; 1339 \item \texttt{DEC} (Declination of boresight): Set by ${\cal 1340 D}_{i_0}(\mathtt{decBoresight})$. Uniqueness guaranteed by 1341 \ref{sec-implementation-merge-checks}; 1342 \item \texttt{TEL\_ALT} (Telescope altitude): Set by ${\cal 1343 D}_{i_0}(\mathtt{alt})$. Uniqueness guaranteed by 1344 \ref{sec-implementation-merge-checks}; 1345 \item \texttt{TEL\_AZ} (Telescope azimuth): Set by ${\cal 1346 D}_{i_0}(\mathtt{az})$. Uniqueness guaranteed by 1347 \ref{sec-implementation-merge-checks}; 1348 \item \texttt{EXPTIME} (Exposure time (sec)): Set by ${\cal 1349 D}_{i_0}(\mathtt{exptime})$. Uniqueness guaranteed by 1350 \ref{sec-implementation-merge-checks}; 1351 \item \texttt{ROTANGLE} (Rotator position angle): Set by ${\cal 1352 D}_{i_0}(\mathtt{rotangle})$. Uniqueness guaranteed by 1353 \ref{sec-implementation-merge-checks}; 1354 \item \texttt{FILTER} (Filter name): Set by ${\cal 1355 D}_{i_0}(\mathtt{filter})$. Uniqueness guaranteed by 1356 \ref{sec-implementation-merge-checks}; 1357 \item \texttt{AIRMASS} (Airmass of exposure): Set by ${\cal 1358 D}_{i_0}(\mathtt{airmass})$. Uniqueness guaranteed by 1359 \ref{sec-implementation-merge-checks}; 1360 \item \texttt{SEEING} (Mean seeing): Set by the median of defined (not 1361 \texttt{NaN}, not \texttt{Infinity}) of $({\cal 1362 D}_{i}(\mathtt{seeing}))_i$; 1363 \commentFromSC{2012-09-18}{Check if it is what we 1364 really expect. Take the example of 3 set of detections for which 1365 \texttt{seeing} is defined, assuming the first one contains 1000 1366 detections with a \texttt{seeing} of 1.0, the second one contains 1367 10 detections with a \texttt{seeing} of 2.0, the third one 10 1368 detections with a \texttt{seeing} of 3.0. Do we really want the 1369 global \texttt{seeing} value to be 2.0?}{} 1370 \item \texttt{OBSCODE} (IAU Observatory code): Hard-coded value 1371 defined in \texttt{src/ppMops.h} (value \texttt{F51}); 1372 \commentFromSC{2012-09-18}{I'm surprised that it's defined locally 1373 and not in some high-level project header file}{} 1374 \item \texttt{MAGZP} (Magnitude zero point): Set by \texttt{zp} 1375 argument value; 1376 \item \texttt{MAGZPERR} (Error in magnitude zero point): Set by 1377 \texttt{zp\_error} argument value; 1378 \item \texttt{ASTRORMS} (Error in magnitude zero point): Set by 1379 \texttt{astrom\_rms} argument value; 1380 \item \texttt{CMFVERSION} (CMF version): Set by \texttt{version} 1381 argument value but possibly modified by first \texttt{EXTTYPE} 1382 value; 1383 \commentFromSC{2012-09-18}{Depends on the order of the input FITS 1384 file and their \texttt{EXTTYPE} value (e.g. if \texttt{-version 0} 1385 is used as argument and two files are used, one with 1386 \texttt{EXTTYPE} of 1, the other with \texttt{EXTTYPE} of 1387 2). However we do not expect to have different values for 1388 \texttt{EXTTYPE}, do we?}{} 1389 \end{itemize} 1390 1391 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1392 \subsubsection{Detection Parameters: Extension Details} 1393 \label{sec-implementation-write-detection} 1394 1395 If no detection is present in any detections set, an extension is 1396 still created and contains exactly one row of undefined values 1397 (\texttt{NaN} for floating-point data, 0 for integral types). 1398 1399 To resolve any ambiguity, we will note the parameter named 1400 \texttt{param} which was built for the detection $j$ in the set of 1401 detections ${\cal D}_{i}$ will be denoted by ${\cal 1402 D}_{ij}(\mathtt{param})$ where \texttt{param} was defined in 1403 paragraph~\ref{sec-implementation-read}. When the \texttt{param} 1404 parameter is the exact copy of the value associated to the keyword 1405 \texttt{INPUT\_KEY}, we will write it as ${\cal 1406 D}_{ij}(\mathtt{INPUT\_KEY})$ (note the use of the uppercase 1407 letters). 1408 1409 For each detection $j$ in each detections set ${\cal D}_{i}$, the 1410 following products are written to the output FITS file: 1411 \begin{itemize} 1412 \item \texttt{RA} associated to ${\cal D}_{ij}(\mathtt{ra})$ (which is 1413 identical to ${\cal D}_{ij}(\mathtt{RA\_PSF})$); 1414 \item \texttt{RA\_ERR} associated to ${\cal D}_{ij}(\mathtt{raErr})$; 1415 \item \texttt{DEC} associated to ${\cal D}_{ij}(\mathtt{dec})$ (which 1416 is identical to ${\cal D}_{ij}(\mathtt{DEC\_PSF})$); 1417 \item \texttt{DEC\_ERR} associated to ${\cal 1418 D}_{ij}(\mathtt{decErr})$; 1419 \item \texttt{MAG} associated to ${\cal D}_{ij}(\mathtt{mag})$; 1420 \item \texttt{MAG\_ERR} associated to ${\cal D}_{ij}(\mathtt{magErr})$ 1421 (which is identical to ${\cal 1422 D}_{ij}(\mathtt{PSF\_INST\_MAG\_SIG})$); 1423 \item \texttt{PSF\_CHI2} associated to ${\cal 1424 D}_{ij}(\mathtt{PSF\_CHISQ})$; 1425 \item \texttt{PSF\_DOF} associated to ${\cal 1426 D}_{ij}(\mathtt{PSF\_NDOF})$; 1427 \item \texttt{CR\_SIGNIFICANCE} associated to ${\cal 1428 D}_{ij}(\mathtt{CR\_NSIGMA})$; 1429 \item \texttt{EXT\_SIGNIFICANCE} associated to ${\cal 1430 D}_{ij}(\mathtt{EXT\_NSIGMA})$; 1431 \item \texttt{PSF\_MAJOR} associated to ${\cal 1432 D}_{ij}(\mathtt{PSF\_MAJOR})$; 1433 \item \texttt{PSF\_MINOR} associated to ${\cal 1434 D}_{ij}(\mathtt{PSF\_MINOR})$; 1435 \item \texttt{PSF\_THETA} associated to ${\cal 1436 D}_{ij}(\mathtt{PSF\_THETA})$; 1437 \item \texttt{PSF\_QUALITY} associated to ${\cal 1438 D}_{ij}(\mathtt{PSF\_QF})$; 1439 \item \texttt{PSF\_NPIX} associated to ${\cal 1440 D}_{ij}(\mathtt{PSF\_NPIX})$; 1441 \item \texttt{MOMENTS\_XX} associated to ${\cal 1442 D}_{ij}(\mathtt{MOMENTS\_XX})$; 1443 \item \texttt{MOMENTS\_XY} associated to ${\cal 1444 D}_{ij}(\mathtt{MOMENTS\_XY})$; 1445 \item \texttt{MOMENTS\_YY} associated to ${\cal 1446 D}_{ij}(\mathtt{MOMENTS\_YY})$; 1447 \item \texttt{N\_POS} associated to ${\cal 1448 D}_{ij}(\mathtt{DIFF\_NPOS})$; 1449 \item \texttt{F\_POS} associated to ${\cal 1450 D}_{ij}(\mathtt{DIFF\_FRATIO})$; 1451 \item \texttt{RATIO\_BAD} associated to ${\cal 1452 D}_{ij}(\mathtt{DIFF\_NRATIO\_BAD})$; 1453 \item \texttt{RATIO\_MASK} associated to ${\cal 1454 D}_{ij}(\mathtt{DIFF\_NRATIO\_MASK})$; 1455 \item \texttt{RATIO\_ALL} associated to ${\cal 1456 D}_{ij}(\mathtt{DIFF\_NRATIO\_ALL})$; 1457 \item \texttt{FLAGS} associated to ${\cal D}_{ij}(\mathtt{FLAGS})$; 1458 \item \texttt{DIFF\_SKYFILE\_ID} associated to ${\cal 1459 D}_{i}(\mathtt{diffSkyfileId})$ (that is, the \texttt{diff\_id} of 1460 the file which was used to compute the difference); 1461 \item \texttt{IPP\_IDET} associated to ${\cal 1462 D}_{ij}(\mathtt{IPP\_DET})$ (since it is the position of the 1463 detection if the $i$th diff file, it is not very useful. However 1464 gaps in the numbering show that detections have been removed. 1465 \item \texttt{PSF\_INST\_FLUX} associated to ${\cal 1466 D}_{ij}(\mathtt{PSF\_INST\_FLUX})$; 1467 \item \texttt{PSF\_INST\_FLUX\_SIG} associated to ${\cal 1468 D}_{ij}(\mathtt{PSF\_INST\_FLUX\_SIG})$; 1469 \item \texttt{AP\_MAG} associated to ${\cal D}_{ij}(\mathtt{AP\_MAG})$; 1470 \item \texttt{AP\_MAG\_RAW} associated to ${\cal 1471 D}_{ij}(\mathtt{AP\_MAG\_RAW})$; 1472 \item \texttt{AP\_MAG\_RADIUS} associated to ${\cal 1473 D}_{ij}(\mathtt{AP\_MAG\_RADIUS})$; 1474 \item \texttt{AP\_FLUX} associated to ${\cal D}_{ij}(\mathtt{AP\_FLUX})$; 1475 \item \texttt{AP\_FLUX\_SIG} associated to ${\cal 1476 D}_{ij}(\mathtt{AP\_FLUX\_SIG})$; 1477 \item \texttt{PEAK\_FLUX\_AS\_MAG} associated to ${\cal 1478 D}_{ij}(\mathtt{PEAK\_FLUX\_AS\_MAG})$; 1479 \item \texttt{CAL\_PSF\_MAG} associated to ${\cal 1480 D}_{ij}(\mathtt{CAL\_PSF\_MAG})$; 1481 \item \texttt{CAL\_PSF\_MAG\_SIG} associated to ${\cal 1482 D}_{ij}(\mathtt{CAL\_PSF\_MAG\_SIG})$; 1483 \item \texttt{SKY} associated to ${\cal D}_{ij}(\mathtt{SKY})$; 1484 \item \texttt{SKY\_SIGMA} associated to ${\cal D}_{ij}(\mathtt{SKY\_SIGMA})$; 1485 \item \texttt{PSF\_QF\_PERFECT} associated to ${\cal 1486 D}_{ij}(\mathtt{PSF\_QF\_PERFECT})$; 1487 \item \texttt{MOMENTS\_R1} associated to ${\cal D}_{ij}(\mathtt{MOMENTS\_R1})$; 1488 \item \texttt{MOMENTS\_RH} associated to ${\cal D}_{ij}(\mathtt{MOMENTS\_RH})$; 1489 \item \texttt{KRON\_FLUX} associated to ${\cal D}_{ij}(\mathtt{KRON\_FLUX})$; 1490 \item \texttt{KRON\_FLUX\_ERR} associated to ${\cal 1491 D}_{ij}(\mathtt{KRON\_FLUX\_ERR})$; 1492 \item \texttt{KRON\_FLUX\_INNER} associated to ${\cal 1493 D}_{ij}(\mathtt{KRON\_FLUX\_INNER})$; 1494 \item \texttt{KRON\_FLUX\_OUTER} associated to ${\cal 1495 D}_{ij}(\mathtt{KRON\_FLUX\_OUTER})$; 1496 \item \texttt{DIFF\_R\_P} associated to ${\cal 1497 D}_{ij}(\mathtt{DIFF\_R\_P})$; 1498 \item \texttt{DIFF\_SN\_P} associated to ${\cal 1499 D}_{ij}(\mathtt{DIFF\_SN\_P})$; 1500 \item \texttt{DIFF\_R\_M} associated to ${\cal 1501 D}_{ij}(\mathtt{DIFF\_R\_M})$; 1502 \item \texttt{DIFF\_SN\_M} associated to ${\cal 1503 D}_{ij}(\mathtt{DIFF\_SN\_M})$; 1504 \item \texttt{FLAGS2} associated to ${\cal D}_{ij}(\mathtt{FLAGS2})$; 1505 \item \texttt{N\_FRAMES} associated to ${\cal 1506 D}_{ij}(\mathtt{N\_FRAMES})$; 1507 \item \texttt{PADDING} associated to ${\cal 1508 D}_{ij}(\mathtt{PADDING})$; 1509 \item \texttt{X\_EXT} associated to ${\cal D}_{ij}(\mathtt{X\_EXT})$; 1510 \item \texttt{Y\_EXT} associated to ${\cal D}_{ij}(\mathtt{Y\_EXT})$; 1511 \item \texttt{X\_EXT\_SIG} associated to ${\cal 1512 D}_{ij}(\mathtt{X\_EXT\_SIG})$; 1513 \item \texttt{Y\_EXT\_SIG} associated to ${\cal 1514 D}_{ij}(\mathtt{Y\_EXT\_SIG})$; 1515 \item \texttt{EXT\_INST\_MAG} associated to ${\cal 1516 D}_{ij}(\mathtt{EXT\_INST\_MAG})$; 1517 \item \texttt{EXT\_INST\_MAG\_SIG} associated to ${\cal 1518 D}_{ij}(\mathtt{EXT\_INST\_MAG\_SIG})$; 1519 \item \texttt{NPARAMS} associated to ${\cal 1520 D}_{ij}(\mathtt{NPARAMS})$; 1521 \item \texttt{EXT\_WIDTH\_MAJ} associated to ${\cal 1522 D}_{ij}(\mathtt{EXT\_WIDTH\_MAJ})$; 1523 \item \texttt{EXT\_WIDTH\_MIN} associated to ${\cal 1524 D}_{ij}(\mathtt{EXT\_WIDTH\_MIN})$; 1525 \item \texttt{EXT\_THETA} associated to ${\cal 1526 D}_{ij}(\mathtt{EXT\_THETA})$; 1527 \item \texttt{EXT\_WIDTH\_MAJ\_ERR} associated to ${\cal 1528 D}_{ij}(\mathtt{EXT\_WIDTH\_MAJ\_ERR})$; 1529 \item \texttt{EXT\_WIDTH\_MIN\_ERR} associated to ${\cal 1530 D}_{ij}(\mathtt{EXT\_WIDTH\_MIN\_ERR})$; 1531 \item \texttt{EXT\_THETA\_ERR} associated to ${\cal 1532 D}_{ij}(\mathtt{EXT\_THETA\_ERR})$; 1533 \end{itemize} 1534 1535 \subsection{Testing} 1536 \label{sec-implementation-test} 1537 1538 No test data have been provided. 1539 1540 \commentFromSC{2012-09-18}{No data exists to test the software. It 1541 would be good to make sure that the products are consistent at least 1542 (1) From one software release to another; (2) From one software 1543 execution to another; (3) To check if the product depends one the 1544 order in which the input data are ingested and processed. Stress 1545 tests could also be imagined, e.g. involving large data sets}{ } 1546 1547 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1548 \newpage 1549 \section{Obsolete Stuff?} 1550 1551 TODO (SC): The following stuff seems obsolete. Tell me if I can remove it. 769 1552 770 1553 \subsection{IPP to MOPS} … … 797 1580 \hline 798 1581 Detectability Query & \code{MOPS_DETECTABILITY_QUERY} & table of detectability query tuples (RA, Dec, FPA) \\ 799 \end{tabular}800 \end{center}801 \end{table}802 803 \subsection{Acronyms}804 805 \begin{table}[htbp]806 \begin{center}807 \small808 \caption{Acronyms used in this document\label{table-acronyms}}809 \begin{tabular}{ll}810 \hline811 \hline812 {\bf Acronym} & {\bf Definition} \\813 \hline814 MOPS & Pan-STARRS Moving Object Processing System \\815 IPP & Pan-STARRS Image Processing Pipeline \\816 FPA & Focal plane array \\817 MPC & Center for Astrophysics Minor Planet Center \\818 \hline819 1582 \end{tabular} 820 1583 \end{center} … … 841 1604 \end{itemize} 842 1605 843 \subsection{Example}844 \label{sec-example}845 846 \begin{verbatim}847 XTENSION= 'BINTABLE' / binary table extension848 BITPIX = 8 / 8-bit bytes849 NAXIS = 2 / 2-dimensional binary table850 NAXIS1 = 120 / width of table in bytes851 NAXIS2 = 42032 / number of rows in table852 PCOUNT = 0 / size of special data area853 GCOUNT = 1 / one data group (required keyword)854 TFIELDS = 25 / number of fields in each row855 TTYPE1 = 'RA ' / label for field 1856 TFORM1 = '1D ' / data format of field: 8-byte DOUBLE857 TTYPE2 = 'RA_ERR ' / label for field 2858 TFORM2 = '1D ' / data format of field: 8-byte DOUBLE859 TTYPE3 = 'DEC ' / label for field 3860 TFORM3 = '1D ' / data format of field: 8-byte DOUBLE861 TTYPE4 = 'DEC_ERR ' / label for field 4862 TFORM4 = '1D ' / data format of field: 8-byte DOUBLE863 TTYPE5 = 'MAG ' / label for field 5864 TFORM5 = '1E ' / data format of field: 4-byte REAL865 TTYPE6 = 'MAG_ERR ' / label for field 6866 TFORM6 = '1E ' / data format of field: 4-byte REAL867 TTYPE7 = 'PSF_CHI2' / label for field 7868 TFORM7 = '1E ' / data format of field: 4-byte REAL869 TTYPE8 = 'PSF_DOF ' / label for field 8870 TFORM8 = '1J ' / data format of field: 4-byte INTEGER871 TTYPE9 = 'CR_SIGNIFICANCE' / label for field 9872 TFORM9 = '1E ' / data format of field: 4-byte REAL873 TTYPE10 = 'EXT_SIGNIFICANCE' / label for field 10874 TFORM10 = '1E ' / data format of field: 4-byte REAL875 TTYPE11 = 'PSF_MAJOR' / label for field 11876 TFORM11 = '1E ' / data format of field: 4-byte REAL877 TTYPE12 = 'PSF_MINOR' / label for field 12878 TFORM12 = '1E ' / data format of field: 4-byte REAL879 TTYPE13 = 'PSF_THETA' / label for field 13880 TFORM13 = '1E ' / data format of field: 4-byte REAL881 TTYPE14 = 'PSF_QUALITY' / label for field 14882 TFORM14 = '1E ' / data format of field: 4-byte REAL883 TTYPE15 = 'PSF_NPIX' / label for field 15884 TFORM15 = '1J ' / data format of field: 4-byte INTEGER885 TTYPE16 = 'MOMENTS_XX' / label for field 16886 TFORM16 = '1E ' / data format of field: 4-byte REAL887 TTYPE17 = 'MOMENTS_XY' / label for field 17888 TFORM17 = '1E ' / data format of field: 4-byte REAL889 TTYPE18 = 'MOMENTS_YY' / label for field 18890 TFORM18 = '1E ' / data format of field: 4-byte REAL891 TTYPE19 = 'N_POS ' / label for field 19892 TFORM19 = '1J ' / data format of field: 4-byte INTEGER893 TTYPE20 = 'F_POS ' / label for field 20894 TFORM20 = '1E ' / data format of field: 4-byte REAL895 TTYPE21 = 'RATIO_BAD' / label for field 21896 TFORM21 = '1E ' / data format of field: 4-byte REAL897 TTYPE22 = 'RATIO_MASK' / label for field 22898 TFORM22 = '1E ' / data format of field: 4-byte REAL899 TTYPE23 = 'RATIO_ALL' / label for field 23900 TFORM23 = '1E ' / data format of field: 4-byte REAL901 TTYPE24 = 'FLAGS ' / label for field 24902 TFORM24 = '1J ' / data format of field: 4-byte INTEGER903 TZERO24 = 2147483648 / offset for unsigned integers904 TSCAL24 = 1 / data are not scaled905 TTYPE25 = 'DIFF_SKYFILE_ID' / label for field 25906 TFORM25 = '1K ' / data format of field: 8-byte INTEGER907 SWSOURCE= '60eb6cdc-a59c-4636-a4e0-dba66a9721fd' / Software source908 SWVERSN = 'branches/pap_mops/ppMops@25227' / Software version909 HISTORY ppMops at 2009-09-02T03:48:46.695783910 HISTORY psLib version: branches/pap_mops/psLib@25227911 HISTORY psLib source: 60eb6cdc-a59c-4636-a4e0-dba66a9721fd912 HISTORY ppMops version: branches/pap_mops/ppMops@25227913 HISTORY ppMops source: 60eb6cdc-a59c-4636-a4e0-dba66a9721fd914 EXP_NAME= 'o4995g0129o' / Exposure name915 EXP_ID = 77164 / Exposure identifier916 CHIP_ID = 24019 / Chip stage identifier917 CAM_ID = 17726 / Cam stage identifier918 FAKE_ID = 10227 / Fake stage identifier919 WARP_ID = 8842 / Warp stage identifier920 DIFF_ID = 19219 / Diff stage identifier921 DIFF_POS= F / Positive subtraction?922 MJD-OBS = 54995.4740598313 / MJD of exposure midpoint923 RA = '18:25:01.988' / Right Ascension of boresight924 DEC = '-17:20:40.069' / Declination of boresight925 TEL_ALT = 51.951873 / Telescope altitude926 TEL_AZ = 179.483883 / Telescope azimuth927 EXPTIME = 38. / Exposure time (sec)928 ROTANGLE= 333.1039 / Rotator position angle929 FILTER = 'r.00000 ' / Filter name930 AIRMASS = 1.269 / Airmass of exposure931 OBSCODE = 'F51 ' / IAU Observatory code932 SEEING = 1.678401 / Mean seeing933 MAGZP = 28.65226 / Magnitude zero point934 MAGZPERR= 0.353063 / Error in magnitude zero point935 ASTRORMS= 0.3111496 / RMS of astrometric fit936 EXTNAME = 'MOPS_TRANSIENT_DETECTIONS'937 \end{verbatim}938 939 940 1606 \end{document} 941 1607 -
branches/eam_branches/ipp-20120905/ppTranslate/src/ppMops.h
r34566 r34735 59 59 psVector *raExtErr, *decExtErr; // Error in sky coordinates for RA_EXT and DEC_EXT 60 60 psVector *mask; // Mask for detections 61 float platescale; //Plate scale at centroid 61 62 } ppMopsDetections; 62 63 -
branches/eam_branches/ipp-20120905/ppTranslate/src/ppMopsRead.c
r34566 r34735 1 /* 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12 * 13 * 14 * 15 * 16 * 17 * 18 * 19 * 20 * 21 * 22 * 23 * 24 * 25 * 26 * 27 * 28 * 29 * 30 * THIS CODE CONTAINS DIRTY BUG FIXES! 31 * 32 * 33 * 34 * 35 * 36 * 37 * 38 * Look for "DIRTY_BUG_FIX" to know where 39 * 40 * and set the following to 0 to change the code 41 */ 42 #define DIRTY_BUG_FIX 1 43 /* 44 * 45 * 46 * 47 * 48 * 49 * 50 * 51 * 52 * 53 * 54 * 55 * 56 * 57 * 58 * 59 * 60 * 61 * 62 * 63 * 64 * 65 * 66 * 67 * 68 * 69 * 70 * 71 * 72 * 73 * 74 * 75 * 76 * 77 */ 1 #define DIRTY_BUG_FIX 0 78 2 79 3 #ifdef HAVE_CONFIG_H … … 90 14 static void replaceDummyValuesS32(const char* colName, psMetadata* source, psMetadata* target, psVector* indexes); 91 15 static void renameDummyValuesF32(const char* colNameSource, psMetadata* source, const char* colNameTarget, psMetadata* target, psVector* indexes); 92 #if DIRTY_BUG_FIX93 static psVector* createDummyF32_default(long size, float default_value);94 #endif95 16 96 17 /* … … 145 66 if (skyChipPsfVersion != args->version) { 146 67 if (skyChipPsfVersion > args->version) { 147 psWarning("The FITS data will be downgraded from PS1_DV%d to PS1_DV%d\n",148 skyChipPsfVersion, args->version);68 psWarning("The FITS data will be downgraded from PS1_DV%d to PS1_DV%d\n", 69 skyChipPsfVersion, args->version); 149 70 } else { // Necessarily: skyChipPsfVersion > args->version 150 psWarning("The FITS data will be upgraded from PS1_DV%d to PS1_DV%d (new values set to default 0, NaN...)\n",151 skyChipPsfVersion, args->version);71 psWarning("The FITS data will be upgraded from PS1_DV%d to PS1_DV%d (new values set to default 0, NaN...)\n", 72 skyChipPsfVersion, args->version); 152 73 } 153 74 } … … 199 120 addDummyValues(det->table, size, args->version); 200 121 if (!psFitsMoveExtName(fits, "SkyChip.xfit")) { 201 psTrace("ppMops.read", 3, "No fitted trails extension");122 psTrace("ppMops.read", 3, "No fitted trails extension"); 202 123 } else { 203 psTrace("ppMops.read", 3, "Fitted trails extension found\n"); 204 psTrace("ppMops.read", 10, "Getting size?\n"); 205 int fittedTrailsSize = psFitsTableSize(fits); 206 psTrace("ppMops.read", 10, "size = %d\n", fittedTrailsSize); 207 if (fittedTrailsSize <= 0) { 208 psErrorStackPrint(stderr, "Unable to determine size of fitted trails extension table %d", i); 209 psTrace("ppMops.read", 3, "No entry in fitted trails extension!!!!\n"); 210 psErrorClear(); 211 } else { 212 psTrace("ppMops.read", 10, "Reading table of interest?\n"); 213 psMetadata* fittedTrails = psFitsReadTableAllColumns(fits); // Table of interest 214 psTrace("ppMops.read", 10, "OK for table of interest\n"); 215 if (!fittedTrails) { 216 psError(PS_ERR_IO, false, "Unable to read fittedTrails table in file %d", i); 217 return NULL; 218 } 219 //Iterate on the different names and types expected in the fittedTrails parameters 220 psTrace("ppMops.read", 10, "Getting IPP_IDET\n"); 221 psVector* idet = psMetadataLookupVector(NULL, fittedTrails, "IPP_IDET"); 222 replaceDummyValuesF32("X_EXT", fittedTrails, det->table, idet); 223 replaceDummyValuesF32("Y_EXT", fittedTrails, det->table, idet); 224 replaceDummyValuesF32("X_EXT_SIG", fittedTrails, det->table, idet); 225 replaceDummyValuesF32("Y_EXT_SIG", fittedTrails, det->table, idet); 226 replaceDummyValuesF32("EXT_INST_MAG", fittedTrails, det->table, idet); 227 replaceDummyValuesF32("EXT_INST_MAG_SIG", fittedTrails, det->table, idet); 228 replaceDummyValuesS32("NPARAMS", fittedTrails, det->table, idet); 229 replaceDummyValuesF32("EXT_WIDTH_MAJ", fittedTrails, det->table, idet); 230 replaceDummyValuesF32("EXT_WIDTH_MIN", fittedTrails, det->table, idet); 231 replaceDummyValuesF32("EXT_THETA", fittedTrails, det->table, idet); 232 replaceDummyValuesF32("EXT_WIDTH_MAJ_ERR", fittedTrails, det->table, idet); 233 // EXT_WIDTH_MIN_ERR is actually undefined but set to 0. in CMF files 234 // We explicitely let it set to NaN, hence the commented out 235 // following line 236 //replaceDummyValuesF32("EXT_WIDTH_MIN_ERR", fittedTrails, det->table, idet); 237 replaceDummyValuesF32("EXT_THETA_ERR", fittedTrails, det->table, idet); 238 psTrace("ppMops.read", 10, "Got all version 2 values\n"); 239 if (skyChipPsfVersion >= 3) { 240 psTrace("ppMops.read", 10, "Getting PS1_DV3 data\n"); 241 replaceDummyValuesF32("RA_EXT", fittedTrails, det->table, idet); 242 // Note: RA_EXT_SIGMA is computed (see det->raExtErr) 243 replaceDummyValuesF32("DEC_EXT", fittedTrails, det->table, idet); 244 // Note: DEC_EXT_SIGMA is computed (see det->decExtErr) 245 //Note: POSANG_EXT is POSANGLE in xfit 246 #if DIRTY_BUG_FIX 247 #else 248 renameDummyValuesF32("POSANGLE", fittedTrails, "POSANG_EXT", det->table, idet); 249 #endif 250 //Note: PLTSCALE_EXT in xfit is PLTSCALE 251 renameDummyValuesF32("PLTSCALE", fittedTrails, "PLTSCALE_EXT", det->table, idet); 252 renameDummyValuesF32("EXT_INST_FLUX", fittedTrails, "EXT_FLUX", det->table, idet); 253 replaceDummyValuesF32("EXT_CAL_MAG", fittedTrails, det->table, idet); 254 renameDummyValuesF32("EXT_INST_MAG_SIG", fittedTrails, "EXT_MAG_SIG", det->table, idet); 255 replaceDummyValuesF32("EXT_CHISQ", fittedTrails, det->table, idet); 256 replaceDummyValuesS32("EXT_NDOF", fittedTrails, det->table, idet); 257 psTrace("ppMops.read", 10, "Got all version 3 values\n"); 258 } 259 } 124 psTrace("ppMops.read", 3, "Fitted trails extension found\n"); 125 psTrace("ppMops.read", 10, "Getting size?\n"); 126 int fittedTrailsSize = psFitsTableSize(fits); 127 psTrace("ppMops.read", 10, "size = %d\n", fittedTrailsSize); 128 if (fittedTrailsSize <= 0) { 129 psErrorStackPrint(stderr, "Unable to determine size of fitted trails extension table %d", i); 130 psTrace("ppMops.read", 3, "No entry in fitted trails extension!!!!\n"); 131 psErrorClear(); 132 } else { 133 psTrace("ppMops.read", 10, "Reading table of interest?\n"); 134 psMetadata* fittedTrails = psFitsReadTableAllColumns(fits); // Table of interest 135 psTrace("ppMops.read", 10, "OK for table of interest\n"); 136 if (!fittedTrails) { 137 psError(PS_ERR_IO, false, "Unable to read fittedTrails table in file %d", i); 138 return NULL; 139 } 140 //Iterate on the different names and types expected in the fittedTrails parameters 141 psTrace("ppMops.read", 10, "Getting IPP_IDET\n"); 142 psVector* idet = psMetadataLookupVector(NULL, fittedTrails, "IPP_IDET"); 143 replaceDummyValuesF32("X_EXT", fittedTrails, det->table, idet); 144 replaceDummyValuesF32("Y_EXT", fittedTrails, det->table, idet); 145 replaceDummyValuesF32("X_EXT_SIG", fittedTrails, det->table, idet); 146 replaceDummyValuesF32("Y_EXT_SIG", fittedTrails, det->table, idet); 147 replaceDummyValuesF32("EXT_INST_MAG", fittedTrails, det->table, idet); 148 replaceDummyValuesF32("EXT_INST_MAG_SIG", fittedTrails, det->table, idet); 149 replaceDummyValuesS32("NPARAMS", fittedTrails, det->table, idet); 150 replaceDummyValuesF32("EXT_WIDTH_MAJ", fittedTrails, det->table, idet); 151 replaceDummyValuesF32("EXT_WIDTH_MIN", fittedTrails, det->table, idet); 152 replaceDummyValuesF32("EXT_THETA", fittedTrails, det->table, idet); 153 replaceDummyValuesF32("EXT_WIDTH_MAJ_ERR", fittedTrails, det->table, idet); 154 // EXT_WIDTH_MIN_ERR is actually undefined but set to 0. in CMF files 155 // We explicitely let it set to NaN, hence the commented out 156 // following line 157 //replaceDummyValuesF32("EXT_WIDTH_MIN_ERR", fittedTrails, det->table, idet); 158 replaceDummyValuesF32("EXT_THETA_ERR", fittedTrails, det->table, idet); 159 psTrace("ppMops.read", 10, "Got all version 2 values\n"); 160 if (skyChipPsfVersion >= 3) { 161 psTrace("ppMops.read", 10, "Getting PS1_DV3 data\n"); 162 replaceDummyValuesF32("RA_EXT", fittedTrails, det->table, idet); 163 // Note: RA_EXT_SIGMA is computed (see det->raExtErr) 164 replaceDummyValuesF32("DEC_EXT", fittedTrails, det->table, idet); 165 // Note: DEC_EXT_SIGMA is computed (see det->decExtErr) 166 //Note: POSANG_EXT is POSANGLE in xfit 167 renameDummyValuesF32("POSANGLE", fittedTrails, "POSANG_EXT", det->table, idet); 168 //Not written anymore but still used in computation 169 renameDummyValuesF32("PLTSCALE", fittedTrails, "PLTSCALE_EXT", det->table, idet); 170 renameDummyValuesF32("EXT_INST_FLUX", fittedTrails, "EXT_FLUX", det->table, idet); 171 replaceDummyValuesF32("EXT_CAL_MAG", fittedTrails, det->table, idet); 172 renameDummyValuesF32("EXT_INST_MAG_SIG", fittedTrails, "EXT_MAG_SIG", det->table, idet); 173 replaceDummyValuesF32("EXT_CHISQ", fittedTrails, det->table, idet); 174 replaceDummyValuesS32("EXT_NDOF", fittedTrails, det->table, idet); 175 psTrace("ppMops.read", 10, "Got all version 3 values\n"); 176 } 177 } 260 178 } 261 179 } … … 264 182 if (args->version == 0) { 265 183 if (skyChipPsfVersion < 2) { 266 // XXX: TODO: Do we need to add dummy vectors for the missing columns?184 // XXX: TODO: Do we need to add dummy vectors for the missing columns? 267 185 } 268 186 } … … 324 242 psU32 flags = flagsV->data.U32[row]; // psFitsTableGetU32(NULL, table, row, "FLAGS"); 325 243 if (flags & SOURCE_MASK) { 326 psTrace("ppMops.read", 10, "Discarding row %ld from input %d because of flags: %ud", row, i, flags);327 det->mask->data.U8[row] = 0xFF;328 continue;244 psTrace("ppMops.read", 10, "Discarding row %ld from input %d because of flags: %ud", row, i, flags); 245 det->mask->data.U8[row] = 0xFF; 246 continue; 329 247 } 330 248 … … 333 251 double yErr = yErrV->data.F32[row]; 334 252 double scale = scaleV->data.F32[row]; 335 #if DIRTY_BUG_FIX336 double angle = 0. * angleV->data.F32[row];337 #else338 253 double angle = angleV->data.F32[row]; 339 #endif340 341 254 if (!isfinite(det->x->data.F32[row]) || !isfinite(det->y->data.F32[row]) || 342 !isfinite(det->ra->data.F64[row]) || !isfinite(det->dec->data.F64[row]) ||343 !isfinite(mag->data.F32[row]) || !isfinite(magErr->data.F32[row]) ||344 !isfinite(xErr) || !isfinite(yErr) || !isfinite(scale) || !isfinite(angle)) {345 psTrace("ppMops.read", 10,346 "Discarding row %ld from input %d because of non-finite values: "347 "%f %f %lf %lf %f %f %f %f %f %f",348 row, i,349 det->x->data.F32[row], det->y->data.F32[row],350 det->ra->data.F64[row], det->dec->data.F64[row],351 mag->data.F32[row], magErr->data.F32[row],352 xErr, yErr, scale, angle);353 det->mask->data.U8[row] = 0xFF;354 continue;255 !isfinite(det->ra->data.F64[row]) || !isfinite(det->dec->data.F64[row]) || 256 !isfinite(mag->data.F32[row]) || !isfinite(magErr->data.F32[row]) || 257 !isfinite(xErr) || !isfinite(yErr) || !isfinite(scale) || !isfinite(angle)) { 258 psTrace("ppMops.read", 10, 259 "Discarding row %ld from input %d because of non-finite values: " 260 "%f %f %lf %lf %f %f %f %f %f %f", 261 row, i, 262 det->x->data.F32[row], det->y->data.F32[row], 263 det->ra->data.F64[row], det->dec->data.F64[row], 264 mag->data.F32[row], magErr->data.F32[row], 265 xErr, yErr, scale, angle); 266 det->mask->data.U8[row] = 0xFF; 267 continue; 355 268 } 356 269 … … 364 277 det->mask->data.U8[row] = 0; 365 278 plateScale += scale; 279 //Update the platescale value (should be a constant) 280 if (isfinite(scale)) { 281 det->platescale = scale; 282 } 366 283 numGood++; 367 284 368 285 // Same for EXT data if version permits 369 286 if (skyChipPsfVersion >= 3) { 370 xErr = xExtErrV->data.F32[row]; 371 yErr = yExtErrV->data.F32[row]; 372 scale = scaleExtV->data.F32[row]/3600.; 373 #if DIRTY_BUG_FIX 374 angle = 0.; 375 #else 376 angle = angleExtV->data.F32[row]; 377 #endif 378 cosAngle = cos(angle); 379 sinAngle = sin(angle); 380 cosAngle2 = PS_SQR(cosAngle); 381 sinAngle2 = PS_SQR(sinAngle); 382 xErr2 = PS_SQR(xErr); 383 yErr2 = PS_SQR(yErr); 384 errScale = scale / 3600.0; 385 det->raExtErr->data.F64[row] = errScale * sqrt(cosAngle2 * xErr2 + sinAngle2 * yErr2); 386 det->decExtErr->data.F64[row] = errScale * sqrt(sinAngle2 * xErr2 + cosAngle2 * yErr2); 287 xErr = xExtErrV->data.F32[row]; 288 yErr = yExtErrV->data.F32[row]; 289 scale = scaleExtV->data.F32[row]/3600.; 290 angle = angleExtV->data.F32[row]; 291 cosAngle = cos(angle); 292 sinAngle = sin(angle); 293 cosAngle2 = PS_SQR(cosAngle); 294 sinAngle2 = PS_SQR(sinAngle); 295 xErr2 = PS_SQR(xErr); 296 yErr2 = PS_SQR(yErr); 297 errScale = scale / 3600.0; 298 det->raExtErr->data.F64[row] = errScale * sqrt(cosAngle2 * xErr2 + sinAngle2 * yErr2); 299 det->decExtErr->data.F64[row] = errScale * sqrt(sinAngle2 * xErr2 + cosAngle2 * yErr2); 387 300 } 388 301 } … … 406 319 return dummy; 407 320 } 408 #if DIRTY_BUG_FIX 409 static psVector* createDummyF32_default(long size, float default_value) { 410 psVector* dummy = psVectorAlloc(size, PS_TYPE_F32); 411 psVectorInit(dummy, default_value); 412 return dummy; 413 } 414 #endif 321 415 322 static psVector* createDummyS32(long size) { 416 323 psVector* dummy = psVectorAlloc(size, PS_TYPE_S32); 417 psVectorInit(dummy, NAN);324 psVectorInit(dummy, 0); 418 325 return dummy; 419 326 } … … 439 346 psMetadataAdd(md, PS_LIST_TAIL, "DEC_EXT", PS_DATA_VECTOR, "Fitted centroid DEC", createDummyF32(size)); 440 347 /* psMetadataAdd(md, PS_LIST_TAIL, "DEC_EXT_SIGMA", PS_DATA_VECTOR, "Fitted DEC sigma", createDummyF32(size)); *\/ */ 441 #if DIRTY_BUG_FIX442 psMetadataAdd(md, PS_LIST_TAIL, "POSANG_EXT", PS_DATA_VECTOR, "Fitted position angle", createDummyF32_default(size, 0.));443 #else444 348 psMetadataAdd(md, PS_LIST_TAIL, "POSANG_EXT", PS_DATA_VECTOR, "Fitted position angle", createDummyF32(size)); 445 #endif446 349 psMetadataAdd(md, PS_LIST_TAIL, "PLTSCALE_EXT", PS_DATA_VECTOR, "Plate scale at centroid", createDummyF32(size)); 447 350 psMetadataAdd(md, PS_LIST_TAIL, "EXT_FLUX", PS_DATA_VECTOR, "Fitted flux", createDummyF32(size)); -
branches/eam_branches/ipp-20120905/ppTranslate/src/ppMopsWrite.c
r34566 r34735 48 48 } 49 49 } 50 //Get the SEEING weighted mean 50 //Get the SEEING weighted mean. Update the PLTSCALE value 51 51 float seeing = 0.; 52 52 int totalGood = 0; … … 55 55 seeing += ((ppMopsDetections*) detections->data[d])->seeing; 56 56 totalGood += 1; 57 } 58 } 57 if (isfinite(((ppMopsDetections*) detections->data[d])->platescale)) { 58 det->platescale = ((ppMopsDetections*) detections->data[d])->platescale; 59 } 60 } 61 } 62 printf("plate-scale = [%g]\n", det->platescale); 59 63 seeing /= (float) totalGood; 60 64 if (det != NULL) { … … 80 84 psMetadataAddF32(header, PS_LIST_TAIL, "MAGZPERR", 0, "Error in magnitude zero point", args->zpErr); 81 85 psMetadataAddF32(header, PS_LIST_TAIL, "ASTRORMS", 0, "RMS of astrometric fit", args->rmsAstrom); 82 psMetadataAddStr(header, PS_LIST_TAIL, "C OMMENT", 0, "Exposure comment", args->comment);86 psMetadataAddStr(header, PS_LIST_TAIL, "CMMTOBS", 0, "Exposure comment", args->comment); 83 87 psMetadataAddStr(header, PS_LIST_TAIL, "OBS_MODE", 0, "Exposure observation mode", args->obsMode); 84 88 psMetadataAddStr(header, PS_LIST_TAIL, "DIFFTYPE", 0, "WW: Warp-Warp diff / WS: Warp-Stack diff / SW: Stack-Warp diff", args->difftype); 85 89 psMetadataAddF32(header, PS_LIST_TAIL, "SKY", 0, "Exposure avg sky background", args->sky); 86 90 psMetadataAddStr(header, PS_LIST_TAIL, "SHUTOUTC", 0, "Camera exposure shutter open (UTC)", args->shutoutc); 91 psMetadataAddF32(header, PS_LIST_TAIL, "PLTSCALE_EXT", 0, "Plate scale at centroid", det->platescale); 92 psMetadataAddF32(header, PS_LIST_TAIL, "PLTSCALE", 0, "Plate scale at centroid", det->platescale); 87 93 88 94 //field in header that tells about the CMF version … … 92 98 93 99 // Find the total number of detections 94 95 100 long total = 0; 96 101 for (long i=0; i<detections->n; i++) { … … 191 196 0); 192 197 if (args->version == 3) { 193 // Write data of version 3 (see ICD) 194 psMetadataAdd (row, PS_LIST_TAIL, "RA_EXT", PS_DATA_F32, "Fitted centroid RA", 195 0); 196 psMetadataAdd (row, PS_LIST_TAIL, "RA_EXT_SIGMA", PS_DATA_F32, "Fitted RA sigma", 197 0); 198 psMetadataAdd (row, PS_LIST_TAIL, "DEC_EXT", PS_DATA_F32, "Fitted centroid DEC", 199 0); 200 psMetadataAdd (row, PS_LIST_TAIL, "DEC_EXT_SIGMA", PS_DATA_F32, "Fitted DEC sigma", 201 0); 202 psMetadataAdd (row, PS_LIST_TAIL, "POSANG_EXT", PS_DATA_F32, "Fitted position angle", 203 0); 204 psMetadataAdd (row, PS_LIST_TAIL, "PLTSCALE_EXT", PS_DATA_F32, "Plate scale at centroid", 205 0); 206 psMetadataAdd (row, PS_LIST_TAIL, "EXT_FLUX", PS_DATA_F32, "Fitted flux", 207 0); 208 psMetadataAdd (row, PS_LIST_TAIL, "EXT_CAL_MAG", PS_DATA_F32, "Calibrated mag", 209 0); 210 psMetadataAdd (row, PS_LIST_TAIL, "EXT_MAG_SIG", PS_DATA_F32, "Mag sigma", 211 0); 212 psMetadataAdd (row, PS_LIST_TAIL, "EXT_CHISQ", PS_DATA_F32, "Chi^2 of fit", 213 0); 214 psMetadataAdd (row, PS_LIST_TAIL, "EXT_NDOF", PS_DATA_F32, "Fit degrees of freedom", 215 0); 198 // Write data of version 3 (see ICD) 199 psMetadataAdd (row, PS_LIST_TAIL, "RA_EXT", PS_DATA_F32, "Fitted centroid RA", 200 0); 201 psMetadataAdd (row, PS_LIST_TAIL, "RA_EXT_SIGMA", PS_DATA_F32, "Fitted RA sigma", 202 0); 203 psMetadataAdd (row, PS_LIST_TAIL, "DEC_EXT", PS_DATA_F32, "Fitted centroid DEC", 204 0); 205 psMetadataAdd (row, PS_LIST_TAIL, "DEC_EXT_SIGMA", PS_DATA_F32, "Fitted DEC sigma", 206 0); 207 psMetadataAdd (row, PS_LIST_TAIL, "POSANG_EXT", PS_DATA_F32, "Fitted position angle", 208 0); 209 psMetadataAdd (row, PS_LIST_TAIL, "EXT_FLUX", PS_DATA_F32, "Fitted flux", 210 0); 211 psMetadataAdd (row, PS_LIST_TAIL, "EXT_CAL_MAG", PS_DATA_F32, "Calibrated mag", 212 0); 213 psMetadataAdd (row, PS_LIST_TAIL, "EXT_MAG_SIG", PS_DATA_F32, "Mag sigma", 214 0); 215 psMetadataAdd (row, PS_LIST_TAIL, "EXT_CHISQ", PS_DATA_F32, "Chi^2 of fit", 216 0); 217 psMetadataAdd (row, PS_LIST_TAIL, "EXT_NDOF", PS_DATA_F32, "Fit degrees of freedom", 218 0); 216 219 } 217 220 } … … 308 311 addColumn("DEC_EXT_SIGMA", NULL, 0); 309 312 addColumn("POSANG_EXT", NULL, 0); 310 addColumn("PLTSCALE_EXT", NULL, 0);311 313 addColumn("EXT_FLUX", NULL, 0); 312 314 addColumn("EXT_CAL_MAG", NULL, 0); -
branches/eam_branches/ipp-20120905/psLib/share/tai_utc.dat
r22679 r34735 12 12 # JD TAI-UTC Const 1 Const 2 13 13 # (days) (sec) (none) (none) 14 # psF64psF64 psF64 psF6414 # psF64 psF64 psF64 psF64 15 15 2437300.5 1.4228180 37300.0 0.0012960 16 16 2437512.5 1.3728180 37300.0 0.0012960 … … 51 51 2453736.5 33.0000000 41317.0 0.0000000 52 52 2454832.5 34.0000000 41317.0 0.0000000 53 2456109.5 35.0000000 41317.0 0.0000000 -
branches/eam_branches/ipp-20120905/psLib/share/tai_utc.raw
r22679 r34735 37 37 2006 JAN 1 =JD 2453736.5 TAI-UTC= 33.0 S + (MJD - 41317.) X 0.0 S 38 38 2009 JAN 1 =JD 2454832.5 TAI-UTC= 34.0 S + (MJD - 41317.) X 0.0 S 39 2012 JUL 1 =JD 2456109.5 TAI-UTC= 35.0 S + (MJD - 41317.) X 0.0 S -
branches/eam_branches/ipp-20120905/psLib/src/imageops/psImageConvolve.c
r33089 r34735 605 605 PS_ASSERT_IMAGE_NON_NULL(image, false); 606 606 607 if (sigma < 0.25) { 608 psTrace("psLib.imageops", 5, "sigma: %f < 0.25 skipping smoothing", sigma); 609 return true; 610 } 611 607 612 // relevant terms 608 613 int Nrange = sigma*Nsigma + 0.5; // Number of pixels either side for convolution kernel 614 if (Nrange < 1) { 615 // using zero will cause an arithmetic exception in the loop 616 psTrace("psLib.imageops", 5, "Nrange %d for smoothing too small skipping smoothing", Nrange); 617 return true; 618 } 609 619 int Nx = image->numCols; // Number of columns 610 620 int Ny = image->numRows; // Number of rows -
branches/eam_branches/ipp-20120905/psLib/src/math/psHistogram.c
r27553 r34735 58 58 psTrace("psLib.math", 3, "---- %s() begin ----\n", __func__); 59 59 psTrace("psLib.math", 5, "(lower, upper, n) is (%f, %f, %d)\n", lower, upper, n); 60 psAssert(n > 0, "Number of bins must be positive ");60 psAssert(n > 0, "Number of bins must be positive not %d", n); 61 61 psAssert(upper >= lower, "Bounds must be sensical"); 62 62 -
branches/eam_branches/ipp-20120905/psLib/src/math/psStats.c
r31152 r34735 764 764 goto escape; 765 765 } 766 if (!isfinite(max - min)) { 767 COUNT_WARNING(10, 100, "Range of of the input vector is too large: %lf.\n", (double)max - (double) min); 768 goto escape; 769 } 766 770 psTrace(TRACE, 6, "Data min/max is (%.2f, %.2f)\n", min, max); 767 771 … … 802 806 psTrace(TRACE, 6, "Numbins is %ld\n", numBins); 803 807 psTrace(TRACE, 6, "Creating a robust histogram from data range (%.2f - %.2f)\n", min, max); 808 809 // We are sometimes causing psHistogramAlloc to assert. 810 // Assert here so we can get more information about what is going wrong. 811 psAssert(numBins > 0, "Invalid numBins: %ld max: %f min: %f binSize: %f", numBins, max, min, binSize); 812 804 813 // Generate the histogram 805 814 histogram = psHistogramAlloc(min - 2.0*binSize, max + 2.0*binSize, numBins); … … 858 867 // if we did not mask anything, give up. 859 868 } 869 870 // We were causing psHistogramAlloc to assert. 871 // Assert here so we can get more information about what is going wrong. 872 psAssert(numBins > 0, "Invalid numBins %ld max: %f min: %f binSize: %f", numBins, max, min, binSize); 860 873 861 874 // ADD step 1: Convert the specific histogram to a cumulative histogram -
branches/eam_branches/ipp-20120905/psModules
- Property svn:mergeinfo changed
/trunk/psModules merged: 34598,34720
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20120905/psModules/src/objects
- Property svn:ignore
-
branches/eam_branches/ipp-20120905/psModules/src/objects/pmSourceIO.c
r34568 r34735 1028 1028 if (strcmp (xtension, "BINTABLE")) { 1029 1029 psWarning ("no binary table in extension %s, skipping\n", dataname); 1030 psFree(tableHeader); 1030 1031 return false; 1031 1032 } … … 1242 1243 if (!xtension) psAbort("cannot read table type"); 1243 1244 if (strcmp (xtension, "BINTABLE")) { 1245 psFree(tableHeader); 1244 1246 psWarning ("no binary table in extension %s, skipping\n", xsrcname); 1245 1247 return false; … … 1281 1283 if (strcmp (xtension, "BINTABLE")) { 1282 1284 psWarning ("no binary table in extension %s, skipping\n", extname); 1285 psFree(tableHeader); 1283 1286 return false; 1284 1287 } … … 1318 1321 if (strcmp (xtension, "BINTABLE")) { 1319 1322 psWarning ("no binary table in extension %s, skipping\n", extname); 1323 psFree(tableHeader); 1320 1324 return false; 1321 1325 } -
branches/eam_branches/ipp-20120905/psphot
- Property svn:mergeinfo changed
/trunk/psphot merged: 34704,34708,34721
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20120905/psphot/src
- Property svn:mergeinfo changed
/trunk/psphot/src merged: 34704,34708,34721
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20120905/psphot/src/psphotDeblendSatstars.c
r34570 r34735 498 498 psStatsInit (fluxStats); 499 499 500 while ( logR->data.F32[bin] < lRmax) {500 while (bin < logR->n && logR->data.F32[bin] < lRmax) { 501 501 if (isfinite(flux->data.F32[bin])) { 502 502 psVectorAppend (fluxVals, flux->data.F32[bin]); -
branches/eam_branches/ipp-20120905/psphot/src/psphotReplaceUnfit.c
r34570 r34735 35 35 // loop over the available readouts 36 36 for (int i = 0; i < num; i++) { 37 if (!psphotReplaceAllSourcesReadout (config, view, filerule, i, recipe, ignoreState)) { 38 psError (PSPHOT_ERR_CONFIG, false, "failed to replace all sources for %s entry %d", filerule, i); 39 return false; 40 } 37 // ignore return value. False means "sources not subtracted", not a failure condition 38 (void) psphotReplaceAllSourcesReadout (config, view, filerule, i, recipe, ignoreState); 41 39 } 42 40 return true; -
branches/eam_branches/ipp-20120905/psphot/src/psphotStackImageLoop.c
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20120905/psphot/src/psphotStackMatchPSFs.c
r34404 r34735 108 108 bool notMatched = psMetadataLookupBool(NULL, readoutOut->analysis, "NOT.PSF.MATCHED"); 109 109 if (notMatched) { 110 if (!readoutOut->image) { 111 // our images got freed in the matching process. Recreate them so that they 112 // are available when sources are copied to this readout. 113 readoutOut->image = psImageCopy(NULL, readoutSrc->image, PS_TYPE_F32); 114 if (readoutSrc->variance) { 115 psFree(readoutOut->variance); 116 readoutOut->variance = psImageCopy(NULL, readoutSrc->variance, PS_TYPE_F32); 117 } 118 if (readoutSrc->mask) { 119 psFree(readoutOut->mask); 120 readoutOut->mask = psImageCopy(NULL, readoutSrc->mask, PS_TYPE_IMAGE_MASK); 121 } 110 psFree(readoutOut->image); 111 readoutOut->image = psImageCopy(NULL, readoutSrc->image, PS_TYPE_F32); 112 psFree(readoutOut->variance); 113 if (readoutSrc->variance) { 114 readoutOut->variance = psImageCopy(NULL, readoutSrc->variance, PS_TYPE_F32); 115 } 116 psFree(readoutOut->mask); 117 if (readoutSrc->mask) { 118 readoutOut->mask = psImageCopy(NULL, readoutSrc->mask, PS_TYPE_IMAGE_MASK); 122 119 } 123 120 } -
branches/eam_branches/ipp-20120905/psphot/src/psphotStackMatchPSFsUtils.c
r34352 r34735 303 303 if (!pmSubtractionMatch(NULL, readoutOut, fake, readoutSrc, footprint, stride, regionSize, spacing, threshold, stampSources, stampsName, type, size, order, widthsCopy, orders, inner, ringsOrder, binning, penalty, optimum, optWidths, optOrder, optThresh, iter, rej, normFrac, sysError, skyErr, kernelError, covarFrac, maskVal, maskBad, maskPoor, poorFrac, badFrac, PM_SUBTRACTION_MODE_2)) { 304 304 int errorCode = psErrorCodeLast(); 305 if (errorCode == PM_ERR_SMALL_AREA ) {305 if (errorCode == PM_ERR_SMALL_AREA || errorCode == PM_ERR_STAMPS) { 306 306 // failed to match but, don't fault. Just drop this input from measurements that need the 307 307 // matched readout. 308 psErrorClear(); 308 309 rejectReadout = true; 309 psLogMsg("psphot", PS_LOG_WARN, "PSF match failed for input %d. Too few pixels.", index); 310 if (errorCode == PM_ERR_SMALL_AREA) { 311 psLogMsg("psphot", PS_LOG_WARN, "PSF match failed for input %d. Too few pixels.", index); 312 } else if (errorCode == PM_ERR_STAMPS) { 313 psLogMsg("psphot", PS_LOG_WARN, "PSF match failed for input %d. Failed to find stamps.", index); 314 } 310 315 } else { 311 316 psError(psErrorCodeLast(), false, "Unable to match images."); … … 324 329 325 330 if (rejectReadout) { 331 psMetadataAddBool(readoutSrc->analysis, PS_LIST_TAIL, "NOT.PSF.MATCHED", PS_META_REPLACE, "", true); 326 332 psMetadataAddBool(readoutOut->analysis, PS_LIST_TAIL, "NOT.PSF.MATCHED", PS_META_REPLACE, "", true); 327 333 } else { 334 psMetadataAddBool(readoutSrc->analysis, PS_LIST_TAIL, "NOT.PSF.MATCHED", PS_META_REPLACE, "", false); 328 335 psMetadataAddBool(readoutOut->analysis, PS_LIST_TAIL, "NOT.PSF.MATCHED", PS_META_REPLACE, "", false); 329 336 } -
branches/eam_branches/ipp-20120905/psphot/src/psphotStackReadout.c
r34570 r34735 409 409 } 410 410 } 411 // mark any inputs that we want to skip the matched apertures for 412 psphotStackSetInputsToSkip(config, view, STACK_CNV, true); 413 psphotStackSetInputsToSkip(config, view, STACK_OUT, true); 411 414 psphotRadialApertures (config, view, STACK_CNV, 0); // entry 0 == unmatched 412 415 psMemDump("extmeas"); 413 416 414 // mark any inputs that we want to skip the matched apertures for415 psphotStackSetInputsToSkip(config, view, STACK_OUT, true);416 417 417 418 int nRadialEntries = psphotStackMatchPSFsEntries(config, view, STACK_OUT); … … 439 440 } 440 441 } 442 psphotStackSetInputsToSkip(config, view, STACK_CNV, false); 441 443 psphotStackSetInputsToSkip(config, view, STACK_OUT, false); 442 444 -
branches/eam_branches/ipp-20120905/pstamp/scripts
- Property svn:mergeinfo changed
/trunk/pstamp/scripts merged: 34595,34597,34611,34716
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20120905/pstamp/scripts/psmkreq
r34466 r34735 52 52 my $comment; 53 53 54 my $survey_name = 'null';55 my $release = 'null';56 my $stack_type = 'null';57 my $bgrestore;58 my $jpeg;59 my $nocompress;60 61 54 my $missing_tools; 62 55 my $pstamp_request_file = can_run('pstamp_request_file') or (warn "Can't find required program pstamp_request_file" and $missing_tools = 1); … … 75 68 'width=i' => \$width, 76 69 'height=i' => \$height, 77 # pixcenter is deprecated 78 # 'pixcenter' => \$pixcenter, 70 'pixcenter' => \$pixcenter, 79 71 'arcseconds' => \$arcseconds, 80 72 'coord_mask=i' => \$coord_mask, … … 95 87 'comment=s' => \$comment, 96 88 97 # new columns for version 298 'survey=s' => \$survey_name,99 'release=s' => \$release,100 'stack_type' => \$stack_type,101 102 89 'option_mask=i' => \$option_mask, 103 90 'image' => \$image, 104 91 'mask' => \$mask, 105 92 'variance' => \$variance, 106 ' sources'=> \$cmf,93 'cmf' => \$cmf, 107 94 'psf' => \$psf, 108 95 'backmdl' => \$backmdl, … … 112 99 'do_not_wait' => \$no_wait, 113 100 114 # new options for version 2115 'no_compress' => \$nocompress,116 'bgrestore' => \$bgrestore,117 118 101 'verbose' => \$verbose, 119 102 'save-temps' => \$save_temps, … … 127 110 128 111 pod2usage( -msg => "Invalid job_type: $job_type", -exitval =>1 ) 129 unless ($job_type eq 'stamp' or $job_type eq 'get_image' or $job_type eq 'listtargets');130 131 if ( ($job_type eq 'stamp') or ($job_type eq 'listtargets')) {112 unless ($job_type eq 'stamp' or $job_type eq 'get_image'); 113 114 if ($job_type eq 'stamp') { 132 115 if (defined $list) { 133 116 pod2usage( -msg => "--ra --dec --x --y are not used with --list", -exitval =>1 ) … … 169 152 $id = 0 if !$id; 170 153 171 172 unless (($job_type eq 'listtargets' and $stage eq 'exposure') or $stage eq 'raw' or $stage eq 'chip' or $stage eq 'warp' or $stage eq 'diff' or $stage eq 'stack') { 173 die "$stage is not a valid stage for $job_type jobs\n"; 154 unless ($stage eq 'raw' or $stage eq 'chip' or $stage eq 'warp' or $stage eq 'diff' or $stage eq 'stack') { 155 die "$stage is not a valid value for stage\n"; 174 156 } 175 157 … … 225 207 } else { 226 208 $rows = []; 227 push @$rows, buildRow("", $comment, $x, $y, $filter, $mjd_min, $mjd_max , $survey_name, $release, $stack_type);209 push @$rows, buildRow("", $comment, $x, $y, $filter, $mjd_min, $mjd_max); 228 210 } 229 211 230 212 my ($tdf, $table_def_name) = tempfile ("/tmp/tabledef.XXXX", UNLINK => !$save_temps); 231 print $tdf "$req_name 2\n";213 print $tdf "$req_name 1\n"; 232 214 my $rownum = 0; 233 215 foreach my $row (@$rows) { 234 216 $rownum++; 235 217 my $line = "$rownum $row->{ra}\t$row->{dec}\t$width $height" 236 . " $coord_mask $job_type $option_mask $project $r ow->{survey_name} $row->{release} $req_type"218 . " $coord_mask $job_type $option_mask $project $req_type" 237 219 . " $stage $id $tess_id $component $data_group" 238 . " $row->{filter} $row->{mjd_min} $row->{mjd_max} $row->{stack_type}";220 . " $row->{filter} $row->{mjd_min} $row->{mjd_max}"; 239 221 240 222 if ($row->{comment} and $row->{comment} ne '') { … … 248 230 } 249 231 close $tdf; 250 251 system "cat $table_def_name";252 #exit 0;253 232 254 233 { … … 298 277 $row->{dec} = checkDEC($vals[1], $linenumber); 299 278 $row->{filter} = checkFilter($vals[2], $filter, $linenumber); 300 $row->{mjd_min} = checkMJD($vals[3], $mjd_min, $linenumber); 301 $row->{mjd_max} = checkMJD($vals[4], $mjd_max, $linenumber); 302 $row->{survey_name} = $vals[5]; 303 $row->{release} = $vals[6]; 304 $row->{stack_type} = $vals[7]; 279 $row->{mjd_min} = checkMJD($vals[3], $mjd_min, $linenumber);; 280 $row->{mjd_max} = checkMJD($vals[4], $mjd_max, $linenumber);; 305 281 $row->{comment} = $comment; 306 282 -
branches/eam_branches/ipp-20120905/pstamp/scripts/pstamp_checkdependent.pl
r34466 r34735 262 262 } elsif ($chip->{state} eq 'goto_cleaned') { 263 263 264 if ($chip->{data_state} eq 'full') { 265 # cleanup has been queued, but has not yet finished. (cleanup pantasks is probably stopped) 266 # Since this chip is in full go ahead and set the run to state update and change the label. 264 # we don't need to check for full data_state 265 # if ($chip->{data_state} eq 'full') { 266 { 267 # cleanup must not be running. Set state to update. If this chip is not 'full' it will be 268 # set to be updated the next time this script is invoked 267 269 # XXX: In the very rare case that this chip run is actually in the running cleanup pantasks 268 270 # queue things may get confused but we can live with that … … 341 343 } 342 344 } 345 346 my $tess_id = $metadata->{tess_id}; 347 if ($tess_id eq 'RINGS.V0') { 348 # we have stopped updating data from RINGS.V0 349 return $PSTAMP_GONE 350 } 343 351 if (($state =~ /error/) or ($state =~ /purged/) or ($state =~ /scrubbed/) or ($state eq 'drop') or 344 352 ($data_state =~ /error/) or ($data_state =~ /purged/) or ($data_state =~ /scrubbed/) or ($data_state eq 'drop')) { … … 365 373 my $skycell = $metadata; 366 374 367 if ($skycell->{state} eq 'goto_cleaned' and $skycell->{data_state} eq 'full') { 368 # cleanup has been queued, but hasn't been done. it's "safe" to set the state back to full 369 # XXX: seem comments in check_states_chip 375 # if ($skycell->{state} eq 'goto_cleaned' and $skycell->{data_state} eq 'full') { 376 if ($skycell->{state} eq 'goto_cleaned') { 377 # cleanup has been queued, but hasn't finished, probably due to an error or cleanup is not running. 378 # It's "safe" to set the state to update. If the skycell is not full it will be set to update 379 # the next time this task runs 370 380 my $command = "$warptool -updaterun -set_state update -warp_id $warp_id"; 371 381 $command .= " -set_label $rlabel" if $rlabel; … … 468 478 my $skycell_id = $skycell->{skycell_id}; 469 479 470 if ($metadata->{state} eq 'goto_cleaned' and $metadata->{data_state} eq 'full') { 480 # if ($metadata->{state} eq 'goto_cleaned' and $metadata->{data_state} eq 'full') { 481 if ($metadata->{state} eq 'goto_cleaned') { 482 # cleanup must not be running. Set state to update. If the skycell is not 'full' it will be 483 # set to be updated the next time this script is invoked 471 484 print "changing state of diffRun $diff_id from goto_cleaned to update. skycell $skycell_id is full\n"; 472 485 my $command = "$difftool -updaterun -set_state update -diff_id $diff_id"; -
branches/eam_branches/ipp-20120905/pstamp/src/ppstampArguments.c
r33504 r34735 25 25 fprintf(stderr, " [-mask mk_image] : mask image\n"); 26 26 fprintf(stderr, " [-variance var_image] : variance image\n"); 27 fprintf(stderr, " [-sources sources] : sources cmf (ignored for chip stage)\n"); 27 28 fprintf(stderr, " [-stage stage] : stage of input image (raw, chip, warp, stack, diff)\n"); 28 29 fprintf(stderr, " [-write_jpeg] : write a JPEG format of the image stamp\n"); 30 fprintf(stderr, " [-write_cmf] : create an output cmf with the sources overlapping the stamp\n"); 31 fprintf(stderr, " [-wholefile] : ignore the region of interest and process the entire input image\n"); 29 32 // fprintf(stderr, " [-no_censor_masked] : do not set masked pixels to NAN\n"); 30 33 fprintf(stderr, "\n"); … … 92 95 options->stage = psStringCopy(argv[argnum]); 93 96 psArgumentRemove(argnum, &argc, argv); 97 } else { 98 // Should we require this? 99 options->stage = psStringCopy("unknown"); 94 100 } 95 101 if ((argnum = psArgumentGet(argc, argv, "-write_jpeg"))) { 96 102 psArgumentRemove(argnum, &argc, argv); 97 103 options->writeJPEG = true; 98 } else { 99 options->writeJPEG = false; 104 } 105 if ((argnum = psArgumentGet(argc, argv, "-write_cmf"))) { 106 psArgumentRemove(argnum, &argc, argv); 107 options->writeCMF = true; 100 108 } 101 109 102 pmConfigFileSetsMD(config->arguments, &argc, argv, "ASTROM", "-astrom", "-astromlist"); 110 // XXX: Note: the various list options have never been tested with ppstamp to my knowledge 111 bool gotAstrom = false; 112 if ((argnum = psArgumentGet(argc, argv, "-astrom"))) { 113 gotAstrom = true; 114 pmConfigFileSetsMD(config->arguments, &argc, argv, "ASTROM", "-astrom", "-astromlist"); 115 } 103 116 pmConfigFileSetsMD(config->arguments, &argc, argv, "MASK", "-mask", "-masklist"); 104 117 pmConfigFileSetsMD(config->arguments, &argc, argv, "VARIANCE", "-variance", "-variancelist"); 105 118 106 // the input file is a required argument; if not found, we will exit 119 if ((argnum = psArgumentGet(argc, argv, "-sources"))) { 120 pmConfigFileSetsMD(config->arguments, &argc, argv, "SOURCES", "-sources", "-sourceslist"); 121 // supplying a sources file implies that we want to save the output 122 options->writeCMF = true; 123 } else if (options->writeCMF && !gotAstrom) { 124 // if we didn't get a sources file but the user wanted us to write the sources we must 125 // have an astrometry file supplied 126 // XXX: Is this too restrictive? Could the sources be contained in say the input file? 127 psError(PSTAMP_ERR_ARGUMENTS, true, "cannot write cmf file unless input sources are supplied\n"); 128 usage(); 129 } 130 131 // the input image file is a required argument; if not found, we will exit 107 132 bool status = pmConfigFileSetsMD (config->arguments, &argc, argv, "INPUT", "-file", "-list"); 108 133 if (!status) { … … 126 151 } 127 152 128 // finally the o utput file153 // finally the only argument left must be output outroot 129 154 if (argc < 2) { 130 155 psError(PSTAMP_ERR_ARGUMENTS, true, "must specify OUTPUT\n"); … … 135 160 } 136 161 137 // Add the output image (which remains on the command-line) to the arguments list138 162 psMetadataAddStr(config->arguments, PS_LIST_TAIL, "OUTPUT", 0, "Name of the output image", argv[1]); 139 140 // psMetadataPrint(stdout, config->arguments,0);141 163 142 164 return config; -
branches/eam_branches/ipp-20120905/pstamp/src/ppstampMakeStamp.c
r33504 r34735 19 19 static void chipToSky(pmAstromObj *pt, pmFPA *fpa, pmChip *chip); 20 20 static bool setMaskedToNAN(pmConfig *config, psImage *image, psImage *mask, psImage *variance); 21 static bool copySources(pmReadout *outputReadout, pmReadout *inputReadout, pmReadout *astromReadout, psRegion extractRegion); 21 22 22 23 // convert the input chip's transforms to the output … … 80 81 } 81 82 82 static bool copyMetadata(pmFPAfile *output, pmFPAfile *input, pmChip *inChip, ppstampOptions *options, pmAstromObj *center )83 static bool copyMetadata(pmFPAfile *output, pmFPAfile *input, pmChip *inChip, ppstampOptions *options, pmAstromObj *center, pmFPAfile *astrom, pmFPAview *inView) 83 84 { 84 85 pmChip *outChip; 85 pmFPAview * view = pmFPAviewAlloc(0);86 pmFPAview *outView = pmFPAviewAlloc(0); 86 87 87 88 // our output file has a single chip 88 view->chip = 0; 89 outChip = pmFPAviewThisChip(view, output->fpa); 90 psFree(view); 91 92 // copy data from the input chip header to the output. 89 outView->chip = 0; 90 outChip = pmFPAviewThisChip(outView, output->fpa); 91 psFree(outView); 92 pmHDU *outHDU = pmHDUGetHighest(output->fpa, outChip, NULL); 93 94 // copy data from the input's chip header to the output. 93 95 // since some of the keywords might be duplicated we may not want to copy both 94 96 95 pmHDU *inHDU = pmHDUFromChip(inChip); 96 pmHDU *outHDU = pmHDUGetHighest(output->fpa, outChip, NULL); 97 pmHDU *inHDU = NULL; 98 if (strcmp(options->stage, "raw") && input != astrom) { 99 // Copy the header from the astrometry file since it contains the psphot and psastro results 100 pmChip *astromChip = pmFPAviewThisChip(inView, astrom->fpa); 101 inHDU = pmHDUFromChip(astromChip); 102 } else { 103 inHDU = pmHDUFromChip(inChip); 104 } 97 105 98 106 if (inHDU->header) { … … 102 110 } 103 111 104 // copy the fpa concepts112 // copy the fpa and chip concepts 105 113 pmConceptsCopyFPA(output->fpa, input->fpa, false, false); 114 // Needed to preserve FPA.ZP 106 115 pmConceptsCopyChip(outChip, inChip, false); 116 117 // copy the cell concepts (needed to get CELL.EXPOSURE which gets used to set EXPTIME) 107 118 pmCell *outCell = outChip->cells->data[0]; // The only output cell 108 119 … … 122 133 } 123 134 124 // If input had WCS convert it for stamp135 // If input had WCS convert it for the new image coordinate system of our stamp 125 136 if (input->fpa->toSky) { 126 137 // copy the input fpa's transforms … … 135 146 } 136 147 } else { 137 psWarning("No WCS present in input\n"); 138 } 139 148 psLogMsg("ppstampMakeStamp", PS_LOG_WARN, "No WCS present in input."); 149 } 150 151 // Save our specific metadata 140 152 psMetadataAddF64(outHDU->header, PS_LIST_TAIL, "RA_DEG", PS_META_REPLACE, "Right Ascension of stamp center", RAD_TO_DEG(center->sky->r)); 141 153 psMetadataAddF64(outHDU->header, PS_LIST_TAIL, "DEC_DEG", PS_META_REPLACE, "Declination of stamp center", RAD_TO_DEG(center->sky->d)); 154 155 // XXX: TODO: save the region of interest boundary and the offset to be applied. 156 // XXX: Gene thinks that there may be a way to handle this in the WCS 157 158 // Now a few sanity checks 159 // Make sure zero point in the fpa concepts matches the observed value in the input header 160 bool status; 161 float zpt_obs = psMetadataLookupF32(&status, outHDU->header, "ZPT_OBS"); 162 if (status) { 163 psMetadataAddF32(output->fpa->concepts, PS_LIST_TAIL, "FPA.ZP", PS_META_REPLACE, "Magnitude zero point", zpt_obs); 164 } 142 165 143 166 ppstampVersionMetadata(outHDU->header, options); … … 324 347 325 348 if (options->censorMasked && !setMaskedToNAN(config, outReadout->image, outReadout->mask, outReadout->variance)) { 326 psError(PS_ERR_UNKNOWN, false, "failed to create postage stamp mask image\n");327 status = false;328 break;349 psError(PS_ERR_UNKNOWN, false, "failed to create postage stamp mask image\n"); 350 status = false; 351 break; 329 352 } 330 353 } … … 335 358 status = true; 336 359 360 if (options->writeCMF) { 361 pmReadout *astromReadout = NULL; 362 if (astrom->fpa != input->fpa) { 363 astromReadout = pmFPAviewThisReadout(srcView, astrom->fpa); 364 } 365 if (!copySources(outReadout, astromReadout, astromReadout, extractRegion)) { 366 psError(PS_ERR_UNKNOWN, false, "failed to extract sources from region of interest.\n"); 367 status = false; 368 break; 369 } 370 } 371 337 372 psFree(outReadout); // drop reference 338 373 } … … 341 376 342 377 if (status) { 343 status = copyMetadata(output, input, inChip, options, center); 378 // For raw stage we need to do more work to build a proper header 379 status = copyMetadata(output, input, inChip, options, center, astrom, view); 344 380 } 345 381 return status ? PS_EXIT_SUCCESS : PS_EXIT_UNKNOWN_ERROR; … … 428 464 double dy = 0.5 * options->roip.dDEC / fpa->toSky->Ys; 429 465 430 if (dx > 5000) { 431 fprintf(stderr, "requested width %f too large reducing to 5000\n", dx); 432 dx = 5000; 433 } 434 if (dy > 5000) { 435 fprintf(stderr, "requested height %f too large reducing to 5000\n", dy); 436 dy = 5000; 466 // XXX: why do we limit this? 467 if (dx > 8000) { 468 psWarning( "requested width %f too large reducing to 8000\n", dx); 469 dx = 8000; 470 } 471 if (dy > 8000) { 472 psWarning( "requested height %f too large reducing to 8000\n", dy); 473 dy = 8000; 437 474 } 438 475 … … 480 517 ppstampOverlap returnval = PPSTAMP_OFF; 481 518 482 // fprintf(stderr, "ppstampChipBounds: %s\n", psRegionToString(*chipBounds));483 484 519 // set up the astrometry 485 520 pmHDU *hdu = pmFPAviewThisHDU(view, astrom->fpa); … … 498 533 } 499 534 } else { 500 // we use a default FPA pixel scale of 1.0501 535 if (!pmAstromReadWCS (input->fpa, chip, hdu->header, 1.0) && mustHaveAstrometry) { 502 536 psError(PS_ERR_UNKNOWN, false, "Unable to read WCS astrometry for input FPA."); … … 537 571 center->chip->yErr = 0; 538 572 onChip = true; 539 chipToSky(center, input->fpa, chip); 573 if (input->fpa->toSky) { 574 chipToSky(center, input->fpa, chip); 575 } 540 576 } 541 577 } … … 550 586 int width = options->roip.dX; 551 587 int height = options->roip.dY; 552 if (width > 7000) {553 fprintf(stderr, "requested width %d too large reducing to 7000\n", width);554 width = 7000;588 if (width > 8000) { 589 psWarning( "requested width %d too large reducing to 8000\n", width); 590 width = 8000; 555 591 } 556 if (height > 7000) {557 fprintf(stderr, "requested height %d too large reducing to 7000\n", height);558 height = 7000;592 if (height > 8000) { 593 psWarning( "requested height %d too large reducing to 8000\n", height); 594 height = 8000; 559 595 } 560 596 … … 675 711 676 712 if (!foundOverlap && (returnval == PS_EXIT_SUCCESS)) { 677 fprintf(stderr,"ROI not found in input\n");713 psWarning( "ROI not found in input\n"); 678 714 returnval = PSTAMP_NO_OVERLAP; 679 715 } … … 739 775 } 740 776 741 // XXX: this shouldn't be a fprintf 742 fprintf(stderr, "Censored %ld masked pixels\n", numCensored); 777 psLogMsg("ppstamp", PS_LOG_DETAIL, "Censored %ld masked pixels\n", numCensored); 743 778 744 779 return true; 745 780 } 781 782 static bool copySources(pmReadout *outReadout, pmReadout *inReadout, pmReadout *astromReadout, psRegion extractRegion) { 783 bool status; 784 785 // first look for detections in the input readout. Those would have come from the -sources file 786 pmDetections *inDetections = psMetadataLookupPtr (&status, inReadout->analysis, "PSPHOT.DETECTIONS"); 787 if (!inDetections) { 788 // No detections on the input readout. Try the astrometry readout if supplied. 789 if (astromReadout) { 790 inDetections = psMetadataLookupPtr (&status, astromReadout->analysis, "PSPHOT.DETECTIONS"); 791 if (!inDetections) { 792 psLogMsg("ppstampMakeStamp", PS_LOG_WARN, "no detections found on input or astrometry readout\n"); 793 return false; 794 } else { 795 psLogMsg("ppstampMakeStamp", PS_LOG_INFO, "using detections from astrom file\n"); 796 } 797 } else { 798 psLogMsg("ppstampMakeStamp", PS_LOG_WARN, "no detections found on input readout\n"); 799 return false; 800 } 801 } 802 if (!inDetections->allSources) { 803 psLogMsg("ppstampMakeStamp", PS_LOG_WARN, "no sources array found on detections structure\n"); 804 return false; 805 } 806 807 // Ok we have sources, allocate a detections structure and copy them to the output readout 808 psArray *inSources = inDetections->allSources; 809 810 pmDetections *outDetections = pmDetectionsAlloc(); 811 psMetadataAddPtr (outReadout->analysis, PS_LIST_TAIL, "PSPHOT.DETECTIONS", PS_META_REPLACE | PS_DATA_UNKNOWN, 812 "psphot detections", outDetections); 813 814 psArray *outSources = outDetections->allSources = psArrayAllocEmpty( 100 ); 815 816 // include sources that are off the stamp by just a little bit 817 #define EXPAND_SIZE 16 818 psRegion sourceRegion = extractRegion; 819 sourceRegion.x0 -= EXPAND_SIZE; 820 sourceRegion.y0 -= EXPAND_SIZE; 821 sourceRegion.x1 += EXPAND_SIZE; 822 sourceRegion.y1 += EXPAND_SIZE; 823 824 for (int i = 0; i < inSources->n; i++ ) { 825 pmSource *src = inSources->data[i]; 826 827 float x = src->peak->xf; 828 float y = src->peak->yf; 829 if (x < sourceRegion.x0 || x > sourceRegion.x1 || 830 y < sourceRegion.y0 || y > sourceRegion.y1) { 831 continue; 832 } 833 psArrayAdd(outSources, 100, src); 834 } 835 836 return true; 837 } -
branches/eam_branches/ipp-20120905/pstamp/src/ppstampOptions.c
r33504 r34735 32 32 options->censorMasked = false; 33 33 options->writeJPEG = false; 34 options->writeCMF = false; 34 35 options->nocompress = false; 35 36 options->wholeFile = false; -
branches/eam_branches/ipp-20120905/pstamp/src/ppstampOptions.h
r33504 r34735 14 14 bool censorMasked; 15 15 bool writeJPEG; 16 bool writeCMF; 16 17 bool nocompress; 17 18 // -
branches/eam_branches/ipp-20120905/pstamp/src/ppstampParseCamera.c
r33504 r34735 120 120 } 121 121 122 // Set up the input and output sources files if needed 123 if (options->writeCMF) { 124 bool status; 125 126 // see if -sources file was supplied. 127 // If so define the file. 128 psPtr sourcesFile = psMetadataLookupStr(&status, config->arguments, "SOURCES"); 129 if (sourcesFile) { 130 pmFPAfile *sources = pmFPAfileBindFromArgs(&status, input, config, "PPSTAMP.INPUT.SOURCES", "SOURCES"); 131 if (!status) { 132 psError(psErrorCodeLast(), false, "Failed to load file definition for PPSTAMP.INPUT.SOURCES"); 133 return false; 134 } 135 if (!sources && !astrom) { 136 psError(psErrorCodeLast(), false, "Failed to define input sources file"); 137 return false; 138 } 139 } else { 140 psLogMsg ("ppstamp", PS_LOG_INFO, "output sources file requested but no input supplied. Will try the supplied astrometry file.\n"); 141 } 142 143 pmFPAfile *outputSources = NULL; 144 outputSources = pmFPAfileDefineSkycell(config, output->fpa, "PPSTAMP.OUTPUT.SOURCES"); 145 if (!outputSources) { 146 psError(psErrorCodeLast(), false, "Failed to define output sources file"); 147 return false; 148 } 149 outputSources->save = true; 150 } 151 122 152 pmFPAfile *chipImage = pmFPAfileDefineChipMosaic(config, input->fpa, "PPSTAMP.CHIP"); 123 153 if (!chipImage) { -
branches/eam_branches/ipp-20120905/pstamp/src/pstamp.h
r28291 r34735 26 26 27 27 // values for options mask. 28 #define PSTAMP_SELECT_IMAGE 1 29 #define PSTAMP_SELECT_MASK 2 30 #define PSTAMP_SELECT_WEIGHT 4 31 #define PSTAMP_SELECT_CMF 8 32 #define PSTAMP_SELECT_PSF 16 33 #define PSTAMP_SELECT_BACKMDL 32 34 #define PSTAMP_SELECT_INVERSE 1024 35 #define PSTAMP_SELECT_UNCONV 2048 36 #define PSTAMP_USE_IMFILE_ID 16384 28 #define PSTAMP_SELECT_IMAGE 1 29 #define PSTAMP_SELECT_MASK 2 30 #define PSTAMP_SELECT_WEIGHT 4 31 #define PSTAMP_SELECT_SOURCES 8 32 #define PSTAMP_SELECT_CMF 8 33 #define PSTAMP_SELECT_PSF 16 34 #define PSTAMP_SELECT_BACKMDL 32 35 #define PSTAMP_SELECT_JPEG 64 36 // unused 128 37 // unused 256 38 #define PSTAMP_SELECT_UNCOMPRESSED 512 39 #define PSTAMP_SELECT_INVERSE 1024 40 #define PSTAMP_SELECT_UNCONV 2048 41 #define PSTAMP_RESTORE_BACKGROUND 4096 42 // unused 8192 43 #define PSTAMP_USE_IMFILE_ID 16384 37 44 38 #define PSTAMP_NO_WAIT_FOR_UPDATE 32768 45 #define PSTAMP_NO_WAIT_FOR_UPDATE 32768 46 #define PSTAMP_REQUEST_UNCENSORED 0x10000 47 #define PSTAMP_REQUIRE_UNCENSORED 0x20000 39 48 40 49 #define PSTAMP_CENTER_IN_PIXELS 1 -
branches/eam_branches/ipp-20120905/psvideophot
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20120905/tools/fixburntool
r34364 r34735 6 6 use strict; 7 7 use warnings; 8 8 9 use Carp; 9 10 use IPC::Cmd 0.36 qw( can_run run ); … … 28 29 my $class_id; 29 30 my $dbname = 'gpc1'; 30 my $verbose = 1;31 my $verbose = 0; 31 32 GetOptions( 32 33 'exp_id|e=s' => \$exp_id, … … 35 36 ) or pod2usage( 2 ); 36 37 37 die "usage: $0 (exp_id)(class_id)\n" unless $class_id and $exp_id;38 die "usage: $0 --exp_id (exp_id) --class_id (class_id)\n" unless $class_id and $exp_id; 38 39 39 40 $regtool .= " -dbname gpc1 -exp_id $exp_id -class_id $class_id"; … … 45 46 my $command = "$regtool -processedimfile"; 46 47 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 47 run(command => $command, verbose => 0);48 run(command => $command, verbose => $verbose); 48 49 unless ($success) { 49 50 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 68 69 my $command = "neb-stat $table"; 69 70 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 70 run(command => $command, verbose => 0);71 run(command => $command, verbose => $verbose); 71 72 if ($success) { 72 73 $table_exists = 1; … … 96 97 # print "$left $num $end\n"; 97 98 98 99 99 my $prev = $num - 1; 100 100 my $prev_name = sprintf "$left%04d$end", $prev; … … 105 105 # print "$prev_name $prev_uri\n"; 106 106 107 108 107 { 109 108 my $command = "$burntool --continue 10 --exp_id $exp_id --class_id $class_id --this_uri $uri --previous_uri $prev_uri"; 110 109 print "$command\n"; 111 110 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 112 run(command => $command, verbose => 0);111 run(command => $command, verbose => 1); 113 112 unless ($success) { 114 113 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); -
branches/eam_branches/ipp-20120905/tools/runwarpskycell.pl
r33923 r34735 16 16 17 17 my $dbname = "gpc1"; 18 my ($warp_id, $skycell_id, $threads, $update, $redirect, $pretend, $save_temps );18 my ($warp_id, $skycell_id, $threads, $update, $redirect, $pretend, $save_temps, $outdir); 19 19 my $zaplog; 20 20 … … 26 26 'zaplog' => \$zaplog, 27 27 'redirect-output' => \$redirect, 28 'outdir=s' => \$outdir, 28 29 'update' => \$update, 29 30 'dbname=s' => \$dbname, … … 74 75 } else { 75 76 die "unexpected warpRun.state found: $state\n"; 77 } 78 79 if ($outdir) { 80 my $base = basename($path_base); 81 $path_base = "$outdir/$base"; 82 print "changing path_base to $path_base\n"; 76 83 } 77 84
Note:
See TracChangeset
for help on using the changeset viewer.
