Changeset 34403
- Timestamp:
- Sep 5, 2012, 4:16:36 PM (14 years ago)
- Location:
- trunk/psModules
- Files:
-
- 64 edited
- 2 copied
-
. (modified) (1 prop)
-
src/camera/pmFPAfileIO.c (modified) (1 diff)
-
src/camera/pmReadoutFake.c (modified) (1 diff)
-
src/extras/pmVisual.c (modified) (1 diff)
-
src/imcombine/pmPSFEnvelope.c (modified) (1 diff)
-
src/imcombine/pmSubtractionStamps.c (modified) (1 diff)
-
src/objects/Makefile.am (modified) (5 diffs)
-
src/objects/mksource.pl (modified) (6 diffs)
-
src/objects/models/pmModel_DEV.c (modified) (1 diff)
-
src/objects/models/pmModel_EXP.c (modified) (1 diff)
-
src/objects/models/pmModel_GAUSS.c (modified) (1 diff)
-
src/objects/models/pmModel_PGAUSS.c (modified) (1 diff)
-
src/objects/models/pmModel_PS1_V1.c (modified) (1 diff)
-
src/objects/models/pmModel_QGAUSS.c (modified) (1 diff)
-
src/objects/models/pmModel_RGAUSS.c (modified) (1 diff)
-
src/objects/models/pmModel_SERSIC.c (modified) (1 diff)
-
src/objects/models/pmModel_TRAIL.c (modified) (1 diff)
-
src/objects/pmDetEff.c (modified) (1 diff)
-
src/objects/pmGrowthCurve.c (modified) (1 diff)
-
src/objects/pmGrowthCurveGenerate.c (modified) (1 diff)
-
src/objects/pmModelUtils.c (modified) (1 diff)
-
src/objects/pmPCM_MinimizeChisq.c (modified) (1 diff)
-
src/objects/pmPCMdata.c (modified) (1 diff)
-
src/objects/pmPSF.c (modified) (1 diff)
-
src/objects/pmPSF_IO.c (modified) (1 diff)
-
src/objects/pmPSFtry.c (modified) (1 diff)
-
src/objects/pmPSFtryFitEXT.c (modified) (1 diff)
-
src/objects/pmPSFtryFitPSF.c (modified) (1 diff)
-
src/objects/pmPSFtryMakePSF.c (modified) (1 diff)
-
src/objects/pmPSFtryMetric.c (modified) (1 diff)
-
src/objects/pmPSFtryModel.c (modified) (1 diff)
-
src/objects/pmPhotObj.c (modified) (1 diff)
-
src/objects/pmSource.c (modified) (5 diffs)
-
src/objects/pmSource.h (modified) (1 diff)
-
src/objects/pmSourceContour.c (modified) (1 diff)
-
src/objects/pmSourceExtendedPars.c (modified) (1 diff)
-
src/objects/pmSourceFitModel.c (modified) (1 diff)
-
src/objects/pmSourceFitPCM.c (modified) (1 diff)
-
src/objects/pmSourceFitSet.c (modified) (1 diff)
-
src/objects/pmSourceGroups.c (modified) (1 diff)
-
src/objects/pmSourceIO.c (modified) (6 diffs)
-
src/objects/pmSourceIO.h (modified) (1 diff)
-
src/objects/pmSourceIO_CMF.c.in (modified) (14 diffs)
-
src/objects/pmSourceIO_CMP.c (modified) (1 diff)
-
src/objects/pmSourceIO_MatchedRefs.c (modified) (1 diff)
-
src/objects/pmSourceIO_OBJ.c (modified) (1 diff)
-
src/objects/pmSourceIO_PS1_CAL_0.c (modified) (1 diff)
-
src/objects/pmSourceIO_PS1_DEV_0.c (modified) (1 diff)
-
src/objects/pmSourceIO_PS1_DEV_1.c (modified) (1 diff)
-
src/objects/pmSourceIO_RAW.c (modified) (1 diff)
-
src/objects/pmSourceIO_SMPDATA.c (modified) (1 diff)
-
src/objects/pmSourceIO_SX.c (modified) (1 diff)
-
src/objects/pmSourceMasks.h (modified) (2 diffs)
-
src/objects/pmSourceMatch.c (modified) (1 diff)
-
src/objects/pmSourceMoments.c (modified) (1 diff)
-
src/objects/pmSourceOutputs.c (modified) (2 diffs)
-
src/objects/pmSourcePhotometry.c (modified) (1 diff)
-
src/objects/pmSourcePlotApResid.c (modified) (1 diff)
-
src/objects/pmSourcePlotMoments.c (modified) (1 diff)
-
src/objects/pmSourcePlotPSFModel.c (modified) (1 diff)
-
src/objects/pmSourceSatstar.c (copied) (copied from branches/eam_branches/ipp-20120805/psModules/src/objects/pmSourceSatstar.c )
-
src/objects/pmSourceSatstar.h (copied) (copied from branches/eam_branches/ipp-20120805/psModules/src/objects/pmSourceSatstar.h )
-
src/objects/pmSourceSky.c (modified) (1 diff)
-
src/objects/pmSourceUtils.c (modified) (1 diff)
-
src/objects/pmSourceVisual.c (modified) (1 diff)
-
src/psmodules.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120805/psModules (added) merged: 34367,34374-34376,34379,34381,34383,34396
- Property svn:mergeinfo changed
-
trunk/psModules/src/camera/pmFPAfileIO.c
r33690 r34403 38 38 #include "pmSourceExtendedPars.h" 39 39 #include "pmSourceDiffStats.h" 40 #include "pmSourceSatstar.h" 40 41 #include "pmSource.h" 41 42 #include "pmSourceFitModel.h" -
trunk/psModules/src/camera/pmReadoutFake.c
r34085 r34403 26 26 #include "pmSourceExtendedPars.h" 27 27 #include "pmSourceDiffStats.h" 28 #include "pmSourceSatstar.h" 28 29 #include "pmSource.h" 29 30 #include "pmSourceFitModel.h" -
trunk/psModules/src/extras/pmVisual.c
r31153 r34403 40 40 // #include "pmSourceExtendedPars.h" 41 41 // #include "pmSourceDiffStats.h" 42 #include "pmSourceSatstar.h" 42 43 // #include "pmSource.h" 43 44 // #include "pmSourceFitModel.h" -
trunk/psModules/src/imcombine/pmPSFEnvelope.c
r32563 r34403 26 26 #include "pmSourceExtendedPars.h" 27 27 #include "pmSourceDiffStats.h" 28 #include "pmSourceSatstar.h" 28 29 #include "pmSource.h" 29 30 #include "pmSourceFitModel.h" -
trunk/psModules/src/imcombine/pmSubtractionStamps.c
r33435 r34403 25 25 #include "pmSourceExtendedPars.h" 26 26 #include "pmSourceDiffStats.h" 27 #include "pmSourceSatstar.h" 27 28 #include "pmSource.h" 28 29 -
trunk/psModules/src/objects/Makefile.am
r34259 r34403 26 26 pmSourceDiffStats.c \ 27 27 pmSourceExtendedPars.c \ 28 pmSourceSatstar.c \ 28 29 pmSourceUtils.c \ 29 30 pmSourceSky.c \ … … 47 48 pmSourceIO_CMF_PS1_V4.c \ 48 49 pmSourceIO_CMF_PS1_SV1.c \ 50 pmSourceIO_CMF_PS1_SV2.c \ 49 51 pmSourceIO_CMF_PS1_DV1.c \ 50 52 pmSourceIO_CMF_PS1_DV2.c \ 53 pmSourceIO_CMF_PS1_DV3.c \ 51 54 pmSourceIO_MatchedRefs.c \ 52 55 pmSourcePlots.c \ … … 99 102 pmSourceDiffStats.h \ 100 103 pmSourceExtendedPars.h \ 104 pmSourceSatstar.h \ 101 105 pmSourceUtils.h \ 102 106 pmSourceSky.h \ … … 133 137 134 138 # pmSourceID_CMF_* functions use a common framework 135 BUILT_SOURCES = pmSourceIO_CMF_PS1_V1.c pmSourceIO_CMF_PS1_V2.c pmSourceIO_CMF_PS1_V3.c pmSourceIO_CMF_PS1_DV1.c pmSourceIO_CMF_PS1_DV2.c pmSourceIO_CMF_PS1_SV1.c 139 BUILT_SOURCES = \ 140 pmSourceIO_CMF_PS1_V1.c \ 141 pmSourceIO_CMF_PS1_V2.c \ 142 pmSourceIO_CMF_PS1_V3.c \ 143 pmSourceIO_CMF_PS1_V4.c \ 144 pmSourceIO_CMF_PS1_DV1.c \ 145 pmSourceIO_CMF_PS1_DV2.c \ 146 pmSourceIO_CMF_PS1_DV3.c \ 147 pmSourceIO_CMF_PS1_SV1.c \ 148 pmSourceIO_CMF_PS1_SV2.c 136 149 137 150 pmSourceIO_CMF_PS1_V1.c : pmSourceIO_CMF.c.in mksource.pl … … 153 166 mksource.pl pmSourceIO_CMF.c.in PS1_DV2 pmSourceIO_CMF_PS1_DV2.c 154 167 168 pmSourceIO_CMF_PS1_DV3.c : pmSourceIO_CMF.c.in mksource.pl 169 mksource.pl pmSourceIO_CMF.c.in PS1_DV3 pmSourceIO_CMF_PS1_DV3.c 170 155 171 pmSourceIO_CMF_PS1_SV1.c : pmSourceIO_CMF.c.in mksource.pl 156 172 mksource.pl pmSourceIO_CMF.c.in PS1_SV1 pmSourceIO_CMF_PS1_SV1.c 157 173 174 pmSourceIO_CMF_PS1_SV2.c : pmSourceIO_CMF.c.in mksource.pl 175 mksource.pl pmSourceIO_CMF.c.in PS1_SV2 pmSourceIO_CMF_PS1_SV2.c 176 158 177 # EXTRA_DIST = pmErrorCodes.h.in pmErrorCodes.dat pmErrorCodes.c.in -
trunk/psModules/src/objects/mksource.pl
r34259 r34403 14 14 # validate the cmfmode 15 15 16 # see if we can add in PS1_DV* and PS1_SV* as well... 17 %cmfmodes = ("PS1_V1", 1, 18 "PS1_V2", 2, 19 "PS1_V3", 3, 20 "PS1_V4", 4, 16 # keep the series (V1,SV1,DV1) separate) 17 %cmfmodes_v = ("PS1_V1", 1, 18 "PS1_V2", 2, 19 "PS1_V3", 3, 20 "PS1_V4", 4, 21 ); 22 %cmfmodes_dv = ("PS1_DV1", 1, 23 "PS1_DV2", 2, 24 "PS1_DV3", 3, 25 ); 26 %cmfmodes_sv = ("PS1_SV1", 1, 27 "PS1_SV2", 2, 21 28 ); 22 29 … … 118 125 if ($rule =~ m|^>=|) { 119 126 print ">= rule: $rule\n" if $DEBUG; 120 if ($cmfmodes{$cmfmode} == 0) { next; }127 # find the cmfmode series (v, dv, sv) 121 128 $realrule = substr($rule,2); 122 $thisLevel = $cmfmodes{$realrule}; 123 $myLevel = $cmfmodes{$cmfmode}; 129 %series = &cmf_series ($realrule); 130 if (! %series) { next; } 131 if ($series{$cmfmode} == 0) { next; } 132 $thisLevel = $series{$realrule}; 133 $myLevel = $series{$cmfmode}; 124 134 print "levels: $cmfmode, $realrule, $myLevel, $thisLevel\n" if $DEBUG; 125 135 if ($myLevel >= $thisLevel) { $keepLine = 1; } … … 130 140 if ($rule =~ m|^>|) { 131 141 print "> rule: $rule\n" if $DEBUG; 132 if ($cmfmodes{$cmfmode} == 0) { next; }142 # find the cmfmode series (v, dv, sv) 133 143 $realrule = substr($rule,1); 134 $thisLevel = $cmfmodes{$realrule}; 135 $myLevel = $cmfmodes{$cmfmode}; 144 %series = &cmf_series ($realrule); 145 if (! %series) { next; } 146 if ($series{$cmfmode} == 0) { next; } 147 $thisLevel = $series{$realrule}; 148 $myLevel = $series{$cmfmode}; 136 149 print "levels: $cmfmode, $realrule, $myLevel, $thisLevel\n" if $DEBUG; 137 150 if ($myLevel > $thisLevel) { $keepLine = 1; } … … 142 155 if ($rule =~ m|^<=|) { 143 156 print "<= rule: $rule\n" if $DEBUG; 144 if ($cmfmodes{$cmfmode} == 0) { next; }157 # find the cmfmode series (v, dv, sv) 145 158 $realrule = substr($rule,2); 146 $thisLevel = $cmfmodes{$realrule}; 147 $myLevel = $cmfmodes{$cmfmode}; 159 %series = &cmf_series ($realrule); 160 if (! %series) { next; } 161 if ($series{$cmfmode} == 0) { next; } 162 $thisLevel = $series{$realrule}; 163 $myLevel = $series{$cmfmode}; 148 164 print "levels: $cmfmode, $realrule, $myLevel, $thisLevel\n" if $DEBUG; 149 165 if ($myLevel <= $thisLevel) { $keepLine = 1; } … … 154 170 if ($rule =~ m|^<|) { 155 171 print "< rule: $rule\n" if $DEBUG; 156 if ($cmfmodes{$cmfmode} == 0) { next; }172 # find the cmfmode series (v, dv, sv) 157 173 $realrule = substr($rule,1); 158 $thisLevel = $cmfmodes{$realrule}; 159 $myLevel = $cmfmodes{$cmfmode}; 174 %series = &cmf_series ($realrule); 175 if (! %series) { next; } 176 if ($series{$cmfmode} == 0) { next; } 177 $thisLevel = $series{$realrule}; 178 $myLevel = $series{$cmfmode}; 160 179 print "levels: $cmfmode, $realrule, $myLevel, $thisLevel\n" if $DEBUG; 161 180 if ($myLevel < $thisLevel) { $keepLine = 1; } … … 174 193 175 194 exit 0; 195 196 sub cmf_series { 197 198 my ($rule) = $_[0]; 199 200 if ($cmfmodes_v{$rule}) { return %cmfmodes_v; } 201 if ($cmfmodes_sv{$rule}) { return %cmfmodes_sv; } 202 if ($cmfmodes_dv{$rule}) { return %cmfmodes_dv; } 203 return 0; 204 } -
trunk/psModules/src/objects/models/pmModel_DEV.c
r32347 r34403 43 43 #include "pmSourceExtendedPars.h" 44 44 #include "pmSourceDiffStats.h" 45 #include "pmSourceSatstar.h" 45 46 #include "pmSource.h" 46 47 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/models/pmModel_EXP.c
r32347 r34403 39 39 #include "pmSourceExtendedPars.h" 40 40 #include "pmSourceDiffStats.h" 41 #include "pmSourceSatstar.h" 41 42 #include "pmSource.h" 42 43 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/models/pmModel_GAUSS.c
r31153 r34403 39 39 #include "pmSourceExtendedPars.h" 40 40 #include "pmSourceDiffStats.h" 41 #include "pmSourceSatstar.h" 41 42 #include "pmSource.h" 42 43 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/models/pmModel_PGAUSS.c
r34085 r34403 39 39 #include "pmSourceExtendedPars.h" 40 40 #include "pmSourceDiffStats.h" 41 #include "pmSourceSatstar.h" 41 42 #include "pmSource.h" 42 43 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/models/pmModel_PS1_V1.c
r34085 r34403 40 40 #include "pmSourceExtendedPars.h" 41 41 #include "pmSourceDiffStats.h" 42 #include "pmSourceSatstar.h" 42 43 #include "pmSource.h" 43 44 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/models/pmModel_QGAUSS.c
r34085 r34403 40 40 #include "pmSourceExtendedPars.h" 41 41 #include "pmSourceDiffStats.h" 42 #include "pmSourceSatstar.h" 42 43 #include "pmSource.h" 43 44 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/models/pmModel_RGAUSS.c
r34085 r34403 40 40 #include "pmSourceExtendedPars.h" 41 41 #include "pmSourceDiffStats.h" 42 #include "pmSourceSatstar.h" 42 43 #include "pmSource.h" 43 44 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/models/pmModel_SERSIC.c
r33409 r34403 49 49 #include "pmSourceExtendedPars.h" 50 50 #include "pmSourceDiffStats.h" 51 #include "pmSourceSatstar.h" 51 52 #include "pmSource.h" 52 53 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/models/pmModel_TRAIL.c
r34259 r34403 39 39 #include "pmSourceExtendedPars.h" 40 40 #include "pmSourceDiffStats.h" 41 #include "pmSourceSatstar.h" 41 42 #include "pmSource.h" 42 43 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmDetEff.c
r29004 r34403 23 23 #include "pmSourceExtendedPars.h" 24 24 #include "pmSourceDiffStats.h" 25 #include "pmSourceSatstar.h" 25 26 #include "pmSource.h" 26 27 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmGrowthCurve.c
r31451 r34403 36 36 #include "pmSourceExtendedPars.h" 37 37 #include "pmSourceDiffStats.h" 38 #include "pmSourceSatstar.h" 38 39 #include "pmSource.h" 39 40 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmGrowthCurveGenerate.c
r31451 r34403 43 43 #include "pmSourceExtendedPars.h" 44 44 #include "pmSourceDiffStats.h" 45 #include "pmSourceSatstar.h" 45 46 #include "pmSource.h" 46 47 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmModelUtils.c
r34085 r34403 38 38 #include "pmSourceExtendedPars.h" 39 39 #include "pmSourceDiffStats.h" 40 #include "pmSourceSatstar.h" 40 41 #include "pmSource.h" 41 42 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmPCM_MinimizeChisq.c
r32725 r34403 37 37 #include "pmSourceExtendedPars.h" 38 38 #include "pmSourceDiffStats.h" 39 #include "pmSourceSatstar.h" 39 40 #include "pmSource.h" 40 41 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmPCMdata.c
r33442 r34403 37 37 #include "pmSourceExtendedPars.h" 38 38 #include "pmSourceDiffStats.h" 39 #include "pmSourceSatstar.h" 39 40 #include "pmSource.h" 40 41 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmPSF.c
r32347 r34403 43 43 #include "pmSourceExtendedPars.h" 44 44 #include "pmSourceDiffStats.h" 45 #include "pmSourceSatstar.h" 45 46 #include "pmSource.h" 46 47 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmPSF_IO.c
r31451 r34403 53 53 #include "pmSourceExtendedPars.h" 54 54 #include "pmSourceDiffStats.h" 55 #include "pmSourceSatstar.h" 55 56 #include "pmSource.h" 56 57 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmPSFtry.c
r30621 r34403 35 35 #include "pmSourceExtendedPars.h" 36 36 #include "pmSourceDiffStats.h" 37 #include "pmSourceSatstar.h" 37 38 #include "pmSource.h" 38 39 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmPSFtryFitEXT.c
r33586 r34403 35 35 #include "pmSourceExtendedPars.h" 36 36 #include "pmSourceDiffStats.h" 37 #include "pmSourceSatstar.h" 37 38 #include "pmSource.h" 38 39 #include "pmSourceUtils.h" -
trunk/psModules/src/objects/pmPSFtryFitPSF.c
r31451 r34403 33 33 #include "pmSourceExtendedPars.h" 34 34 #include "pmSourceDiffStats.h" 35 #include "pmSourceSatstar.h" 35 36 #include "pmSource.h" 36 37 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmPSFtryMakePSF.c
r34156 r34403 34 34 #include "pmSourceExtendedPars.h" 35 35 #include "pmSourceDiffStats.h" 36 #include "pmSourceSatstar.h" 36 37 #include "pmSource.h" 37 38 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmPSFtryMetric.c
r29004 r34403 34 34 #include "pmSourceExtendedPars.h" 35 35 #include "pmSourceDiffStats.h" 36 #include "pmSourceSatstar.h" 36 37 #include "pmSource.h" 37 38 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmPSFtryModel.c
r30621 r34403 35 35 #include "pmSourceExtendedPars.h" 36 36 #include "pmSourceDiffStats.h" 37 #include "pmSourceSatstar.h" 37 38 #include "pmSource.h" 38 39 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmPhotObj.c
r31153 r34403 35 35 #include "pmSourceExtendedPars.h" 36 36 #include "pmSourceDiffStats.h" 37 #include "pmSourceSatstar.h" 37 38 #include "pmSource.h" 38 39 -
trunk/psModules/src/objects/pmSource.c
r34318 r34403 40 40 #include "pmSourceDiffStats.h" 41 41 #include "pmSourcePhotometry.h" 42 #include "pmSourceSatstar.h" 42 43 #include "pmSource.h" 43 44 … … 61 62 psFree(tmp->modelFits); 62 63 psFree(tmp->extFitPars); 64 psFree(tmp->blends); 65 psFree(tmp->satstar); 63 66 psFree(tmp->extpars); 64 psFree(tmp->moments);65 67 psFree(tmp->diffStats); 66 68 psFree(tmp->radialAper); 67 psFree(tmp->blends);68 69 psTrace("psModules.objects", 10, "---- end ----\n"); 69 70 } … … 160 161 source->region = psRegionSet(NAN, NAN, NAN, NAN); 161 162 source->blends = NULL; 163 source->satstar = NULL; 162 164 source->extpars = NULL; 163 165 source->diffStats = NULL; … … 650 652 if (source->peak->y >= region->y1) continue; 651 653 654 # define DEBUG 0 655 # define TEST_X 2792 656 # define TEST_Y 1741 657 # if (DEBUG) 658 if ((fabs(source->peak->x - TEST_X) < 5) && (fabs(source->peak->y - TEST_Y) < 5)) { 659 fprintf (stderr, "test peak\n"); 660 } 661 # endif 662 652 663 // should be set by pmSourceAlloc 653 664 psAssert (source->type == PM_SOURCE_TYPE_UNKNOWN, "source type was not init-ed?"); … … 665 676 666 677 // XXX EAM : can we use the value of SATURATE if mask is NULL? 678 // XXX a 5x5 box centered on the peak is a rather small region to check for 667 679 inner = psRegionForSquare (source->peak->x, source->peak->y, 2); 668 680 inner = psRegionForImage (source->maskView, inner); -
trunk/psModules/src/objects/pmSource.h
r34315 r34403 114 114 psRegion region; ///< area on image covered by selected pixels 115 115 psArray *blends; ///< collection of sources thought to be confused with object 116 pmSourceSatstar *satstar; 116 117 pmSourceExtendedPars *extpars; ///< extended source parameters 117 118 pmSourceDiffStats *diffStats; ///< extra parameters for difference detections -
trunk/psModules/src/objects/pmSourceContour.c
r29004 r34403 39 39 #include "pmSourceExtendedPars.h" 40 40 #include "pmSourceDiffStats.h" 41 #include "pmSourceSatstar.h" 41 42 #include "pmSource.h" 42 43 -
trunk/psModules/src/objects/pmSourceExtendedPars.c
r32347 r34403 190 190 bool pmSourceRadialProfileSortPair (psVector *index, psVector *extra) { 191 191 192 psAssert (index->n == extra->n, "mismatched vector lengths"); 193 if (index->n < 2) return true; 194 192 195 // sort the vector set by the radius 193 196 PSSORT (index->n, COMPARE_INDEX, SWAP_INDEX, NONE); -
trunk/psModules/src/objects/pmSourceFitModel.c
r34259 r34403 39 39 #include "pmSourceExtendedPars.h" 40 40 #include "pmSourceDiffStats.h" 41 #include "pmSourceSatstar.h" 41 42 #include "pmSource.h" 42 43 #include "pmSourcePhotometry.h" -
trunk/psModules/src/objects/pmSourceFitPCM.c
r34287 r34403 37 37 #include "pmSourceExtendedPars.h" 38 38 #include "pmSourceDiffStats.h" 39 #include "pmSourceSatstar.h" 39 40 #include "pmSource.h" 40 41 #include "pmSourcePhotometry.h" -
trunk/psModules/src/objects/pmSourceFitSet.c
r31153 r34403 38 38 #include "pmSourceExtendedPars.h" 39 39 #include "pmSourceDiffStats.h" 40 #include "pmSourceSatstar.h" 40 41 #include "pmSource.h" 41 42 #include "pmSourcePhotometry.h" -
trunk/psModules/src/objects/pmSourceGroups.c
r29004 r34403 24 24 #include "pmSourceExtendedPars.h" 25 25 #include "pmSourceDiffStats.h" 26 #include "pmSourceSatstar.h" 26 27 #include "pmSource.h" 27 28 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmSourceIO.c
r34271 r34403 46 46 #include "pmSourceExtendedPars.h" 47 47 #include "pmSourceDiffStats.h" 48 #include "pmSourceSatstar.h" 48 49 #include "pmSource.h" 49 50 #include "pmSourceFitModel.h" … … 574 575 PM_SOURCES_WRITE("PS1_V4", CMF_PS1_V4); 575 576 PM_SOURCES_WRITE("PS1_SV1", CMF_PS1_SV1); 577 PM_SOURCES_WRITE("PS1_SV2", CMF_PS1_SV2); 576 578 PM_SOURCES_WRITE("PS1_DV1", CMF_PS1_DV1); 577 579 PM_SOURCES_WRITE("PS1_DV2", CMF_PS1_DV2); 580 PM_SOURCES_WRITE("PS1_DV3", CMF_PS1_DV3); 578 581 579 582 psFree (outhead); … … 1047 1050 PM_SOURCES_READ_PSF("PS1_V4", CMF_PS1_V4); 1048 1051 PM_SOURCES_READ_PSF("PS1_SV1", CMF_PS1_SV1); 1052 PM_SOURCES_READ_PSF("PS1_SV2", CMF_PS1_SV2); 1049 1053 PM_SOURCES_READ_PSF("PS1_DV1", CMF_PS1_DV1); 1050 1054 PM_SOURCES_READ_PSF("PS1_DV2", CMF_PS1_DV2); 1055 PM_SOURCES_READ_PSF("PS1_DV3", CMF_PS1_DV3); 1051 1056 1052 1057 long *sourceIndex = NULL; … … 1253 1258 PM_SOURCES_READ_XSRC("PS1_V4", CMF_PS1_V4); 1254 1259 PM_SOURCES_READ_XSRC("PS1_SV1", CMF_PS1_SV1); 1260 PM_SOURCES_READ_XSRC("PS1_SV2", CMF_PS1_SV2); 1255 1261 PM_SOURCES_READ_XSRC("PS1_DV1", CMF_PS1_DV1); 1256 1262 PM_SOURCES_READ_XSRC("PS1_DV2", CMF_PS1_DV2); 1263 PM_SOURCES_READ_XSRC("PS1_DV3", CMF_PS1_DV3); 1257 1264 } 1258 1265 psFree(tableHeader); … … 1289 1296 PM_SOURCES_READ_XFIT("PS1_V4", CMF_PS1_V4); 1290 1297 PM_SOURCES_READ_XFIT("PS1_SV1", CMF_PS1_SV1); 1298 PM_SOURCES_READ_XFIT("PS1_SV2", CMF_PS1_SV2); 1291 1299 PM_SOURCES_READ_XFIT("PS1_DV1", CMF_PS1_DV1); 1292 1300 PM_SOURCES_READ_XFIT("PS1_DV2", CMF_PS1_DV2); 1301 PM_SOURCES_READ_XFIT("PS1_DV3", CMF_PS1_DV3); 1293 1302 } 1294 1303 psFree(tableHeader); … … 1324 1333 PM_SOURCES_READ_XRAD("PS1_V4", CMF_PS1_V4); 1325 1334 PM_SOURCES_READ_XRAD("PS1_SV1", CMF_PS1_SV1); 1335 PM_SOURCES_READ_XRAD("PS1_SV2", CMF_PS1_SV2); 1326 1336 PM_SOURCES_READ_XRAD("PS1_DV1", CMF_PS1_DV1); 1327 1337 PM_SOURCES_READ_XRAD("PS1_DV2", CMF_PS1_DV2); 1338 PM_SOURCES_READ_XRAD("PS1_DV3", CMF_PS1_DV3); 1328 1339 } 1329 1340 psFree(tableHeader); -
trunk/psModules/src/objects/pmSourceIO.h
r34269 r34403 36 36 MK_PROTO(CMF_PS1_V4); 37 37 MK_PROTO(CMF_PS1_SV1); 38 MK_PROTO(CMF_PS1_SV2); 38 39 MK_PROTO(CMF_PS1_DV1); 39 40 MK_PROTO(CMF_PS1_DV2); 41 MK_PROTO(CMF_PS1_DV3); 40 42 41 43 int pmSourceGetDophotType (pmSource *source); -
trunk/psModules/src/objects/pmSourceIO_CMF.c.in
r34362 r34403 43 43 #include "pmSourceExtendedPars.h" 44 44 #include "pmSourceDiffStats.h" 45 #include "pmSourceSatstar.h" 45 46 #include "pmSource.h" 46 47 #include "pmSourceFitModel.h" … … 135 136 @ALL,!PS1_V1,!PS1_V2@ psMetadataAdd (row, PS_LIST_TAIL, "PSF_INST_FLUX_SIG",PS_DATA_F32, "Sigma of PSF instrumental flux", source->psfFluxErr); 136 137 137 @ALL@ psMetadataAdd (row, PS_LIST_TAIL, "AP_MAG", PS_DATA_F32, "magnitude in standard aperture", source->apMag);138 @>PS1_V2,PS1_SV 1,PS1_DV2@psMetadataAdd (row, PS_LIST_TAIL, "AP_MAG_RAW", PS_DATA_F32, "magnitude in reported aperture", source->apMagRaw);139 @ALL@ psMetadataAdd (row, PS_LIST_TAIL, "AP_MAG_RADIUS", PS_DATA_F32, "radius used for aperture mags", outputs.apRadius);140 @ PS1_DV2@psMetadataAdd (row, PS_LIST_TAIL, "AP_FLUX", PS_DATA_F32, "instrumental flux in standard aperture", source->apFlux);141 @ PS1_DV2@psMetadataAdd (row, PS_LIST_TAIL, "AP_FLUX_SIG", PS_DATA_F32, "aperture flux error", source->apFluxErr);138 @ALL@ psMetadataAdd (row, PS_LIST_TAIL, "AP_MAG", PS_DATA_F32, "magnitude in standard aperture", source->apMag); 139 @>PS1_V2,PS1_SV?,>PS1_DV1@ psMetadataAdd (row, PS_LIST_TAIL, "AP_MAG_RAW", PS_DATA_F32, "magnitude in reported aperture", source->apMagRaw); 140 @ALL@ psMetadataAdd (row, PS_LIST_TAIL, "AP_MAG_RADIUS", PS_DATA_F32, "radius used for aperture mags", outputs.apRadius); 141 @>PS1_DV1,>PS1_V3,>PS1_SV1@ psMetadataAdd (row, PS_LIST_TAIL, "AP_FLUX", PS_DATA_F32, "instrumental flux in standard aperture", source->apFlux); 142 @>PS1_DV1,>PS1_V3,>PS1_SV1@ psMetadataAdd (row, PS_LIST_TAIL, "AP_FLUX_SIG", PS_DATA_F32, "aperture flux error", source->apFluxErr); 142 143 143 144 @<PS1_V3,PS1_SV1,PS1_DV?@ psMetadataAdd (row, PS_LIST_TAIL, "PEAK_FLUX_AS_MAG", PS_DATA_F32, "Peak flux expressed as magnitude", outputs.peakMag); … … 150 151 @ALL,!PS1_V1@ psMetadataAdd (row, PS_LIST_TAIL, "DEC_PSF", PS_DATA_F64, "PSF DEC coordinate (degrees)", outputs.dec); 151 152 152 @>=PS1_V3 @psMetadataAdd (row, PS_LIST_TAIL, "PEAK_FLUX_AS_MAG", PS_DATA_F32, "Peak flux expressed as magnitude", outputs.peakMag);153 @>=PS1_V3,>PS1_SV1@ psMetadataAdd (row, PS_LIST_TAIL, "PEAK_FLUX_AS_MAG", PS_DATA_F32, "Peak flux expressed as magnitude", outputs.peakMag); 153 154 @ALL@ psMetadataAdd (row, PS_LIST_TAIL, "SKY", PS_DATA_F32, "Sky level", source->sky); 154 155 @ALL@ psMetadataAdd (row, PS_LIST_TAIL, "SKY_SIGMA", PS_DATA_F32, "Sigma of sky level", source->skyErr); … … 162 163 @ALL@ psMetadataAdd (row, PS_LIST_TAIL, "PSF_THETA", PS_DATA_F32, "PSF orientation angle", outputs.psfTheta); 163 164 @ALL@ psMetadataAdd (row, PS_LIST_TAIL, "PSF_QF", PS_DATA_F32, "PSF coverage/quality factor (bad)", source->pixWeightNotBad); 164 @>PS1_V2,PS1_SV 1,PS1_DV2@ psMetadataAdd (row, PS_LIST_TAIL, "PSF_QF_PERFECT", PS_DATA_F32, "PSF coverage/quality factor (poor)", source->pixWeightNotPoor);165 @>PS1_V2,PS1_SV?,>PS1_DV1@ psMetadataAdd (row, PS_LIST_TAIL, "PSF_QF_PERFECT", PS_DATA_F32, "PSF coverage/quality factor (poor)", source->pixWeightNotPoor); 165 166 @ALL@ psMetadataAdd (row, PS_LIST_TAIL, "PSF_NDOF", PS_DATA_S32, "degrees of freedom", outputs.nDOF); 166 167 @ALL@ psMetadataAdd (row, PS_LIST_TAIL, "PSF_NPIX", PS_DATA_S32, "number of pixels in fit", outputs.nPix); … … 170 171 @ALL@ psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_YY", PS_DATA_F32, "second moments (Y*Y)", moments.Myy); 171 172 172 @>PS1_V2,PS1_SV 1@ psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_M3C", PS_DATA_F32, "third momemt cos theta", moments.M_c3);173 @>PS1_V2,PS1_SV 1@ psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_M3S", PS_DATA_F32, "third momemt sin theta", moments.M_s3);174 @>PS1_V2,PS1_SV 1@ psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_M4C", PS_DATA_F32, "fourth momemt cos theta", moments.M_c4);175 @>PS1_V2,PS1_SV 1@ psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_M4S", PS_DATA_F32, "fourth momemt sin theta", moments.M_s4);176 177 @>PS1_V2,PS1_SV 1,PS1_DV2@ psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_R1", PS_DATA_F32, "first radial moment", moments.Mrf);178 @>PS1_V2,PS1_SV 1,PS1_DV2@ psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_RH", PS_DATA_F32, "half radial moment", moments.Mrh);179 @>PS1_V2,PS1_SV 1,PS1_DV2@ psMetadataAdd (row, PS_LIST_TAIL, "KRON_FLUX", PS_DATA_F32, "Kron Flux (in 2.5 R1)", moments.Krf);180 @>PS1_V2,PS1_SV 1,PS1_DV2@ psMetadataAdd (row, PS_LIST_TAIL, "KRON_FLUX_ERR", PS_DATA_F32, "Kron Flux Error", moments.dKrf);181 @>PS1_V2,PS1_SV 1,PS1_DV2@ psMetadataAdd (row, PS_LIST_TAIL, "KRON_FLUX_INNER", PS_DATA_F32, "Kron Flux (in 1.0 R1)", moments.Kinner);182 @>PS1_V2,PS1_SV 1,PS1_DV2@ psMetadataAdd (row, PS_LIST_TAIL, "KRON_FLUX_OUTER", PS_DATA_F32, "Kron Flux (in 4.0 R1)", moments.Kouter);173 @>PS1_V2,PS1_SV?@ psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_M3C", PS_DATA_F32, "third momemt cos theta", moments.M_c3); 174 @>PS1_V2,PS1_SV?@ psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_M3S", PS_DATA_F32, "third momemt sin theta", moments.M_s3); 175 @>PS1_V2,PS1_SV?@ psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_M4C", PS_DATA_F32, "fourth momemt cos theta", moments.M_c4); 176 @>PS1_V2,PS1_SV?@ psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_M4S", PS_DATA_F32, "fourth momemt sin theta", moments.M_s4); 177 178 @>PS1_V2,PS1_SV?,>PS1_DV1@ psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_R1", PS_DATA_F32, "first radial moment", moments.Mrf); 179 @>PS1_V2,PS1_SV?,>PS1_DV1@ psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_RH", PS_DATA_F32, "half radial moment", moments.Mrh); 180 @>PS1_V2,PS1_SV?,>PS1_DV1@ psMetadataAdd (row, PS_LIST_TAIL, "KRON_FLUX", PS_DATA_F32, "Kron Flux (in 2.5 R1)", moments.Krf); 181 @>PS1_V2,PS1_SV?,>PS1_DV1@ psMetadataAdd (row, PS_LIST_TAIL, "KRON_FLUX_ERR", PS_DATA_F32, "Kron Flux Error", moments.dKrf); 182 @>PS1_V2,PS1_SV?,>PS1_DV1@ psMetadataAdd (row, PS_LIST_TAIL, "KRON_FLUX_INNER", PS_DATA_F32, "Kron Flux (in 1.0 R1)", moments.Kinner); 183 @>PS1_V2,PS1_SV?,>PS1_DV1@ psMetadataAdd (row, PS_LIST_TAIL, "KRON_FLUX_OUTER", PS_DATA_F32, "Kron Flux (in 4.0 R1)", moments.Kouter); 183 184 184 185 @>PS1_V3@ psMetadataAdd (row, PS_LIST_TAIL, "SKY_LIMIT_RAD", PS_DATA_F32, "Radius where object hits sky", source->skyRadius); … … 197 198 @PS1_DV2@ psMetadataAdd (row, PS_LIST_TAIL, "DIFF_SN_M", PS_DATA_F32, "signal-to-noise of neg match src", diffStats.SNm); 198 199 199 @ALL@ psMetadataAdd (row, PS_LIST_TAIL, "FLAGS", PS_DATA_U32, "psphot analysis flags", source->mode); 200 @>PS1_V2,PS1_SV1,PS1_DV2@ psMetadataAdd (row, PS_LIST_TAIL, "FLAGS2", PS_DATA_U32, "psphot analysis flags", source->mode2); 201 // @>PS1_V2,PS1_SV1,PS1_DV2@ psMetadataAdd (row, PS_LIST_TAIL, "FLAGS2", PS_DATA_U32, "psphot analysis flags", source->mode2 | (source->id<<8)); 202 @>PS1_V2@ psMetadataAdd (row, PS_LIST_TAIL, "PADDING2", PS_DATA_S32, "more padding", 0); 203 @PS1_SV1@ 200 @ALL@ psMetadataAdd (row, PS_LIST_TAIL, "FLAGS", PS_DATA_U32, "psphot analysis flags", source->mode); 201 @>PS1_V2,PS1_SV?,>PS1_DV1@ psMetadataAdd (row, PS_LIST_TAIL, "FLAGS2", PS_DATA_U32, "psphot analysis flags", source->mode2); 202 @PS1_V3,PS1_SV2@ psMetadataAdd (row, PS_LIST_TAIL, "PADDING2", PS_DATA_S32, "more padding", 0); 203 @PS1_SV?@ 204 204 205 205 // note that this definition is inconsistent with the definition in … … 316 316 @ALL@ source->psfMagErr = psMetadataLookupF32 (&status, row, "PSF_INST_MAG_SIG"); 317 317 @ALL@ source->apMag = psMetadataLookupF32 (&status, row, "AP_MAG"); 318 @>PS1_V2,PS1_SV 1,PS1_DV2@ source->apMagRaw = psMetadataLookupF32 (&status, row, "AP_MAG_RAW");318 @>PS1_V2,PS1_SV?,>PS1_DV1@ source->apMagRaw = psMetadataLookupF32 (&status, row, "AP_MAG_RAW"); 319 319 320 320 // XXX use these to determine PAR[PM_PAR_I0] if they exist? 321 321 // XXX add these to PS1_SV1? 322 @>PS1_V2,PS1_SV 1,PS1_DV?@ source->psfFlux = psMetadataLookupF32 (&status, row, "PSF_INST_FLUX");323 @>PS1_V2,PS1_SV 1,PS1_DV?@ source->psfFluxErr= psMetadataLookupF32 (&status, row, "PSF_INST_FLUX_SIG");322 @>PS1_V2,PS1_SV?,PS1_DV?@ source->psfFlux = psMetadataLookupF32 (&status, row, "PSF_INST_FLUX"); 323 @>PS1_V2,PS1_SV?,PS1_DV?@ source->psfFluxErr= psMetadataLookupF32 (&status, row, "PSF_INST_FLUX_SIG"); 324 324 325 325 // XXX this scaling is incorrect: does not include the 2 \pi AREA factor … … 342 342 343 343 @ALL@ source->pixWeightNotBad = psMetadataLookupF32 (&status, row, "PSF_QF"); 344 @>PS1_V2,PS1_SV 1,PS1_DV2@ source->pixWeightNotPoor = psMetadataLookupF32 (&status, row, "PSF_QF_PERFECT");344 @>PS1_V2,PS1_SV?,>PS1_DV1@ source->pixWeightNotPoor = psMetadataLookupF32 (&status, row, "PSF_QF_PERFECT"); 345 345 @ALL@ source->crNsigma = psMetadataLookupF32 (&status, row, "CR_NSIGMA"); 346 346 @ALL@ source->extNsigma = psMetadataLookupF32 (&status, row, "EXT_NSIGMA"); … … 362 362 // XXX we do not save all of the 3rd and 4th moment parameters. when we load in data, 363 363 // we are storing enough information so the output will be consistent with the input 364 @>PS1_V2,PS1_SV 1@ source->moments->Mxxx = +1.0 * psMetadataLookupF32 (&status, row, "MOMENTS_M3C");365 @>PS1_V2,PS1_SV 1@ source->moments->Mxxy = 0.0;366 @>PS1_V2,PS1_SV 1@ source->moments->Mxyy = 0.0;367 @>PS1_V2,PS1_SV 1@ source->moments->Myyy = -1.0 * psMetadataLookupF32 (&status, row, "MOMENTS_M3S");368 369 @>PS1_V2,PS1_SV 1@ source->moments->Mxxxx = +1.00 * psMetadataLookupF32 (&status, row, "MOMENTS_M4C");370 @>PS1_V2,PS1_SV 1@ source->moments->Mxxxy = 0.0;371 @>PS1_V2,PS1_SV 1@ source->moments->Mxxyy = 0.0;372 @>PS1_V2,PS1_SV 1@ source->moments->Mxyyy = -0.25 * psMetadataLookupF32 (&status, row, "MOMENTS_M4S");373 @>PS1_V2,PS1_SV 1@ source->moments->Myyyy = 0.0;374 375 @>PS1_V2,PS1_SV 1,PS1_DV2@ source->moments->Mrf = psMetadataLookupF32 (&status, row, "MOMENTS_R1");376 @>PS1_V2,PS1_SV 1,PS1_DV2@ source->moments->Mrh = psMetadataLookupF32 (&status, row, "MOMENTS_RH");377 @>PS1_V2,PS1_SV 1,PS1_DV2@ source->moments->KronFlux = psMetadataLookupF32 (&status, row, "KRON_FLUX");378 @>PS1_V2,PS1_SV 1,PS1_DV2@ source->moments->KronFluxErr = psMetadataLookupF32 (&status, row, "KRON_FLUX_ERR");379 @>PS1_V2,PS1_SV 1,PS1_DV2@ source->moments->KronFinner = psMetadataLookupF32 (&status, row, "KRON_FLUX_INNER");380 @>PS1_V2,PS1_SV 1,PS1_DV2@ source->moments->KronFouter = psMetadataLookupF32 (&status, row, "KRON_FLUX_OUTER");364 @>PS1_V2,PS1_SV?@ source->moments->Mxxx = +1.0 * psMetadataLookupF32 (&status, row, "MOMENTS_M3C"); 365 @>PS1_V2,PS1_SV?@ source->moments->Mxxy = 0.0; 366 @>PS1_V2,PS1_SV?@ source->moments->Mxyy = 0.0; 367 @>PS1_V2,PS1_SV?@ source->moments->Myyy = -1.0 * psMetadataLookupF32 (&status, row, "MOMENTS_M3S"); 368 369 @>PS1_V2,PS1_SV?@ source->moments->Mxxxx = +1.00 * psMetadataLookupF32 (&status, row, "MOMENTS_M4C"); 370 @>PS1_V2,PS1_SV?@ source->moments->Mxxxy = 0.0; 371 @>PS1_V2,PS1_SV?@ source->moments->Mxxyy = 0.0; 372 @>PS1_V2,PS1_SV?@ source->moments->Mxyyy = -0.25 * psMetadataLookupF32 (&status, row, "MOMENTS_M4S"); 373 @>PS1_V2,PS1_SV?@ source->moments->Myyyy = 0.0; 374 375 @>PS1_V2,PS1_SV?,>PS1_DV1@ source->moments->Mrf = psMetadataLookupF32 (&status, row, "MOMENTS_R1"); 376 @>PS1_V2,PS1_SV?,>PS1_DV1@ source->moments->Mrh = psMetadataLookupF32 (&status, row, "MOMENTS_RH"); 377 @>PS1_V2,PS1_SV?,>PS1_DV1@ source->moments->KronFlux = psMetadataLookupF32 (&status, row, "KRON_FLUX"); 378 @>PS1_V2,PS1_SV?,>PS1_DV1@ source->moments->KronFluxErr = psMetadataLookupF32 (&status, row, "KRON_FLUX_ERR"); 379 @>PS1_V2,PS1_SV?,>PS1_DV1@ source->moments->KronFinner = psMetadataLookupF32 (&status, row, "KRON_FLUX_INNER"); 380 @>PS1_V2,PS1_SV?,>PS1_DV1@ source->moments->KronFouter = psMetadataLookupF32 (&status, row, "KRON_FLUX_OUTER"); 381 381 382 382 @>PS1_V3@ source->skyRadius = psMetadataLookupF32 (&status, row, "SKY_LIMIT_RAD"); … … 393 393 @PS1_DV?@ source->diffStats->nRatioAll = psMetadataLookupF32 (&status, row, "DIFF_NRATIO_ALL"); 394 394 395 @ PS1_DV2@ source->diffStats->Rp = psMetadataLookupF32 (&status, row, "DIFF_R_P");396 @ PS1_DV2@ source->diffStats->SNp = psMetadataLookupF32 (&status, row, "DIFF_SN_P");397 @ PS1_DV2@ source->diffStats->Rm = psMetadataLookupF32 (&status, row, "DIFF_R_M");398 @ PS1_DV2@ source->diffStats->SNm = psMetadataLookupF32 (&status, row, "DIFF_SN_M");395 @>PS1_DV1@ source->diffStats->Rp = psMetadataLookupF32 (&status, row, "DIFF_R_P"); 396 @>PS1_DV1@ source->diffStats->SNp = psMetadataLookupF32 (&status, row, "DIFF_SN_P"); 397 @>PS1_DV1@ source->diffStats->Rm = psMetadataLookupF32 (&status, row, "DIFF_R_M"); 398 @>PS1_DV1@ source->diffStats->SNm = psMetadataLookupF32 (&status, row, "DIFF_SN_M"); 399 399 @PS1_DV?@ } 400 400 401 @ALL@ source->mode = psMetadataLookupU32 (&status, row, "FLAGS");402 @>PS1_V2,PS1_SV 1,PS1_DV2@ source->mode2 = psMetadataLookupU32 (&status, row, "FLAGS2");403 @ALL@ source->nFrames = psMetadataLookupU16 (&status, row, "N_FRAMES");401 @ALL@ source->mode = psMetadataLookupU32 (&status, row, "FLAGS"); 402 @>PS1_V2,PS1_SV?,>PS1_DV1@ source->mode2 = psMetadataLookupU32 (&status, row, "FLAGS2"); 403 @ALL@ source->nFrames = psMetadataLookupU16 (&status, row, "N_FRAMES"); 404 404 assert (status); 405 405 … … 735 735 } 736 736 737 @>PS1_DV2@ pmChip *chip = readout->parent->parent; 738 737 739 table = psArrayAllocEmpty (sources->n); 738 740 … … 768 770 yErr = dPAR[PM_PAR_YPOS]; 769 771 772 @>PS1_DV2@ psSphere ptSky = {0.0, 0.0, 0.0, 0.0}; 773 @>PS1_DV2@ float posAngle = 0.0; 774 @>PS1_DV2@ float pltScale = 0.0; 775 @>PS1_DV2@ pmSourceLocalAstrometry (&ptSky, &posAngle, &pltScale, chip, xPos, yPos); 776 @>PS1_DV2@ double raPos = ptSky.r*PS_DEG_RAD; 777 @>PS1_DV2@ double decPos = ptSky.d*PS_DEG_RAD; 778 770 779 float kronFlux = source->moments ? source->moments->KronFlux : NAN; 771 780 float kronMag = isfinite(kronFlux) ? -2.5*log10(kronFlux) : NAN; … … 779 788 psMetadataAddF32 (row, PS_LIST_TAIL, "X_EXT_SIG", 0, "Sigma in EXT x coordinate", xErr); 780 789 psMetadataAddF32 (row, PS_LIST_TAIL, "Y_EXT_SIG", 0, "Sigma in EXT y coordinate", yErr); 790 @>PS1_DV2@ psMetadataAddF32 (row, PS_LIST_TAIL, "RA_EXT", 0, "EXT model ra coordinate", raPos); 791 @>PS1_DV2@ psMetadataAddF32 (row, PS_LIST_TAIL, "DEC_EXT", 0, "EXT model dec coordinate", decPos); 781 792 psMetadataAddF32 (row, PS_LIST_TAIL, "EXT_INST_MAG", 0, "EXT fit instrumental magnitude", model->mag); 782 793 psMetadataAddF32 (row, PS_LIST_TAIL, "EXT_INST_MAG_SIG", 0, "Sigma of PSF instrumental magnitude", model->magErr); 794 795 @>PS1_DV2@ psMetadataAddF32 (row, PS_LIST_TAIL, "POSANGLE", 0, "position angle at source (degrees)", posAngle); 796 @>PS1_DV2@ psMetadataAddF32 (row, PS_LIST_TAIL, "PLTSCALE", 0, "plate scale at source (arcsec/pixel)", pltScale); 783 797 784 798 // psMetadataAddF32 (row, PS_LIST_TAIL, "MOMENTS_XX", 0, "second moment in x", extPars->Mxx); … … 792 806 psMetadataAddF32 (row, PS_LIST_TAIL, "KRON_MAG", 0, "Kron Mag", kronMag); 793 807 794 psMetadataAddF32 (row, PS_LIST_TAIL, "NPARAMS", 0, "number of model parameters", model->params->n); 808 @ALL, <PS1_DV3@ psMetadataAddF32 (row, PS_LIST_TAIL, "NPARAMS", 0, "number of model parameters", model->params->n); 809 @>PS1_DV2@ psMetadataAddS32 (row, PS_LIST_TAIL, "NPARAMS", 0, "number of model parameters", model->params->n); 795 810 psMetadataAddStr (row, PS_LIST_TAIL, "MODEL_TYPE", 0, "name of model", pmModelClassGetName (model->type)); 796 811 -
trunk/psModules/src/objects/pmSourceIO_CMP.c
r34085 r34403 43 43 #include "pmSourceExtendedPars.h" 44 44 #include "pmSourceDiffStats.h" 45 #include "pmSourceSatstar.h" 45 46 #include "pmSource.h" 46 47 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmSourceIO_MatchedRefs.c
r29004 r34403 43 43 #include "pmSourceExtendedPars.h" 44 44 #include "pmSourceDiffStats.h" 45 #include "pmSourceSatstar.h" 45 46 #include "pmSource.h" 46 47 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmSourceIO_OBJ.c
r32347 r34403 43 43 #include "pmSourceExtendedPars.h" 44 44 #include "pmSourceDiffStats.h" 45 #include "pmSourceSatstar.h" 45 46 #include "pmSource.h" 46 47 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmSourceIO_PS1_CAL_0.c
r34085 r34403 43 43 #include "pmSourceExtendedPars.h" 44 44 #include "pmSourceDiffStats.h" 45 #include "pmSourceSatstar.h" 45 46 #include "pmSource.h" 46 47 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmSourceIO_PS1_DEV_0.c
r32347 r34403 43 43 #include "pmSourceExtendedPars.h" 44 44 #include "pmSourceDiffStats.h" 45 #include "pmSourceSatstar.h" 45 46 #include "pmSource.h" 46 47 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmSourceIO_PS1_DEV_1.c
r32347 r34403 43 43 #include "pmSourceExtendedPars.h" 44 44 #include "pmSourceDiffStats.h" 45 #include "pmSourceSatstar.h" 45 46 #include "pmSource.h" 46 47 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmSourceIO_RAW.c
r31451 r34403 43 43 #include "pmSourceExtendedPars.h" 44 44 #include "pmSourceDiffStats.h" 45 #include "pmSourceSatstar.h" 45 46 #include "pmSource.h" 46 47 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmSourceIO_SMPDATA.c
r34085 r34403 43 43 #include "pmSourceExtendedPars.h" 44 44 #include "pmSourceDiffStats.h" 45 #include "pmSourceSatstar.h" 45 46 #include "pmSource.h" 46 47 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmSourceIO_SX.c
r34085 r34403 43 43 #include "pmSourceExtendedPars.h" 44 44 #include "pmSourceDiffStats.h" 45 #include "pmSourceSatstar.h" 45 46 #include "pmSource.h" 46 47 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmSourceMasks.h
r32808 r34403 5 5 // When adding to or subtracting from this list, please also modify pmSourceMaskHeader 6 6 typedef enum { 7 PM_SOURCE_MODE_DEFAULT = 0x00000000, ///< Initial value: resets all bits8 PM_SOURCE_MODE_PSFMODEL = 0x00000001, ///< Source fitted with a psf model (linear or non-linear)9 PM_SOURCE_MODE_EXTMODEL = 0x00000002, ///< Source fitted with an extended-source model10 PM_SOURCE_MODE_FITTED = 0x00000004, ///< Source fitted with non-linear model (PSF or EXT; good or bad)11 PM_SOURCE_MODE_FAIL = 0x00000008, ///< Fit (non-linear) failed (non-converge, off-edge, run to zero)12 PM_SOURCE_MODE_POOR = 0x00000010, ///< Fit succeeds, but low-SN, high-Chisq, or large (for PSF -- drop?)13 PM_SOURCE_MODE_PAIR = 0x00000020, ///< Source fitted with a double psf14 PM_SOURCE_MODE_PSFSTAR = 0x00000040, ///< Source used to define PSF model15 PM_SOURCE_MODE_SATSTAR = 0x00000080, ///< Source model peak is above saturation16 PM_SOURCE_MODE_BLEND = 0x00000100, ///< Source is a blend with other sources17 PM_SOURCE_MODE_EXTERNAL = 0x00000200, ///< Source based on supplied input position18 PM_SOURCE_MODE_BADPSF = 0x00000400, ///< Failed to get good estimate of object's PSF19 PM_SOURCE_MODE_DEFECT = 0x00000800, ///< Source is thought to be a defect20 PM_SOURCE_MODE_SATURATED = 0x00001000, ///< Source is thought to be saturated pixels (bleed trail)21 PM_SOURCE_MODE_CR_LIMIT = 0x00002000, ///< Source has crNsigma above limit22 PM_SOURCE_MODE_EXT_LIMIT = 0x00004000, ///< Source has extNsigma above limit23 PM_SOURCE_MODE_MOMENTS_FAILURE = 0x00008000, ///< could not measure the moments24 PM_SOURCE_MODE_SKY_FAILURE = 0x00010000, ///< could not measure the local sky25 PM_SOURCE_MODE_SKYVAR_FAILURE = 0x00020000, ///< could not measure the local sky variance26 PM_SOURCE_MODE_BELOW_MOMENTS_SN = 0x00040000, ///< moments not measured due to low S/N27 PM_SOURCE_MODE_BIG_RADIUS = 0x00100000, ///< poor moments for small radius, try large radius28 PM_SOURCE_MODE_AP_MAGS = 0x00200000, ///< source has an aperture magnitude29 PM_SOURCE_MODE_BLEND_FIT = 0x00400000, ///< source was fitted as a blend30 PM_SOURCE_MODE_EXTENDED_FIT = 0x00800000, ///< full extended fit was used31 PM_SOURCE_MODE_EXTENDED_STATS = 0x01000000, ///< extended aperture stats calculated32 PM_SOURCE_MODE_LINEAR_FIT = 0x02000000, ///< source fitted with the linear fit33 PM_SOURCE_MODE_NONLINEAR_FIT = 0x04000000, ///< source fitted with the non-linear fit34 PM_SOURCE_MODE_RADIAL_FLUX = 0x08000000, ///< radial flux measurements calculated35 PM_SOURCE_MODE_SIZE_SKIPPED = 0x10000000, ///< size could not be determined36 PM_SOURCE_MODE_ON_SPIKE = 0x20000000, ///< peak lands on diffraction spike37 PM_SOURCE_MODE_ON_GHOST = 0x40000000, ///< peak lands on ghost or glint38 PM_SOURCE_MODE_OFF_CHIP = 0x80000000, ///< peak lands off edge of chip7 PM_SOURCE_MODE_DEFAULT = 0x00000000, ///< Initial value: resets all bits 8 PM_SOURCE_MODE_PSFMODEL = 0x00000001, ///< Source fitted with a psf model (linear or non-linear) 9 PM_SOURCE_MODE_EXTMODEL = 0x00000002, ///< Source fitted with an extended-source model 10 PM_SOURCE_MODE_FITTED = 0x00000004, ///< Source fitted with non-linear model (PSF or EXT; good or bad) 11 PM_SOURCE_MODE_FAIL = 0x00000008, ///< Fit (non-linear) failed (non-converge, off-edge, run to zero) 12 PM_SOURCE_MODE_POOR = 0x00000010, ///< Fit succeeds, but low-SN, high-Chisq, or large (for PSF -- drop?) 13 PM_SOURCE_MODE_PAIR = 0x00000020, ///< Source fitted with a double psf 14 PM_SOURCE_MODE_PSFSTAR = 0x00000040, ///< Source used to define PSF model 15 PM_SOURCE_MODE_SATSTAR = 0x00000080, ///< Source model peak is above saturation 16 PM_SOURCE_MODE_BLEND = 0x00000100, ///< Source is a blend with other sources 17 PM_SOURCE_MODE_EXTERNAL = 0x00000200, ///< Source based on supplied input position 18 PM_SOURCE_MODE_BADPSF = 0x00000400, ///< Failed to get good estimate of object's PSF 19 PM_SOURCE_MODE_DEFECT = 0x00000800, ///< Source is thought to be a defect 20 PM_SOURCE_MODE_SATURATED = 0x00001000, ///< Source is thought to be saturated pixels (bleed trail) 21 PM_SOURCE_MODE_CR_LIMIT = 0x00002000, ///< Source has crNsigma above limit 22 PM_SOURCE_MODE_EXT_LIMIT = 0x00004000, ///< Source has extNsigma above limit 23 PM_SOURCE_MODE_MOMENTS_FAILURE = 0x00008000, ///< could not measure the moments 24 PM_SOURCE_MODE_SKY_FAILURE = 0x00010000, ///< could not measure the local sky 25 PM_SOURCE_MODE_SKYVAR_FAILURE = 0x00020000, ///< could not measure the local sky variance 26 PM_SOURCE_MODE_BELOW_MOMENTS_SN = 0x00040000, ///< moments not measured due to low S/N 27 PM_SOURCE_MODE_BIG_RADIUS = 0x00100000, ///< poor moments for small radius, try large radius 28 PM_SOURCE_MODE_AP_MAGS = 0x00200000, ///< source has an aperture magnitude 29 PM_SOURCE_MODE_BLEND_FIT = 0x00400000, ///< source was fitted as a blend 30 PM_SOURCE_MODE_EXTENDED_FIT = 0x00800000, ///< full extended fit was used 31 PM_SOURCE_MODE_EXTENDED_STATS = 0x01000000, ///< extended aperture stats calculated 32 PM_SOURCE_MODE_LINEAR_FIT = 0x02000000, ///< source fitted with the linear fit 33 PM_SOURCE_MODE_NONLINEAR_FIT = 0x04000000, ///< source fitted with the non-linear fit 34 PM_SOURCE_MODE_RADIAL_FLUX = 0x08000000, ///< radial flux measurements calculated 35 PM_SOURCE_MODE_SIZE_SKIPPED = 0x10000000, ///< size could not be determined 36 PM_SOURCE_MODE_ON_SPIKE = 0x20000000, ///< peak lands on diffraction spike 37 PM_SOURCE_MODE_ON_GHOST = 0x40000000, ///< peak lands on ghost or glint 38 PM_SOURCE_MODE_OFF_CHIP = 0x80000000, ///< peak lands off edge of chip 39 39 } pmSourceMode; 40 40 … … 42 42 // When adding to or subtracting from this list, please also modify pmSourceMaskHeader 43 43 typedef enum { 44 PM_SOURCE_MODE2_DEFAULT = 0x00000000, ///< Initial value: resets all bits 45 PM_SOURCE_MODE2_DIFF_WITH_SINGLE = 0x00000001, ///< diff source matched to a single positive detection 46 PM_SOURCE_MODE2_DIFF_WITH_DOUBLE = 0x00000002, ///< diff source matched to positive detections in both images 47 PM_SOURCE_MODE2_MATCHED = 0x00000004, ///< diff source matched to positive detections in both images 48 PM_SOURCE_MODE2_DIFF_SELF_MATCH = 0x00000800, ///< positive detection match is probably this source 49 50 PM_SOURCE_MODE2_ON_SPIKE = 0x00000008, ///< > 25% of (PSF-weighted) pixels land on diffraction spike 51 PM_SOURCE_MODE2_ON_STARCORE = 0x00000010, ///< > 25% of (PSF-weighted) pixels land on starcore 52 PM_SOURCE_MODE2_ON_BURNTOOL = 0x00000020, ///< > 25% of (PSF-weighted) pixels land on burntool 53 PM_SOURCE_MODE2_ON_CONVPOOR = 0x00000040, ///< > 25% of (PSF-weighted) pixels land on convpoor 54 55 PM_SOURCE_MODE2_PASS1_SRC = 0x00000080, ///< source detected in first pass analysis 56 44 PM_SOURCE_MODE2_DEFAULT = 0x00000000, ///< Initial value: resets all bits 45 PM_SOURCE_MODE2_DIFF_WITH_SINGLE = 0x00000001, ///< diff source matched to a single positive detection 46 PM_SOURCE_MODE2_DIFF_WITH_DOUBLE = 0x00000002, ///< diff source matched to positive detections in both images 47 PM_SOURCE_MODE2_MATCHED = 0x00000004, ///< diff source matched to positive detections in both images 48 PM_SOURCE_MODE2_ON_SPIKE = 0x00000008, ///< > 25% of (PSF-weighted) pixels land on diffraction spike 49 PM_SOURCE_MODE2_ON_STARCORE = 0x00000010, ///< > 25% of (PSF-weighted) pixels land on starcore 50 PM_SOURCE_MODE2_ON_BURNTOOL = 0x00000020, ///< > 25% of (PSF-weighted) pixels land on burntool 51 PM_SOURCE_MODE2_ON_CONVPOOR = 0x00000040, ///< > 25% of (PSF-weighted) pixels land on convpoor 52 PM_SOURCE_MODE2_PASS1_SRC = 0x00000080, ///< source detected in first pass analysis 57 53 PM_SOURCE_MODE2_HAS_BRIGHTER_NEIGHBOR = 0x00000100, ///< peak is not the brightest in its footprint 58 54 PM_SOURCE_MODE2_BRIGHT_NEIGHBOR_1 = 0x00000200, ///< flux_n / (r^2 flux_p) > 1 59 55 PM_SOURCE_MODE2_BRIGHT_NEIGHBOR_10 = 0x00000400, ///< flux_n / (r^2 flux_p) > 10 56 PM_SOURCE_MODE2_DIFF_SELF_MATCH = 0x00000800, ///< positive detection match is probably this source 57 PM_SOURCE_MODE2_SATSTAR_PROFILE = 0x00001000, ///< saturated source is modeled with a radial profile 60 58 } pmSourceMode2; 61 59 -
trunk/psModules/src/objects/pmSourceMatch.c
r32046 r34403 24 24 #include "pmSourceExtendedPars.h" 25 25 #include "pmSourceDiffStats.h" 26 #include "pmSourceSatstar.h" 26 27 #include "pmSource.h" 27 28 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmSourceMoments.c
r33838 r34403 41 41 #include "pmSourceExtendedPars.h" 42 42 #include "pmSourceDiffStats.h" 43 #include "pmSourceSatstar.h" 43 44 #include "pmSource.h" 44 45 -
trunk/psModules/src/objects/pmSourceOutputs.c
r33690 r34403 32 32 #include "pmSourceExtendedPars.h" 33 33 #include "pmSourceDiffStats.h" 34 #include "pmSourceSatstar.h" 34 35 #include "pmSource.h" 35 36 #include "pmSourceFitModel.h" … … 226 227 *pltScale = 0.5*(pltScale_x + pltScale_y); 227 228 229 float crossProduct = dTPx_dCHx * dTPy_dCHy - dTPx_dCHy * dTPy_dCHx; 230 if (crossProduct > 0.) { 231 *pltScale *= -1.0; 232 } 233 228 234 float posAngle_x = atan2 (+dTPy_dCHx, +dTPx_dCHx); 229 235 float posAngle_y = atan2 (-dTPy_dCHy, +dTPx_dCHy); -
trunk/psModules/src/objects/pmSourcePhotometry.c
r34085 r34403 39 39 #include "pmSourceExtendedPars.h" 40 40 #include "pmSourceDiffStats.h" 41 #include "pmSourceSatstar.h" 41 42 #include "pmSource.h" 42 43 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmSourcePlotApResid.c
r29004 r34403 41 41 #include "pmSourceExtendedPars.h" 42 42 #include "pmSourceDiffStats.h" 43 #include "pmSourceSatstar.h" 43 44 #include "pmSource.h" 44 45 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmSourcePlotMoments.c
r29004 r34403 44 44 #include "pmSourceExtendedPars.h" 45 45 #include "pmSourceDiffStats.h" 46 #include "pmSourceSatstar.h" 46 47 #include "pmSource.h" 47 48 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmSourcePlotPSFModel.c
r32347 r34403 45 45 #include "pmSourceExtendedPars.h" 46 46 #include "pmSourceDiffStats.h" 47 #include "pmSourceSatstar.h" 47 48 #include "pmSource.h" 48 49 #include "pmSourceFitModel.h" -
trunk/psModules/src/objects/pmSourceSky.c
r29004 r34403 40 40 #include "pmSourceExtendedPars.h" 41 41 #include "pmSourceDiffStats.h" 42 #include "pmSourceSatstar.h" 42 43 #include "pmSource.h" 43 44 -
trunk/psModules/src/objects/pmSourceUtils.c
r29004 r34403 40 40 #include "pmSourceExtendedPars.h" 41 41 #include "pmSourceDiffStats.h" 42 #include "pmSourceSatstar.h" 42 43 #include "pmSource.h" 43 44 -
trunk/psModules/src/objects/pmSourceVisual.c
r31153 r34403 22 22 #include "pmSourceExtendedPars.h" 23 23 #include "pmSourceDiffStats.h" 24 #include "pmSourceSatstar.h" 24 25 #include "pmSource.h" 25 26 #include "pmSourceFitModel.h" -
trunk/psModules/src/psmodules.h
r31451 r34403 132 132 #include <pmSourceMasks.h> 133 133 #include <pmSourceExtendedPars.h> 134 #include <pmSourceSatstar.h> 134 135 #include <pmSourceDiffStats.h> 135 136 #include <pmSource.h>
Note:
See TracChangeset
for help on using the changeset viewer.
