Changeset 1231 in Sophya for trunk/SophyaExt/FitsIOServer/fitsfile.cc
- Timestamp:
- Oct 12, 2000, 4:47:37 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaExt/FitsIOServer/fitsfile.cc
r1221 r1231 129 129 130 130 { 131 FitsOutFile of(flnm, unknown);131 FitsOutFile of(flnm, FitsFile::unknown); 132 132 Write(of); 133 133 } … … 208 208 } 209 209 210 FitsInFile::FitsInFile(char flnm[]) 210 FitsInFile::FitsInFile(string const & flnm) 211 { 212 InitNull(); 213 int status = 0; 214 fits_open_file(&fptr_,flnm.c_str(),READONLY,&status); 215 if( status ) printerror( status ); 216 } 217 218 FitsInFile::FitsInFile(const char * flnm) 211 219 { 212 220 InitNull(); … … 250 258 } 251 259 252 void FitsInFile::GetBlockType(char flnm[], int hdunum, string& typeOfExtension, int& naxis, vector<int>& naxisn, string& dataType, DVList& dvl )260 void FitsInFile::GetBlockType(char flnm[], int hdunum, FitsExtensionType& typeOfExtension, int& naxis, vector<int>& naxisn, FitsDataType& dataType, DVList& dvl ) 253 261 { 254 262 int status = 0; … … 262 270 if(hdutype == IMAGE_HDU) 263 271 { 264 typeOfExtension = "IMAGE";272 typeOfExtension = FitsExtensionType_IMAGE; 265 273 int bitpix; 266 274 GetImageParameters (fileptr, bitpix, naxis, naxisn); 267 if(bitpix == DOUBLE_IMG) dataType = "double";275 if(bitpix == DOUBLE_IMG) dataType = FitsDataType_double; 268 276 else 269 if(bitpix == FLOAT_IMG) dataType = "float";277 if(bitpix == FLOAT_IMG) dataType = FitsDataType_float; 270 278 else 271 if(bitpix == LONG_IMG || bitpix == SHORT_IMG ) dataType = "int";279 if(bitpix == LONG_IMG || bitpix == SHORT_IMG ) dataType = FitsDataType_int; 272 280 else 273 281 { … … 289 297 if(hdutype == ASCII_TBL) 290 298 { 291 typeOfExtension = "ASCII_TBL";292 dataType = "ASCII";299 typeOfExtension = FitsExtensionType_ASCII_TBL; 300 dataType = FitsDataType_ASCII; 293 301 } 294 302 else 295 303 { 296 typeOfExtension = "BINARY_TBL";297 if(types[0] == 'D') dataType = "double";304 typeOfExtension = FitsExtensionType_BINARY_TBL; 305 if(types[0] == 'D') dataType = FitsDataType_double; 298 306 else 299 if(types[0] == 'E') dataType = "float";307 if(types[0] == 'E') dataType = FitsDataType_float; 300 308 else 301 if(types[0] == 'I' ) dataType = "int";309 if(types[0] == 'I' ) dataType = FitsDataType_int; 302 310 else 303 if(types[0] == 'S' ) dataType = "char*";311 if(types[0] == 'S' ) dataType = FitsDataType_char; 304 312 else 305 313 { … … 1093 1101 1094 1102 */ 1095 FitsOutFile::FitsOutFile(char flnm[], WriteMode wrm) 1096 { 1097 1103 1104 FitsOutFile::FitsOutFile(string const & flnm, WriteMode wrm) 1105 { 1098 1106 InitNull(); 1107 openoutputfitsfile(flnm.c_str(), wrm); 1108 } 1109 1110 FitsOutFile::FitsOutFile(const char * flnm, WriteMode wrm) 1111 { 1112 InitNull(); 1113 openoutputfitsfile(flnm, wrm); 1114 } 1115 1116 void FitsOutFile::openoutputfitsfile(const char * flnm, WriteMode wrm) 1117 { 1099 1118 int status = 0; 1100 1119
Note:
See TracChangeset
for help on using the changeset viewer.