Changeset 7382
- Timestamp:
- Jun 6, 2006, 5:27:52 PM (20 years ago)
- Location:
- trunk/psModules/src
- Files:
-
- 26 deleted
- 12 edited
-
astrom/pmAstrometryObjects.c (modified) (2 diffs)
-
camera/pmChipMosaic.c (modified) (3 diffs)
-
camera/pmFPACopy.c (modified) (8 diffs)
-
camera/pmFPARead.c (modified) (4 diffs)
-
camera/pmFPA_JPEG.c (modified) (4 diffs)
-
camera/pmFPAfile.c (modified) (1 diff)
-
camera/pmHDU.c (modified) (1 diff)
-
camera/pmHDUGenerate.c (modified) (3 diffs)
-
concepts/pmConcepts.c (modified) (1 diff)
-
concepts/pmConceptsWrite.c (modified) (2 diffs)
-
objects/pmSourceIO.c (modified) (3 diffs)
-
pslib/.cvsignore (deleted)
-
pslib/Makefile.am (deleted)
-
pslib/psAdditionals.c (deleted)
-
pslib/psAdditionals.h (deleted)
-
pslib/psEllipse.c (deleted)
-
pslib/psEllipse.h (deleted)
-
pslib/psImageFlip.c (deleted)
-
pslib/psImageFlip.h (deleted)
-
pslib/psImageJpeg.c (deleted)
-
pslib/psImageJpeg.h (deleted)
-
pslib/psImageUnbin.c (deleted)
-
pslib/psImageUnbin.h (deleted)
-
pslib/psLine.c (deleted)
-
pslib/psLine.h (deleted)
-
pslib/psMetadataItemCompare.c (deleted)
-
pslib/psMetadataItemCompare.h (deleted)
-
pslib/psMetadataItemParse.c (deleted)
-
pslib/psMetadataItemParse.h (deleted)
-
pslib/psPolynomialUtils.c (deleted)
-
pslib/psPolynomialUtils.h (deleted)
-
pslib/psRegionIsBad.c (deleted)
-
pslib/psRegionIsBad.h (deleted)
-
pslib/psSparse.c (deleted)
-
pslib/psSparse.h (deleted)
-
pslib/psVectorSmooth.c (deleted)
-
pslib/psVectorSmooth.h (deleted)
-
psmodules.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/astrom/pmAstrometryObjects.c
r7282 r7382 8 8 * @author EAM, IfA 9 9 * 10 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $11 * @date $Date: 2006-06-0 2 02:15:35$10 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2006-06-07 03:27:52 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 803 803 804 804 // smooth histgram vector with gaussian of 1sigma = radius 805 psVectorSmooth (xHist, tweakSmooth, tweakNsigma);806 psVectorSmooth (yHist, tweakSmooth, tweakNsigma);805 psVectorSmooth(xHist, xHist, tweakSmooth, tweakNsigma); 806 psVectorSmooth(yHist, yHist, tweakSmooth, tweakNsigma); 807 807 808 808 // select peak in x and in y -
trunk/psModules/src/camera/pmChipMosaic.c
r7278 r7382 1 1 #include <stdio.h> 2 2 #include <assert.h> 3 #include "pslib.h"3 #include <pslib.h> 4 4 #include "pmFPA.h" 5 5 #include "pmHDU.h" 6 #include "psRegionIsBad.h"7 6 8 7 … … 52 51 pmCell *cell = cells->data[i]; // Cell of interest 53 52 psRegion *trimsec = psMetadataLookupPtr(&mdok, cell->concepts, "CELL.TRIMSEC"); // Trim section 54 if (!mdok || !trimsec || psRegionIs Bad(*trimsec)) {53 if (!mdok || !trimsec || psRegionIsNaN(*trimsec)) { 55 54 psError(PS_ERR_IO, true, "CELL.TRIMSEC hasn't been set for cell %d.\n", i); 56 55 return false; … … 86 85 psRegion *biassec = NULL; // Bias section from iteration 87 86 while ((biassec = psListGetAndIncrement(biassecsIter))) { 88 if (psRegionIs Bad(*biassec)) {87 if (psRegionIsNaN(*biassec)) { 89 88 continue; 90 89 } -
trunk/psModules/src/camera/pmFPACopy.c
r7278 r7382 2 2 #include <assert.h> 3 3 4 #include "pslib.h" 5 #include "psImageFlip.h" 6 #include "psRegionIsBad.h" 4 #include <pslib.h> 7 5 8 6 #include "pmFPA.h" … … 17 15 // File-static functions 18 16 ////////////////////////////////////////////////////////////////////////////////////////////////////////////// 19 20 // Copy pixels from a target image to a source image, with flips21 static psImage *copyPixels(psImage *source, // Source image (from source cell)22 bool xFlip, // Flip in x?23 bool yFlip // Flip in y?24 )25 {26 assert(source);27 28 psImage *copy = psMemIncrRefCounter(source);29 bool copied = false; // Have the pixels been copied?30 if (xFlip) {31 psImage *temp = psImageFlipX(copy); // Flipped version32 psFree(copy);33 copy = temp;34 copied = true;35 }36 if (yFlip) {37 psImage *temp = psImageFlipY(copy); // Flipped version38 psFree(copy);39 copy = temp;40 copied = true;41 }42 if (!copied) {43 psFree(copy);44 copy = psImageCopy(NULL, source, source->type.type);45 }46 47 return copy;48 }49 17 50 18 // Bin a region down by specified factors in x and y … … 154 122 psFree(targetReadout->image); 155 123 } 156 targetReadout->image = copyPixels(sourceReadout->image, xFlip, yFlip);124 targetReadout->image = psImageFlip(NULL, sourceReadout->image, xFlip, yFlip); 157 125 } 158 126 … … 162 130 psFree(targetReadout->mask); 163 131 } 164 targetReadout->mask = copyPixels(sourceReadout->mask, xFlip, yFlip);132 targetReadout->mask = psImageFlip(NULL, sourceReadout->mask, xFlip, yFlip); 165 133 } 166 134 … … 170 138 psFree(targetReadout->weight); 171 139 } 172 targetReadout->weight = copyPixels(sourceReadout->weight, xFlip, yFlip);140 targetReadout->weight = psImageFlip(NULL, sourceReadout->weight, xFlip, yFlip); 173 141 } 174 142 … … 181 149 psImage *bias = NULL; // Bias image from iteration 182 150 while ((bias = psListGetAndIncrement(biasIter))) { 183 psImage *biasCopy = copyPixels(bias, xFlip, yFlip);151 psImage *biasCopy = psImageFlip(NULL, bias, xFlip, yFlip); 184 152 psListAdd(targetReadout->bias, PS_LIST_TAIL, biasCopy); 185 153 psFree(biasCopy); // Drop reference … … 209 177 if (xBin != 1 || yBin != 1) { 210 178 psRegion *trimsec = psMetadataLookupPtr(&mdok, target->concepts, "CELL.TRIMSEC"); // The trim section 211 if (mdok && trimsec && !psRegionIs Bad(*trimsec)) {179 if (mdok && trimsec && !psRegionIsNaN(*trimsec)) { 212 180 binRegion(trimsec, xBin, yBin); 213 181 } … … 217 185 psRegion *biassec = NULL; // Bias section, from iteration 218 186 while ((biassec = psListGetAndIncrement(biassecsIter))) { 219 if (!psRegionIs Bad(*biassec)) {187 if (!psRegionIsNaN(*biassec)) { 220 188 binRegion(biassec, xBin, yBin); 221 189 } -
trunk/psModules/src/camera/pmFPARead.c
r7311 r7382 8 8 #include "pmHDUUtils.h" 9 9 #include "pmConcepts.h" 10 #include "psRegionIsBad.h"11 10 #include "pmFPAHeader.h" 12 11 … … 33 32 34 33 // The image corresponding to the trim region 35 if (psRegionIs Bad(*trimsec)) {34 if (psRegionIsNaN(*trimsec)) { 36 35 psString regionString = psRegionToString(*trimsec); 37 36 psError(PS_ERR_UNKNOWN, true, "Invalid trim section: %s\n", regionString); … … 59 58 psRegion *biassec = NULL; // A BIASSEC region from the list 60 59 while ((biassec = psListGetAndIncrement(iter))) { 61 if (psRegionIs Bad(*biassec)) {60 if (psRegionIsNaN(*biassec)) { 62 61 psString regionString = psRegionToString(*biassec); 63 62 psError(PS_ERR_IO, true, "Invalid bias section: %s\n", regionString); … … 190 189 bool mdok = true; // Status of MD lookup 191 190 psRegion *trimsec = psMetadataLookupPtr(&mdok, cell->concepts, "CELL.TRIMSEC"); // Trim sections 192 if (!mdok || !trimsec || psRegionIs Bad(*trimsec)) {191 if (!mdok || !trimsec || psRegionIsNaN(*trimsec)) { 193 192 psError(PS_ERR_IO, true, "CELL.TRIMSEC is not set.\n"); 194 193 return false; -
trunk/psModules/src/camera/pmFPA_JPEG.c
r7311 r7382 5 5 * @author EAM, IfA 6 6 * 7 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $8 * @date $Date: 2006-06-0 3 01:02:08$7 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2006-06-07 03:27:52 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 17 17 18 18 #include <pslib.h> 19 # include "psImageJpeg.h"20 # include "psImageUnbin.h"21 # include "psAdditionals.h"22 19 23 20 #include "pmHDU.h" … … 141 138 142 139 // XXX we need to decide where the scale will come from in the long term 143 unsigned long seed = 0; 144 psImageClippedStatsInit (10000, seed); 145 146 psStats *stats = psImageClippedStats (readout->image, NULL, 0, 0.25, 0.75); 140 psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS, 0); 141 psStats *stats = psImageBackground(readout->image, NULL, 0, 0.25, 0.75, 10000, rng); 147 142 float delta = stats->robustUQ - stats->robustLQ; 148 143 float min = stats->robustMedian - 3*delta; … … 162 157 psImageJpeg (map, readout->image, name, min, max); 163 158 164 psFree (name);165 psFree (mode);166 psFree (word);167 psFree (mapname);168 psFree (map);169 psFree (stats);170 ps ImageClippedStatsCleanup ();159 psFree(name); 160 psFree(mode); 161 psFree(word); 162 psFree(mapname); 163 psFree(map); 164 psFree(stats); 165 psFree(rng); 171 166 172 167 return true; -
trunk/psModules/src/camera/pmFPAfile.c
r7323 r7382 1 1 #include <stdio.h> 2 #include "pslib.h"3 #include "psAdditionals.h" 2 #include <pslib.h> 3 4 4 #include "pmConfig.h" 5 5 #include "pmHDU.h" -
trunk/psModules/src/camera/pmHDU.c
r7278 r7382 4 4 #include "pslib.h" 5 5 #include "pmFPA.h" 6 #include "psAdditionals.h"7 6 8 7 ////////////////////////////////////////////////////////////////////////////////////////////////////////////// -
trunk/psModules/src/camera/pmHDUGenerate.c
r7288 r7382 6 6 #include "pmHDU.h" 7 7 #include "pmHDUUtils.h" 8 #include "psRegionIsBad.h"9 8 10 9 #include "pmHDUGenerate.h" … … 66 65 while ((cell = psListGetAndIncrement(cellsIter))) { 67 66 psRegion *trimsec = psMetadataLookupPtr(&mdok, cell->concepts, "CELL.TRIMSEC"); // Trim section 68 if (mdok && trimsec && !psRegionIs Bad(*trimsec)) {67 if (mdok && trimsec && !psRegionIsNaN(*trimsec)) { 69 68 *xSize = PS_MAX(trimsec->x1, *xSize); 70 69 *ySize = PS_MAX(trimsec->y1, *ySize); … … 78 77 psRegion *biassec = NULL; // The bias section 79 78 while ((biassec = psListGetAndIncrement(biassecsIter))) { 80 if (!psRegionIs Bad(*trimsec)) {79 if (!psRegionIsNaN(*trimsec)) { 81 80 *xSize = PS_MAX(biassec->x1, *xSize); 82 81 *ySize = PS_MAX(biassec->y1, *ySize); -
trunk/psModules/src/concepts/pmConcepts.c
r7313 r7382 3 3 #include <stdio.h> 4 4 #include <assert.h> 5 6 #include "pslib.h" 5 #include <pslib.h> 6 7 7 #include "pmConcepts.h" 8 8 #include "pmConceptsRead.h" 9 9 #include "pmConceptsWrite.h" 10 10 #include "pmConceptsStandard.h" 11 #include "psAdditionals.h"12 11 13 12 static bool conceptsInitialised = false;// Have concepts been read? -
trunk/psModules/src/concepts/pmConceptsWrite.c
r7278 r7382 2 2 #include <assert.h> 3 3 #include <strings.h> 4 #include "pslib.h"4 #include <pslib.h> 5 5 6 6 #include "pmFPA.h" … … 9 9 #include "pmConcepts.h" 10 10 #include "pmConceptsRead.h" 11 #include "psAdditionals.h"12 11 #include "psMetadataItemCompare.h" 13 12 -
trunk/psModules/src/objects/pmSourceIO.c
r7311 r7382 3 3 * @author EAM, IfA 4 4 * 5 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $6 * @date $Date: 2006-06-0 3 01:02:08$5 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2006-06-07 03:27:52 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 13 13 #include <math.h> 14 14 #include <string.h> 15 #include "pslib.h" 16 #include "psAdditionals.h" 15 #include <pslib.h> 17 16 #include "pmHDU.h" 18 17 #include "pmFPA.h" … … 32 31 int pmSourceDophotType (pmSource *source) 33 32 { 34 35 33 switch (source->type) { 36 34 -
trunk/psModules/src/psmodules.h
r7359 r7382 2 2 #define PS_MODULES_H 3 3 4 // XXX should this be included explicitly?5 4 #include <pslib.h> 6 7 // the following headers are from psModule:pslib8 #include <psImageJpeg.h>9 #include <psImageFlip.h>10 #include <psImageUnbin.h>11 #include <psLine.h>12 #include <psPolynomialUtils.h>13 #include <psSparse.h>14 #include <psEllipse.h>15 #include <psVectorSmooth.h>16 #include <psAdditionals.h>17 #include <psRegionIsBad.h>18 #include <psMetadataItemParse.h>19 5 20 6 // the following headers are from psModule:config … … 42 28 #include <pmFPAWrite.h> 43 29 #include <pmFPA_JPEG.h> 44 //#include <pmReadout.h>45 30 #include <pmChipMosaic.h> 46 31 … … 66 51 67 52 // the following headers are from psModule:objects 68 # include <pmPeaks.h>69 # include <pmMoments.h>70 # include <pmModel.h>71 # include <pmSource.h>72 # include <pmSourceIO.h>73 # include <pmSourceSky.h>74 # include <pmSourceFitModel.h>75 # include <pmSourceContour.h>76 # include <pmGrowthCurve.h>77 # include <pmPSF.h>78 # include <pmPSF_IO.h>79 # include <pmPSFtry.h>80 # include <pmModelGroup.h>81 # include <pmSourcePhotometry.h>53 #include <pmPeaks.h> 54 #include <pmMoments.h> 55 #include <pmModel.h> 56 #include <pmSource.h> 57 #include <pmSourceIO.h> 58 #include <pmSourceSky.h> 59 #include <pmSourceFitModel.h> 60 #include <pmSourceContour.h> 61 #include <pmGrowthCurve.h> 62 #include <pmPSF.h> 63 #include <pmPSF_IO.h> 64 #include <pmPSFtry.h> 65 #include <pmModelGroup.h> 66 #include <pmSourcePhotometry.h> 82 67 83 68 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
