- Timestamp:
- Sep 19, 2014, 4:05:27 PM (12 years ago)
- Location:
- branches/eam_branches/ps2-tc3-20130727
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
psModules/src/extras/pmVisual.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ps2-tc3-20130727
- Property svn:mergeinfo changed
-
branches/eam_branches/ps2-tc3-20130727/psModules/src/extras/pmVisual.c
r36680 r37403 22 22 bool pmSourceVisualClose(void); 23 23 24 // #include "pmHDU.h"25 // #include "pmFPA.h"26 // #include "pmFPAfile.h"27 // #include "pmAstrometryObjects.h"28 // #include "pmSubtractionStamps.h"29 // #include "pmTrend2D.h"30 // #include "pmResiduals.h"31 // #include "pmGrowthCurve.h"32 // #include "pmSpan.h"33 // #include "pmFootprintSpans.h"34 // #include "pmFootprint.h"35 // #include "pmPeaks.h"36 // #include "pmMoments.h"37 // #include "pmModelFuncs.h"38 // #include "pmModel.h"39 // #include "pmSourceMasks.h"40 // #include "pmSourceExtendedPars.h"41 // #include "pmSourceDiffStats.h"42 24 #include "pmSourceSatstar.h" 43 // #include "pmSourceLensing.h"44 // #include "pmSource.h"45 // #include "pmSourceFitModel.h"46 // #include "pmPSF.h"47 // #include "pmPSFtry.h"48 // #include "pmFPAExtent.h"49 // #include "pmAstrometryVisual.h"50 // #include "pmSubtractionVisual.h"51 // #include "pmStackVisual.h"52 // #include "pmSourceVisual.h"53 25 54 26 # if (HAVE_KAPA) … … 161 133 } 162 134 135 136 // ask the user to continue or not. give up after 2 seconds. 137 bool pmVisualAskUserOrDump(bool *plotFlag, bool *dumpData) 138 { 139 struct timeval timeout; 140 fd_set fdSet; 141 int status; 142 143 if (dumpData) *dumpData = false; 144 145 char key[10]; 146 if (plotFlag && dumpData) { 147 fprintf (stderr, "[p]ause? [c]ontinue? [s]kip the rest of these plots? [d]ump the data? [a]bort all visual plots? (c) "); 148 } 149 if (plotFlag && !dumpData) { 150 fprintf (stderr, "[p]ause? [c]ontinue? [s]kip the rest of these plots? [a]bort all visual plots? (c) "); 151 } 152 if (!plotFlag && dumpData) { 153 fprintf (stderr, "[p]ause? [c]ontinue? [d]ump the data? [a]bort all visual plots? (c) "); 154 } 155 if (!plotFlag && !dumpData) { 156 fprintf (stderr, "[p]ause? [c]ontinue? [a]bort all visual plots? (c) "); 157 } 158 159 /* Wait up to 1.0 second for a response, then continue */ 160 timeout.tv_sec = 10; 161 timeout.tv_usec = 0; 162 163 FD_ZERO (&fdSet); 164 FD_SET (STDIN_FILENO, &fdSet); 165 166 status = select (1, &fdSet, NULL, NULL, &timeout); 167 if (status <= 0) { 168 fprintf (stderr, "\n"); 169 return true; // if no data, give up 170 } 171 172 while (true) { 173 if (!fgets(key, 8, stdin)) { 174 psWarning("Unable to read option"); 175 } 176 switch (key[0]) { 177 case 's': 178 if (plotFlag) *plotFlag = false; 179 return true; 180 case 'd': 181 if (dumpData) *dumpData = true; 182 return true; 183 case 'a': 184 isVisual = false; 185 return true; 186 case 'c': 187 case '\n': 188 return true; 189 default: 190 break; 191 } 192 193 if (plotFlag && dumpData) { 194 fprintf (stderr, "[p]ause? [c]ontinue? [s]kip the rest of these plots? [d]ump the data? [a]bort all visual plots? (c) "); 195 } 196 if (plotFlag && !dumpData) { 197 fprintf (stderr, "[p]ause? [c]ontinue? [s]kip the rest of these plots? [a]bort all visual plots? (c) "); 198 } 199 if (!plotFlag && dumpData) { 200 fprintf (stderr, "[p]ause? [c]ontinue? [d]ump the data? [a]bort all visual plots? (c) "); 201 } 202 if (!plotFlag && !dumpData) { 203 fprintf (stderr, "[p]ause? [c]ontinue? [a]bort all visual plots? (c) "); 204 } 205 } 206 return true; 207 } 163 208 164 209 bool pmVisualImStats(psImage *image, double *mean, double *stdev, double *min, double *max) {
Note:
See TracChangeset
for help on using the changeset viewer.
