Changeset 37992 for trunk/Ohana/src/libdvo
- Timestamp:
- Mar 23, 2015, 8:13:04 AM (11 years ago)
- Location:
- trunk/Ohana/src/libdvo
- Files:
-
- 3 edited
- 4 moved
-
Makefile (modified) (2 diffs)
-
include/cmf-ps1-v5-r0-lensing.h (moved) (moved from trunk/Ohana/src/libdvo/include/cmf-ps1-v5-lensing-alt.h ) (1 diff)
-
include/cmf-ps1-v5-r1-lensing.h (moved) (moved from trunk/Ohana/src/libdvo/include/cmf-ps1-v5-lensing.h ) (2 diffs)
-
include/dvo.h (modified) (1 diff)
-
src/cmf-ps1-v5-r0-lensing.c (moved) (moved from trunk/Ohana/src/libdvo/src/cmf-ps1-v5-lensing-alt.c ) (11 diffs)
-
src/cmf-ps1-v5-r2-lensing.c (moved) (moved from trunk/Ohana/src/libdvo/src/cmf-ps1-v5-lensing.c ) (14 diffs)
-
src/dvo_convert_PS1_V5.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libdvo/Makefile
r37807 r37992 43 43 $(DESTINC)/cmf-ps1-sv3.h \ 44 44 $(DESTINC)/cmf-ps1-sv4.h \ 45 $(DESTINC)/cmf-ps1-v5-lensing.h \ 46 $(DESTINC)/cmf-ps1-v5-lensing-alt.h 45 $(DESTINC)/cmf-ps1-v5-r0-lensing.h \ 46 $(DESTINC)/cmf-ps1-v5-r1-lensing.h \ 47 $(DESTINC)/cmf-ps1-v5-r2-lensing.h 47 48 48 49 INCS = $(DEFS) $(DESTINC)/dvo.h $(DESTINC)/autocode.h $(DESTINC)/dvo_util.h $(DESTINC)/dvodb.h $(DESTINC)/libdvo_astro.h $(DESTINC)/convert.h $(DESTINC)/get_graphdata.h … … 102 103 $(SRC)/cmf-ps1-sv4.$(ARCH).o \ 103 104 $(SRC)/cmf-ps1-v5.$(ARCH).o \ 104 $(SRC)/cmf-ps1-v5-lensing.$(ARCH).o \ 105 $(SRC)/cmf-ps1-v5-lensing-alt.$(ARCH).o \ 105 $(SRC)/cmf-ps1-v5-r0-lensing.$(ARCH).o \ 106 $(SRC)/cmf-ps1-v5-r1-lensing.$(ARCH).o \ 107 $(SRC)/cmf-ps1-v5-r2-lensing.$(ARCH).o \ 106 108 $(SRC)/dvo_util.$(ARCH).o \ 107 109 $(SRC)/dbBooleanCond.$(ARCH).o \ -
trunk/Ohana/src/libdvo/include/cmf-ps1-v5-r0-lensing.h
r37985 r37992 84 84 short nFrames; // images overlapping peak 85 85 short padding; // padding for 8byte records 86 } CMF_PS1_V5_ Lensing_Alt;86 } CMF_PS1_V5_R0_Lensing; 87 87 88 CMF_PS1_V5_ Lensing_Alt *gfits_table_get_CMF_PS1_V5_Lensing_Alt(FTable *table, off_t *Ndata, char *swapped);89 int gfits_table_set_CMF_PS1_V5_ Lensing_Alt (FTable *ftable, CMF_PS1_V5_Lensing_Alt*data, off_t Ndata);90 int gfits_table_mkheader_CMF_PS1_V5_ Lensing_Alt(Header *header);91 int gfits_convert_CMF_PS1_V5_ Lensing_Alt(unsigned char *data, off_t size, off_t nitems, char toStruct);92 int Send_CMF_PS1_V5_ Lensing_Alt (int device, CMF_PS1_V5_Lensing_Alt*data, int Ndata, int copy);93 int Recv_CMF_PS1_V5_ Lensing_Alt (int device, CMF_PS1_V5_Lensing_Alt**data, int *Ndata);88 CMF_PS1_V5_R0_Lensing *gfits_table_get_CMF_PS1_V5_R0_Lensing (FTable *table, off_t *Ndata, char *swapped); 89 int gfits_table_set_CMF_PS1_V5_R0_Lensing (FTable *ftable, CMF_PS1_V5_R0_Lensing *data, off_t Ndata); 90 int gfits_table_mkheader_CMF_PS1_V5_R0_Lensing (Header *header); 91 int gfits_convert_CMF_PS1_V5_R0_Lensing (unsigned char *data, off_t size, off_t nitems, char toStruct); 92 int Send_CMF_PS1_V5_R0_Lensing (int device, CMF_PS1_V5_R0_Lensing *data, int Ndata, int copy); 93 int Recv_CMF_PS1_V5_R0_Lensing (int device, CMF_PS1_V5_R0_Lensing **data, int *Ndata); -
trunk/Ohana/src/libdvo/include/cmf-ps1-v5-r1-lensing.h
r37985 r37992 74 74 short srcChipX; 75 75 short srcChipY; 76 short padding3; 76 77 77 78 float Mr1; // first radial moment (pixels) … … 88 89 short nFrames; // images overlapping peak 89 90 short padding; // padding for 8byte records 90 } CMF_PS1_V5_ Lensing;91 } CMF_PS1_V5_R1_Lensing; 91 92 92 CMF_PS1_V5_ Lensing *gfits_table_get_CMF_PS1_V5_Lensing (FTable *table, off_t *Ndata, char *swapped);93 int gfits_table_set_CMF_PS1_V5_ Lensing (FTable *ftable, CMF_PS1_V5_Lensing *data, off_t Ndata);94 int gfits_table_mkheader_CMF_PS1_V5_ Lensing (Header *header);95 int gfits_convert_CMF_PS1_V5_ Lensing (unsigned char *data, off_t size, off_t nitems, char toStruct);96 int Send_CMF_PS1_V5_ Lensing (int device, CMF_PS1_V5_Lensing *data, int Ndata, int copy);97 int Recv_CMF_PS1_V5_ Lensing (int device, CMF_PS1_V5_Lensing **data, int *Ndata);93 CMF_PS1_V5_R1_Lensing *gfits_table_get_CMF_PS1_V5_R1_Lensing (FTable *table, off_t *Ndata, char *swapped); 94 int gfits_table_set_CMF_PS1_V5_R1_Lensing (FTable *ftable, CMF_PS1_V5_R1_Lensing *data, off_t Ndata); 95 int gfits_table_mkheader_CMF_PS1_V5_R1_Lensing (Header *header); 96 int gfits_convert_CMF_PS1_V5_R1_Lensing (unsigned char *data, off_t size, off_t nitems, char toStruct); 97 int Send_CMF_PS1_V5_R1_Lensing (int device, CMF_PS1_V5_R1_Lensing *data, int Ndata, int copy); 98 int Recv_CMF_PS1_V5_R1_Lensing (int device, CMF_PS1_V5_R1_Lensing **data, int *Ndata); -
trunk/Ohana/src/libdvo/include/dvo.h
r37807 r37992 334 334 # include "cmf-ps1-sv4.h" 335 335 # include "cmf-ps1-v5.h" 336 # include "cmf-ps1-v5-lensing.h" 337 # include "cmf-ps1-v5-lensing-alt.h" 336 # include "cmf-ps1-v5-r0-lensing.h" 337 # include "cmf-ps1-v5-r1-lensing.h" 338 # include "cmf-ps1-v5-r2-lensing.h" 338 339 339 340 typedef struct { -
trunk/Ohana/src/libdvo/src/cmf-ps1-v5-r0-lensing.c
r37985 r37992 3 3 4 4 // this function is based on the one generated by the autocode of cmf-ps1-v5.d 5 int gfits_convert_CMF_PS1_V5_ Lensing_Alt(unsigned char *data, off_t size, off_t nitems, char toStruct) {5 int gfits_convert_CMF_PS1_V5_R0_Lensing (unsigned char *data, off_t size, off_t nitems, char toStruct) { 6 6 7 7 off_t i; … … 9 9 10 10 if (size != ST_SIZE) { 11 fprintf (stderr, "WARNING: mismatch in data types CMF_PS1_V5_ Lensing_Alt: "OFF_T_FMT" vs %d\n", size, ST_SIZE);11 fprintf (stderr, "WARNING: mismatch in data types CMF_PS1_V5_R0_Lensing: "OFF_T_FMT" vs %d\n", size, ST_SIZE); 12 12 return (FALSE); 13 13 } … … 191 191 /*** add test of EXTNAME and header-defined columns? ***/ 192 192 /* return internal structure representation */ 193 CMF_PS1_V5_ Lensing_Alt *gfits_table_get_CMF_PS1_V5_Lensing_Alt(FTable *ftable, off_t *Ndata, char *swapped) {193 CMF_PS1_V5_R0_Lensing *gfits_table_get_CMF_PS1_V5_R0_Lensing (FTable *ftable, off_t *Ndata, char *swapped) { 194 194 195 195 int Ncols; 196 CMF_PS1_V5_ Lensing_Alt*data;196 CMF_PS1_V5_R0_Lensing *data; 197 197 198 198 Ncols = ftable[0].header[0].Naxis[0]; … … 203 203 204 204 *Ndata = ftable[0].header[0].Naxis[1]; 205 data = (CMF_PS1_V5_ Lensing_Alt*) ftable[0].buffer;205 data = (CMF_PS1_V5_R0_Lensing *) ftable[0].buffer; 206 206 if ((swapped == NULL) || (*swapped == FALSE)) { 207 if (!gfits_convert_CMF_PS1_V5_ Lensing_Alt ((unsigned char *) data, sizeof (CMF_PS1_V5_Lensing_Alt), *Ndata, TRUE)) {207 if (!gfits_convert_CMF_PS1_V5_R0_Lensing ((unsigned char *) data, sizeof (CMF_PS1_V5_R0_Lensing), *Ndata, TRUE)) { 208 208 return NULL; 209 209 } … … 214 214 } 215 215 216 int gfits_table_set_CMF_PS1_V5_ Lensing_Alt (FTable *ftable, CMF_PS1_V5_Lensing_Alt*data, off_t Ndata) {216 int gfits_table_set_CMF_PS1_V5_R0_Lensing (FTable *ftable, CMF_PS1_V5_R0_Lensing *data, off_t Ndata) { 217 217 218 218 Header *header; … … 221 221 222 222 /* create table header */ 223 if (!gfits_create_table_header (header, "BINTABLE", "CMF_PS1_V5_ Lensing_Alt")) return (FALSE);223 if (!gfits_create_table_header (header, "BINTABLE", "CMF_PS1_V5_R0_Lensing")) return (FALSE); 224 224 225 225 /* define table layout */ … … 308 308 /* add data values */ 309 309 if (!gfits_table_scale_data (ftable)) return (FALSE); 310 if (!gfits_convert_CMF_PS1_V5_ Lensing_Alt ((unsigned char *) data, sizeof (CMF_PS1_V5_Lensing_Alt), Ndata, FALSE)) return (FALSE);311 if (!gfits_add_rows (ftable, (char *) data, Ndata, sizeof (CMF_PS1_V5_ Lensing_Alt))) return (FALSE);310 if (!gfits_convert_CMF_PS1_V5_R0_Lensing ((unsigned char *) data, sizeof (CMF_PS1_V5_R0_Lensing), Ndata, FALSE)) return (FALSE); 311 if (!gfits_add_rows (ftable, (char *) data, Ndata, sizeof (CMF_PS1_V5_R0_Lensing))) return (FALSE); 312 312 313 313 return (TRUE); 314 314 } 315 315 316 int gfits_table_mkheader_CMF_PS1_V5_ Lensing_Alt(Header *header) {316 int gfits_table_mkheader_CMF_PS1_V5_R0_Lensing (Header *header) { 317 317 318 318 /* create table header */ 319 if (!gfits_create_table_header (header, "BINTABLE", "CMF_PS1_V5_ Lensing_Alt")) return (FALSE);319 if (!gfits_create_table_header (header, "BINTABLE", "CMF_PS1_V5_R0_Lensing")) return (FALSE); 320 320 321 321 /* define table layout */ … … 402 402 } 403 403 404 int Send_CMF_PS1_V5_ Lensing_Alt (int device, CMF_PS1_V5_Lensing_Alt*data, int Ndata, int copy) {404 int Send_CMF_PS1_V5_R0_Lensing (int device, CMF_PS1_V5_R0_Lensing *data, int Ndata, int copy) { 405 405 406 406 int Nwrite, Nbytes; 407 CMF_PS1_V5_ Lensing_Alt*tmpdata;408 409 Nbytes = Ndata * sizeof (CMF_PS1_V5_ Lensing_Alt);407 CMF_PS1_V5_R0_Lensing *tmpdata; 408 409 Nbytes = Ndata * sizeof (CMF_PS1_V5_R0_Lensing); 410 410 411 411 if (copy) { 412 ALLOCATE (tmpdata, CMF_PS1_V5_ Lensing_Alt, Ndata);412 ALLOCATE (tmpdata, CMF_PS1_V5_R0_Lensing, Ndata); 413 413 memcpy (tmpdata, data, Nbytes); 414 414 } else { … … 416 416 } 417 417 418 if (!gfits_convert_CMF_PS1_V5_ Lensing_Alt ((unsigned char *) tmpdata, sizeof (CMF_PS1_V5_Lensing_Alt), Ndata, FALSE)) return (FALSE);418 if (!gfits_convert_CMF_PS1_V5_R0_Lensing ((unsigned char *) tmpdata, sizeof (CMF_PS1_V5_R0_Lensing), Ndata, FALSE)) return (FALSE); 419 419 420 420 SendCommand (device, 16, "NVALUE: %6d", Ndata); … … 430 430 } 431 431 432 int Recv_CMF_PS1_V5_ Lensing_Alt (int device, CMF_PS1_V5_Lensing_Alt**data, int *Ndata) {432 int Recv_CMF_PS1_V5_R0_Lensing (int device, CMF_PS1_V5_R0_Lensing **data, int *Ndata) { 433 433 434 434 int ndata; 435 435 IOBuffer message; 436 CMF_PS1_V5_ Lensing_Alt*tmpdata;436 CMF_PS1_V5_R0_Lensing *tmpdata; 437 437 438 438 ExpectCommand (device, 16, 1.0, &message); … … 443 443 ExpectMessage (device, 1.0, &message); 444 444 445 tmpdata = (CMF_PS1_V5_ Lensing_Alt*) message.buffer;446 if (!gfits_convert_CMF_PS1_V5_ Lensing_Alt ((unsigned char *) tmpdata, sizeof (CMF_PS1_V5_Lensing_Alt), ndata, TRUE)) return (FALSE);445 tmpdata = (CMF_PS1_V5_R0_Lensing *) message.buffer; 446 if (!gfits_convert_CMF_PS1_V5_R0_Lensing ((unsigned char *) tmpdata, sizeof (CMF_PS1_V5_R0_Lensing), ndata, TRUE)) return (FALSE); 447 447 448 448 /* double-check data length? */ -
trunk/Ohana/src/libdvo/src/cmf-ps1-v5-r2-lensing.c
r37985 r37992 1 1 # include "dvo.h" 2 # define ST_SIZE 32 02 # define ST_SIZE 328 3 3 4 4 // this function is based on the one generated by the autocode of cmf-ps1-v5.d 5 int gfits_convert_CMF_PS1_V5_ Lensing (unsigned char *data, off_t size, off_t nitems, char toStruct) {5 int gfits_convert_CMF_PS1_V5_R2_Lensing (unsigned char *data, off_t size, off_t nitems, char toStruct) { 6 6 7 7 off_t i; … … 9 9 10 10 if (size != ST_SIZE) { 11 fprintf (stderr, "WARNING: mismatch in data types CMF_PS1_V5_ Lensing: "OFF_T_FMT" vs %d\n", size, ST_SIZE);11 fprintf (stderr, "WARNING: mismatch in data types CMF_PS1_V5_R2_Lensing: "OFF_T_FMT" vs %d\n", size, ST_SIZE); 12 12 return (FALSE); 13 13 } … … 101 101 SWAP_WORD (260); // E2_SH_PSF 102 102 103 SWAP_BYTE (264); // SRC_CHIP_NUM 104 SWAP_BYTE (266); // SRC_CHIP_X 105 SWAP_BYTE (268); // SRC_CHIP_Y 106 107 SWAP_WORD (272); // MOMENTS_R1 108 SWAP_WORD (276); // MOMENTS_RH 109 SWAP_WORD (280); // KRON_FLUX 110 SWAP_WORD (284); // KRON_FLUX_ERR 111 SWAP_WORD (288); // KRON_FLUX_INNER 112 SWAP_WORD (292); // KRON_FLUX_OUTER 113 SWAP_WORD (296); // SKY_LIMIT_RAD 114 SWAP_WORD (300); // SKY_LIMIT_FLUX 115 SWAP_WORD (304); // SKY_LIMIT_SLOPE 116 SWAP_WORD (308); // FLAGS 117 SWAP_WORD (312); // FLAGS2 118 SWAP_BYTE (316); // N_FRAMES 119 SWAP_BYTE (318); // PADDING 103 SWAP_WORD (264); // E1_PSF 104 SWAP_WORD (268); // E2_PSF 105 106 SWAP_BYTE (272); // SRC_CHIP_NUM 107 SWAP_BYTE (274); // SRC_CHIP_X 108 SWAP_BYTE (276); // SRC_CHIP_Y 109 // SWAP_BYTE (278); // PADDING3, not swapped 110 111 SWAP_WORD (280); // MOMENTS_R1 112 SWAP_WORD (284); // MOMENTS_RH 113 SWAP_WORD (288); // KRON_FLUX 114 SWAP_WORD (292); // KRON_FLUX_ERR 115 SWAP_WORD (296); // KRON_FLUX_INNER 116 SWAP_WORD (300); // KRON_FLUX_OUTER 117 SWAP_WORD (304); // SKY_LIMIT_RAD 118 SWAP_WORD (308); // SKY_LIMIT_FLUX 119 SWAP_WORD (312); // SKY_LIMIT_SLOPE 120 SWAP_WORD (316); // FLAGS 121 SWAP_WORD (320); // FLAGS2 122 SWAP_BYTE (324); // N_FRAMES 123 // SWAP_BYTE (326); // PADDING, not swapped 120 124 } 121 125 # endif … … 196 200 /*** add test of EXTNAME and header-defined columns? ***/ 197 201 /* return internal structure representation */ 198 CMF_PS1_V5_ Lensing *gfits_table_get_CMF_PS1_V5_Lensing (FTable *ftable, off_t *Ndata, char *swapped) {202 CMF_PS1_V5_R2_Lensing *gfits_table_get_CMF_PS1_V5_R2_Lensing (FTable *ftable, off_t *Ndata, char *swapped) { 199 203 200 204 int Ncols; 201 CMF_PS1_V5_ Lensing *data;205 CMF_PS1_V5_R2_Lensing *data; 202 206 203 207 Ncols = ftable[0].header[0].Naxis[0]; … … 208 212 209 213 *Ndata = ftable[0].header[0].Naxis[1]; 210 data = (CMF_PS1_V5_ Lensing *) ftable[0].buffer;214 data = (CMF_PS1_V5_R2_Lensing *) ftable[0].buffer; 211 215 if ((swapped == NULL) || (*swapped == FALSE)) { 212 if (!gfits_convert_CMF_PS1_V5_ Lensing ((unsigned char *) data, sizeof (CMF_PS1_V5_Lensing), *Ndata, TRUE)) {216 if (!gfits_convert_CMF_PS1_V5_R2_Lensing ((unsigned char *) data, sizeof (CMF_PS1_V5_R2_Lensing), *Ndata, TRUE)) { 213 217 return NULL; 214 218 } … … 219 223 } 220 224 221 int gfits_table_set_CMF_PS1_V5_ Lensing (FTable *ftable, CMF_PS1_V5_Lensing *data, off_t Ndata) {225 int gfits_table_set_CMF_PS1_V5_R2_Lensing (FTable *ftable, CMF_PS1_V5_R2_Lensing *data, off_t Ndata) { 222 226 223 227 Header *header; … … 226 230 227 231 /* create table header */ 228 if (!gfits_create_table_header (header, "BINTABLE", "CMF_PS1_V5_ Lensing")) return (FALSE);232 if (!gfits_create_table_header (header, "BINTABLE", "CMF_PS1_V5_R2_Lensing")) return (FALSE); 229 233 230 234 /* define table layout */ … … 294 298 gfits_define_bintable_column (header, "E", "E1_SH_PSF", "lensing shear", "", 1.0, 0.0); 295 299 gfits_define_bintable_column (header, "E", "E2_SH_PSF", "lensing shear", "", 1.0, 0.0); 300 gfits_define_bintable_column (header, "E", "E1_PSF", "psf polarization", "", 1.0, 0.0); 301 gfits_define_bintable_column (header, "E", "E2_PSF", "psf polarization", "", 1.0, 0.0); 296 302 297 303 gfits_define_bintable_column (header, "I", "SRC_CHIP_NUM", "number of source chip for warp", "", 1.0, 0.0); … … 319 325 /* add data values */ 320 326 if (!gfits_table_scale_data (ftable)) return (FALSE); 321 if (!gfits_convert_CMF_PS1_V5_ Lensing ((unsigned char *) data, sizeof (CMF_PS1_V5_Lensing), Ndata, FALSE)) return (FALSE);322 if (!gfits_add_rows (ftable, (char *) data, Ndata, sizeof (CMF_PS1_V5_ Lensing))) return (FALSE);327 if (!gfits_convert_CMF_PS1_V5_R2_Lensing ((unsigned char *) data, sizeof (CMF_PS1_V5_R2_Lensing), Ndata, FALSE)) return (FALSE); 328 if (!gfits_add_rows (ftable, (char *) data, Ndata, sizeof (CMF_PS1_V5_R2_Lensing))) return (FALSE); 323 329 324 330 return (TRUE); 325 331 } 326 332 327 int gfits_table_mkheader_CMF_PS1_V5_ Lensing (Header *header) {333 int gfits_table_mkheader_CMF_PS1_V5_R2_Lensing (Header *header) { 328 334 329 335 /* create table header */ 330 if (!gfits_create_table_header (header, "BINTABLE", "CMF_PS1_V5_ Lensing")) return (FALSE);336 if (!gfits_create_table_header (header, "BINTABLE", "CMF_PS1_V5_R2_Lensing")) return (FALSE); 331 337 332 338 /* define table layout */ … … 396 402 gfits_define_bintable_column (header, "E", "E1_SH_PSF", "lensing shear", "", 1.0, 0.0); 397 403 gfits_define_bintable_column (header, "E", "E2_SH_PSF", "lensing shear", "", 1.0, 0.0); 404 gfits_define_bintable_column (header, "E", "E1_PSF", "psf polarization", "", 1.0, 0.0); 405 gfits_define_bintable_column (header, "E", "E2_PSF", "psf polarization", "", 1.0, 0.0); 398 406 399 407 gfits_define_bintable_column (header, "I", "SRC_CHIP_NUM", "number of source chip for warp", "", 1.0, 0.0); … … 419 427 } 420 428 421 int Send_CMF_PS1_V5_ Lensing (int device, CMF_PS1_V5_Lensing *data, int Ndata, int copy) {429 int Send_CMF_PS1_V5_R2_Lensing (int device, CMF_PS1_V5_R2_Lensing *data, int Ndata, int copy) { 422 430 423 431 int Nwrite, Nbytes; 424 CMF_PS1_V5_ Lensing *tmpdata;425 426 Nbytes = Ndata * sizeof (CMF_PS1_V5_ Lensing);432 CMF_PS1_V5_R2_Lensing *tmpdata; 433 434 Nbytes = Ndata * sizeof (CMF_PS1_V5_R2_Lensing); 427 435 428 436 if (copy) { 429 ALLOCATE (tmpdata, CMF_PS1_V5_ Lensing, Ndata);437 ALLOCATE (tmpdata, CMF_PS1_V5_R2_Lensing, Ndata); 430 438 memcpy (tmpdata, data, Nbytes); 431 439 } else { … … 433 441 } 434 442 435 if (!gfits_convert_CMF_PS1_V5_ Lensing ((unsigned char *) tmpdata, sizeof (CMF_PS1_V5_Lensing), Ndata, FALSE)) return (FALSE);443 if (!gfits_convert_CMF_PS1_V5_R2_Lensing ((unsigned char *) tmpdata, sizeof (CMF_PS1_V5_R2_Lensing), Ndata, FALSE)) return (FALSE); 436 444 437 445 SendCommand (device, 16, "NVALUE: %6d", Ndata); … … 447 455 } 448 456 449 int Recv_CMF_PS1_V5_ Lensing (int device, CMF_PS1_V5_Lensing **data, int *Ndata) {457 int Recv_CMF_PS1_V5_R2_Lensing (int device, CMF_PS1_V5_R2_Lensing **data, int *Ndata) { 450 458 451 459 int ndata; 452 460 IOBuffer message; 453 CMF_PS1_V5_ Lensing *tmpdata;461 CMF_PS1_V5_R2_Lensing *tmpdata; 454 462 455 463 ExpectCommand (device, 16, 1.0, &message); … … 460 468 ExpectMessage (device, 1.0, &message); 461 469 462 tmpdata = (CMF_PS1_V5_ Lensing *) message.buffer;463 if (!gfits_convert_CMF_PS1_V5_ Lensing ((unsigned char *) tmpdata, sizeof (CMF_PS1_V5_Lensing), ndata, TRUE)) return (FALSE);470 tmpdata = (CMF_PS1_V5_R2_Lensing *) message.buffer; 471 if (!gfits_convert_CMF_PS1_V5_R2_Lensing ((unsigned char *) tmpdata, sizeof (CMF_PS1_V5_R2_Lensing), ndata, TRUE)) return (FALSE); 464 472 465 473 /* double-check data length? */ -
trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V5.c
r37807 r37992 532 532 out[i].E2_sh_psf = in[i].E2_sh_psf; 533 533 534 out[i].E1_psf = in[i].E1_psf; 535 out[i].E2_psf = in[i].E2_psf; 536 534 537 out[i].F_ApR5 = in[i].F_ApR5; 535 538 out[i].dF_ApR5 = in[i].dF_ApR5; … … 580 583 out[i].E2_sm_psf = in[i].E2_sm_psf; 581 584 585 out[i].E1_psf = in[i].E1_psf; 586 out[i].E2_psf = in[i].E2_psf; 587 582 588 out[i].X11_sh_psf = in[i].X11_sh_psf; 583 589 out[i].X12_sh_psf = in[i].X12_sh_psf; … … 1264 1270 } 1265 1271 1266 1267 Lensing *Lensing_PS1_V5_ALT_ToInternal (Lensing_PS1_V5_ALT *in, off_t Nvalues) { 1272 Lensing *Lensing_PS1_V5_R0_ToInternal (Lensing_PS1_V5_R0 *in, off_t Nvalues) { 1268 1273 1269 1274 off_t i; … … 1318 1323 } 1319 1324 1325 Lensing *Lensing_PS1_V5_R1_ToInternal (Lensing_PS1_V5_R1 *in, off_t Nvalues) { 1326 1327 off_t i; 1328 Lensing *out; 1329 1330 ALLOCATE_ZERO (out, Lensing, Nvalues); 1331 1332 for (i = 0; i < Nvalues; i++) { 1333 dvo_lensing_init (&out[i]); 1334 1335 out[i].X11_sm_obj = in[i].X11_sm_obj; 1336 out[i].X12_sm_obj = in[i].X12_sm_obj; 1337 out[i].X22_sm_obj = in[i].X22_sm_obj; 1338 out[i].E1_sm_obj = in[i].E1_sm_obj; 1339 out[i].E2_sm_obj = in[i].E2_sm_obj; 1340 1341 out[i].X11_sh_obj = in[i].X11_sh_obj; 1342 out[i].X12_sh_obj = in[i].X12_sh_obj; 1343 out[i].X22_sh_obj = in[i].X22_sh_obj; 1344 out[i].E1_sh_obj = in[i].E1_sh_obj; 1345 out[i].E2_sh_obj = in[i].E2_sh_obj; 1346 1347 out[i].X11_sm_psf = in[i].X11_sm_psf; 1348 out[i].X12_sm_psf = in[i].X12_sm_psf; 1349 out[i].X22_sm_psf = in[i].X22_sm_psf; 1350 out[i].E1_sm_psf = in[i].E1_sm_psf; 1351 out[i].E2_sm_psf = in[i].E2_sm_psf; 1352 1353 out[i].X11_sh_psf = in[i].X11_sh_psf; 1354 out[i].X12_sh_psf = in[i].X12_sh_psf; 1355 out[i].X22_sh_psf = in[i].X22_sh_psf; 1356 out[i].E1_sh_psf = in[i].E1_sh_psf; 1357 out[i].E2_sh_psf = in[i].E2_sh_psf; 1358 1359 out[i].F_ApR5 = in[i].F_ApR5; 1360 out[i].dF_ApR5 = in[i].dF_ApR5; 1361 out[i].sF_ApR5 = in[i].sF_ApR5; 1362 out[i].fF_ApR5 = in[i].fF_ApR5; 1363 1364 out[i].F_ApR6 = in[i].F_ApR6; 1365 out[i].dF_ApR6 = in[i].dF_ApR6; 1366 out[i].sF_ApR6 = in[i].sF_ApR6; 1367 out[i].fF_ApR6 = in[i].fF_ApR6; 1368 1369 out[i].detID = in[i].detID; 1370 out[i].objID = in[i].objID; 1371 out[i].catID = in[i].catID; 1372 1373 out[i].averef = in[i].averef; 1374 } 1375 return (out); 1376 } 1377
Note:
See TracChangeset
for help on using the changeset viewer.
