Changeset 21508 for trunk/Ohana/src/opihi
- Timestamp:
- Feb 16, 2009, 11:33:52 AM (17 years ago)
- Location:
- trunk/Ohana/src/opihi
- Files:
-
- 5 added
- 5 deleted
- 12 edited
-
cmd.data/Makefile (modified) (5 diffs)
-
cmd.data/applyfit.c (deleted)
-
cmd.data/applyfit1d.c (added)
-
cmd.data/clip.c (deleted)
-
cmd.data/fit.c (deleted)
-
cmd.data/fit1d.c (added)
-
cmd.data/imclip.c (added)
-
cmd.data/imstats.c (added)
-
cmd.data/init.c (modified) (8 diffs)
-
cmd.data/stats.c (deleted)
-
cmd.data/vstat.c (deleted)
-
cmd.data/vstats.c (added)
-
dvo/dbExtractAverages.c (modified) (1 diff)
-
dvo/dbExtractImages.c (modified) (1 diff)
-
dvo/dbExtractMeasures.c (modified) (5 diffs)
-
dvo/dbFields.c (modified) (2 diffs)
-
dvo/gimages.c (modified) (1 diff)
-
dvo/gstar.c (modified) (4 diffs)
-
dvo/paverage.c (modified) (1 diff)
-
dvo/photometry.c (modified) (14 diffs)
-
dvo/pmeasure.c (modified) (1 diff)
-
include/dvoshell.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.data/Makefile
r17579 r21508 20 20 $(SRC)/accum.$(ARCH).o \ 21 21 $(SRC)/applyfit2d.$(ARCH).o \ 22 $(SRC)/applyfit .$(ARCH).o \22 $(SRC)/applyfit1d.$(ARCH).o \ 23 23 $(SRC)/box.$(ARCH).o \ 24 24 $(SRC)/book.$(ARCH).o \ … … 26 26 $(SRC)/center.$(ARCH).o \ 27 27 $(SRC)/clear.$(ARCH).o \ 28 $(SRC)/ clip.$(ARCH).o \28 $(SRC)/imclip.$(ARCH).o \ 29 29 $(SRC)/close.$(ARCH).o \ 30 30 $(SRC)/concat.$(ARCH).o \ … … 44 44 $(SRC)/fft1d.$(ARCH).o \ 45 45 $(SRC)/fft2d.$(ARCH).o \ 46 $(SRC)/fit1d.$(ARCH).o \ 46 47 $(SRC)/fit2d.$(ARCH).o \ 47 $(SRC)/fit.$(ARCH).o \48 48 $(SRC)/gaussj.$(ARCH).o \ 49 49 $(SRC)/gaussdeviate.$(ARCH).o \ … … 107 107 $(SRC)/spline_apply.$(ARCH).o \ 108 108 $(SRC)/spline_construct.$(ARCH).o \ 109 $(SRC)/ stats.$(ARCH).o\109 $(SRC)/imstats.$(ARCH).o \ 110 110 $(SRC)/style.$(ARCH).o \ 111 111 $(SRC)/subraster.$(ARCH).o \ … … 131 131 $(SRC)/vroll.$(ARCH).o \ 132 132 $(SRC)/vsmooth.$(ARCH).o \ 133 $(SRC)/vstat .$(ARCH).o \133 $(SRC)/vstats.$(ARCH).o \ 134 134 $(SRC)/wd.$(ARCH).o \ 135 135 $(SRC)/write_vectors.$(ARCH).o \ -
trunk/Ohana/src/opihi/cmd.data/init.c
r21064 r21508 3 3 int accum PROTO((int, char **)); 4 4 int applyfit PROTO((int, char **)); 5 int applyfit1d PROTO((int, char **)); 5 6 int applyfit2d PROTO((int, char **)); 6 7 int box PROTO((int, char **)); … … 11 12 int clear PROTO((int, char **)); 12 13 int clip PROTO((int, char **)); 14 int imclip PROTO((int, char **)); 13 15 int close_device PROTO((int, char **)); 14 16 int concat PROTO((int, char **)); … … 29 31 int fft1d PROTO((int, char **)); 30 32 int fft2d PROTO((int, char **)); 33 int fit PROTO((int, char **)); 34 int fit1d PROTO((int, char **)); 31 35 int fit2d PROTO((int, char **)); 32 int fit PROTO((int, char **));33 36 int gaussjordan PROTO((int, char **)); 34 37 int gaussdeviate PROTO((int, char **)); … … 92 95 int spline_construct_cmd PROTO((int, char **)); 93 96 int stats PROTO((int, char **)); 97 int imstats PROTO((int, char **)); 94 98 int style PROTO((int, char **)); 95 99 int subraster PROTO((int, char **)); … … 113 117 int vload PROTO((int, char **)); 114 118 int vzload PROTO((int, char **)); 115 int vstat PROTO((int, char **));119 int vstats PROTO((int, char **)); 116 120 int vroll PROTO((int, char **)); 117 121 int vpop PROTO((int, char **)); … … 124 128 static Command cmds[] = { 125 129 {1, "accum", accum, "accumulate vector values in another vector"}, 126 {1, "applyfit", applyfit, "apply fit to new vector"}, 130 {1, "applyfit", applyfit1d, "apply 1-d fit to new vector"}, 131 {1, "applyfit1d", applyfit1d, "apply 1-d fit to new vector"}, 127 132 {1, "applyfit2d", applyfit2d, "apply 2-d fit to new vector"}, 133 {1, "book", book_command, "commands to manipulate book/page/word data"}, 128 134 {1, "box", box, "draw a box on the plot"}, 129 {1, "book", book_command, "commands to manipulate book/page/word data"}, 135 {1, "buffers", list_buffers, "list the currently allocated buffers (images)"}, 136 {1, "images", list_buffers, "list the currently allocated images"}, 130 137 {1, "center", center, "center image on coords"}, 131 {1, "parity", parity, "set image parity"},132 138 {1, "circstats", circstats, "circular statistics"}, 133 139 {1, "clear", clear, "erase plot"}, 134 {1, "clip", clip, "clip values in a bufferto be within a range"},140 {1, "clip", imclip, "clip values in an image to be within a range"}, 135 141 {1, "close", close_device, "close the current display device"}, 136 {1, "concat", concat, " reduce vector dimension"},142 {1, "concat", concat, "append values to the end of a vector"}, 137 143 {1, "contour", contour, "create contour from image"}, 138 144 {1, "create", create, "create a new vector"}, 145 {1, "vcreate", create, "create a new vector"}, 139 146 {1, "cumulative", cumulative, "build a cumulative histogram from a specific histogram"}, 140 147 {1, "cursor", cursor, "get coords from cursor"}, … … 143 150 {1, "dbconnect", dbconnect, "setup mysql db connection"}, 144 151 {1, "dbselect", dbselect, "extract vectors from mysql database table"}, 145 {1, "delete", delete, "delete vectors or matrices"},152 {1, "delete", delete, "delete vectors or images"}, 146 153 {1, "device", device, "set / get current graphics device"}, 147 {1, "dimendown", dimendown, "convert matrix to vector"}, 148 {1, "dimenup", dimenup, "convert vector to matrix"}, 149 {1, "erase", erase, "erase objects on an overlay"}, 150 {1, "extract", extract, "extract a portion of a buffer into another buffer"}, 151 {1, "fft1d", fft1d, "fft on the pixel-stream in an image"}, 154 {1, "dimendown", dimendown, "convert image to vector"}, 155 {1, "dimenup", dimenup, "convert vector to image"}, 156 {1, "dot", dot, "plot a single point"}, 157 {1, "erase", erase, "erase objects on an image overlay"}, 158 {1, "extract", extract, "extract a portion of a image into another image"}, 159 {1, "fft1d", fft1d, "fft on a vector"}, 152 160 {1, "fft2d", fft2d, "fft on an image"}, 153 {1, "fit", fit, "fit polynomial to vector pair"}, 161 {1, "fit", fit1d, "fit polynomial to vector pair"}, 162 {1, "fit1d", fit1d, "fit polynomial to vector pair"}, 154 163 {1, "fit2d", fit2d, "fit 2-d polynomial to vector triplet"}, 155 {1, "gaussj", gaussjordan, "solve Ax = B (N-D)"},156 164 {1, "gaussdev", gaussdeviate, "generate a gaussian deviate vector"}, 157 165 {1, "gaussint", gaussintegral, "return the integrated gaussian vector"}, 158 {1, "grid", grid, "plot cartesian grid"}, 159 {1, "gridify", gridify, "convert vector triplet to buffer"}, 166 {1, "gaussj", gaussjordan, "solve Ax = B (N-Dimensional)"}, 167 {1, "grid", grid, "plot cartesian grid on graph"}, 168 {1, "gridify", gridify, "convert vector triplet to image (same as vgrid?)"}, 160 169 {1, "grow", grow, "grow a mask"}, 161 {1, "ungridify", ungridify, "convert buffer region to vector triplet"}, 162 {1, "header", header, "print buffer header"}, 170 {1, "header", header, "print image header"}, 163 171 {1, "histogram", histogram, "generate histogram from vector"}, 172 {1, "imbin", rebin, "rebin image data by factor of N"}, 173 {1, "imclip", imclip, "clip values in an image to be within a range"}, 164 174 {1, "imcut", imcut, "linear image cut between arbitrary coords"}, 165 {1, "imhist ",imhist, "histogram of an image region"},175 {1, "imhistogram", imhist, "histogram of an image region"}, 166 176 {1, "imsmooth", imsmooth, "circular gaussian smoothing"}, 177 {1, "imstats", imstats, "statistics on a portion of an image"}, 167 178 {1, "integrate", integrate, "integrate a vector"}, 168 179 {1, "interpolate", interpolate, "interpolate between vector pairs"}, 169 {1, "jpeg", jpeg, "write text line on graph"}, 170 {1, "png", jpeg, "write text line on graph"}, 171 {1, "ppm", jpeg, "write text line on graph"}, 180 {1, "jpeg", jpeg, "convert display image to JPEG"}, 172 181 {1, "kern", kern, "convolve with 3x3 kernel"}, 173 {1, "keyword", keyword, "extract a FITS keyword from bufferheader"},182 {1, "keyword", keyword, "extract a FITS keyword from image header"}, 174 183 {1, "labels", labels, "define labels for plot"}, 175 184 {1, "limits", limits, "define plot limits"}, 176 {1, "line", line, "plot line"}, 177 {1, "buffers", list_buffers, "list the currently allocated buffers"}, 178 {1, "vectors", list_vectors, "list vectors"}, 179 {1, "load", load, "load an SAOimage style overlay"}, 185 {1, "line", line, "plot a line"}, 186 {1, "load", load, "load an SAOimage/DS9 style overlay"}, 180 187 {1, "lookup", lookup, "convert vector via lookup table (vector pair)"}, 181 {1, "m krgb", mkrgb, "convert 3 images to rgb jpeg"},182 {1, " mcreate", mcreate, "create a matrix"},188 {1, "mcreate", mcreate, "create an image"}, 189 {1, "imcreate", mcreate, "create an image"}, 183 190 {1, "medacc", medacc, "accumulate vector values in another vector"}, 184 {1, "mget", mget, "extract a vector from a matrix"}, 191 {1, "mget", mget, "extract a vector from an image"}, 192 {1, "imget", mget, "extract a vector from an image"}, 185 193 {1, "minterp", minterp, "interpolate image pixels"}, 186 {1, "mset", mset, "insert a vector in a matrix"}, 194 {1, "iminterp", minterp, "interpolate image pixels"}, 195 {1, "mkrgb", mkrgb, "convert 3 images to rgb jpeg (use Kapa for better control)"}, 196 {1, "imset", mset, "insert a vector in an image"}, 197 {1, "parity", parity, "set image parity"}, 187 198 {1, "peak", peak, "find vector peak in range"}, 188 199 {1, "periodogram", periodogram, "measure periods in unevenly sampled data"}, 189 200 {1, "plot", plot, "plot a pair of vectors"}, 190 {1, "dot", dot, "plot a single point"}, 191 {1, "point", point, "load overlay with single point"}, 192 {1, "ps", ps, "define labels for plot"}, 201 {1, "png", jpeg, "convert display graphic to PNG"}, 202 {1, "point", point, "load image overlay with a single point"}, 203 {1, "ppm", jpeg, "convert display graphic to PPM"}, 204 {1, "ps", ps, "convert display to PostScript"}, 205 {1, "queuedelete", queuedelete, "delete a queue"}, 206 {1, "queuedrop", queuedrop, "drop values from queue matching a key"}, 207 {1, "queueinit", queueinit, "create an empty queue"}, 208 {1, "queuelist", queuelist, "list defined queues"}, 209 {1, "queueload", queueload, "load queue from command"}, 193 210 {1, "queuepop", queuepop, "pop value from queue to variable"}, 194 {1, "queuedrop", queuedrop, "drop values from queue matching a key"},195 211 {1, "queueprint", queueprint, "print the contents of a queue"}, 196 212 {1, "queuepush", queuepush, "push value onto queue"}, 197 {1, "queueinit", queueinit, "create an empty queue"}, 198 {1, "queuedelete", queuedelete, "delete a queue"}, 199 {1, "queuelist", queuelist, "list defined queues"}, 200 {1, "queueload", queueload, "load queue from command"}, 213 {1, "queuesize", queuesize, "show queue size"}, 201 214 {1, "queuesubstr", queuesubstr, "bulk replace strings in queue"}, 202 {1, "queuesize", queuesize, "show queue size"},203 215 {1, "rd", rd, "load fits image"}, 204 216 {1, "rdseg", rdseg, "read a segment of an image from a file"}, 205 217 {1, "read", read_vectors, "read vectors from datafile"}, 206 {1, "rebin", rebin, "rebin data by factor of N"},218 {1, "rebin", rebin, "rebin image data by factor of N"}, 207 219 {1, "resize", resize, "set graphics/image window size"}, 208 220 {1, "roll", roll, "roll image to new start point"}, 209 221 {1, "rotate", rotate, "rotate image"}, 210 {1, "save", save, "save an SAOimage style overlay"},222 {1, "save", save, "save an SAOimage style image overlay"}, 211 223 {1, "section", section, "define section of graph"}, 212 {1, "set", set, "vector math"}, 224 {1, "select", vect_select, "selective vector assignment"}, 225 {1, "set", set, "image and vector math"}, 213 226 {1, "shift", shift, "shift data in an image"}, 214 227 {1, "sort", sort_vectors, "sort list of vectors"}, 215 228 {1, "spline.apply", spline_apply_cmd, "apply spline fit to generate an image"}, 216 229 {1, "spline.const", spline_construct_cmd, "create spline 2nd deriv. terms"}, 217 {1, "stats", stats, "give statistics on a portion of a buffer"},230 {1, "stats", imstats, "statistics on a portion of an image"}, 218 231 {1, "style", style, "set the style for graph plots"}, 219 232 {1, "subraster", subraster, "subraster of fits image"}, 220 {1, "subset", subset, " expand vector dimension"},221 {1, "svd", svd, "singular value decomposition of a matrix "},233 {1, "subset", subset, "generate a vector from a portion of another vector"}, 234 {1, "svd", svd, "singular value decomposition of a matrix (image)"}, 222 235 {1, "swapbytes", swapbytes, "byte swap thing"}, 223 236 {1, "textline", textline, "write text line on graph"}, … … 225 238 {1, "tvchannel", tvchannel, "set the current tv channel"}, 226 239 {1, "tvcolors", tvcolors, "set the tv colormap"}, 227 {1, "tvcontour", tvcontour, "send contour to overlay"}, 228 {1, "tvgrid", tvgrid, "wait until return is typed"}, 240 {1, "tvcontour", tvcontour, "send contour to image overlay"}, 241 {1, "tvgrid", tvgrid, "RA/DEC grid on an image"}, 242 {1, "ungridify", ungridify, "convert image region to vector triplet"}, 229 243 {1, "uniq", uniq, "create a uniq vector subset from a vector"}, 230 244 {1, "unsign", unsign, "toggle the UNSIGN status"}, 231 {1, "vbin", vbin, " bin values in a vector to be within a range"},245 {1, "vbin", vbin, "rebin vector data by a fector of N"}, 232 246 {1, "vclip", vclip, "clip values in a vector to be within a range"}, 233 {1, "select", vect_select, "selective vector assignment"}, 234 {1, "vgauss", vgauss, ""}, 235 {1, "vmaxwell", vmaxwell, ""}, 236 {1, "vgrid", vgrid, ""}, 237 {1, "vload", vload, "load vectors on Kii"}, 238 {1, "vzload", vzload, "load vectors on Kii"}, 239 {1, "vstat", vstat, "get info from imreg database"}, 240 {1, "vsmooth", vsmooth, "gaussian smooth of a vector"}, 247 {1, "vectors", list_vectors, "list vectors"}, 248 {1, "vgauss", vgauss, "fit a Gaussian to a vector"}, 249 {1, "vgrid", vgrid, "generate an image from a triplet of vectors"}, 250 {1, "vhistogram", histogram, "generate histogram from vector"}, 251 {1, "vload", vload, "load vectors as overlay on image display"}, 252 {1, "vmaxwell", vmaxwell, "fit a Maxwellian to a vector"}, 253 {1, "vpop", vpop, "remove first element of a vector"}, 241 254 {1, "vroll", vroll, "roll vector elements"}, 242 {1, "vpop", vpop, "remove first element"}, 255 {1, "vsmooth", vsmooth, "Gaussian smooth of a vector"}, 256 {1, "vstats", vstats, "statistics on a vector"}, 257 {1, "vzload", vzload, "load vectors as overlay on image display (scaled points)"}, 243 258 {1, "wd", wd, "write an image to a file"}, 244 259 {1, "write", write_vectors, "write vectors to datafile"}, 245 {1, "zap", zap, " delete pixels"},260 {1, "zap", zap, "assign values to pixel regions"}, 246 261 {1, "zplot", zplot, "plot x y with size scaled by z"}, 247 262 }; -
trunk/Ohana/src/opihi/dvo/dbExtractAverages.c
r21153 r21508 121 121 break; 122 122 case AVE_FLAG: 123 value.Int = average[0]. code;123 value.Int = average[0].flags; 124 124 break; 125 125 case AVE_OBJID: -
trunk/Ohana/src/opihi/dvo/dbExtractImages.c
r20936 r21508 247 247 break; 248 248 case IMAGE_FLAG: 249 value.Int = image[N]. code;249 value.Int = image[N].flags; 250 250 break; 251 251 case IMAGE_CCDNUM: -
trunk/Ohana/src/opihi/dvo/dbExtractMeasures.c
r21153 r21508 146 146 case MAG_NPHOT: 147 147 if (equiv == NULL) { 148 value.Int = NAN;148 value.Int = 0; 149 149 break; 150 150 } … … 260 260 break; 261 261 case MEAS_OBJFLAGS: /* OK */ 262 value.Int = average[0]. code;262 value.Int = average[0].flags; 263 263 break; 264 264 // note that these represent the ra displacement relative to the average, not … … 312 312 break; 313 313 case MEAS_DOPHOT: /* OK */ 314 value. Flt = measure[0].dophot;314 value.Int = (measure[0].photFlags >> 16); 315 315 break; 316 316 case MEAS_DB_FLAGS: /* ? */ … … 394 394 break; 395 395 case MEAS_PSF_QF: /* OK */ 396 value.Flt = measure[0]. qPSF;396 value.Flt = measure[0].psfQual; 397 397 break; 398 398 case MEAS_PSF_CHISQ: /* OK */ … … 404 404 case MEAS_EXT_NSIGMA: /* OK */ 405 405 value.Flt = measure[0].extNsigma; 406 break;407 case MEAS_STARGAL: /* OK */408 value.Flt = measure[0].stargal;409 406 break; 410 407 -
trunk/Ohana/src/opihi/dvo/dbFields.c
r21153 r21508 170 170 if (!strcasecmp (fieldName, "FWHM_MIN")) ESCAPE (MEAS_FWHM_MIN, MAG_NONE, OPIHI_FLT); 171 171 if (!strcasecmp (fieldName, "THETA")) ESCAPE (MEAS_THETA, MAG_NONE, OPIHI_FLT); 172 if (!strcasecmp (fieldName, "DOPHOT")) ESCAPE (MEAS_DOPHOT, MAG_NONE, OPIHI_ FLT);172 if (!strcasecmp (fieldName, "DOPHOT")) ESCAPE (MEAS_DOPHOT, MAG_NONE, OPIHI_INT); 173 173 if (!strcasecmp (fieldName, "DB_FLAGS")) ESCAPE (MEAS_DB_FLAGS, MAG_NONE, OPIHI_INT); 174 174 if (!strcasecmp (fieldName, "PHOT_FLAGS")) ESCAPE (MEAS_PHOT_FLAGS, MAG_NONE, OPIHI_INT); … … 193 193 if (!strcasecmp (fieldName, "SKY")) ESCAPE (MEAS_SKY, MAG_NONE, OPIHI_FLT); 194 194 if (!strcasecmp (fieldName, "SKY_ERR")) ESCAPE (MEAS_dSKY, MAG_NONE, OPIHI_FLT); 195 if (!strcasecmp (fieldName, "STARGAL")) ESCAPE (MEAS_STARGAL, MAG_NONE, OPIHI_FLT);196 195 197 196 // for words that don't parse, try a photcode -
trunk/Ohana/src/opihi/dvo/gimages.c
r21153 r21508 220 220 if (PixelCoords) { 221 221 gprint (GP_LOG, "%3d %s %6.1f %6.1f %20s %5d %2d %4.2f %6.3f %5.3f %5.3f %4x\n", 222 Nfound, image[i].name, X, Y, date, image[i].nstar, image[i].photcode, image[i].secz, image[i].Mcal, image[i].dMcal, image[i].exptime, image[i]. code);222 Nfound, image[i].name, X, Y, date, image[i].nstar, image[i].photcode, image[i].secz, image[i].Mcal, image[i].dMcal, image[i].exptime, image[i].flags); 223 223 } else { 224 224 XY_to_RD (&ra, &dec, 0.5*image[i].NX, 0.5*image[i].NY, &image[i].coords); 225 225 gprint (GP_LOG, "%3d %s %8.4f %8.4f %20s %5d %2d %4.2f %6.3f %5.3f %5.3f %4x\n", 226 Nfound, image[i].name, ra, dec, date, image[i].nstar, image[i].photcode, image[i].secz, image[i].Mcal, image[i].dMcal, image[i].exptime, image[i]. code);226 Nfound, image[i].name, ra, dec, date, image[i].nstar, image[i].photcode, image[i].secz, image[i].Mcal, image[i].dMcal, image[i].exptime, image[i].flags); 227 227 } 228 228 sprintf (name, "IMAGEx:%d", Nfound); -
trunk/Ohana/src/opihi/dvo/gstar.c
r20936 r21508 158 158 gprint (GP_LOG, "%3d ", catalog.average[k].Nmeasure); 159 159 gprint (GP_LOG, "%4.1f ", 0.01*catalog.average[k].Xp); 160 gprint (GP_LOG, "%5d", catalog.average[k]. code);160 gprint (GP_LOG, "%5d", catalog.average[k].flags); 161 161 162 162 if (FULL_OUTPUT) { … … 211 211 gprint (GP_LOG, "%7.4f ", catalog.measure[m].dR); 212 212 gprint (GP_LOG, "%7.4f", catalog.measure[m].dD); 213 gprint (GP_LOG, "% 2d ", catalog.measure[m].dophot);213 gprint (GP_LOG, "%4x ", catalog.measure[m].photFlags); 214 214 gprint (GP_LOG, "%3x ", catalog.measure[m].dbFlags); 215 215 gprint (GP_LOG, "%5d ", catalog.measure[m].photcode); … … 233 233 gprint (GP_LOG, "%d", catalog.measure[m].detID); 234 234 gprint (GP_LOG, "%d", catalog.measure[m].imageID); 235 gprint (GP_LOG, "%f", catalog.measure[m]. qPSF);235 gprint (GP_LOG, "%f", catalog.measure[m].psfQual); 236 236 gprint (GP_LOG, "%f", catalog.measure[m].psfChisq); 237 237 gprint (GP_LOG, "%f", catalog.measure[m].crNsigma); … … 240 240 gprint (GP_LOG, "%f", 0.01*catalog.measure[m].FWy); 241 241 gprint (GP_LOG, "%f", (360.0/(float)0xffff)*catalog.measure[m].theta); 242 243 gprint (GP_LOG, "%x", catalog.measure[m].photFlags);244 gprint (GP_LOG, "%d", catalog.measure[m].stargal);245 242 } 246 243 gprint (GP_LOG, "\n"); -
trunk/Ohana/src/opihi/dvo/paverage.c
r20936 r21508 122 122 /* project stars to screen display coords */ 123 123 for (i = 0; (i < catalog.Naverage) && !interrupt; i++) { 124 if (IDclip && (average[i]. code!= IDchoice)) continue;124 if (IDclip && (average[i].flags != IDchoice)) continue; 125 125 average[i].R = ohana_normalize_angle (average[i].R); 126 126 while (average[i].R < Rmin) average[i].R += 360.0; -
trunk/Ohana/src/opihi/dvo/photometry.c
r17200 r21508 2 2 3 3 /* match code to measure */ 4 # define TESTCODE(C,M) \5 if (C != NULL) { \6 switch (C[0].type) { \7 case PHOT_DEP:\8 case PHOT_REF:\9 if (C[0].code != M.photcode) continue;\10 break;\11 case PHOT_SEC:\12 if (C[0].code != GetPhotcodeEquivCodebyCode (M.photcode)) continue; \13 break;\14 default:\15 break;\16 } }4 # define TESTCODE(C,M) \ 5 if (C != NULL) { \ 6 switch (C[0].type) { \ 7 case PHOT_DEP: \ 8 case PHOT_REF: \ 9 if (C[0].code != M.photcode) continue; \ 10 break; \ 11 case PHOT_SEC: \ 12 if (C[0].code != GetPhotcodeEquivCodebyCode (M.photcode)) continue; \ 13 break; \ 14 default: \ 15 break; \ 16 } } 17 17 18 18 /* exclusions based on measure.params */ 19 # define TESTMEASURE(M) \ 20 if (ApplySelections[SelectionParam]) { \ 21 if (TimeSelect && (M.t < tzero)) continue; \ 22 if (TimeSelect && (M.t > tend)) continue; \ 23 if (ErrSelect && (M.dM > ErrValue)) continue; \ 19 # define TESTMEASURE(M) \ 20 if (ApplySelections[SelectionParam]) { \ 21 if (TimeSelect && (M.t < tzero)) continue; \ 22 if (TimeSelect && (M.t > tend)) continue; \ 23 if (ErrSelect && (M.dM > ErrValue)) continue; \ 24 if (iMagSelect && (PhotInst (&M) < iMagMin)) continue; \ 25 if (FlagSelect && (M.dbFlags != FlagValue)) continue; \ 24 26 if (TypeSelect && (TypeValue != GetMeasureTypeCode (&M))) continue; \ 25 if (iMagSelect && (PhotInst (&M) < iMagMin)) continue; \ 26 if (FlagSelect && (M.dbFlags != FlagValue)) continue; \ 27 } 28 29 # define SETMAG(MOUT,MEAS,MODE) \ 30 MOUT = NAN; \ 31 if (MODE == MAG_INST) MOUT = PhotInst (&MEAS); \ 32 if (MODE == MAG_CAT) MOUT = PhotCat (&MEAS); \ 33 if (MODE == MAG_SYS) MOUT = PhotSys (&MEAS, average, secfilt); \ 34 if (MODE == MAG_REL) MOUT = PhotRel (&MEAS, average, secfilt); \ 27 } 28 29 # define SETMAG(MOUT,MEAS,MODE) \ 30 MOUT = NAN; \ 31 if (MODE == MAG_INST) MOUT = PhotInst (&MEAS); \ 32 if (MODE == MAG_CAT) MOUT = PhotCat (&MEAS); \ 33 if (MODE == MAG_SYS) MOUT = PhotSys (&MEAS, average, secfilt); \ 34 if (MODE == MAG_REL) MOUT = PhotRel (&MEAS, average, secfilt); \ 35 35 if (MODE == MAG_CAL) MOUT = PhotCal (&MEAS, average, secfilt, measure, GetPhotcodeEquivbyCode (MEAS.photcode)); \ 36 36 if (MODE == MAG_AVE) MOUT = PhotAve (GetPhotcodeEquivbyCode (MEAS.photcode), average, secfilt); \ 37 37 if (MODE == MAG_REF) MOUT = PhotRef (GetPhotcodeEquivbyCode (MEAS.photcode), average, secfilt, measure); \ 38 if (ApplySelections[SelectionParam]) { \39 if (MagSelect && (MOUT > MagMax)) continue; \40 if (MagSelect && (MOUT < MagMin)) continue; \38 if (ApplySelections[SelectionParam]) { \ 39 if (MagSelect && (MOUT > MagMax)) continue; \ 40 if (MagSelect && (MOUT < MagMin)) continue; \ 41 41 } 42 42 … … 182 182 if (!strcasecmp (parname, "dec")) param = MEAS_DEC; 183 183 if (!strcasecmp (parname, "mag")) param = MEAS_MAG; 184 // if (!strcasecmp (parname, "dmag")) param = MEAS_dMAG;185 184 if (!strcasecmp (parname, "airmass")) param = MEAS_AIRMASS; 186 185 if (!strcasecmp (parname, "exptime")) param = MEAS_EXPTIME; … … 190 189 if (!strcasecmp (parname, "dD")) param = MEAS_DEC_OFFSET; 191 190 if (!strcasecmp (parname, "fwhm")) param = MEAS_FWHM; 192 // if (!strcasecmp (parname, "dophot")) param = MEAS_DOPHOT;193 191 if (!strcasecmp (parname, "FLAGS")) param = MEAS_DB_FLAGS; 194 192 if (!strcasecmp (parname, "XCCD")) param = MEAS_XCCD; … … 198 196 if (!strcasecmp (parname, "help")) { 199 197 gprint (GP_ERR, "value may be one of the following:\n"); 200 gprint (GP_ERR, " ra dR dec dD mag dmag Mrel Mcal photcode time fwhm dophotxccd yccd xmosaic ymosaic flags\n");198 gprint (GP_ERR, " ra dR dec dD mag dmag Mrel Mcal photcode time fwhm xccd yccd xmosaic ymosaic flags\n"); 201 199 gprint (GP_ERR, "value may also be a valid photcode\n"); 202 200 gprint (GP_ERR, "photcodes or 'mag' may have optional magnitude type: mag,[Minst, Mcat, Msys, Mrel, Mcal]\n"); … … 311 309 312 310 if (VarConfig ("ZERO_PT", "%lf", &ZERO_POINT) == (char *) NULL) { 313 gprint (GP_ERR, "ZERO_PT undefined in config\n");314 return (FALSE);311 gprint (GP_ERR, "ZERO_PT undefined in config\n"); 312 return (FALSE); 315 313 } 316 314 SetZeroPoint (ZERO_POINT); … … 324 322 325 323 if (VarConfig ("PHOTCODE_FILE", "%s", MasterPhotcodeFile) == (char *) NULL) { 326 gprint (GP_ERR, "PHOTCODE_FILE undefined in config\n");327 return (FALSE);324 gprint (GP_ERR, "PHOTCODE_FILE undefined in config\n"); 325 return (FALSE); 328 326 } 329 327 if (!LoadPhotcodes (CatdirPhotcodeFile, MasterPhotcodeFile)) { … … 642 640 break; 643 641 case AVE_FLAG: 644 value = average[0]. code;642 value = average[0].flags; 645 643 break; 646 644 case AVE_MAG: … … 659 657 value = NAN; 660 658 for (i = 0; i < average[0].Nmeasure; i++) { 661 if (code[0].code != measure[i].photcode) continue;662 value = measure[i].M;659 if (code[0].code != measure[i].photcode) continue; 660 value = measure[i].M; 663 661 } 664 662 break; … … 675 673 break; 676 674 case AVE_TYPEFRAC: 677 value = DetermineTypefrac (average, measure, code); 675 // value = DetermineTypefrac (average, measure, code); 676 value = NAN; 678 677 break; 679 678 case AVE_NCODE: … … 719 718 if ((code != NULL) && (code[0].code != GetPhotcodeEquivCodebyCode (measure[k].photcode))) continue; 720 719 Nc ++; 721 if ( measure[k].dophot!= TypefracType) continue;720 if ((measure[k].photFlags >> 16) != TypefracType) continue; 722 721 Nt ++; 723 722 } … … 744 743 745 744 int GetMeasureTypeCode (Measure *measure) { 746 switch ( measure[0].dophot) {745 switch ((measure[0].photFlags >> 16)) { 747 746 case 0: 748 747 case 1: … … 770 769 if (IsDophot) { 771 770 772 if ( measure[0].dophot== 4) return (FALSE);771 if ((measure[0].photFlags >> 16) == 4) return (FALSE); 773 772 return (TRUE); 774 773 … … 866 865 if (ErrSelect) { 867 866 dM = PhotdM (code, average, secfilt); 868 if (dM > ErrValue) return ( NAN);867 if (dM > ErrValue) return (FALSE); 869 868 } 870 869 … … 1137 1136 value = average[0].D - measure[0].dD / 3600.0; 1138 1137 break; 1139 # if (0)1140 case MEAS_dMAG: /* OK */1141 value = measure[0].dM;1142 break;1143 1138 case MEAS_DOPHOT: /* OK */ 1144 value = measure[0].dophot; 1145 break; 1146 # endif 1139 value = (measure[0].photFlags >> 16); 1140 break; 1147 1141 case MEAS_AIRMASS: /* OK */ 1148 1142 value = measure[0].airmass; -
trunk/Ohana/src/opihi/dvo/pmeasure.c
r20936 r21508 192 192 /* project stars to screen display coords */ 193 193 for (i = 0; (i < catalog.Naverage) && !interrupt; i++) { 194 if (IDclip && (catalog.average[i]. code!= IDchoice)) continue;194 if (IDclip && (catalog.average[i].flags != IDchoice)) continue; 195 195 catalog.average[i].R = ohana_normalize_angle (catalog.average[i].R); 196 196 while (catalog.average[i].R < Rmin) catalog.average[i].R += 360.0; -
trunk/Ohana/src/opihi/include/dvoshell.h
r21153 r21508 106 106 MEAS_CR_NSIGMA, 107 107 MEAS_EXT_NSIGMA, 108 MEAS_STARGAL,109 108 }; 110 109
Note:
See TracChangeset
for help on using the changeset viewer.
