Changeset 24244 for branches/cnb_branches/cnb_branch_20090301/Ohana
- Timestamp:
- May 26, 2009, 1:59:32 PM (17 years ago)
- Location:
- branches/cnb_branches/cnb_branch_20090301
- Files:
-
- 23 edited
- 2 copied
-
. (modified) (1 prop)
-
Ohana (modified) (1 prop)
-
Ohana/src/addstar/include/skycells.h (modified) (1 diff)
-
Ohana/src/addstar/src/args_skycells.c (modified) (1 diff)
-
Ohana/src/addstar/src/load_subpix.c (modified) (1 diff)
-
Ohana/src/addstar/src/sky_tessalation.c (modified) (4 diffs)
-
Ohana/src/getstar/src/Shutdown.c (modified) (1 diff)
-
Ohana/src/libfits/Makefile (modified) (1 diff)
-
Ohana/src/libfits/extern/gzip.c (copied) (copied from trunk/Ohana/src/libfits/extern/gzip.c )
-
Ohana/src/libfits/matrix/F_compress_M.c (modified) (2 diffs)
-
Ohana/src/libfits/matrix/F_uncompress_data.c (modified) (2 diffs)
-
Ohana/src/libohana/doc/kahan-gji.pdf (copied) (copied from trunk/Ohana/src/libohana/doc/kahan-gji.pdf )
-
Ohana/src/libohana/src/gaussj.c (modified) (6 diffs)
-
Ohana/src/opihi/cmd.astro/coord_systems.c (modified) (1 diff)
-
Ohana/src/opihi/cmd.data/fit1d.c (modified) (1 diff)
-
Ohana/src/opihi/cmd.data/gaussj.c (modified) (2 diffs)
-
Ohana/src/opihi/cmd.data/init.c (modified) (1 diff)
-
Ohana/src/opihi/dimm/camera_cmds.c (modified) (1 prop)
-
Ohana/src/opihi/dimm/telescope_cmds.c (modified) (1 prop)
-
Ohana/src/opihi/dvo/avextract.c (modified) (1 diff)
-
Ohana/src/opihi/dvo/gstar.c (modified) (10 diffs)
-
Ohana/src/opihi/dvo/mextract.c (modified) (1 diff)
-
Ohana/src/opihi/dvo/mmextract.c (modified) (1 diff)
-
Ohana/src/opihi/lib.shell/gprint.c (modified) (1 diff)
-
Ohana/src/tools/src/fields.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/cnb_branches/cnb_branch_20090301
- Property svn:mergeinfo changed
-
branches/cnb_branches/cnb_branch_20090301/Ohana
- Property svn:mergeinfo changed
/trunk/Ohana merged: 23664,23688,23724,23740,23815-23816,23914,23985,24002,24027-24028,24033,24080-24082,24174,24219,24232-24233
- Property svn:mergeinfo changed
-
branches/cnb_branches/cnb_branch_20090301/Ohana/src/addstar/include/skycells.h
r23352 r24244 98 98 int sky_triangle_coords PROTO((SkyTriangle *triangle)); 99 99 100 SkyRectangle *sky_rectangle_ring PROTO((float dec, float dDEC, int *nring ));100 SkyRectangle *sky_rectangle_ring PROTO((float dec, float dDEC, int *nring, char *format)); 101 101 102 102 SkyTriangle *sky_divide_triangles PROTO((SkyTriangle *in, int *ntriangles)); -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/addstar/src/args_skycells.c
r23352 r24244 182 182 183 183 fprintf (stderr, " -mode (name) : define the type of tessellation. available options are:\n"); 184 fprintf (stderr, " SQUARE : generate rectangular skycells using icosahedronbase solid (default)\n");184 fprintf (stderr, " SQUARE : generate rectangular skycells using base solid (default)\n"); 185 185 fprintf (stderr, " TRIANGLE : generate triangular skycells using icosahedron base solid\n"); 186 fprintf (stderr, " RINGS : generate rectangular skycells using declination strips\n"); 186 187 fprintf (stderr, " LOCAL : generate a local tessellation around a spot on the sky\n"); 187 188 fprintf (stderr, " (Note that this tessellation does not cover the full sky)\n"); 188 fprintf (stderr, " -solid (name) : specify the base solid \n");189 fprintf (stderr, " -solid (name) : specify the base solid (default: ICOSAHEDRON)\n"); 189 190 fprintf (stderr, " value may be one of: TETRAHEDRON, CUBE, OCTOHEDRON, DODECAHEDRON, ICOSAHEDRON\n"); 190 191 fprintf (stderr, " for convenience, only the first 4 characters are required\n"); -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/addstar/src/load_subpix.c
r3376 r24244 22 22 23 23 for (i = 0; i < Nsubpix; i++) { 24 fscanf (f, "%*s %*s %lf %lf %lf %*s\n", 25 &Subpix[i].Amp, &Subpix[i].Phase, &Subpix[i].dM); 24 if (fscanf (f, "%*s %*s %lf %lf %lf %*s\n", 25 &Subpix[i].Amp, &Subpix[i].Phase, &Subpix[i].dM) != 3) { 26 Shutdown("can't read subpix datafile %s", SubpixDatafile); 27 } 26 28 } 27 29 fclose (f); -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/addstar/src/sky_tessalation.c
r23352 r24244 231 231 int sky_tessellation_rings (FITS_DB *db, int level, int Nmax) { 232 232 233 int j, nDEC, Nimage, Nring ;233 int j, nDEC, Nimage, Nring, Ntotal, Ndigit; 234 234 float dec, dDEC; 235 235 SkyRectangle *ring; 236 236 Image *image; 237 char format[16]; 237 238 238 239 // The tessellation has one input parameter: the approximate cell size. Starting with … … 246 247 nDEC += 2; 247 248 248 // a test 249 // for (dec = 0.0 + 0.5*dDEC; dec < +90.0; dec += dDEC) { 249 // how many total projection cells for this realization? divide sky area by cell area: 250 // this is used to set the number of digits, so it does not need to be very accurate... 251 Ntotal = 41254.2 / (dDEC*dDEC); 252 Ndigit = (int)(log10(Ntotal)) + 1 ; 253 snprintf (format, 16, "skycell.%%0%dd", Ndigit); 250 254 251 255 // generate the a collection of rectangles for each ring 252 256 for (dec = -90.0; dec < +90.0 + 0.5*dDEC; dec += dDEC) { 253 257 254 ring = sky_rectangle_ring (dec, dDEC, &Nring );258 ring = sky_rectangle_ring (dec, dDEC, &Nring, format); 255 259 if (!ring) continue; 256 260 … … 534 538 535 539 // define the parameters of a single sky projection center 536 SkyRectangle *sky_rectangle_ring (float dec, float dDEC, int *nring) { 537 540 SkyRectangle *sky_rectangle_ring (float dec, float dDEC, int *nring, char *format) { 541 542 static int Nname = 0; 538 543 int i, NX, NY, nRA; 539 544 SkyRectangle *ring; … … 631 636 strcpy (ring[i].coords.ctype, "DEC--TAN"); 632 637 633 ring[i].NX = NX ;634 ring[i].NY = NY ;638 ring[i].NX = NX*(1.0 + PADDING); 639 ring[i].NY = NY*(1.0 + PADDING); 635 640 ring[i].photcode = 1; // this needs to be set more sensibly 636 641 642 snprintf (ring[i].name, DVO_IMAGE_NAME_LEN, format, Nname); 643 Nname++; 637 644 638 645 // fprintf (stderr, "%f %f : %f %f\n", -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/getstar/src/Shutdown.c
r7080 r24244 21 21 va_end (argp); 22 22 23 if (!db) { exit (2); } 23 24 SetProtect (TRUE); 24 25 gfits_db_close (db); -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/libfits/Makefile
r16093 r24244 60 60 $(EXT)/fits_hdecompress.$(ARCH).o \ 61 61 $(EXT)/pliocomp.$(ARCH).o \ 62 $(EXT)/ricecomp.$(ARCH).o 62 $(EXT)/ricecomp.$(ARCH).o \ 63 $(EXT)/gzip.$(ARCH).o 63 64 64 65 OBJS = $(HEADER_OBJ) $(MATRIX_OBJ) $(TABLE_OBJ) $(EXTERN_OBJ) -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/libfits/matrix/F_compress_M.c
r20652 r24244 248 248 // XXX not certain this is the correct place to do the swap (or if zdata_pixsize is 249 249 // the correct size to guide the swap) 250 if (!gfits_byteswap_zdata (zdata, Nzdata, zdata_pixsize)) return (FALSE); 250 251 if (strcasecmp(cmptype, "GZIP_1")) { 252 if (!gfits_byteswap_zdata (zdata, Nzdata, zdata_pixsize)) return (FALSE); 253 } 251 254 252 255 // gfits_uncompress_data uncompresses from zdata to the temporary output buffer which must be allocated … … 496 499 497 500 if (!strcasecmp(cmptype, "GZIP_1")) { 498 return (4); 501 if (out_bitpix == 8) return (1); 502 if (out_bitpix == 16) return (2); 503 if (out_bitpix == 32) return (4); 504 if (out_bitpix == -32) return (4); 505 if (out_bitpix == -64) return (8); 506 return (1); 499 507 } 500 508 if (!strcasecmp(cmptype, "RICE_1")) { -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/libfits/matrix/F_uncompress_data.c
r18272 r24244 22 22 int pl_l2pi (short *ll_src, int xs, int *px_dst, int npix); 23 23 24 /* functions defined in gzip.c */ 25 int gfits_gz_stripheader (unsigned char *data, int *ndata); 26 int gfits_uncompress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen); 27 24 28 int gfits_uncompress_data (char *zdata, int Nzdata, char *cmptype, char **optname, char **optvalue, int Nopt, char *outdata, int *Nout, int out_pixsize) { 25 29 … … 30 34 if (!strcasecmp(cmptype, "GZIP_1")) { 31 35 unsigned long tNout = *Nout * out_pixsize; 36 37 // for GZIP data, I need to check for and remove the header on the first block: 38 gfits_gz_stripheader ((unsigned char *)zdata, &Nzdata); 39 32 40 // uncompress does not require us to know the expected number of pixel; it tells us the number 33 status = uncompress ((Bytef *) outdata, &tNout, (Bytef *) zdata, Nzdata);41 status = gfits_uncompress ((Bytef *) outdata, &tNout, (Bytef *) zdata, Nzdata); 34 42 if (status != Z_OK) { 35 43 fprintf (stderr, "error in uncompress (GZIP)\n"); 36 44 return (FALSE); 37 45 } 38 *Nout = tNout; 46 *Nout = tNout / out_pixsize; 47 48 // the resulting uncompressed data is byteswapped 49 if (!gfits_byteswap_zdata (outdata, *Nout, out_pixsize)) return (FALSE); 50 39 51 return (TRUE); 40 52 } -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/libohana/src/gaussj.c
r16120 r24244 1 1 # include <ohana.h> 2 # define GROWTHTEST 0 3 # define MAX_RANGE 1.0e7 2 4 3 5 // Gauss-Jordan elimination using full pivots based on Press et al's description. Substantially 4 6 // reworked for Ohana: major modifications to conform to C indexing, use a boolean to track the 5 7 // completed pivot rows and catch the singular matrix early on. Also, much cleaner control loops 6 // than their implementation. XXX this really needs to check on round-off errors (see version by 7 // William Kahan 8 // than their implementation. (largely based on version by William Kahan) 9 10 // MAX_RANGE is used to test for ill-conditioned input matrices. For an ill-conditioned 11 // matrix, one or more of the pivots trends towards zero. Rather than allow this to go to the 12 // numerical precision, I am raising an error if |growth| > 1e8 8 13 int dgaussjordan (double **A, double **B, int N, int M) { 9 14 … … 19 24 memset (pivot, 0, N*sizeof(int)); 20 25 26 double growth = 1.0; 27 21 28 // determine underflow conditions 22 29 // double underFlow = DBL_MIN; 23 # if ( 0)30 # if (GROWTHTEST) 24 31 double roundTest = 4.0; 25 32 roundTest /= 3.0; 26 33 roundTest -= 1.0; 27 34 double epsilon = fabs(((roundTest+roundTest) - 1.0) + roundTest); 28 double growth = 1.0;29 35 # endif 30 36 … … 57 63 } 58 64 65 # if (GROWTHTEST) 66 fprintf (stderr, "maxcol: %d\n", maxcol); 67 fprintf (stderr, "full A matrix:\n"); 68 for (row = 0; row < N; row++) { 69 for (col = 0; col < N; col++) { 70 fprintf (stderr, "%10.3e ", A[row][col]); 71 } 72 fprintf (stderr, "\n"); 73 } 74 fprintf (stderr, "\n"); 75 # endif 76 59 77 // if pivot[maxcol] is set, we have already done this row: this implies a singular matrix 60 78 if (pivot[maxcol]) goto escape; … … 76 94 for (col = 0; col < N; col++) A[maxcol][col] *= tmpval; 77 95 for (col = 0; col < M; col++) B[maxcol][col] *= tmpval; 78 // XXX measure the pivot growth and trigger on over/under flow 79 // growth *= tmpval; 80 // fprintf (stderr, "column: %d, growth: %e, epsilon: %e\n", maxcol, growth, epsilon); 96 97 // check for ill-conditioned matrix 98 growth *= tmpval; 99 100 // report the pivot growth 101 # if (GROWTHTEST) 102 fprintf (stderr, "column: %d, maxval : %f, growth: %e, epsilon: %e\n", maxcol, tmpval, growth, epsilon); 103 fprintf (stderr, "A diagonal: "); 104 for (col = 0; col < N; col++) fprintf (stderr, "%f ", A[col][col]); 105 fprintf (stderr, "\n"); 106 # endif 107 108 if (fabs(growth) > MAX_RANGE) goto escape; 81 109 82 110 /* adjust the elements above the pivot */ … … 122 150 memset (pivot, 0, N*sizeof(int)); 123 151 152 float growth = 1.0; 153 124 154 // determine underflow conditions 125 155 // float underFlow = FLT_MIN; 126 # if ( 0)156 # if (GROWTHTEST) 127 157 float roundTest = 4.0; 128 158 roundTest /= 3.0; 129 159 roundTest -= 1.0; 130 160 float epsilon = fabs(((roundTest+roundTest) - 1.0) + roundTest); 131 float growth = 1.0;132 161 # endif 133 162 … … 179 208 for (col = 0; col < N; col++) A[maxcol][col] *= tmpval; 180 209 for (col = 0; col < M; col++) B[maxcol][col] *= tmpval; 181 // growth *= tmpval; 182 // fprintf (stderr, "column: %d, growth: %e, epsilon: %e\n", maxcol, growth, epsilon); 210 211 // check for ill-conditioned matrix 212 growth *= tmpval; 213 214 // report the pivot growth 215 # if (GROWTHTEST) 216 fprintf (stderr, "column: %d, maxval : %f, growth: %e, epsilon: %e\n", maxcol, tmpval, growth, epsilon); 217 fprintf (stderr, "A diagonal: "); 218 for (col = 0; col < N; col++) fprintf (stderr, "%f ", A[col][col]); 219 fprintf (stderr, "\n"); 220 # endif 221 222 if (fabs(growth) > MAX_RANGE) goto escape; 183 223 184 224 /* adjust the elements above the pivot */ -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/opihi/cmd.astro/coord_systems.c
r18122 r24244 123 123 // atan2 returns -pi : +pi 124 124 *x = DEG_RAD * atan2 (sin_x, cos_x) + transform->xo; 125 if ((*x) < 0.0) (*x) += 360; 125 if ((*x) < 0.0) (*x) += 360; 126 if ((*x) > 360.0) (*x) -= 360; 126 127 127 128 // should be in range -pi/2 : +pi/2 -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/opihi/cmd.data/fit1d.c
r21508 r24244 125 125 } 126 126 } 127 if (!dgaussjordan (c, b, nterm, 1)) goto escape; 127 if (!dgaussjordan (c, b, nterm, 1)) { 128 gprint (GP_ERR, "failed to fit data : ill-conditioned matrix\n"); 129 goto escape; 130 } 128 131 129 132 /* generate fitted values */ -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/opihi/cmd.data/gaussj.c
r20936 r24244 47 47 status = dgaussjordan (a, b, N, 1); 48 48 49 // output vector needs to be float, so re-cast it 50 ResetVector (B, OPIHI_FLT, N); 51 vf = B[0].elements.Flt; 49 // if dgaussjordan succeeds, replace the input values with the results 50 if (status) { 51 // output vector needs to be float, so re-cast it 52 ResetVector (B, OPIHI_FLT, N); 53 vf = B[0].elements.Flt; 52 54 53 for (i = 0; i < N; i++) { 54 for (j = 0; j < N; j++) { 55 m[i+j*N] = a[i][j]; 55 for (i = 0; i < N; i++) { 56 for (j = 0; j < N; j++) { 57 m[i+j*N] = a[i][j]; 58 } 59 vf[i] = b[i][0]; 56 60 } 57 vf[i] = b[i][0];58 61 } 59 62 … … 66 69 67 70 if (!status && !QUIET) { 68 gprint (GP_ERR, " failure in matrix solution\n");71 gprint (GP_ERR, "gaussjordan: ill-conditioned matrix; input values are retained\n"); 69 72 } 70 73 return (status); -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/opihi/cmd.data/init.c
r21541 r24244 193 193 {1, "iminterp", minterp, "interpolate image pixels"}, 194 194 {1, "mkrgb", mkrgb, "convert 3 images to rgb jpeg (use Kapa for better control)"}, 195 {1, "mset", mset, "insert a vector in an image"}, 195 196 {1, "imset", mset, "insert a vector in an image"}, 196 197 {1, "parity", parity, "set image parity"}, -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/opihi/dimm/camera_cmds.c
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/cnb_branches/cnb_branch_20090301/Ohana/src/opihi/dimm/telescope_cmds.c
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/cnb_branches/cnb_branch_20090301/Ohana/src/opihi/dvo/avextract.c
r21086 r24244 205 205 gprint (GP_ERR, " <photcode>:cal : first calibrated magnitude for <photcode> \n"); 206 206 gprint (GP_ERR, " <photcode>:err : magnitude error for photcode\n"); 207 gprint (GP_ERR, " <photcode>:chi psq :chi-square of magnitude fit\n");207 gprint (GP_ERR, " <photcode>:chisq : raw chi-square of magnitude fit\n"); 208 208 gprint (GP_ERR, " type : dophot type (unused)\n"); 209 209 gprint (GP_ERR, " typefrac : dophot type fraction (unused)\n"); -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/opihi/dvo/gstar.c
r21508 r24244 14 14 int Nstars, found, GetMeasures, Nlo, Nhi; 15 15 int SaveVectors; 16 Vector *vec1, *vec2, *vec3, *vec4 ;16 Vector *vec1, *vec2, *vec3, *vec4, *vec5, *vec6; 17 17 SkyTable *sky; 18 18 SkyList *skylist; … … 37 37 38 38 NPTS = 0; 39 vec1 = vec2 = vec3 = vec4 = NULL;39 vec1 = vec2 = vec3 = vec4 = vec5 = vec6 = NULL; 40 40 SaveVectors = FALSE; 41 41 if ((N = get_argument (argc, argv, "-save"))) { … … 46 46 if ((vec3 = SelectVector ("gs:z", ANYVECTOR, TRUE)) == NULL) return (FALSE); 47 47 if ((vec4 = SelectVector ("gs:f", ANYVECTOR, TRUE)) == NULL) return (FALSE); 48 if ((vec5 = SelectVector ("gs:dr", ANYVECTOR, TRUE)) == NULL) return (FALSE); 49 if ((vec6 = SelectVector ("gs:dd", ANYVECTOR, TRUE)) == NULL) return (FALSE); 48 50 } 49 51 … … 87 89 /* lock, load, unlock catalog */ 88 90 catalog.filename = skylist[0].filename[0]; 89 catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF;91 catalog.catflags = GetMeasures ? LOAD_AVES | LOAD_MEAS | LOAD_SECF : LOAD_AVES | LOAD_SECF; 90 92 catalog.Nsecfilt = 0; 91 93 … … 140 142 ResetVector (vec3, OPIHI_FLT, NPTS); 141 143 ResetVector (vec4, OPIHI_FLT, NPTS); 144 ResetVector (vec5, OPIHI_FLT, NPTS); 145 ResetVector (vec6, OPIHI_FLT, NPTS); 142 146 } 143 147 … … 156 160 gprint (GP_LOG, "%11.7f ", catalog.average[k].R); 157 161 gprint (GP_LOG, "%11.7f ", catalog.average[k].D); 162 gprint (GP_LOG, "%5.2f ", 3600.0*sqrt(r)); 158 163 gprint (GP_LOG, "%3d ", catalog.average[k].Nmeasure); 159 164 gprint (GP_LOG, "%4.1f ", 0.01*catalog.average[k].Xp); 160 gprint (GP_LOG, "%5d ", catalog.average[k].flags);161 165 gprint (GP_LOG, "%5d ", catalog.average[k].flags); 166 162 167 if (FULL_OUTPUT) { 163 gprint (GP_LOG, "%f ", catalog.average[k].dR);164 gprint (GP_LOG, "%f ", catalog.average[k].dD);165 gprint (GP_LOG, "%f ", catalog.average[k].uR);166 gprint (GP_LOG, "%f ", catalog.average[k].uD);167 gprint (GP_LOG, "%f ", catalog.average[k].duR);168 gprint (GP_LOG, "%f ", catalog.average[k].duD);169 gprint (GP_LOG, "%f ", catalog.average[k].P);170 gprint (GP_LOG, "%f ", catalog.average[k].dP);171 gprint (GP_LOG, "%x ", catalog.average[k].objID);172 gprint (GP_LOG, "%x ", catalog.average[k].catID);168 gprint (GP_LOG, "%f ", catalog.average[k].dR); 169 gprint (GP_LOG, "%f ", catalog.average[k].dD); 170 gprint (GP_LOG, "%f ", catalog.average[k].uR); 171 gprint (GP_LOG, "%f ", catalog.average[k].uD); 172 gprint (GP_LOG, "%f ", catalog.average[k].duR); 173 gprint (GP_LOG, "%f ", catalog.average[k].duD); 174 gprint (GP_LOG, "%f ", catalog.average[k].P); 175 gprint (GP_LOG, "%f ", catalog.average[k].dP); 176 gprint (GP_LOG, "%x ", catalog.average[k].objID); 177 gprint (GP_LOG, "%x ", catalog.average[k].catID); 173 178 } 174 179 … … 210 215 gprint (GP_LOG, "%20s ", date); 211 216 gprint (GP_LOG, "%7.4f ", catalog.measure[m].dR); 212 gprint (GP_LOG, "%7.4f ",catalog.measure[m].dD);217 gprint (GP_LOG, "%7.4f ", catalog.measure[m].dD); 213 218 gprint (GP_LOG, "%4x ", catalog.measure[m].photFlags); 214 219 gprint (GP_LOG, "%3x ", catalog.measure[m].dbFlags); 215 220 gprint (GP_LOG, "%5d ", catalog.measure[m].photcode); 216 gprint (GP_LOG, "%-20s ",GetPhotcodeNamebyCode (catalog.measure[m].photcode));217 gprint (GP_LOG, "%5.2f ", 0.01*catalog.measure[m].FWx);221 gprint (GP_LOG, "%-20s ", GetPhotcodeNamebyCode (catalog.measure[m].photcode)); 222 gprint (GP_LOG, "%5.2f ", 0.01*catalog.measure[m].FWx); 218 223 gprint (GP_LOG, "%5.2f ", 0.01*catalog.measure[m].FWy); 219 224 220 225 if (FULL_OUTPUT) { 221 gprint (GP_LOG, "%f ", catalog.measure[m].Mcal);222 gprint (GP_LOG, "%f ", catalog.measure[m].Map);223 gprint (GP_LOG, "%f ", pow(10.0, 0.4*catalog.measure[m].dt));224 gprint (GP_LOG, "%f ", 1.0 + catalog.measure[m].airmass);225 gprint (GP_LOG, "%f ", catalog.measure[m].az);226 gprint (GP_LOG, "%f ", catalog.measure[m].Xccd);227 gprint (GP_LOG, "%f ", catalog.measure[m].Yccd);228 gprint (GP_LOG, "%d ", catalog.measure[m].dXccd);229 gprint (GP_LOG, "%d ", catalog.measure[m].dYccd);230 gprint (GP_LOG, "%f ", catalog.measure[m].Sky);231 gprint (GP_LOG, "%f ", catalog.measure[m].dSky);232 gprint (GP_LOG, "%d ", catalog.measure[m].averef);233 gprint (GP_LOG, "%d ", catalog.measure[m].detID);234 gprint (GP_LOG, "%d ", catalog.measure[m].imageID);235 gprint (GP_LOG, "%f ", catalog.measure[m].psfQual);236 gprint (GP_LOG, "%f ", catalog.measure[m].psfChisq);237 gprint (GP_LOG, "%f ", catalog.measure[m].crNsigma);238 gprint (GP_LOG, "%f ", catalog.measure[m].extNsigma);239 gprint (GP_LOG, "%f ", 0.01*catalog.measure[m].FWx);240 gprint (GP_LOG, "%f ", 0.01*catalog.measure[m].FWy);241 gprint (GP_LOG, "%f ", (360.0/(float)0xffff)*catalog.measure[m].theta);226 gprint (GP_LOG, "%f ", catalog.measure[m].Mcal); 227 gprint (GP_LOG, "%f ", catalog.measure[m].Map); 228 gprint (GP_LOG, "%f ", pow(10.0, 0.4*catalog.measure[m].dt)); 229 gprint (GP_LOG, "%f ", 1.0 + catalog.measure[m].airmass); 230 gprint (GP_LOG, "%f ", catalog.measure[m].az); 231 gprint (GP_LOG, "%f ", catalog.measure[m].Xccd); 232 gprint (GP_LOG, "%f ", catalog.measure[m].Yccd); 233 gprint (GP_LOG, "%d ", catalog.measure[m].dXccd); 234 gprint (GP_LOG, "%d ", catalog.measure[m].dYccd); 235 gprint (GP_LOG, "%f ", catalog.measure[m].Sky); 236 gprint (GP_LOG, "%f ", catalog.measure[m].dSky); 237 gprint (GP_LOG, "%d ", catalog.measure[m].averef); 238 gprint (GP_LOG, "%d ", catalog.measure[m].detID); 239 gprint (GP_LOG, "%d ", catalog.measure[m].imageID); 240 gprint (GP_LOG, "%f ", catalog.measure[m].psfQual); 241 gprint (GP_LOG, "%f ", catalog.measure[m].psfChisq); 242 gprint (GP_LOG, "%f ", catalog.measure[m].crNsigma); 243 gprint (GP_LOG, "%f ", catalog.measure[m].extNsigma); 244 gprint (GP_LOG, "%f ", 0.01*catalog.measure[m].FWx); 245 gprint (GP_LOG, "%f ", 0.01*catalog.measure[m].FWy); 246 gprint (GP_LOG, "%f ", (360.0/(float)0xffff)*catalog.measure[m].theta); 242 247 } 243 248 gprint (GP_LOG, "\n"); … … 251 256 vec3[0].elements.Flt[N] = catalog.measure[m].airmass; 252 257 vec4[0].elements.Flt[N] = catalog.measure[m].photcode; 258 vec5[0].elements.Flt[N] = catalog.measure[m].dR; 259 vec6[0].elements.Flt[N] = catalog.measure[m].dD; 253 260 N ++; 254 261 if (N == NPTS - 1) { … … 258 265 REALLOCATE (vec3[0].elements.Flt, opihi_flt, NPTS); 259 266 REALLOCATE (vec4[0].elements.Flt, opihi_flt, NPTS); 267 REALLOCATE (vec5[0].elements.Flt, opihi_flt, NPTS); 268 REALLOCATE (vec6[0].elements.Flt, opihi_flt, NPTS); 260 269 } 261 270 } … … 270 279 vec3[0].Nelements = N; 271 280 vec4[0].Nelements = N; 281 vec5[0].Nelements = N; 282 vec6[0].Nelements = N; 272 283 } 273 284 -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/opihi/dvo/mextract.c
r21086 r24244 226 226 gprint (GP_ERR, " <photcode>:cal : calibrated magnitude for photcode \n"); 227 227 gprint (GP_ERR, " <photcode>:err : magnitude error for photcode\n"); 228 gprint (GP_ERR, " <photcode>:chisq : chi-square of magnitude fit\n");228 gprint (GP_ERR, " <photcode>:chisq : raw chi-square of magnitude fit\n"); 229 229 gprint (GP_ERR, " <photcode>:ncode : number of measurements in photcode\n"); 230 230 gprint (GP_ERR, " <photcode>:nphot : number of measurements used for average magnitude\n"); -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/opihi/dvo/mmextract.c
r20936 r24244 348 348 gprint (GP_ERR, " photcode:cal : calibrated magnitude for photcode \n"); 349 349 gprint (GP_ERR, " photcode:err : magnitude error for photcode\n"); 350 gprint (GP_ERR, " photcode:chisq : chi-square of magnitude fit\n");350 gprint (GP_ERR, " photcode:chisq : raw chi-square of magnitude fit\n"); 351 351 gprint (GP_ERR, " photcode:ncode : number of measurements in photcode\n"); 352 352 gprint (GP_ERR, " photcode:nphot : number of measurements used for average magnitude\n"); -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/opihi/lib.shell/gprint.c
r23594 r24244 306 306 status = vfprintf (stream[0].file, format, argp); 307 307 if (status < 0) { 308 abort();308 return (FALSE); 309 309 } 310 310 } else { -
branches/cnb_branches/cnb_branch_20090301/Ohana/src/tools/src/fields.c
r15905 r24244 60 60 while (fscanf (stdin, "%s", filename) != EOF) { 61 61 if (!Extnum && !Extname) { 62 GotFile &= gfits_read_header (filename, &header); 62 if (!gfits_read_header (filename, &header)) continue; 63 GotFile = TRUE; 63 64 GotField &= print_fields (filename, NULL, &header, argc, argv); 64 65 continue; 65 66 } 66 67 if (Extnum) { 67 GotFile &= gfits_read_Xheader (filename, &header, Nextend); 68 if (!gfits_read_Xheader (filename, &header, Nextend)) continue; 69 GotFile = TRUE; 68 70 GotField &= print_fields (filename, NULL, &header, argc, argv); 69 71 continue; … … 98 100 Nextend ++; 99 101 100 GotFile = gfits_read_Xheader (filename, &header, Nextend);102 GotFile &= gfits_read_Xheader (filename, &header, Nextend); 101 103 continue; 102 104 }
Note:
See TracChangeset
for help on using the changeset viewer.
