Changeset 33982
- Timestamp:
- Jun 1, 2012, 5:41:44 PM (14 years ago)
- Location:
- branches/eam_branches/ipp-20120601/Ohana/src
- Files:
-
- 24 edited
-
addstar/src/GetFileMode.c (modified) (2 diffs)
-
addstar/src/edge_check.c (modified) (2 diffs)
-
addstar/src/get2mass_full.c (modified) (1 diff)
-
addstar/src/get2mass_ops.c (modified) (2 diffs)
-
addstar/src/load2mass_as_rawdata.c (modified) (2 diffs)
-
addstar/src/load_subpix.c (modified) (1 diff)
-
addstar/src/resort_catalog.c (modified) (1 diff)
-
libdvo/src/ImageOps.c (modified) (3 diffs)
-
libdvo/src/coordops.c (modified) (2 diffs)
-
libdvo/src/dbCmdlineFields.c (modified) (1 diff)
-
libdvo/src/dbRPN.c (modified) (2 diffs)
-
libdvo/src/dvo_image.c (modified) (1 diff)
-
libdvo/src/dvo_tiny_values.c (modified) (2 diffs)
-
libdvo/src/skyregion_gsc.c (modified) (2 diffs)
-
libfits/extern/fits_hdecompress.c (modified) (4 diffs)
-
libfits/extern/ricecomp.c (modified) (12 diffs)
-
libfits/matrix/F_compress_M.c (modified) (3 diffs)
-
libfits/table/F_copy_T.c (modified) (2 diffs)
-
libkapa/src/DrawRotString.c (modified) (2 diffs)
-
libkapa/src/KapaOpen.c (modified) (2 diffs)
-
libkapa/src/KiiOpen.c (modified) (2 diffs)
-
libkapa/src/KiiPicture.c (modified) (2 diffs)
-
libohana/src/config.c (modified) (4 diffs)
-
libohana/src/time.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120601/Ohana/src/addstar/src/GetFileMode.c
r31627 r33982 7 7 8 8 int Naxis; 9 int simple, extend , haveNaxis, haveCTYPE;9 int simple, extend; 10 10 int havePHOT_VER, haveTARG_VER; 11 11 12 12 gfits_scan_alt (header, "SIMPLE", "%t", 1, &simple); 13 haveNaxis = gfits_scan (header, "NAXIS", "%d", 1, &Naxis);14 haveCTYPE = gfits_scan (header, "CTYPE1", "%s", 1, ctype);13 int haveNaxis = gfits_scan (header, "NAXIS", "%d", 1, &Naxis); 14 int haveCTYPE = gfits_scan (header, "CTYPE1", "%s", 1, ctype); 15 15 16 16 gfits_scan_alt (header, "EXTEND", "%t", 1, &extend); … … 22 22 if (havePHOT_VER && haveTARG_VER) return SDSS_OBJ; 23 23 24 if ( (Naxis == 2) || TEXTMODE || !simple) {25 if ( !strcmp (&ctype[4], "-WRP")) {24 if (haveNaxis && ((Naxis == 2) || TEXTMODE || !simple)) { 25 if (haveCTYPE && !strcmp (&ctype[4], "-WRP")) { 26 26 return MOSAIC_CMP; 27 27 } -
branches/eam_branches/ipp-20120601/Ohana/src/addstar/src/edge_check.c
r3361 r33982 4 4 5 5 double theta1, theta2; 6 double Theta1, Theta2;7 6 8 7 theta1 = opening_angle (x1[0], y1[0], x2[0], y2[0], x1[1], y1[1]); … … 17 16 } 18 17 19 Theta1 = theta1;20 Theta2 = theta2;21 18 theta1 = opening_angle (x2[0], y2[0], x1[1], y1[1], x2[1], y2[1]); 22 19 theta2 = opening_angle (x2[0], y2[0], x1[1], y1[1], x1[0], y1[0]); -
branches/eam_branches/ipp-20120601/Ohana/src/addstar/src/get2mass_full.c
r30613 r33982 23 23 star[0][0].measure.theta = ToShortPixels(strtod (ptr, NULL)); 24 24 25 star[2][0].measure.FWx = star[ 2][0].measure.FWx = star[0][0].measure.FWx;26 star[2][0].measure.FWy = star[ 2][0].measure.FWy = star[0][0].measure.FWy;27 star[2][0].measure.theta = star[ 2][0].measure.theta = star[0][0].measure.theta;25 star[2][0].measure.FWx = star[1][0].measure.FWx = star[0][0].measure.FWx; 26 star[2][0].measure.FWy = star[1][0].measure.FWy = star[0][0].measure.FWy; 27 star[2][0].measure.theta = star[1][0].measure.theta = star[0][0].measure.theta; 28 28 29 29 ptr = next2MASSfield (ptr); // designation (skip) -
branches/eam_branches/ipp-20120601/Ohana/src/addstar/src/get2mass_ops.c
r21508 r33982 95 95 dK = strtod (ptr, NULL); 96 96 97 /* filter on the ph_qual flag for this filter (field 19) */ 97 // get the time 98 time = get2mass_time (ptr, 20, Nmax - (ptr - line)); 99 100 # if (0) 101 /* old code to filter on the ph_qual flag for this filter (field 19) */ 98 102 if (SELECT_2MASS_QUALITY != NULL) { 99 103 ptr = skipNbounds (ptr, '|', 3, Nmax - (ptr - line)); … … 105 109 time = get2mass_time (ptr, 20, Nmax - (ptr - line)); 106 110 } 111 # endif 107 112 108 113 // how many bits are being used for the 2mass flags; can we just set photFlags based on them? -
branches/eam_branches/ipp-20120601/Ohana/src/addstar/src/load2mass_as_rawdata.c
r24977 r33982 14 14 int i, j, verbose; 15 15 int Nstars, NSTARS, Ntstars, NTSTARS; 16 int Nbyte, Nextra, Ntotal,offset;16 int Nbyte, Nextra, offset; 17 17 18 18 double Rmin, Rmax, Dmin, Dmax; … … 37 37 38 38 Nextra = 0; // number excess bytes from lsat partial row 39 Ntotal = 0; // track the total number of bytes read40 39 while ((Nbyte = fread (&buffer[Nextra], 1, NBYTE-Nextra, f)) != 0) { 41 40 if (Nbyte == -1) Shutdown ("error reading from raw file %s", filename); -
branches/eam_branches/ipp-20120601/Ohana/src/addstar/src/load_subpix.c
r24002 r33982 45 45 46 46 int bin; 47 double d y, dM;47 double dM; 48 48 49 dy = y - (int)(y);49 // dy = y - (int)(y); 50 50 bin = 5 * (int)(x/100) + (int)(y/100); 51 51 dM = Subpix[bin].dM; -
branches/eam_branches/ipp-20120601/Ohana/src/addstar/src/resort_catalog.c
r33653 r33982 146 146 int NmeasureTotal = 0; 147 147 int measureOffsetOK = TRUE; 148 for (i = 0; i < catalog[0].Naverage; i++) {148 for (i = 0; i < Naverage; i++) { 149 149 NmeasureTotal += catalog[0].average[i].Nmeasure; 150 150 if (VERBOSE && !(NmeasureTotal <= catalog[0].Nmeasure)) { -
branches/eam_branches/ipp-20120601/Ohana/src/libdvo/src/ImageOps.c
r31636 r33982 8 8 { 9 9 10 int j, flipped, status , InPic;10 int j, flipped, status; 11 11 off_t i, n, *subset; 12 12 int npts; … … 65 65 x[2] = image[i].NX; y[2] = image[i].NY; 66 66 x[3] = 0; y[3] = image[i].NY; 67 InPic =flipped = FALSE;67 flipped = FALSE; 68 68 for (j = 0; j < 4; j++) { 69 69 XY_to_RD (&r, &d, x[j], y[j], &image[i].coords); … … 95 95 x[2] = image[i].NX; y[2] = image[i].NY; 96 96 x[3] = 0; y[3] = image[i].NY; 97 InPic =flipped = FALSE;97 flipped = FALSE; 98 98 for (j = 0; j < 4; j++) { 99 99 XY_to_RD (&r, &d, x[j], y[j], &image[i].coords); -
branches/eam_branches/ipp-20120601/Ohana/src/libdvo/src/coordops.c
r31663 r33982 68 68 mode = GetProjectionMode (proj); 69 69 if (proj == PROJ_NONE) return (FALSE); 70 if ( proj== PROJ_MODE_NONE) return (FALSE);70 if (mode == PROJ_MODE_NONE) return (FALSE); 71 71 72 72 stht = ctht = 1; … … 201 201 mode = GetProjectionMode (proj); 202 202 if (proj == PROJ_NONE) return (FALSE); 203 if ( proj== PROJ_MODE_NONE) return (FALSE);203 if (mode == PROJ_MODE_NONE) return (FALSE); 204 204 205 205 /**** Locally Cartesian Projections ****/ -
branches/eam_branches/ipp-20120601/Ohana/src/libdvo/src/dbCmdlineFields.c
r31636 r33982 136 136 // XXX the ra and dec range depend on the projection. 137 137 // XXX this is wrong... 138 int status;139 status =XY_to_RD (&Rmin, &Dmin, graphsky.xmin, graphsky.ymin, &graphsky.coords);140 status =XY_to_RD (&Rmax, &Dmax, graphsky.xmax, graphsky.ymax, &graphsky.coords);138 // int status; 139 XY_to_RD (&Rmin, &Dmin, graphsky.xmin, graphsky.ymin, &graphsky.coords); 140 XY_to_RD (&Rmax, &Dmax, graphsky.xmax, graphsky.ymax, &graphsky.coords); 141 141 } 142 142 -
branches/eam_branches/ipp-20120601/Ohana/src/libdvo/src/dbRPN.c
r31635 r33982 4 4 dbStack *dbRPN (int argc, char **argv, int *nstack) { 5 5 6 int type , Nx, Ny;6 int type; 7 7 int i, j, Nstack, Nop_stack, NSTACK; 8 8 dbStack *stack, *op_stack; … … 17 17 } 18 18 19 N x = Ny = Nstack = Nop_stack = 0;19 Nstack = Nop_stack = 0; 20 20 for (i = 0; i < argc; i++) { 21 21 -
branches/eam_branches/ipp-20120601/Ohana/src/libdvo/src/dvo_image.c
r33649 r33982 111 111 exit (2); 112 112 } 113 return ( TRUE);113 return (status); 114 114 } 115 115 -
branches/eam_branches/ipp-20120601/Ohana/src/libdvo/src/dvo_tiny_values.c
r33649 r33982 51 51 52 52 for (i = 0; i < catalog[0].Naverage; i++) { 53 CopyAverageToTiny (& catalog[0].averageT[i], &catalog[0].average[i]);53 CopyAverageToTiny (&averageT[i], &average[i]); 54 54 } 55 55 } … … 61 61 62 62 for (i = 0; i < catalog[0].Nmeasure; i++) { 63 CopyMeasureToTiny (& catalog[0].measureT[i], &catalog[0].measure[i]);63 CopyMeasureToTiny (&measureT[i], &measure[i]); 64 64 } 65 65 } -
branches/eam_branches/ipp-20120601/Ohana/src/libdvo/src/skyregion_gsc.c
r33649 r33982 271 271 int i, j, Nz, NZ, Nregions, poleRegion; 272 272 SkyRegion *regions; 273 SkyRegion tempregion;274 273 SkyRegionZone *zones; 275 274 char basename[64]; … … 294 293 poleRegion = SIGN(regions[i].Dmin); 295 294 Nregions --; 296 tempregion = regions[i];297 295 for (j = i; j < Nregions; j++) { 298 296 regions[j] = regions[j+1]; -
branches/eam_branches/ipp-20120601/Ohana/src/libfits/extern/fits_hdecompress.c
r15487 r33982 1048 1048 { 1049 1049 LONGLONG sumall; 1050 int nel,stat;1050 int stat; 1051 1051 unsigned char nbitplanes[3]; 1052 1052 char tmagic[2]; … … 1071 1071 *scale=readint(infile); /* scale factor for digitization */ 1072 1072 1073 nel = (*nx) * (*ny);1073 // nel = (*nx) * (*ny); 1074 1074 1075 1075 /* sum of all pixels */ … … 1095 1095 */ 1096 1096 { 1097 int nel,stat;1097 int stat; 1098 1098 LONGLONG sumall; 1099 1099 unsigned char nbitplanes[3]; … … 1119 1119 *scale=readint(infile); /* scale factor for digitization */ 1120 1120 1121 nel = (*nx) * (*ny);1121 // nel = (*nx) * (*ny); 1122 1122 1123 1123 /* sum of all pixels */ -
branches/eam_branches/ipp-20120601/Ohana/src/libfits/extern/ricecomp.c
r18269 r33982 59 59 { 60 60 Buffer bufmem, *buffer = &bufmem; 61 int bsize,i, j, thisblock;61 int i, j, thisblock; 62 62 int lastpix, nextpix, pdiff; 63 63 int v, fs, fsmask, top, fsmax, fsbits, bbits; … … 73 73 * compression of short & byte images. 74 74 */ 75 bsize = 4;75 // int bsize = 4; 76 76 77 77 /* nblock = 32; now an input parameter*/ … … 277 277 { 278 278 Buffer bufmem, *buffer = &bufmem; 279 int bsize,i, j, thisblock;279 int i, j, thisblock; 280 280 281 281 /* … … 299 299 * compression of short & byte images. 300 300 */ 301 bsize = 2;301 // bsize = 2; 302 302 303 303 /* nblock = 32; now an input parameter */ … … 501 501 { 502 502 Buffer bufmem, *buffer = &bufmem; 503 int bsize,i, j, thisblock;503 int i, j, thisblock; 504 504 505 505 /* … … 523 523 * compression of short & byte images. 524 524 */ 525 bsize = 1;525 // bsize = 1; 526 526 527 527 /* nblock = 32; now an input parameter */ … … 826 826 int nblock) /* coding block size */ 827 827 { 828 int bsize,i, k, imax;828 int i, k, imax; 829 829 int nbits, nzero, fs; 830 830 unsigned char *cend, bytevalue; … … 839 839 * compression of short & byte images. 840 840 */ 841 bsize = 4;841 // bsize = 4; 842 842 843 843 /* nblock = 32; now an input parameter */ … … 1014 1014 { 1015 1015 int i, imax; 1016 int bsize,k;1016 int k; 1017 1017 int nbits, nzero, fs; 1018 1018 unsigned char *cend, bytevalue; … … 1028 1028 */ 1029 1029 1030 bsize = 2;1030 // bsize = 2; 1031 1031 1032 1032 /* nblock = 32; now an input parameter */ … … 1200 1200 { 1201 1201 int i, imax; 1202 int bsize,k;1202 int k; 1203 1203 int nbits, nzero, fs; 1204 1204 unsigned char *cend; … … 1214 1214 */ 1215 1215 1216 bsize = 1;1216 // bsize = 1; 1217 1217 1218 1218 /* nblock = 32; now an input parameter */ -
branches/eam_branches/ipp-20120601/Ohana/src/libfits/matrix/F_compress_M.c
r33648 r33982 45 45 float zscale, zzero; 46 46 47 int zdata_pixsize, odata_pixsize , idata_pixsize;47 int zdata_pixsize, odata_pixsize; 48 48 49 49 int *ztile = NULL; … … 236 236 zdata_pixsize = gfits_vartable_heap_pixsize (zdef.format); 237 237 238 // size of a pixel in the final image 239 idata_pixsize = abs(header[0].bitpix) / 8;238 // size of a pixel in the final image (not needed) 239 // idata_pixsize = abs(header[0].bitpix) / 8; 240 240 241 241 // size of a pixel in the output from the decompression routine … … 480 480 int gfits_compressed_is_primary (Header *header) { 481 481 482 int has_ztension, has_zimage;483 int ztension, zimage;484 485 has_zimage = gfits_scan_alt (header, "ZIMAGE", "%t", 1, &zimage);486 has_ztension = gfits_scan_alt (header, "ZTENSION", "%t", 1, &ztension);482 int zimage = FALSE; 483 // int ztension = FALSE; 484 485 int has_zimage = gfits_scan_alt (header, "ZIMAGE", "%t", 1, &zimage); 486 // int has_ztension = gfits_scan_alt (header, "ZTENSION", "%t", 1, &ztension); 487 487 488 488 if (has_zimage && zimage) return (TRUE); -
branches/eam_branches/ipp-20120601/Ohana/src/libfits/table/F_copy_T.c
r31663 r33982 17 17 int gfits_copy_vtable (VTable *in, VTable *out) { 18 18 19 off_t i , Nx, Ny, Nrows;19 off_t i; 20 20 21 21 /* find buffer size */ 22 Nx = in[0].header[0].Naxis[0];23 Ny = in[0].header[0].Naxis[1];22 off_t Nx = in[0].header[0].Naxis[0]; 23 // off_t Ny = in[0].header[0].Naxis[1]; 24 24 25 25 // validate these two? … … 32 32 out[0].Nrow = in[0].Nrow; 33 33 34 Nrows = out[0].Nrow;34 off_t Nrows = out[0].Nrow; 35 35 36 36 ALLOCATE (out[0].row, off_t, MAX (Nrows, 1)); -
branches/eam_branches/ipp-20120601/Ohana/src/libkapa/src/DrawRotString.c
r30603 r33982 137 137 138 138 int ii, jj, byte_line, byte, bit, flag; 139 unsigned long int fore , back;139 unsigned long int fore; 140 140 double i, j, cs, sn, rscale, tmp; 141 141 int X, Y, X0, X1, X2, Y0, Y1, Y2, x0, y0; … … 143 143 if (mode) { 144 144 fore = RotForeground; 145 back = RotBackground;145 // back = RotBackground; 146 146 } else { 147 147 fore = RotBackground; 148 back = RotForeground;148 // back = RotForeground; 149 149 } 150 150 -
branches/eam_branches/ipp-20120601/Ohana/src/libkapa/src/KapaOpen.c
r27988 r33982 252 252 int KapaOpenNamedSocket (char *kapa_exec, char *name) { 253 253 254 int InitSocket , status;254 int InitSocket; 255 255 struct sockaddr_un Address; 256 256 socklen_t AddressLength; … … 269 269 Address.sun_family = AF_UNIX; 270 270 InitSocket = socket (AF_UNIX, SOCK_STREAM, 0); 271 status =bind (InitSocket, (struct sockaddr *) &Address, sizeof (Address));272 status =listen (InitSocket, 1);271 bind (InitSocket, (struct sockaddr *) &Address, sizeof (Address)); 272 listen (InitSocket, 1); 273 273 274 274 if (name == NULL) { -
branches/eam_branches/ipp-20120601/Ohana/src/libkapa/src/KiiOpen.c
r27588 r33982 4 4 int KiiOpen (char *kii_exec, char *name) { 5 5 6 int InitSocket , status;6 int InitSocket; 7 7 struct sockaddr_un Address; 8 8 socklen_t AddressLength; … … 21 21 Address.sun_family = AF_UNIX; 22 22 InitSocket = socket (AF_UNIX, SOCK_STREAM, 0); 23 status =bind (InitSocket, (struct sockaddr *) &Address, sizeof (Address));24 status =listen (InitSocket, 1);23 bind (InitSocket, (struct sockaddr *) &Address, sizeof (Address)); 24 listen (InitSocket, 1); 25 25 26 26 if (name == NULL) { -
branches/eam_branches/ipp-20120601/Ohana/src/libkapa/src/KiiPicture.c
r31160 r33982 22 22 23 23 int Nwrite, Npix, Ncolors, size; 24 float *in,min, max;24 float min, max; 25 25 26 26 Npix = image[0].Nx*image[0].Ny; … … 28 28 KiiSendCommand (fd, 4, "READ"); /* tell kapa to look for the incoming image */ 29 29 KiiScanMessage (fd, "%d", &Ncolors); 30 31 in = image[0].data1d;32 30 33 31 /* these are for a future upgrade */ -
branches/eam_branches/ipp-20120601/Ohana/src/libohana/src/config.c
r20358 r33982 131 131 132 132 FILE *f; 133 int i, done,Nbytes, NBYTES, nbytes, Nout, Ncpy, INPUT, Nlevel;133 int i, Nbytes, NBYTES, nbytes, Nout, Ncpy, INPUT, Nlevel; 134 134 char *ibuffer, *obuffer, *tbuffer; 135 135 char *last, *next; … … 149 149 /* load data from file */ 150 150 if (f) { 151 done = FALSE;152 151 while ((nbytes = fread (&ibuffer[Nbytes], sizeof(char), D_NBYTES, f)) == D_NBYTES) { 153 152 Nbytes += nbytes; … … 382 381 383 382 FILE *f; 384 int i, done,Nbytes, NBYTES, nbytes, Ncpy;383 int i, Nbytes, NBYTES, nbytes, Ncpy; 385 384 char *ibuffer; 386 385 char line[256]; … … 398 397 399 398 /* load data from file */ 400 done = FALSE;401 399 while ((nbytes = fread (&ibuffer[Nbytes], sizeof(char), D_NBYTES, f)) == D_NBYTES) { 402 400 Nbytes += nbytes; -
branches/eam_branches/ipp-20120601/Ohana/src/libohana/src/time.c
r30602 r33982 90 90 91 91 char *p1, *p2; 92 double tmp;92 // double tmp; 93 93 int mode; 94 94 95 95 p1 = line; 96 tmp =strtod (p1, &p2);96 strtod (p1, &p2); 97 97 mode = TIME_DATE; 98 98 if (p2 == p1 + strlen (p1) - 1) {
Note:
See TracChangeset
for help on using the changeset viewer.
