Changeset 19185
- Timestamp:
- Aug 25, 2008, 11:45:29 AM (18 years ago)
- Location:
- trunk/Ohana/src
- Files:
-
- 1 added
- 11 edited
-
libautocode/Makefile.Targets (modified) (2 diffs)
-
libautocode/def/image-ps1-dev-3.d (added)
-
libautocode/def/image.d (modified) (2 diffs)
-
libdvo/src/dvo_convert.c (modified) (3 diffs)
-
libdvo/src/dvo_convert_PS1_DEV_1.c (modified) (2 diffs)
-
libdvo/src/dvo_convert_PS1_DEV_2.c (modified) (2 diffs)
-
libdvo/src/dvo_convert_PS1_DEV_3.c (modified) (1 diff)
-
libdvo/src/dvo_convert_elixir.c (modified) (2 diffs)
-
libdvo/src/dvo_convert_loneos.c (modified) (2 diffs)
-
libdvo/src/dvo_convert_panstarrs_DEV_0.c (modified) (2 diffs)
-
libdvo/src/dvo_convert_panstarrs_DEV_1.c (modified) (2 diffs)
-
libdvo/src/dvo_image.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libautocode/Makefile.Targets
r17189 r19185 36 36 $(ASRC)/image-ps1-dev-1.$(ARCH).o \ 37 37 $(ASRC)/image-ps1-dev-2.$(ARCH).o \ 38 $(ASRC)/image-ps1-dev-3.$(ARCH).o \ 38 39 $(ASRC)/regimage.$(ARCH).o \ 39 40 $(ASRC)/detreg.$(ARCH).o \ … … 89 90 $(AINC)/image-ps1-dev-1.h \ 90 91 $(AINC)/image-ps1-dev-2.h \ 92 $(AINC)/image-ps1-dev-3.h \ 91 93 $(AINC)/regimage.h \ 92 94 $(AINC)/detreg.h \ -
trunk/Ohana/src/libautocode/def/image.d
r16971 r19185 2 2 EXTNAME DVO_IMAGE 3 3 TYPE BINTABLE 4 SIZE 2804 SIZE 344 5 5 DESCRIPTION DVO Image Table 6 6 … … 40 40 # 40 bytes 41 41 42 FIELD name, NAME, char[ 64],name of original image42 FIELD name, NAME, char[128], name of original image 43 43 FIELD detection_limit, DETECTION_LIMIT, unsigned char, detection limit, 10*mag 44 44 FIELD saturation_limit, SATURATION_LIMIT, unsigned char, saturation limit, 10*mag -
trunk/Ohana/src/libdvo/src/dvo_convert.c
r16810 r19185 288 288 CONVERT_FORMAT ("DVO_IMAGE_PS1_DEV_1", PS1_DEV_1, PS1_DEV_1); 289 289 CONVERT_FORMAT ("DVO_IMAGE_PS1_DEV_2", PS1_DEV_2, PS1_DEV_2); 290 CONVERT_FORMAT ("DVO_IMAGE_PS1_DEV_3", PS1_DEV_3, PS1_DEV_3); 290 291 # undef CONVERT_FORMAT 291 292 … … 321 322 FORMAT_CASE (PS1_DEV_1, PS1_DEV_1); 322 323 FORMAT_CASE (PS1_DEV_2, PS1_DEV_2); 324 FORMAT_CASE (PS1_DEV_3, PS1_DEV_3); 323 325 # undef FORMAT_CASE 324 326 … … 370 372 FORMAT_CASE (PS1_DEV_1, PS1_DEV_1); 371 373 FORMAT_CASE (PS1_DEV_2, PS1_DEV_2); 374 FORMAT_CASE (PS1_DEV_3, PS1_DEV_3); 372 375 # undef FORMAT_CASE 373 376 -
trunk/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_1.c
r17190 r19185 194 194 for (i = 0; i < Nvalues; i++) { 195 195 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 196 strcpy (out[i].name, in[i].name); 196 197 strncpy (out[i].name, in[i].name, 63); // out[128], in[64] 198 out[i].name[63] = 0; // force termination 197 199 198 200 out[i].tzero = in[i].tzero; … … 249 251 for (i = 0; i < Nvalues; i++) { 250 252 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 251 strcpy (out[i].name, in[i].name); 253 254 strncpy (out[i].name, in[i].name, 63); // out[128], in[64] 255 out[i].name[63] = 0; // force termination 252 256 253 257 out[i].tzero = in[i].tzero; -
trunk/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_2.c
r17190 r19185 200 200 for (i = 0; i < Nvalues; i++) { 201 201 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 202 strcpy (out[i].name, in[i].name); 202 203 strncpy (out[i].name, in[i].name, 63); // out[128], int[64] 204 out[i].name[63] = 0; // force termination 203 205 204 206 out[i].tzero = in[i].tzero; … … 256 258 for (i = 0; i < Nvalues; i++) { 257 259 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 258 strcpy (out[i].name, in[i].name); 260 261 strncpy (out[i].name, in[i].name, 63); // in[128], out[64] 262 out[i].name[63] = 0; // force termination 259 263 260 264 out[i].tzero = in[i].tzero; -
trunk/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_3.c
r17190 r19185 3 3 /* convert PS1_DEV_3 formats to internal formats */ 4 4 5 // XXX I am not yet ready to commit to a full PS1_DEV_3 release, but we can add photcode here for now 5 // XXX EAM I am not yet ready to commit to a full PS1_DEV_3 release, but I am providing image and photcode conversion 6 7 Image *Image_PS1_DEV_3_ToInternal (Image_PS1_DEV_3 *in, int Nvalues) { 8 9 int i; 10 Image *out; 11 12 ALLOCATE (out, Image, Nvalues); 13 14 for (i = 0; i < Nvalues; i++) { 15 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 16 17 strncpy (out[i].name, in[i].name, 127); // out[128], in[128] 18 out[i].name[127] = 0; // force termination 19 20 out[i].tzero = in[i].tzero; 21 out[i].nstar = in[i].nstar; 22 out[i].secz = in[i].secz; 23 out[i].NX = in[i].NX; 24 out[i].NY = in[i].NY; 25 out[i].apmifit = in[i].apmifit; 26 out[i].dapmifit = in[i].dapmifit; 27 out[i].Mcal = in[i].Mcal; 28 out[i].dMcal = in[i].dMcal; 29 out[i].Xm = in[i].Xm; 30 out[i].photcode = in[i].photcode; 31 out[i].exptime = in[i].exptime; 32 out[i].sidtime = in[i].sidtime; 33 out[i].latitude = in[i].latitude; 34 out[i].detection_limit = in[i].detection_limit; 35 out[i].saturation_limit = in[i].saturation_limit; 36 out[i].cerror = in[i].cerror; 37 out[i].fwhm_x = in[i].fwhm_x; 38 out[i].fwhm_y = in[i].fwhm_y; 39 out[i].trate = in[i].trate; 40 out[i].code = in[i].code; 41 out[i].ccdnum = in[i].ccdnum; 42 out[i].imageID = in[i].imageID; 43 out[i].externID = in[i].externID; 44 out[i].sourceID = in[i].sourceID; 45 46 out[i].order = in[i].order; 47 out[i].Mx = in[i].Mx; 48 out[i].My = in[i].My; 49 out[i].Mxx = in[i].Mxx; 50 out[i].Mxy = in[i].Mxy; 51 out[i].Myy = in[i].Myy; 52 out[i].Mxxx = in[i].Mxxx; 53 out[i].Mxxy = in[i].Mxxy; 54 out[i].Mxyy = in[i].Mxyy; 55 out[i].Myyy = in[i].Myyy; 56 out[i].Mxxxx = in[i].Mxxxx; 57 out[i].Mxxxy = in[i].Mxxxy; 58 out[i].Mxxyy = in[i].Mxxyy; 59 out[i].Mxyyy = in[i].Mxyyy; 60 out[i].Myyyy = in[i].Myyyy; 61 } 62 return (out); 63 } 64 65 Image_PS1_DEV_3 *ImageInternalTo_PS1_DEV_3 (Image *in, int Nvalues) { 66 67 int i; 68 Image_PS1_DEV_3 *out; 69 70 ALLOCATE (out, Image_PS1_DEV_3, Nvalues); 71 72 for (i = 0; i < Nvalues; i++) { 73 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 74 75 strncpy (out[i].name, in[i].name, 127); // out[128], in[128] 76 out[i].name[127] = 0; // force termination 77 78 out[i].tzero = in[i].tzero; 79 out[i].nstar = in[i].nstar; 80 out[i].secz = in[i].secz; 81 out[i].NX = in[i].NX; 82 out[i].NY = in[i].NY; 83 out[i].apmifit = in[i].apmifit; 84 out[i].dapmifit = in[i].dapmifit; 85 out[i].Mcal = in[i].Mcal; 86 out[i].dMcal = in[i].dMcal; 87 out[i].Xm = in[i].Xm; 88 out[i].photcode = in[i].photcode; 89 out[i].exptime = in[i].exptime; 90 out[i].sidtime = in[i].sidtime; 91 out[i].latitude = in[i].latitude; 92 out[i].detection_limit = in[i].detection_limit; 93 out[i].saturation_limit = in[i].saturation_limit; 94 out[i].cerror = in[i].cerror; 95 out[i].fwhm_x = in[i].fwhm_x; 96 out[i].fwhm_y = in[i].fwhm_y; 97 out[i].trate = in[i].trate; 98 out[i].code = in[i].code; 99 out[i].ccdnum = in[i].ccdnum; 100 out[i].imageID = in[i].imageID; 101 out[i].externID = in[i].externID; 102 out[i].sourceID = in[i].sourceID; 103 104 out[i].order = in[i].order; 105 out[i].Mx = in[i].Mx; 106 out[i].My = in[i].My; 107 out[i].Mxx = in[i].Mxx; 108 out[i].Mxy = in[i].Mxy; 109 out[i].Myy = in[i].Myy; 110 out[i].Mxxx = in[i].Mxxx; 111 out[i].Mxxy = in[i].Mxxy; 112 out[i].Mxyy = in[i].Mxyy; 113 out[i].Myyy = in[i].Myyy; 114 out[i].Mxxxx = in[i].Mxxxx; 115 out[i].Mxxxy = in[i].Mxxxy; 116 out[i].Mxxyy = in[i].Mxxyy; 117 out[i].Mxyyy = in[i].Mxyyy; 118 out[i].Myyyy = in[i].Myyyy; 119 } 120 return (out); 121 } 6 122 7 123 PhotCode_PS1_DEV_3 *PhotCode_Internal_To_PS1_DEV_3 (PhotCode *in, int Nvalues) { -
trunk/Ohana/src/libdvo/src/dvo_convert_elixir.c
r17190 r19185 199 199 for (i = 0; i < Nvalues; i++) { 200 200 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 201 strcpy (out[i].name, in[i].name); // out[64], in[32] 201 202 strncpy (out[i].name, in[i].name, 31); // in[32], out[128] 203 out[i].name[31] = 0; // force termination 202 204 203 205 out[i].tzero = in[i].tzero; … … 258 260 for (i = 0; i < Nvalues; i++) { 259 261 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 260 strncpy (out[i].name, in[i].name, 31); // out[32], in[64] 262 263 strncpy (out[i].name, in[i].name, 31); // out[32], in[128] 261 264 out[i].name[31] = 0; // force termination 262 265 -
trunk/Ohana/src/libdvo/src/dvo_convert_loneos.c
r16810 r19185 189 189 for (i = 0; i < Nvalues; i++) { 190 190 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 191 strcpy (out[i].name, in[i].name); // out[64], in[32] 191 192 strncpy (out[i].name, in[i].name, 31); // in[32], out[128] 193 out[i].name[31] = 0; // force termination 192 194 193 195 out[i].tzero = in[i].tzero; … … 245 247 for (i = 0; i < Nvalues; i++) { 246 248 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 247 strncpy (out[i].name, in[i].name, 31); // out[32], in[64] 249 250 strncpy (out[i].name, in[i].name, 31); // out[32], in[128] 248 251 out[i].name[31] = 0; // force termination 249 252 -
trunk/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_0.c
r16810 r19185 202 202 for (i = 0; i < Nvalues; i++) { 203 203 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 204 strcpy (out[i].name, in[i].name); // out[64], in[32] 204 205 strncpy (out[i].name, in[i].name, 31); // out[128], in[32] 206 out[i].name[31] = 0; // force termination 205 207 206 208 out[i].tzero = in[i].tzero; … … 257 259 for (i = 0; i < Nvalues; i++) { 258 260 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 259 strncpy (out[i].name, in[i].name, 31); // out[32], in[64] 261 262 strncpy (out[i].name, in[i].name, 31); // out[32], in[128] 260 263 out[i].name[31] = 0; // force termination 261 264 -
trunk/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_1.c
r16810 r19185 202 202 for (i = 0; i < Nvalues; i++) { 203 203 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 204 strcpy (out[i].name, in[i].name); 204 205 strncpy (out[i].name, in[i].name, 63); // in[64], out[128] 206 out[i].name[63] = 0; // force termination 205 207 206 208 out[i].tzero = in[i].tzero; … … 257 259 for (i = 0; i < Nvalues; i++) { 258 260 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 259 strcpy (out[i].name, in[i].name); 261 262 strncpy (out[i].name, in[i].name, 63); // in[128], out[64] 263 out[i].name[63] = 0; // force termination 260 264 261 265 out[i].tzero = in[i].tzero; -
trunk/Ohana/src/libdvo/src/dvo_image.c
r16810 r19185 195 195 if (db[0].format == DVO_FORMAT_PS1_DEV_1) gfits_modify (&db[0].header, "FORMAT", "%s", 1, "PS1_DEV_1"); 196 196 if (db[0].format == DVO_FORMAT_PS1_DEV_2) gfits_modify (&db[0].header, "FORMAT", "%s", 1, "PS1_DEV_2"); 197 if (db[0].format == DVO_FORMAT_PS1_DEV_3) gfits_modify (&db[0].header, "FORMAT", "%s", 1, "PS1_DEV_3"); 197 198 198 199 return;
Note:
See TracChangeset
for help on using the changeset viewer.
