Changeset 2940
- Timestamp:
- 05/13/14 14:39:48 (11 years ago)
- Location:
- trunk/external-alma/atnf/PKSIO
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/external-alma/atnf/PKSIO/GBTFITSreader.cc
r2907 r2940 170 170 // Move to the SDFITS extension. 171 171 cALFA = cALFA_BD = cALFA_CIMA = 0; 172 char *extName = "SINGLE DISH" ;173 if (fits_movnam_hdu(cSDptr, BINARY_TBL, "SINGLE DISH", 0, &cStatus)) {172 char *extName = (char *)"SINGLE DISH" ; 173 if (fits_movnam_hdu(cSDptr, BINARY_TBL, extName, 0, &cStatus)) { 174 174 // No SDFITS table, look for BDFITS or CIMAFITS. 175 175 cStatus = 0; 176 if (fits_movnam_hdu(cSDptr, BINARY_TBL, "BDFITS", 0, &cStatus) == 0) {176 if (fits_movnam_hdu(cSDptr, BINARY_TBL, (char *)"BDFITS", 0, &cStatus) == 0) { 177 177 cALFA_BD = 1; 178 extName = "BDFITS" ;178 extName = (char *)"BDFITS" ; 179 179 180 180 } else { 181 181 cStatus = 0; 182 if (fits_movnam_hdu(cSDptr, BINARY_TBL, "CIMAFITS", 0, &cStatus) == 0) {182 if (fits_movnam_hdu(cSDptr, BINARY_TBL, (char *)"CIMAFITS", 0, &cStatus) == 0) { 183 183 cALFA_CIMA = 1; 184 extName = "CIMAFITS" ;184 extName = (char *)"CIMAFITS" ; 185 185 186 186 // Check for later versions of CIMAFITS. 187 187 float version; 188 readParm( "VERSION", TFLOAT, &version);188 readParm((char *)(char *)"VERSION", TFLOAT, &version); 189 189 if (version >= 2.0f) cALFA_CIMA = int(version); 190 190 … … 282 282 // GBT data. 283 283 char telescope[32]; 284 readParm( "TELESCOP", TSTRING, telescope); // Core.284 readParm((char *)(char *)"TELESCOP", TSTRING, telescope); // Core. 285 285 cGBT = strncmp(telescope, "GBT", 3) == 0 || 286 286 strncmp(telescope, "NRAO_GBT", 8) == 0; … … 288 288 289 289 // Check that the DATA array column is present. 290 findData(DATA, "DATA", TFLOAT);290 findData(DATA, (char *)(char *)"DATA", TFLOAT); 291 291 haveSpectra = cHaveSpectra = cData[DATA].colnum > 0; 292 292 … … 305 305 // no TDIM (or MAXISn) card; use the LAGS_IN value. 306 306 cNAxes = 5; 307 readParm( "LAGS_IN", TLONG, cNAxis);307 readParm((char *)"LAGS_IN", TLONG, cNAxis); 308 308 cNAxis[1] = 1; 309 309 cNAxis[2] = 1; … … 325 325 } 326 326 327 findData(FLAGGED, "FLAGGED", TBYTE);327 findData(FLAGGED, (char *)(char *)"FLAGGED", TBYTE); 328 328 329 329 } else { 330 330 // DATA column not present, check for a DATAXED keyword. 331 findData(DATAXED, "DATAXED", TSTRING);331 findData(DATAXED, (char *)(char *)"DATAXED", TSTRING); 332 332 if (cData[DATAXED].colnum < 0) { 333 333 log(LogOrigin( className, methodName, WHERE ), LogIO::SEVERE, "DATA array column absent from binary table."); … … 338 338 // Determine the number of axes and their length. 339 339 char dataxed[32]; 340 readParm( "DATAXED", TSTRING, dataxed);340 readParm((char *)(char *)"DATAXED", TSTRING, dataxed); 341 341 342 342 for (int iaxis = 0; iaxis < 5; iaxis++) cNAxis[iaxis] = 0; … … 348 348 } 349 349 350 char *CTYPE[5] = { "CTYPE1", "CTYPE2", "CTYPE3", "CTYPE4","CTYPE5"};351 char *CRPIX[5] = { "CRPIX1", "CRPIX2", "CRPIX3", "CRPIX4","CRPIX5"};352 char *CRVAL[5] = { "CRVAL1", "CRVAL2", "CRVAL3", "CRVAL4","CRVAL5"};353 char *CDELT[5] = { "CDELT1", "CDELT2", "CDELT3", "CDELT4","CDELT5"};350 char *CTYPE[5] = {(char *)"CTYPE1", (char *)"CTYPE2", (char *)"CTYPE3", (char *)"CTYPE4", (char *)"CTYPE5"}; 351 char *CRPIX[5] = {(char *)"CRPIX1", (char *)"CRPIX2", (char *)"CRPIX3", (char *)"CRPIX4", (char *)"CRPIX5"}; 352 char *CRVAL[5] = {(char *)"CRVAL1", (char *)"CRVAL2", (char *)"CRVAL3", (char *)"CRVAL4", (char *)"CRVAL5"}; 353 char *CDELT[5] = {(char *)"CDELT1", (char *)"CDELT2", (char *)"CDELT3", (char *)"CDELT4", (char *)"CDELT5"}; 354 354 355 355 // Find required DATA array axes. … … 429 429 // Fixed in ALFA CIMAFITS. 430 430 cRaAxis = 2; 431 raCRVAL = "CRVAL2A";431 raCRVAL = (char *)"CRVAL2A"; 432 432 433 433 cDecAxis = 3; 434 decCRVAL = "CRVAL3A";434 decCRVAL = (char *)"CRVAL3A"; 435 435 } 436 436 … … 444 444 445 445 // Set up machinery for data retrieval. 446 findData(SCAN, "SCAN", TINT); // Shared.447 findData(CYCLE, "CYCLE", TINT); // Additional.448 findData(DATE_OBS, "DATE-OBS", TSTRING); // Core.446 findData(SCAN, (char *)(char *)"SCAN", TINT); // Shared. 447 findData(CYCLE, (char *)(char *)"CYCLE", TINT); // Additional. 448 findData(DATE_OBS, (char *)"DATE-OBS", TSTRING); // Core. 449 449 450 450 if (cTimeAxis >= 0) { … … 461 461 462 462 } else { 463 findData(TIME, "TIME", TDOUBLE); // Core.464 } 465 466 findData(EXPOSURE, "EXPOSURE", TFLOAT); // Core.467 findData(OBJECT, "OBJECT", TSTRING); // Core.468 findData(OBJ_RA, "OBJ-RA", TDOUBLE); // Additional.469 findData(OBJ_DEC, "OBJ-DEC", TDOUBLE); // Additional.470 findData(RESTFRQ, "RESTFRQ", TDOUBLE); // Additional.471 findData(OBSMODE, "OBSMODE", TSTRING); // Shared.472 473 findData(BEAM, "BEAM", TSHORT); // Additional.474 findData(IF, "IF", TSHORT); // Additional.463 findData(TIME, (char *)(char *)"TIME", TDOUBLE); // Core. 464 } 465 466 findData(EXPOSURE, (char *)(char *)"EXPOSURE", TFLOAT); // Core. 467 findData(OBJECT, (char *)(char *)"OBJECT", TSTRING); // Core. 468 findData(OBJ_RA, (char *)"OBJ-RA", TDOUBLE); // Additional. 469 findData(OBJ_DEC, (char *)"OBJ-DEC", TDOUBLE); // Additional. 470 findData(RESTFRQ, (char *)(char *)"RESTFRQ", TDOUBLE); // Additional. 471 findData(OBSMODE, (char *)(char *)"OBSMODE", TSTRING); // Shared. 472 473 findData(BEAM, (char *)(char *)"BEAM", TSHORT); // Additional. 474 findData(IF, (char *)(char *)"IF", TSHORT); // Additional. 475 475 findData(FqRefVal, fqCRVAL, TDOUBLE); // Frequency reference value. 476 476 findData(FqDelt, fqCDELT, TDOUBLE); // Frequency increment. … … 478 478 findData(RA, raCRVAL, TDOUBLE); // Right ascension. 479 479 findData(DEC, decCRVAL, TDOUBLE); // Declination. 480 findData(SCANRATE, "SCANRATE", TFLOAT); // Additional.481 482 findData(TSYS, "TSYS", TFLOAT); // Core.483 findData(CALFCTR, "CALFCTR", TFLOAT); // Additional.484 findData(XCALFCTR, "XCALFCTR", TFLOAT); // Additional.485 findData(BASELIN, "BASELIN", TFLOAT); // Additional.486 findData(BASESUB, "BASESUB", TFLOAT); // Additional.487 findData(XPOLDATA, "XPOLDATA", TFLOAT); // Additional.488 489 findData(REFBEAM, "REFBEAM", TSHORT); // Additional.490 findData(TCAL, "TCAL", TFLOAT); // Shared.491 findData(TCALTIME, "TCALTIME", TSTRING); // Additional.492 findData(AZIMUTH, "AZIMUTH", TFLOAT); // Shared.493 findData(ELEVATIO, "ELEVATIO", TFLOAT); // Shared.494 findData(PARANGLE, "PARANGLE", TFLOAT); // Additional.495 findData(FOCUSAXI, "FOCUSAXI", TFLOAT); // Additional.496 findData(FOCUSTAN, "FOCUSTAN", TFLOAT); // Additional.497 findData(FOCUSROT, "FOCUSROT", TFLOAT); // Additional.498 findData(TAMBIENT, "TAMBIENT", TFLOAT); // Shared.499 findData(PRESSURE, "PRESSURE", TFLOAT); // Shared.500 findData(HUMIDITY, "HUMIDITY", TFLOAT); // Shared.501 findData(WINDSPEE, "WINDSPEE", TFLOAT); // Shared.502 findData(WINDDIRE, "WINDDIRE", TFLOAT); // Shared.480 findData(SCANRATE, (char *)(char *)"SCANRATE", TFLOAT); // Additional. 481 482 findData(TSYS, (char *)(char *)"TSYS", TFLOAT); // Core. 483 findData(CALFCTR, (char *)(char *)"CALFCTR", TFLOAT); // Additional. 484 findData(XCALFCTR, (char *)(char *)"XCALFCTR", TFLOAT); // Additional. 485 findData(BASELIN, (char *)(char *)"BASELIN", TFLOAT); // Additional. 486 findData(BASESUB, (char *)(char *)"BASESUB", TFLOAT); // Additional. 487 findData(XPOLDATA, (char *)(char *)"XPOLDATA", TFLOAT); // Additional. 488 489 findData(REFBEAM, (char *)(char *)"REFBEAM", TSHORT); // Additional. 490 findData(TCAL, (char *)(char *)"TCAL", TFLOAT); // Shared. 491 findData(TCALTIME, (char *)(char *)"TCALTIME", TSTRING); // Additional. 492 findData(AZIMUTH, (char *)(char *)"AZIMUTH", TFLOAT); // Shared. 493 findData(ELEVATIO, (char *)(char *)"ELEVATIO", TFLOAT); // Shared. 494 findData(PARANGLE, (char *)(char *)"PARANGLE", TFLOAT); // Additional. 495 findData(FOCUSAXI, (char *)(char *)"FOCUSAXI", TFLOAT); // Additional. 496 findData(FOCUSTAN, (char *)(char *)"FOCUSTAN", TFLOAT); // Additional. 497 findData(FOCUSROT, (char *)(char *)"FOCUSROT", TFLOAT); // Additional. 498 findData(TAMBIENT, (char *)(char *)"TAMBIENT", TFLOAT); // Shared. 499 findData(PRESSURE, (char *)(char *)"PRESSURE", TFLOAT); // Shared. 500 findData(HUMIDITY, (char *)(char *)"HUMIDITY", TFLOAT); // Shared. 501 findData(WINDSPEE, (char *)(char *)"WINDSPEE", TFLOAT); // Shared. 502 findData(WINDDIRE, (char *)(char *)"WINDDIRE", TFLOAT); // Shared. 503 503 504 504 findData(STOKES, polCRVAL, TINT); 505 findData(SIG, "SIG", TSTRING);506 findData(CAL, "CAL", TSTRING);507 508 findData(RVSYS, "RVSYS", TDOUBLE);509 findData(VFRAME, "VFRAME", TDOUBLE);510 findData(VELDEF, "VELDEF", TSTRING);511 512 findData(TIMESTAMP, "TIMESTAMP", TSTRING);513 findData(DURATION, "DURATION", TDOUBLE);514 findData(SAMPLER, "SAMPLER", TSTRING);505 findData(SIG, (char *)(char *)"SIG", TSTRING); 506 findData(CAL, (char *)(char *)"CAL", TSTRING); 507 508 findData(RVSYS, (char *)(char *)"RVSYS", TDOUBLE); 509 findData(VFRAME, (char *)(char *)"VFRAME", TDOUBLE); 510 findData(VELDEF, (char *)(char *)"VELDEF", TSTRING); 511 512 findData(TIMESTAMP, (char *)(char *)"TIMESTAMP", TSTRING); 513 findData(DURATION, (char *)(char *)"DURATION", TDOUBLE); 514 findData(SAMPLER, (char *)(char *)"SAMPLER", TSTRING); 515 515 516 516 if (cStatus) { … … 527 527 cScanNo = 0; 528 528 if (cALFA_CIMA) { 529 findData(SCAN, "SCAN_ID", TINT);529 findData(SCAN, (char *)"SCAN_ID", TINT); 530 530 if (cALFA_CIMA > 1) { 531 531 // Note that RECNUM increases by cNAxisTime per row. 532 findData(CYCLE, "RECNUM", TINT);532 findData(CYCLE, (char *)(char *)"RECNUM", TINT); 533 533 } else { 534 findData(CYCLE, "SUBSCAN", TINT);534 findData(CYCLE, (char *)(char *)"SUBSCAN", TINT); 535 535 } 536 536 } else if (cALFA_BD) { 537 findData(SCAN, "SCAN_NUMBER", TINT);538 findData(CYCLE, "PATTERN_NUMBER", TINT);537 findData(SCAN, (char *)"SCAN_NUMBER", TINT); 538 findData(CYCLE, (char *)"PATTERN_NUMBER", TINT); 539 539 } 540 540 } else { … … 554 554 if (cALFA) { 555 555 // ALFA INPUT_ID, 0-relative (overrides BEAM column if present). 556 findData(BEAM, "INPUT_ID", TSHORT);556 findData(BEAM, (char *)"INPUT_ID", TSHORT); 557 557 cBeam_1rel = 0; 558 558 … … 563 563 } else { 564 564 // ms2sdfits output, 0-relative "feed" number. 565 findData(BEAM, "MAIN_FEED1", TSHORT);565 findData(BEAM, (char *)"MAIN_FEED1", TSHORT); 566 566 cBeam_1rel = 0; 567 567 } … … 573 573 // ALFA data, 0-relative. 574 574 if (cALFA_CIMA > 1) { 575 findData(IF, "IFN", TSHORT);575 findData(IF, (char *)(char *)"IFN", TSHORT); 576 576 } else { 577 findData(IF, "IFVAL", TSHORT);577 findData(IF, (char *)(char *)"IFVAL", TSHORT); 578 578 } 579 579 cIF_1rel = 0; … … 582 582 // ms2sdfits writes a scalar "TSYS" column that averages the polarizations. 583 583 int colnum; 584 findCol( "SYSCAL_TSYS", &colnum);584 findCol((char *)"SYSCAL_TSYS", &colnum); 585 585 if (colnum > 0) { 586 586 // This contains the vector Tsys. 587 findData(TSYS, "SYSCAL_TSYS", TFLOAT);587 findData(TSYS, (char *)"SYSCAL_TSYS", TFLOAT); 588 588 } 589 589 … … 591 591 592 592 if (cData[SCANRATE].colnum < 0) { 593 findData(SCANRATE, "FIELD_POINTING_DIR_RATE", TFLOAT);593 findData(SCANRATE, (char *)"FIELD_POINTING_DIR_RATE", TFLOAT); 594 594 } 595 595 596 596 if (cData[RESTFRQ].colnum < 0) { 597 findData(RESTFRQ, "RESTFREQ", TDOUBLE);597 findData(RESTFRQ, (char *)(char *)"RESTFREQ", TDOUBLE); 598 598 if (cData[RESTFRQ].colnum < 0) { 599 findData(RESTFRQ, "SPECTRAL_WINDOW_REST_FREQUENCY", TDOUBLE);599 findData(RESTFRQ, (char *)"SPECTRAL_WINDOW_REST_FREQUENCY", TDOUBLE); 600 600 } 601 601 } 602 602 603 603 if (cData[OBJ_RA].colnum < 0) { 604 findData(OBJ_RA, "SOURCE_DIRECTION", TDOUBLE);604 findData(OBJ_RA, (char *)"SOURCE_DIRECTION", TDOUBLE); 605 605 } 606 606 if (cData[OBJ_DEC].colnum < 0) { 607 findData(OBJ_DEC, "SOURCE_DIRECTION", TDOUBLE);607 findData(OBJ_DEC, (char *)"SOURCE_DIRECTION", TDOUBLE); 608 608 } 609 609 … … 611 611 612 612 if (cData[TCAL].colnum < 0) { 613 findData(TCAL, "SYSCAL_TCAL", TFLOAT);613 findData(TCAL, (char *)"SYSCAL_TCAL", TFLOAT); 614 614 } else if (cALFA_BD) { 615 615 // ALFA BDFITS has a different TCAL with 64 elements - kill it! 616 findData(TCAL, "NO NO NO", TFLOAT);616 findData(TCAL, (char *)"NO NO NO", TFLOAT); 617 617 } 618 618 619 619 if (cALFA_BD) { 620 620 // ALFA BDFITS. 621 findData(AZIMUTH, "CRVAL2B", TFLOAT);622 findData(ELEVATIO, "CRVAL3B", TFLOAT);621 findData(AZIMUTH, (char *)(char *)"CRVAL2B", TFLOAT); 622 findData(ELEVATIO, (char *)(char *)"CRVAL3B", TFLOAT); 623 623 } 624 624 625 625 if (cALFA) { 626 626 // ALFA data. 627 findData(PARANGLE, "PARA_ANG", TFLOAT);627 findData(PARANGLE, (char *)"PARA_ANG", TFLOAT); 628 628 } 629 629 630 630 if (cData[TAMBIENT].colnum < 0) { 631 findData(TAMBIENT, "WEATHER_TEMPERATURE", TFLOAT);631 findData(TAMBIENT, (char *)"WEATHER_TEMPERATURE", TFLOAT); 632 632 } 633 633 634 634 if (cData[PRESSURE].colnum < 0) { 635 findData(PRESSURE, "WEATHER_PRESSURE", TFLOAT);635 findData(PRESSURE, (char *)"WEATHER_PRESSURE", TFLOAT); 636 636 } 637 637 638 638 if (cData[HUMIDITY].colnum < 0) { 639 findData(HUMIDITY, "WEATHER_REL_HUMIDITY", TFLOAT);639 findData(HUMIDITY, (char *)"WEATHER_REL_HUMIDITY", TFLOAT); 640 640 } 641 641 642 642 if (cData[WINDSPEE].colnum < 0) { 643 findData(WINDSPEE, "WEATHER_WIND_SPEED", TFLOAT);643 findData(WINDSPEE, (char *)"WEATHER_WIND_SPEED", TFLOAT); 644 644 } 645 645 646 646 if (cData[WINDDIRE].colnum < 0) { 647 findData(WINDDIRE, "WEATHER_WIND_DIRECTION", TFLOAT);647 findData(WINDDIRE, (char *)"WEATHER_WIND_DIRECTION", TFLOAT); 648 648 } 649 649 … … 768 768 if (cData[DATAXED].colnum > 0) { 769 769 char dataxed[32]; 770 readParm( "DATAXED", TSTRING, dataxed);770 readParm((char *)(char *)"DATAXED", TSTRING, dataxed); 771 771 772 772 sscanf(dataxed, "(%ld,%ld,%ld,%ld,%ld)", cNAxis, cNAxis+1, … … 1014 1014 if (cALFA_CIMA > 1) { 1015 1015 // FFTs per second when the Mock correlator operates in RFI blanking mode. 1016 readData( "PHFFTACC", TFLOAT, 0, &cALFAacc);1016 readData((char *)"PHFFTACC", TFLOAT, 0, &cALFAacc); 1017 1017 } 1018 1018 … … 1051 1051 1052 1052 // Read parameter values. 1053 readParm( "OBSERVER", TSTRING, observer); // Shared.1054 readParm( "PROJID", TSTRING, project); // Shared.1055 readParm( "TELESCOP", TSTRING, telescope); // Core.1053 readParm((char *)(char *)"OBSERVER", TSTRING, observer); // Shared. 1054 readParm((char *)(char *)"PROJID", TSTRING, project); // Shared. 1055 readParm((char *)(char *)"TELESCOP", TSTRING, telescope); // Core. 1056 1056 1057 1057 antPos[0] = 0.0; 1058 1058 antPos[1] = 0.0; 1059 1059 antPos[2] = 0.0; 1060 if (readParm( "ANTENNA_POSITION", TDOUBLE, antPos)) {1061 readParm( "OBSGEO-X", TDOUBLE, antPos); // Additional.1062 readParm( "OBSGEO-Y", TDOUBLE, antPos + 1); // Additional.1063 readParm( "OBSGEO-Z", TDOUBLE, antPos + 2); // Additional.1060 if (readParm((char *)"ANTENNA_POSITION", TDOUBLE, antPos)) { 1061 readParm((char *)"OBSGEO-X", TDOUBLE, antPos); // Additional. 1062 readParm((char *)"OBSGEO-Y", TDOUBLE, antPos + 1); // Additional. 1063 readParm((char *)"OBSGEO-Z", TDOUBLE, antPos + 2); // Additional. 1064 1064 } 1065 1065 1066 1066 if (antPos[0] == 0.0) { 1067 1067 if (cGBT) { 1068 readParm( "SITELONG", TDOUBLE, antPos ) ;1069 readParm( "SITELAT", TDOUBLE, antPos+1 ) ;1070 readParm( "SITEELEV", TDOUBLE, antPos+2 ) ;1068 readParm( (char *)(char *)"SITELONG", TDOUBLE, antPos ) ; 1069 readParm( (char *)(char *)"SITELAT", TDOUBLE, antPos+1 ) ; 1070 readParm( (char *)(char *)"SITEELEV", TDOUBLE, antPos+2 ) ; 1071 1071 Vector<Double> pos( 2 ) ; 1072 1072 pos[0] = Double( antPos[0] ) ; … … 1116 1116 } 1117 1117 1118 readParm( "EQUINOX", TFLOAT, &equinox); // Shared.1118 readParm((char *)(char *)"EQUINOX", TFLOAT, &equinox); // Shared. 1119 1119 if (cStatus == 405) { 1120 1120 // EQUINOX was written as string value in early versions. 1121 1121 cStatus = 0; 1122 1122 char strtmp[32]; 1123 readParm( "EQUINOX", TSTRING, strtmp);1123 readParm((char *)(char *)"EQUINOX", TSTRING, strtmp); 1124 1124 sscanf(strtmp, "%f", &equinox); 1125 1125 } 1126 1126 1127 if (readParm( "RADESYS", TSTRING, radecsys)) { // Additional.1128 if (readParm( "RADECSYS", TSTRING, radecsys)) { // Additional.1127 if (readParm((char *)(char *)"RADESYS", TSTRING, radecsys)) { // Additional. 1128 if (readParm((char *)(char *)"RADECSYS", TSTRING, radecsys)) { // Additional. 1129 1129 strcpy(radecsys, ""); 1130 1130 } 1131 1131 } 1132 1132 1133 if (readParm( "SPECSYS", TSTRING, dopplerFrame)) { // Additional.1133 if (readParm((char *)(char *)"SPECSYS", TSTRING, dopplerFrame)) { // Additional. 1134 1134 // Fallback value. 1135 1135 strcpy(dopplerFrame, "TOPOCENT"); … … 1139 1139 // Added few more codes currently (as of 2009 Oct) used in the GBT 1140 1140 // SDFITS (based io_sdfits_define.pro of GBTIDL). - TT 1141 if (readParm( "VELFRAME", TSTRING, dopplerFrame)) { // Additional.1141 if (readParm((char *)(char *)"VELFRAME", TSTRING, dopplerFrame)) { // Additional. 1142 1142 // No, try digging it out of the CTYPE card (AIPS convention). 1143 1143 char keyw[9], ctype[9]; … … 1211 1211 readTime(1, 1, datobs, utc); 1212 1212 readData(FqRefVal, 1, &refFreq); 1213 readParm( "BANDWID", TDOUBLE, &bandwidth); // Core.1213 readParm((char *)(char *)"BANDWID", TDOUBLE, &bandwidth); // Core. 1214 1214 1215 1215 if (cStatus) { … … 1263 1263 if (cALFA_BD) { 1264 1264 unsigned char invert; 1265 readData( "UPPERSB", TBYTE, irow, &invert);1265 readData((char *)"UPPERSB", TBYTE, irow, &invert); 1266 1266 1267 1267 if (invert) { … … 1867 1867 unsigned char invert; 1868 1868 int anynul, colnum; 1869 findCol( "UPPERSB", &colnum);1869 findCol((char *)"UPPERSB", &colnum); 1870 1870 fits_read_col(cSDptr, TBYTE, colnum, cRow, 1, 1, 0, &invert, &anynul, 1871 1871 &cStatus); … … 2011 2011 // Rescale according to the number of unblanked accumulations. 2012 2012 int colnum, naccum; 2013 findCol( "STAT", &colnum);2013 findCol((char *)"STAT", &colnum); 2014 2014 fits_read_col(cSDptr, TINT, colnum, cRowR, 10*(cTimeIdx-1)+2, 1, 0, 2015 2015 &naccum, &anynul, &cStatus); … … 2631 2631 char chars[32]; 2632 2632 if (cALFA_BD) { 2633 readData( "OBS_NAME", TSTRING, cRow, chars);2633 readData((char *)"OBS_NAME", TSTRING, cRow, chars); 2634 2634 } else { 2635 readData( "SCANTYPE", TSTRING, cRow, chars);2635 readData((char *)"SCANTYPE", TSTRING, cRow, chars); 2636 2636 } 2637 2637 … … 2691 2691 if (cALFA_CIMA > 1) { 2692 2692 int colnum, naccum; 2693 findCol( "STAT", &colnum);2693 findCol((char *)"STAT", &colnum); 2694 2694 fits_read_col(cSDptr, TINT, colnum, cRow, 2, 1, 0, &naccum, &anynul, 2695 2695 &cStatus); … … 2916 2916 MEpoch me( Quantity( dd, "d" ), MEpoch::UTC ) ; 2917 2917 double antPos[3] ; 2918 readParm( "SITELONG", TDOUBLE, antPos ) ;2919 readParm( "SITELAT", TDOUBLE, antPos+1 ) ;2920 readParm( "SITEELEV", TDOUBLE, antPos+2 ) ;2918 readParm( (char *)(char *)"SITELONG", TDOUBLE, antPos ) ; 2919 readParm( (char *)(char *)"SITELAT", TDOUBLE, antPos+1 ) ; 2920 readParm( (char *)(char *)"SITEELEV", TDOUBLE, antPos+2 ) ; 2921 2921 Vector<Double> pos( 2 ) ; 2922 2922 pos[0] = Double( antPos[0] ) ; -
trunk/external-alma/atnf/PKSIO/NROFITSDataset.cc
r2812 r2940 887 887 //cout << "SCANTP(" << i << ") = " << record_->SCANTP << endl ; 888 888 // 889 c har *name1 = "" ;890 c har *name2 = "" ;889 const char *name1 = "" ; 890 const char *name2 = "" ; 891 891 if ( SCNCD == 0 ) { 892 892 name1 = "DRA" ; … … 1683 1683 while ( count < ARYNM && index < rowNum_ ) { 1684 1684 char ctmp[5] ; 1685 fread( ctmp, 1, 4, fp_ ) ;1685 std::size_t retval = fread( ctmp, 1, 4, fp_ ) ; 1686 1686 ctmp[4] = '\0' ; 1687 1687 //cout << "ctmp = " << ctmp << endl ; … … 1767 1767 int count = 0 ; 1768 1768 while ( strncmp( buf, name, strlen(name) ) != 0 && strncmp( buf, "END", 3 ) != 0 ) { 1769 fread( buf, 1, 80, fp_ ) ;1769 std::size_t retval = fread( buf, 1, 80, fp_ ) ; 1770 1770 buf[80] = '\0' ; 1771 1771 count++ ; … … 1801 1801 fseek( fp_, 0, SEEK_SET ) ; 1802 1802 while ( strncmp( buf, name, strlen(name) ) != 0 && strncmp( buf, "END", 3 ) != 0 ) { 1803 fread( buf, 1, 80, fp_ ) ;1803 std::size_t retval = fread( buf, 1, 80, fp_ ) ; 1804 1804 buf[80] = '\0' ; 1805 1805 //char bufo[9] ; … … 1837 1837 fseek( fp_, 0, SEEK_SET ) ; 1838 1838 while ( strncmp( buf, name, strlen(name) ) != 0 && strncmp( buf, "END", 3 ) != 0 ) { 1839 fread( buf, 1, 80, fp_ ) ;1839 std::size_t retval = fread( buf, 1, 80, fp_ ) ; 1840 1840 buf[80] = '\0' ; 1841 1841 //char bufo[9] ; … … 1871 1871 fseek( fp_, 0, SEEK_SET ) ; 1872 1872 while ( strncmp( buf, name, strlen(name) ) != 0 && strncmp( buf, "END", 3 ) != 0 ) { 1873 fread( buf, 1, 80, fp_ ) ;1873 std::size_t retval = fread( buf, 1, 80, fp_ ) ; 1874 1874 buf[80] = '\0' ; 1875 1875 char bufo[9] ; … … 1913 1913 // read data 1914 1914 if ( xsize < clen ) { 1915 fread( v, 1, xsize, fp_ ) ;1915 std::size_t retval = fread( v, 1, xsize, fp_ ) ; 1916 1916 //v[xsize] = '\0' ; 1917 1917 } 1918 1918 else { 1919 fread( v, 1, clen-1, fp_ ) ;1919 std::size_t retval = fread( v, 1, clen-1, fp_ ) ; 1920 1920 //v[clen-1] = '\0' ; 1921 1921 } … … 1935 1935 1936 1936 // read data 1937 fread( &v, sizeof(int), 1, fp_ ) ;1937 std::size_t retval = fread( &v, sizeof(int), 1, fp_ ) ; 1938 1938 if ( b == 0 ) 1939 1939 convertEndian( v ) ; … … 1953 1953 1954 1954 // read data 1955 fread( &v, sizeof(float), 1, fp_ ) ;1955 std::size_t retval = fread( &v, sizeof(float), 1, fp_ ) ; 1956 1956 if ( b == 0 ) 1957 1957 convertEndian( v ) ; … … 1971 1971 1972 1972 // read data 1973 fread( &v, sizeof(double), 1, fp_ ) ;1973 std::size_t retval = fread( &v, sizeof(double), 1, fp_ ) ; 1974 1974 if ( b == 0 ) 1975 1975 convertEndian( v ) ; … … 1996 1996 int clen = strlen( v[i] ) ; 1997 1997 if ( clen > xsize ) { 1998 fread( v[i], 1, xsize, fp_ ) ;1998 std::size_t retval = fread( v[i], 1, xsize, fp_ ) ; 1999 1999 //v[i][xsize] = '\0' ; 2000 2000 } 2001 2001 else { 2002 fread( v[i], 1, clen, fp_ ) ;2002 std::size_t retval = fread( v[i], 1, clen, fp_ ) ; 2003 2003 //v[i][clen-1] = '\0' ; 2004 2004 } … … 2019 2019 2020 2020 for ( unsigned int i = 0 ; i < v.size() ; i++ ) { 2021 fread( &v[i], 1, sizeof(int), fp_ ) ;2021 std::size_t retval = fread( &v[i], 1, sizeof(int), fp_ ) ; 2022 2022 if ( b == 0 ) 2023 2023 convertEndian( v[i] ) ; … … 2038 2038 2039 2039 for ( unsigned int i = 0 ; i < v.size() ; i++ ) { 2040 fread( &v[i], 1, sizeof(float), fp_ ) ;2040 std::size_t retval = fread( &v[i], 1, sizeof(float), fp_ ) ; 2041 2041 if ( b == 0 ) 2042 2042 convertEndian( v[i] ) ; … … 2057 2057 2058 2058 for ( unsigned int i = 0 ; i < v.size() ; i++ ) { 2059 fread( &v[i], 1, sizeof(double), fp_ ) ;2059 std::size_t retval = fread( &v[i], 1, sizeof(double), fp_ ) ; 2060 2060 if ( b == 0 ) 2061 2061 convertEndian( v[i] ) ; … … 2087 2087 // int clen = (int)strlen( v[i] ) ; 2088 2088 // if ( clen > xsize ) { 2089 // fread( v[i], 1, xsize, fp_ ) ;2089 // std::size_t retval = fread( v[i], 1, xsize, fp_ ) ; 2090 2090 // //v[i][xsize] = '\0' ; 2091 2091 // } 2092 2092 // else { 2093 // fread( v[i], 1, clen-1, fp_ ) ;2093 // std::size_t retval = fread( v[i], 1, clen-1, fp_ ) ; 2094 2094 // //v[i][clen-1] = '\0' ; 2095 2095 // } 2096 2096 char c[xsize+1] ; 2097 fread( c, 1, xsize, fp_ ) ;2097 std::size_t retval = fread( c, 1, xsize, fp_ ) ; 2098 2098 c[xsize] = '\0' ; 2099 2099 v[i] = string( c ) ; … … 2118 2118 int offset = scanLen_ * arrayid_[i] + sizeof(int) * idx ; 2119 2119 fseek( fp_, offset, SEEK_CUR ) ; 2120 fread( &v[i], 1, sizeof(int), fp_ ) ;2120 std::size_t retval = fread( &v[i], 1, sizeof(int), fp_ ) ; 2121 2121 if ( b == 0 ) 2122 2122 convertEndian( v[i] ) ; … … 2141 2141 int offset = scanLen_ * arrayid_[i] + sizeof(float) * idx ; 2142 2142 fseek( fp_, offset, SEEK_CUR ) ; 2143 fread( &v[i], 1, sizeof(float), fp_ ) ;2143 std::size_t retval = fread( &v[i], 1, sizeof(float), fp_ ) ; 2144 2144 if ( b == 0 ) 2145 2145 convertEndian( v[i] ) ; … … 2164 2164 int offset = scanLen_ * arrayid_[i] + sizeof(double) * idx ; 2165 2165 fseek( fp_, offset, SEEK_CUR ) ; 2166 fread( &v[i], 1, sizeof(double), fp_ ) ;2166 std::size_t retval = fread( &v[i], 1, sizeof(double), fp_ ) ; 2167 2167 if ( b == 0 ) 2168 2168 convertEndian( v[i] ) ; -
trunk/external-alma/atnf/PKSIO/NROReader.cc
r2804 r2940 81 81 // Determine the type of input. 82 82 NROReader *reader = 0; 83 std::size_t retval; 83 84 if ( inFile.isRegular() ) { 84 85 FILE *file ; … … 86 87 // read LOFIL0 87 88 char buf[9]; 88 fread( buf, 4, 1, file ) ;89 retval = fread( buf, 4, 1, file ) ; 89 90 buf[4] = '\0' ; 90 91 // DEBUG … … 107 108 delete d ; 108 109 fseek( file, size, SEEK_SET ) ; 109 fread( buf, 8, 1, file ) ;110 retval = fread( buf, 8, 1, file ) ; 110 111 buf[8] = '\0' ; 111 112 // DEBUG … … 123 124 delete d ; 124 125 fseek( file, size, SEEK_SET ) ; 125 fread( buf, 8, 1, file ) ;126 retval = fread( buf, 8, 1, file ) ; 126 127 buf[8] = '\0' ; 127 128 // DEBUG -
trunk/external-alma/atnf/PKSIO/SDFITSreader.cc
r1757 r2940 146 146 // Move to the SDFITS extension. 147 147 cALFA = cALFA_BD = cALFA_CIMA = 0; 148 if (fits_movnam_hdu(cSDptr, BINARY_TBL, "SINGLE DISH", 0, &cStatus)) {148 if (fits_movnam_hdu(cSDptr, BINARY_TBL, (char *)"SINGLE DISH", 0, &cStatus)) { 149 149 // No SDFITS table, look for BDFITS or CIMAFITS. 150 150 cStatus = 0; 151 if (fits_movnam_hdu(cSDptr, BINARY_TBL, "BDFITS", 0, &cStatus) == 0) {151 if (fits_movnam_hdu(cSDptr, BINARY_TBL, (char *)"BDFITS", 0, &cStatus) == 0) { 152 152 cALFA_BD = 1; 153 153 154 154 } else { 155 155 cStatus = 0; 156 if (fits_movnam_hdu(cSDptr, BINARY_TBL, "CIMAFITS", 0, &cStatus) == 0) {156 if (fits_movnam_hdu(cSDptr, BINARY_TBL, (char *)"CIMAFITS", 0, &cStatus) == 0) { 157 157 cALFA_CIMA = 1; 158 158 159 159 // Check for later versions of CIMAFITS. 160 160 float version; 161 readParm( "VERSION", TFLOAT, &version);161 readParm((char *)"VERSION", TFLOAT, &version); 162 162 if (version >= 2.0f) cALFA_CIMA = int(version); 163 163 … … 188 188 // GBT data. 189 189 char telescope[32]; 190 readParm( "TELESCOP", TSTRING, telescope); // Core.190 readParm((char *)"TELESCOP", TSTRING, telescope); // Core. 191 191 cGBT = strncmp(telescope, "GBT", 3) == 0 || 192 strncmp(telescope, "NRAO_GBT", 8) == 0;192 strncmp(telescope, (char *)"NRAO_GBT", 8) == 0; 193 193 194 194 195 195 // Check that the DATA array column is present. 196 findData(DATA, "DATA", TFLOAT);196 findData(DATA, (char *)"DATA", TFLOAT); 197 197 haveSpectra = cHaveSpectra = cData[DATA].colnum > 0; 198 198 … … 211 211 // no TDIM (or MAXISn) card; use the LAGS_IN value. 212 212 cNAxes = 5; 213 readParm( "LAGS_IN", TLONG, cNAxis);213 readParm((char *)"LAGS_IN", TLONG, cNAxis); 214 214 cNAxis[1] = 1; 215 215 cNAxis[2] = 1; … … 231 231 } 232 232 233 findData(FLAGGED, "FLAGGED", TBYTE);233 findData(FLAGGED, (char *)"FLAGGED", TBYTE); 234 234 235 235 } else { 236 236 // DATA column not present, check for a DATAXED keyword. 237 findData(DATAXED, "DATAXED", TSTRING);237 findData(DATAXED, (char *)"DATAXED", TSTRING); 238 238 if (cData[DATAXED].colnum < 0) { 239 239 log(LogOrigin( className, methodName, WHERE ), LogIO::SEVERE, "DATA array column absent from binary table."); … … 244 244 // Determine the number of axes and their length. 245 245 char dataxed[32]; 246 readParm( "DATAXED", TSTRING, dataxed);246 readParm((char *)"DATAXED", TSTRING, dataxed); 247 247 248 248 for (int iaxis = 0; iaxis < 5; iaxis++) cNAxis[iaxis] = 0; … … 254 254 } 255 255 256 char *CTYPE[5] = { "CTYPE1", "CTYPE2", "CTYPE3", "CTYPE4","CTYPE5"};257 char *CRPIX[5] = { "CRPIX1", "CRPIX2", "CRPIX3", "CRPIX4","CRPIX5"};258 char *CRVAL[5] = { "CRVAL1", "CRVAL2", "CRVAL3", "CRVAL4","CRVAL5"};259 char *CDELT[5] = { "CDELT1", "CDELT2", "CDELT3", "CDELT4","CDELT5"};256 char *CTYPE[5] = {(char *)"CTYPE1", (char *)"CTYPE2", (char *)"CTYPE3", (char *)"CTYPE4", (char *)"CTYPE5"}; 257 char *CRPIX[5] = {(char *)"CRPIX1", (char *)"CRPIX2", (char *)"CRPIX3", (char *)"CRPIX4", (char *)"CRPIX5"}; 258 char *CRVAL[5] = {(char *)"CRVAL1", (char *)"CRVAL2", (char *)"CRVAL3", (char *)"CRVAL4", (char *)"CRVAL5"}; 259 char *CDELT[5] = {(char *)"CDELT1", (char *)"CDELT2", (char *)"CDELT3", (char *)"CDELT4", (char *)"CDELT5"}; 260 260 261 261 // Find required DATA array axes. … … 335 335 // Fixed in ALFA CIMAFITS. 336 336 cRaAxis = 2; 337 raCRVAL = "CRVAL2A";337 raCRVAL = (char *)"CRVAL2A"; 338 338 339 339 cDecAxis = 3; 340 decCRVAL = "CRVAL3A";340 decCRVAL = (char *)"CRVAL3A"; 341 341 } 342 342 … … 350 350 351 351 // Set up machinery for data retrieval. 352 findData(SCAN, "SCAN", TINT); // Shared.353 findData(CYCLE, "CYCLE", TINT); // Additional.354 findData(DATE_OBS, "DATE-OBS", TSTRING); // Core.352 findData(SCAN, (char *)"SCAN", TINT); // Shared. 353 findData(CYCLE, (char *)"CYCLE", TINT); // Additional. 354 findData(DATE_OBS, (char *)"DATE-OBS", TSTRING); // Core. 355 355 356 356 if (cTimeAxis >= 0) { … … 367 367 368 368 } else { 369 findData(TIME, "TIME", TDOUBLE); // Core.370 } 371 372 findData(EXPOSURE, "EXPOSURE", TFLOAT); // Core.373 findData(OBJECT, "OBJECT", TSTRING); // Core.374 findData(OBJ_RA, "OBJ-RA", TDOUBLE); // Additional.375 findData(OBJ_DEC, "OBJ-DEC", TDOUBLE); // Additional.376 findData(RESTFRQ, "RESTFRQ", TDOUBLE); // Additional.377 findData(OBSMODE, "OBSMODE", TSTRING); // Shared.378 379 findData(BEAM, "BEAM", TSHORT); // Additional.380 findData(IF, "IF", TSHORT); // Additional.369 findData(TIME, (char *)"TIME", TDOUBLE); // Core. 370 } 371 372 findData(EXPOSURE, (char *)"EXPOSURE", TFLOAT); // Core. 373 findData(OBJECT, (char *)"OBJECT", TSTRING); // Core. 374 findData(OBJ_RA, (char *)"OBJ-RA", TDOUBLE); // Additional. 375 findData(OBJ_DEC, (char *)"OBJ-DEC", TDOUBLE); // Additional. 376 findData(RESTFRQ, (char *)"RESTFRQ", TDOUBLE); // Additional. 377 findData(OBSMODE, (char *)"OBSMODE", TSTRING); // Shared. 378 379 findData(BEAM, (char *)"BEAM", TSHORT); // Additional. 380 findData(IF, (char *)"IF", TSHORT); // Additional. 381 381 findData(FqRefVal, fqCRVAL, TDOUBLE); // Frequency reference value. 382 382 findData(FqDelt, fqCDELT, TDOUBLE); // Frequency increment. … … 384 384 findData(RA, raCRVAL, TDOUBLE); // Right ascension. 385 385 findData(DEC, decCRVAL, TDOUBLE); // Declination. 386 findData(SCANRATE, "SCANRATE", TFLOAT); // Additional.387 388 findData(TSYS, "TSYS", TFLOAT); // Core.389 findData(CALFCTR, "CALFCTR", TFLOAT); // Additional.390 findData(XCALFCTR, "XCALFCTR", TFLOAT); // Additional.391 findData(BASELIN, "BASELIN", TFLOAT); // Additional.392 findData(BASESUB, "BASESUB", TFLOAT); // Additional.393 findData(XPOLDATA, "XPOLDATA", TFLOAT); // Additional.394 395 findData(REFBEAM, "REFBEAM", TSHORT); // Additional.396 findData(TCAL, "TCAL", TFLOAT); // Shared.397 findData(TCALTIME, "TCALTIME", TSTRING); // Additional.398 findData(AZIMUTH, "AZIMUTH", TFLOAT); // Shared.399 findData(ELEVATIO, "ELEVATIO", TFLOAT); // Shared.400 findData(PARANGLE, "PARANGLE", TFLOAT); // Additional.401 findData(FOCUSAXI, "FOCUSAXI", TFLOAT); // Additional.402 findData(FOCUSTAN, "FOCUSTAN", TFLOAT); // Additional.403 findData(FOCUSROT, "FOCUSROT", TFLOAT); // Additional.404 findData(TAMBIENT, "TAMBIENT", TFLOAT); // Shared.405 findData(PRESSURE, "PRESSURE", TFLOAT); // Shared.406 findData(HUMIDITY, "HUMIDITY", TFLOAT); // Shared.407 findData(WINDSPEE, "WINDSPEE", TFLOAT); // Shared.408 findData(WINDDIRE, "WINDDIRE", TFLOAT); // Shared.386 findData(SCANRATE, (char *)"SCANRATE", TFLOAT); // Additional. 387 388 findData(TSYS, (char *)"TSYS", TFLOAT); // Core. 389 findData(CALFCTR, (char *)"CALFCTR", TFLOAT); // Additional. 390 findData(XCALFCTR, (char *)"XCALFCTR", TFLOAT); // Additional. 391 findData(BASELIN, (char *)"BASELIN", TFLOAT); // Additional. 392 findData(BASESUB, (char *)"BASESUB", TFLOAT); // Additional. 393 findData(XPOLDATA, (char *)"XPOLDATA", TFLOAT); // Additional. 394 395 findData(REFBEAM, (char *)"REFBEAM", TSHORT); // Additional. 396 findData(TCAL, (char *)"TCAL", TFLOAT); // Shared. 397 findData(TCALTIME, (char *)"TCALTIME", TSTRING); // Additional. 398 findData(AZIMUTH, (char *)"AZIMUTH", TFLOAT); // Shared. 399 findData(ELEVATIO, (char *)"ELEVATIO", TFLOAT); // Shared. 400 findData(PARANGLE, (char *)"PARANGLE", TFLOAT); // Additional. 401 findData(FOCUSAXI, (char *)"FOCUSAXI", TFLOAT); // Additional. 402 findData(FOCUSTAN, (char *)"FOCUSTAN", TFLOAT); // Additional. 403 findData(FOCUSROT, (char *)"FOCUSROT", TFLOAT); // Additional. 404 findData(TAMBIENT, (char *)"TAMBIENT", TFLOAT); // Shared. 405 findData(PRESSURE, (char *)"PRESSURE", TFLOAT); // Shared. 406 findData(HUMIDITY, (char *)"HUMIDITY", TFLOAT); // Shared. 407 findData(WINDSPEE, (char *)"WINDSPEE", TFLOAT); // Shared. 408 findData(WINDDIRE, (char *)"WINDDIRE", TFLOAT); // Shared. 409 409 410 410 findData(STOKES, polCRVAL, TINT); 411 findData(SIG, "SIG", TSTRING);412 findData(CAL, "CAL", TSTRING);413 414 findData(RVSYS, "RVSYS", TDOUBLE);415 findData(VFRAME, "VFRAME", TDOUBLE);416 findData(VELDEF, "VELDEF", TSTRING);411 findData(SIG, (char *)"SIG", TSTRING); 412 findData(CAL, (char *)"CAL", TSTRING); 413 414 findData(RVSYS, (char *)"RVSYS", TDOUBLE); 415 findData(VFRAME, (char *)"VFRAME", TDOUBLE); 416 findData(VELDEF, (char *)"VELDEF", TSTRING); 417 417 418 418 if (cStatus) { … … 429 429 cScanNo = 0; 430 430 if (cALFA_CIMA) { 431 findData(SCAN, "SCAN_ID", TINT);431 findData(SCAN, (char *)"SCAN_ID", TINT); 432 432 if (cALFA_CIMA > 1) { 433 433 // Note that RECNUM increases by cNAxisTime per row. 434 findData(CYCLE, "RECNUM", TINT);434 findData(CYCLE, (char *)"RECNUM", TINT); 435 435 } else { 436 findData(CYCLE, "SUBSCAN", TINT);436 findData(CYCLE, (char *)"SUBSCAN", TINT); 437 437 } 438 438 } else if (cALFA_BD) { 439 findData(SCAN, "SCAN_NUMBER", TINT);440 findData(CYCLE, "PATTERN_NUMBER", TINT);439 findData(SCAN, (char *)"SCAN_NUMBER", TINT); 440 findData(CYCLE, (char *)"PATTERN_NUMBER", TINT); 441 441 } 442 442 } else { … … 456 456 if (cALFA) { 457 457 // ALFA INPUT_ID, 0-relative (overrides BEAM column if present). 458 findData(BEAM, "INPUT_ID", TSHORT);458 findData(BEAM, (char *)"INPUT_ID", TSHORT); 459 459 cBeam_1rel = 0; 460 460 … … 465 465 } else { 466 466 // ms2sdfits output, 0-relative "feed" number. 467 findData(BEAM, "MAIN_FEED1", TSHORT);467 findData(BEAM, (char *)"MAIN_FEED1", TSHORT); 468 468 cBeam_1rel = 0; 469 469 } … … 475 475 // ALFA data, 0-relative. 476 476 if (cALFA_CIMA > 1) { 477 findData(IF, "IFN", TSHORT);477 findData(IF, (char *)"IFN", TSHORT); 478 478 } else { 479 findData(IF, "IFVAL", TSHORT);479 findData(IF, (char *)"IFVAL", TSHORT); 480 480 } 481 481 cIF_1rel = 0; … … 484 484 // ms2sdfits writes a scalar "TSYS" column that averages the polarizations. 485 485 int colnum; 486 findCol( "SYSCAL_TSYS", &colnum);486 findCol((char *)"SYSCAL_TSYS", &colnum); 487 487 if (colnum > 0) { 488 488 // This contains the vector Tsys. 489 findData(TSYS, "SYSCAL_TSYS", TFLOAT);489 findData(TSYS, (char *)"SYSCAL_TSYS", TFLOAT); 490 490 } 491 491 … … 493 493 494 494 if (cData[SCANRATE].colnum < 0) { 495 findData(SCANRATE, "FIELD_POINTING_DIR_RATE", TFLOAT);495 findData(SCANRATE, (char *)"FIELD_POINTING_DIR_RATE", TFLOAT); 496 496 } 497 497 498 498 if (cData[RESTFRQ].colnum < 0) { 499 findData(RESTFRQ, "RESTFREQ", TDOUBLE);499 findData(RESTFRQ, (char *)"RESTFREQ", TDOUBLE); 500 500 if (cData[RESTFRQ].colnum < 0) { 501 findData(RESTFRQ, "SPECTRAL_WINDOW_REST_FREQUENCY", TDOUBLE);501 findData(RESTFRQ, (char *)"SPECTRAL_WINDOW_REST_FREQUENCY", TDOUBLE); 502 502 } 503 503 } 504 504 505 505 if (cData[OBJ_RA].colnum < 0) { 506 findData(OBJ_RA, "SOURCE_DIRECTION", TDOUBLE);506 findData(OBJ_RA, (char *)"SOURCE_DIRECTION", TDOUBLE); 507 507 } 508 508 if (cData[OBJ_DEC].colnum < 0) { 509 findData(OBJ_DEC, "SOURCE_DIRECTION", TDOUBLE);509 findData(OBJ_DEC, (char *)"SOURCE_DIRECTION", TDOUBLE); 510 510 } 511 511 … … 513 513 514 514 if (cData[TCAL].colnum < 0) { 515 findData(TCAL, "SYSCAL_TCAL", TFLOAT);515 findData(TCAL, (char *)"SYSCAL_TCAL", TFLOAT); 516 516 } else if (cALFA_BD) { 517 517 // ALFA BDFITS has a different TCAL with 64 elements - kill it! 518 findData(TCAL, "NO NO NO", TFLOAT);518 findData(TCAL, (char *)"NO NO NO", TFLOAT); 519 519 } 520 520 521 521 if (cALFA_BD) { 522 522 // ALFA BDFITS. 523 findData(AZIMUTH, "CRVAL2B", TFLOAT);524 findData(ELEVATIO, "CRVAL3B", TFLOAT);523 findData(AZIMUTH, (char *)(char *)"CRVAL2B", TFLOAT); 524 findData(ELEVATIO, (char *)(char *)"CRVAL3B", TFLOAT); 525 525 } 526 526 527 527 if (cALFA) { 528 528 // ALFA data. 529 findData(PARANGLE, "PARA_ANG", TFLOAT);529 findData(PARANGLE, (char *)"PARA_ANG", TFLOAT); 530 530 } 531 531 532 532 if (cData[TAMBIENT].colnum < 0) { 533 findData(TAMBIENT, "WEATHER_TEMPERATURE", TFLOAT);533 findData(TAMBIENT, (char *)"WEATHER_TEMPERATURE", TFLOAT); 534 534 } 535 535 536 536 if (cData[PRESSURE].colnum < 0) { 537 findData(PRESSURE, "WEATHER_PRESSURE", TFLOAT);537 findData(PRESSURE, (char *)"WEATHER_PRESSURE", TFLOAT); 538 538 } 539 539 540 540 if (cData[HUMIDITY].colnum < 0) { 541 findData(HUMIDITY, "WEATHER_REL_HUMIDITY", TFLOAT);541 findData(HUMIDITY, (char *)"WEATHER_REL_HUMIDITY", TFLOAT); 542 542 } 543 543 544 544 if (cData[WINDSPEE].colnum < 0) { 545 findData(WINDSPEE, "WEATHER_WIND_SPEED", TFLOAT);545 findData(WINDSPEE, (char *)"WEATHER_WIND_SPEED", TFLOAT); 546 546 } 547 547 548 548 if (cData[WINDDIRE].colnum < 0) { 549 findData(WINDDIRE, "WEATHER_WIND_DIRECTION", TFLOAT);549 findData(WINDDIRE, (char *)"WEATHER_WIND_DIRECTION", TFLOAT); 550 550 } 551 551 … … 680 680 if (cData[DATAXED].colnum > 0) { 681 681 char dataxed[32]; 682 readParm( "DATAXED", TSTRING, dataxed);682 readParm((char *)"DATAXED", TSTRING, dataxed); 683 683 684 684 sscanf(dataxed, "(%ld,%ld,%ld,%ld,%ld)", cNAxis, cNAxis+1, … … 835 835 if (cALFA_CIMA > 1) { 836 836 // FFTs per second when the Mock correlator operates in RFI blanking mode. 837 readData( "PHFFTACC", TFLOAT, 0, &cALFAacc);837 readData((char *)"PHFFTACC", TFLOAT, 0, &cALFAacc); 838 838 } 839 839 … … 872 872 873 873 // Read parameter values. 874 readParm( "OBSERVER", TSTRING, observer); // Shared.875 readParm( "PROJID", TSTRING, project); // Shared.876 readParm( "TELESCOP", TSTRING, telescope); // Core.874 readParm((char *)"OBSERVER", TSTRING, observer); // Shared. 875 readParm((char *)"PROJID", TSTRING, project); // Shared. 876 readParm((char *)"TELESCOP", TSTRING, telescope); // Core. 877 877 878 878 antPos[0] = 0.0; 879 879 antPos[1] = 0.0; 880 880 antPos[2] = 0.0; 881 if (readParm( "ANTENNA_POSITION", TDOUBLE, antPos)) {882 readParm( "OBSGEO-X", TDOUBLE, antPos); // Additional.883 readParm( "OBSGEO-Y", TDOUBLE, antPos + 1); // Additional.884 readParm( "OBSGEO-Z", TDOUBLE, antPos + 2); // Additional.881 if (readParm((char *)"ANTENNA_POSITION", TDOUBLE, antPos)) { 882 readParm((char *)"OBSGEO-X", TDOUBLE, antPos); // Additional. 883 readParm((char *)"OBSGEO-Y", TDOUBLE, antPos + 1); // Additional. 884 readParm((char *)"OBSGEO-Z", TDOUBLE, antPos + 2); // Additional. 885 885 } 886 886 … … 919 919 } 920 920 921 readParm( "EQUINOX", TFLOAT, &equinox); // Shared.921 readParm((char *)"EQUINOX", TFLOAT, &equinox); // Shared. 922 922 if (cStatus == 405) { 923 923 // EQUINOX was written as string value in early versions. 924 924 cStatus = 0; 925 925 char strtmp[32]; 926 readParm( "EQUINOX", TSTRING, strtmp);926 readParm((char *)"EQUINOX", TSTRING, strtmp); 927 927 sscanf(strtmp, "%f", &equinox); 928 928 } 929 929 930 if (readParm( "RADESYS", TSTRING, radecsys)) { // Additional.931 if (readParm( "RADECSYS", TSTRING, radecsys)) { // Additional.930 if (readParm((char *)"RADESYS", TSTRING, radecsys)) { // Additional. 931 if (readParm((char *)"RADECSYS", TSTRING, radecsys)) { // Additional. 932 932 strcpy(radecsys, ""); 933 933 } 934 934 } 935 935 936 if (readParm( "SPECSYS", TSTRING, dopplerFrame)) { // Additional.936 if (readParm((char *)"SPECSYS", TSTRING, dopplerFrame)) { // Additional. 937 937 // Fallback value. 938 938 strcpy(dopplerFrame, "TOPOCENT"); … … 942 942 // Added few more codes currently (as of 2009 Oct) used in the GBT 943 943 // SDFITS (based io_sdfits_define.pro of GBTIDL). - TT 944 if (readParm( "VELFRAME", TSTRING, dopplerFrame)) { // Additional.944 if (readParm((char *)"VELFRAME", TSTRING, dopplerFrame)) { // Additional. 945 945 // No, try digging it out of the CTYPE card (AIPS convention). 946 946 char keyw[9], ctype[9]; … … 1008 1008 readTime(1, 1, datobs, utc); 1009 1009 readData(FqRefVal, 1, &refFreq); 1010 readParm( "BANDWID", TDOUBLE, &bandwidth); // Core.1010 readParm((char *)"BANDWID", TDOUBLE, &bandwidth); // Core. 1011 1011 1012 1012 if (cStatus) { … … 1060 1060 if (cALFA_BD) { 1061 1061 unsigned char invert; 1062 readData( "UPPERSB", TBYTE, irow, &invert);1062 readData((char *)"UPPERSB", TBYTE, irow, &invert); 1063 1063 1064 1064 if (invert) { … … 1605 1605 unsigned char invert; 1606 1606 int anynul, colnum; 1607 findCol( "UPPERSB", &colnum);1607 findCol((char *)"UPPERSB", &colnum); 1608 1608 fits_read_col(cSDptr, TBYTE, colnum, cRow, 1, 1, 0, &invert, &anynul, 1609 1609 &cStatus); … … 1749 1749 // Rescale according to the number of unblanked accumulations. 1750 1750 int colnum, naccum; 1751 findCol( "STAT", &colnum);1751 findCol((char *)"STAT", &colnum); 1752 1752 fits_read_col(cSDptr, TINT, colnum, cRow, 10*(cTimeIdx-1)+2, 1, 0, 1753 1753 &naccum, &anynul, &cStatus); … … 2346 2346 char chars[32]; 2347 2347 if (cALFA_BD) { 2348 readData( "OBS_NAME", TSTRING, cRow, chars);2348 readData((char *)"OBS_NAME", TSTRING, cRow, chars); 2349 2349 } else { 2350 readData( "SCANTYPE", TSTRING, cRow, chars);2350 readData((char *)"SCANTYPE", TSTRING, cRow, chars); 2351 2351 } 2352 2352 … … 2406 2406 if (cALFA_CIMA > 1) { 2407 2407 int colnum, naccum; 2408 findCol( "STAT", &colnum);2408 findCol((char *)"STAT", &colnum); 2409 2409 fits_read_col(cSDptr, TINT, colnum, cRow, 2, 1, 0, &naccum, &anynul, 2410 2410 &cStatus); -
trunk/external-alma/atnf/PKSIO/SDFITSwriter.cc
r1757 r2940 230 230 231 231 // SCAN (shared, real). 232 fits_insert_col(cSDptr, ++ncol, "SCAN","1I", &cStatus);232 fits_insert_col(cSDptr, ++ncol, (char *)"SCAN", (char *)"1I", &cStatus); 233 233 234 234 // CYCLE (additional, real). 235 fits_insert_col(cSDptr, ++ncol, "CYCLE","1J", &cStatus);235 fits_insert_col(cSDptr, ++ncol, (char *)"CYCLE", (char *)"1J", &cStatus); 236 236 237 237 // DATE-OBS (core, real). 238 fits_insert_col(cSDptr, ++ncol, "DATE-OBS","10A", &cStatus);238 fits_insert_col(cSDptr, ++ncol, (char *)"DATE-OBS", (char *)"10A", &cStatus); 239 239 240 240 // TIME (core, real). 241 fits_insert_col(cSDptr, ++ncol, "TIME","1D", &cStatus);241 fits_insert_col(cSDptr, ++ncol, (char *)"TIME", (char *)"1D", &cStatus); 242 242 sprintf(tunit, "TUNIT%d", ncol); 243 243 fits_write_key_str(cSDptr, tunit, "s", "units of field", &cStatus); 244 244 245 245 // EXPOSURE (core, real). 246 fits_insert_col(cSDptr, ++ncol, "EXPOSURE","1E", &cStatus);246 fits_insert_col(cSDptr, ++ncol, (char *)"EXPOSURE", (char *)"1E", &cStatus); 247 247 sprintf(tunit, "TUNIT%d", ncol); 248 248 fits_write_key_str(cSDptr, tunit, "s", "units of field", &cStatus); 249 249 250 250 // OBJECT (core, real). 251 fits_insert_col(cSDptr, ++ncol, "OBJECT","16A", &cStatus);251 fits_insert_col(cSDptr, ++ncol, (char *)"OBJECT", (char *)"16A", &cStatus); 252 252 253 253 // OBJ-RA (additional, real). 254 fits_insert_col(cSDptr, ++ncol, "OBJ-RA","1D", &cStatus);254 fits_insert_col(cSDptr, ++ncol, (char *)"OBJ-RA", (char *)"1D", &cStatus); 255 255 sprintf(tunit, "TUNIT%d", ncol); 256 256 fits_write_key_str(cSDptr, tunit, "deg", "units of field", &cStatus); 257 257 258 258 // OBJ-DEC (additional, real). 259 fits_insert_col(cSDptr, ++ncol, "OBJ-DEC","1D", &cStatus);259 fits_insert_col(cSDptr, ++ncol, (char *)"OBJ-DEC", (char *)"1D", &cStatus); 260 260 sprintf(tunit, "TUNIT%d", ncol); 261 261 fits_write_key_str(cSDptr, tunit, "deg", "units of field", &cStatus); 262 262 263 263 // RESTFRQ (additional, real). 264 fits_insert_col(cSDptr, ++ncol, "RESTFRQ","1D", &cStatus);264 fits_insert_col(cSDptr, ++ncol, (char *)"RESTFRQ",(char *) "1D", &cStatus); 265 265 sprintf(tunit, "TUNIT%d", ncol); 266 266 fits_write_key_str(cSDptr, tunit, "Hz", "units of field", &cStatus); 267 267 268 268 // OBSMODE (shared, real). 269 fits_insert_col(cSDptr, ++ncol, "OBSMODE","16A", &cStatus);269 fits_insert_col(cSDptr, ++ncol, (char *)"OBSMODE", (char *)"16A", &cStatus); 270 270 271 271 // BEAM (additional, real). 272 fits_insert_col(cSDptr, ++ncol, "BEAM","1I", &cStatus);272 fits_insert_col(cSDptr, ++ncol, (char *)"BEAM", (char *)"1I", &cStatus); 273 273 274 274 // IF (additional, real). 275 fits_insert_col(cSDptr, ++ncol, "IF","1I", &cStatus);275 fits_insert_col(cSDptr, ++ncol, (char *)"IF", (char *)"1I", &cStatus); 276 276 277 277 // FREQRES (core, real). 278 fits_insert_col(cSDptr, ++ncol, "FREQRES","1D", &cStatus);278 fits_insert_col(cSDptr, ++ncol, (char *)"FREQRES", (char *)"1D", &cStatus); 279 279 sprintf(tunit, "TUNIT%d", ncol); 280 280 fits_write_key_str(cSDptr, tunit, "Hz", "units of field", &cStatus); 281 281 282 282 // BANDWID (core, real). 283 fits_insert_col(cSDptr, ++ncol, "BANDWID","1D", &cStatus);283 fits_insert_col(cSDptr, ++ncol, (char *)"BANDWID", (char *)"1D", &cStatus); 284 284 sprintf(tunit, "TUNIT%d", ncol); 285 285 fits_write_key_str(cSDptr, tunit, "Hz", "units of field", &cStatus); … … 290 290 291 291 // CRPIX1 (core, real). 292 fits_insert_col(cSDptr, ++ncol, "CRPIX1","1E", &cStatus);292 fits_insert_col(cSDptr, ++ncol, (char *)"CRPIX1", (char *)"1E", &cStatus); 293 293 294 294 // CRVAL1 (core, real). 295 fits_insert_col(cSDptr, ++ncol, "CRVAL1","1D", &cStatus);295 fits_insert_col(cSDptr, ++ncol, (char *)"CRVAL1", (char *)"1D", &cStatus); 296 296 sprintf(tunit, "TUNIT%d", ncol); 297 297 fits_write_key_str(cSDptr, tunit, "Hz", "units of field", &cStatus); 298 298 299 299 // CDELT1 (core, real). 300 fits_insert_col(cSDptr, ++ncol, "CDELT1","1D", &cStatus);300 fits_insert_col(cSDptr, ++ncol, (char *)"CDELT1", (char *)"1D", &cStatus); 301 301 sprintf(tunit, "TUNIT%d", ncol); 302 302 fits_write_key_str(cSDptr, tunit, "Hz", "units of field", &cStatus); … … 330 330 331 331 // CRVAL3 (core, real). 332 fits_insert_col(cSDptr, ++ncol, "CRVAL3","1D", &cStatus);332 fits_insert_col(cSDptr, ++ncol, (char *)"CRVAL3", (char *)"1D", &cStatus); 333 333 sprintf(tunit, "TUNIT%d", ncol); 334 334 fits_write_key_str(cSDptr, tunit, "deg", "units of field", &cStatus); … … 347 347 348 348 // CRVAL4 (core, real). 349 fits_insert_col(cSDptr, ++ncol, "CRVAL4","1D", &cStatus);349 fits_insert_col(cSDptr, ++ncol, (char *)"CRVAL4", (char *)"1D", &cStatus); 350 350 sprintf(tunit, "TUNIT%d", ncol); 351 351 fits_write_key_str(cSDptr, tunit, "deg", "units of field", &cStatus); … … 355 355 356 356 // SCANRATE (additional, real). 357 fits_insert_col(cSDptr, ++ncol, "SCANRATE","2E", &cStatus);357 fits_insert_col(cSDptr, ++ncol, (char *)"SCANRATE", (char *)"2E", &cStatus); 358 358 sprintf(tunit, "TUNIT%d", ncol); 359 359 fits_write_key_str(cSDptr, tunit, "deg/s", "units of field", &cStatus); … … 377 377 // TSYS (core, real). 378 378 sprintf(tform, "%dE", maxNPol); 379 fits_insert_col(cSDptr, ++ncol, "TSYS", tform, &cStatus);379 fits_insert_col(cSDptr, ++ncol, (char *)"TSYS", tform, &cStatus); 380 380 sprintf(tunit, "TUNIT%d", ncol); 381 381 fits_write_key_str(cSDptr, tunit, bunit, "units of field", &cStatus); … … 383 383 // CALFCTR (additional, real). 384 384 sprintf(tform, "%dE", maxNPol); 385 fits_insert_col(cSDptr, ++ncol, "CALFCTR", tform, &cStatus);385 fits_insert_col(cSDptr, ++ncol, (char *)"CALFCTR", tform, &cStatus); 386 386 387 387 if (cHaveBase) { 388 388 // BASELIN (additional, real). 389 389 sprintf(tform, "%dE", 2*maxNPol); 390 fits_insert_col(cSDptr, ++ncol, "BASELIN", tform, &cStatus);390 fits_insert_col(cSDptr, ++ncol, (char *)"BASELIN", tform, &cStatus); 391 391 long tdim[] = {2, maxNPol}; 392 392 fits_write_tdim(cSDptr, ncol, 2, tdim, &cStatus); … … 394 394 // BASESUB (additional, real). 395 395 sprintf(tform, "%dE", 24*maxNPol); 396 fits_insert_col(cSDptr, ++ncol, "BASESUB", tform, &cStatus);396 fits_insert_col(cSDptr, ++ncol, (char *)"BASESUB", tform, &cStatus); 397 397 tdim[0] = 24; 398 398 fits_write_tdim(cSDptr, ncol, 2, tdim, &cStatus); … … 407 407 strcpy(tform, "1PE"); 408 408 } 409 fits_insert_col(cSDptr, ++ncol, "DATA", tform, &cStatus);409 fits_insert_col(cSDptr, ++ncol, (char *)"DATA", tform, &cStatus); 410 410 411 411 if (cDoTDIM) { 412 412 // TDIMn varies with IF, write a TDIM column. 413 413 sprintf(ttype, "TDIM%d", ncol); 414 fits_insert_col(cSDptr, ++ncol, ttype, "16A", &cStatus);414 fits_insert_col(cSDptr, ++ncol, ttype, (char *)"16A", &cStatus); 415 415 } else { 416 416 // TDIMn fixed for each IF, write a TDIM keyword. … … 430 430 strcpy(tform, "1PB"); 431 431 } 432 fits_insert_col(cSDptr, ++ncol, "FLAGGED", tform, &cStatus);432 fits_insert_col(cSDptr, ++ncol, (char *)"FLAGGED", tform, &cStatus); 433 433 434 434 if (cDoTDIM) { 435 435 // TDIMn varies with IF, write a TDIM column. 436 436 sprintf(ttype, "TDIM%d", ncol); 437 fits_insert_col(cSDptr, ++ncol, ttype, "16A", &cStatus);437 fits_insert_col(cSDptr, ++ncol, ttype, (char *)"16A", &cStatus); 438 438 } else { 439 439 // TDIMn fixed for each IF, write a TDIM keyword. … … 445 445 // XCALFCTR (additional, real). 446 446 sprintf(tform, "%dE", 2); 447 fits_insert_col(cSDptr, ++ncol, "XCALFCTR", tform, &cStatus);447 fits_insert_col(cSDptr, ++ncol, (char *)"XCALFCTR", tform, &cStatus); 448 448 449 449 // XPOLDATA (additional, real). … … 455 455 strcpy(tform, "1PE"); 456 456 } 457 fits_insert_col(cSDptr, ++ncol, "XPOLDATA", tform, &cStatus);457 fits_insert_col(cSDptr, ++ncol, (char *)"XPOLDATA", tform, &cStatus); 458 458 459 459 if (cDoTDIM) { 460 460 // TDIMn varies with IF, write a TDIM column. 461 461 sprintf(ttype, "TDIM%d", ncol); 462 fits_insert_col(cSDptr, ++ncol, ttype, "16A", &cStatus);462 fits_insert_col(cSDptr, ++ncol, ttype, (char *)"16A", &cStatus); 463 463 } else { 464 464 // TDIMn fixed for each IF, write a TDIM keyword. … … 474 474 if (cIsMX) { 475 475 // REFBEAM (additional, real). 476 fits_insert_col(cSDptr, ++ncol, "REFBEAM","1I", &cStatus);476 fits_insert_col(cSDptr, ++ncol, (char *)"REFBEAM", (char *)"1I", &cStatus); 477 477 } 478 478 479 479 // TCAL (shared, real). 480 480 sprintf(tform, "%dE", min(maxNPol,2)); 481 fits_insert_col(cSDptr, ++ncol, "TCAL", tform, &cStatus);481 fits_insert_col(cSDptr, ++ncol, (char *)"TCAL", tform, &cStatus); 482 482 sprintf(tunit, "TUNIT%d", ncol); 483 483 fits_write_key_str(cSDptr, tunit, "Jy", "units of field", &cStatus); 484 484 485 485 // TCALTIME (additional, real). 486 fits_insert_col(cSDptr, ++ncol, "TCALTIME","16A", &cStatus);486 fits_insert_col(cSDptr, ++ncol, (char *)"TCALTIME", (char *)"16A", &cStatus); 487 487 488 488 // AZIMUTH (shared, real). 489 fits_insert_col(cSDptr, ++ncol, "AZIMUTH","1E", &cStatus);489 fits_insert_col(cSDptr, ++ncol, (char *)"AZIMUTH", (char *)"1E", &cStatus); 490 490 sprintf(tunit, "TUNIT%d", ncol); 491 491 fits_write_key_str(cSDptr, tunit, "deg", "units of field", &cStatus); 492 492 493 493 // ELEVATIO (shared, real). 494 fits_insert_col(cSDptr, ++ncol, "ELEVATIO","1E", &cStatus);494 fits_insert_col(cSDptr, ++ncol, (char *)"ELEVATIO", (char *)"1E", &cStatus); 495 495 sprintf(tunit, "TUNIT%d", ncol); 496 496 fits_write_key_str(cSDptr, tunit, "deg", "units of field", &cStatus); 497 497 498 498 // PARANGLE (additional, real). 499 fits_insert_col(cSDptr, ++ncol, "PARANGLE","1E", &cStatus);499 fits_insert_col(cSDptr, ++ncol, (char *)"PARANGLE", (char *)"1E", &cStatus); 500 500 sprintf(tunit, "TUNIT%d", ncol); 501 501 fits_write_key_str(cSDptr, tunit, "deg", "units of field", &cStatus); 502 502 503 503 // FOCUSAXI (additional, real). 504 fits_insert_col(cSDptr, ++ncol, "FOCUSAXI","1E", &cStatus);504 fits_insert_col(cSDptr, ++ncol, (char *)"FOCUSAXI", (char *)"1E", &cStatus); 505 505 sprintf(tunit, "TUNIT%d", ncol); 506 506 fits_write_key_str(cSDptr, tunit, "m", "units of field", &cStatus); 507 507 508 508 // FOCUSTAN (additional, real). 509 fits_insert_col(cSDptr, ++ncol, "FOCUSTAN","1E", &cStatus);509 fits_insert_col(cSDptr, ++ncol, (char *)"FOCUSTAN", (char *)"1E", &cStatus); 510 510 sprintf(tunit, "TUNIT%d", ncol); 511 511 fits_write_key_str(cSDptr, tunit, "m", "units of field", &cStatus); 512 512 513 513 // FOCUSROT (additional, real). 514 fits_insert_col(cSDptr, ++ncol, "FOCUSROT","1E", &cStatus);515 sprintf(tunit, "TUNIT%d", ncol); 516 fits_write_key_str(cSDptr, tunit, "deg","units of field", &cStatus);514 fits_insert_col(cSDptr, ++ncol, (char *)"FOCUSROT", (char *)"1E", &cStatus); 515 sprintf(tunit, "TUNIT%d", ncol); 516 fits_write_key_str(cSDptr, tunit, (char *)"deg", (char *)"units of field", &cStatus); 517 517 518 518 // TAMBIENT (shared, real). 519 fits_insert_col(cSDptr, ++ncol, "TAMBIENT","1E", &cStatus);519 fits_insert_col(cSDptr, ++ncol, (char *)"TAMBIENT", (char *)"1E", &cStatus); 520 520 sprintf(tunit, "TUNIT%d", ncol); 521 521 fits_write_key_str(cSDptr, tunit, "C", "units of field", &cStatus); 522 522 523 523 // PRESSURE (shared, real). 524 fits_insert_col(cSDptr, ++ncol, "PRESSURE","1E", &cStatus);524 fits_insert_col(cSDptr, ++ncol, (char *)"PRESSURE", (char *)"1E", &cStatus); 525 525 sprintf(tunit, "TUNIT%d", ncol); 526 526 fits_write_key_str(cSDptr, tunit, "Pa", "units of field", &cStatus); 527 527 528 528 // HUMIDITY (shared, real). 529 fits_insert_col(cSDptr, ++ncol, "HUMIDITY","1E", &cStatus);529 fits_insert_col(cSDptr, ++ncol, (char *)"HUMIDITY", (char *)"1E", &cStatus); 530 530 sprintf(tunit, "TUNIT%d", ncol); 531 531 fits_write_key_str(cSDptr, tunit, "%", "units of field", &cStatus); 532 532 533 533 // WINDSPEE (shared, real). 534 fits_insert_col(cSDptr, ++ncol, "WINDSPEE","1E", &cStatus);534 fits_insert_col(cSDptr, ++ncol, (char *)"WINDSPEE", (char *)"1E", &cStatus); 535 535 sprintf(tunit, "TUNIT%d", ncol); 536 536 fits_write_key_str(cSDptr, tunit, "m/s", "units of field", &cStatus); 537 537 538 538 // WINDDIRE (shared, real). 539 fits_insert_col(cSDptr, ++ncol, "WINDDIRE","1E", &cStatus);539 fits_insert_col(cSDptr, ++ncol, (char *)"WINDDIRE", (char *)"1E", &cStatus); 540 540 sprintf(tunit, "TUNIT%d", ncol); 541 541 fits_write_key_str(cSDptr, tunit, "deg", "units of field", &cStatus);
Note:
See TracChangeset
for help on using the changeset viewer.