source: Sophya/trunk/SophyaExt/FitsIOServer/fabtcolread.cc@ 2170

Last change on this file since 2170 was 2170, checked in by cmv, 23 years ago

long long et uint_2 cmv 9/8/02

File size: 18.1 KB
Line 
1/* Lecteur de colonne de table Fits (binaire ou ASCII) avec buffer */
2#include "machdefs.h"
3#include <stdlib.h>
4#include <stdio.h>
5#include "pexceptions.h"
6#include "fabtcolread.h"
7//! Class for reading a column in a FITS ASCII or BINARY table
8
9/*!
10 \class SOPHYA::FitsABTColRead
11 \ingroup FitsIOServer
12 Class for reading a column in a FITS ASCII or BINARY table
13 \verbatim
14 -- Exemple:
15 FitsABTColRead fbt("myfits.fits","BoloMuv_28",0,1000,1,3);
16 fbt.SetDebug(3);
17 fbt.Print(3);
18 // Read element by element
19 for(long i=0;i<fbt.GetNbLine();i++) {
20 double x = fbt.Read(i);
21 if(i%lpmod==0) cout<<i<<": "<<x<<endl;
22 }
23 // Read into a vector
24 TVector<double> data;
25 long n = fbt.Read(32,50,data);
26 cout<<"Number of values read: "<<n<<endl;
27 data.ReSize(100);
28 n = fbt.Read(10,-1,data);
29 cout<<"Number of values read: "<<n<<endl;
30 \endverbatim
31*/
32
33//////////////////////////////////////////////////////////////
34/*!
35 Constructor.
36 \param fname : FITS file name to be read
37 \param collabel : label of the column to be read
38 \param ihdu : number of the HDU where the column is.
39 \param blen : read buffer length
40 \param bsens : buffer reading direction
41 \param lp : debug level
42 \verbatim
43 - if ihdu=0 or ihdu>nhdu first binary or ASCII table is taken
44 - bsens>0 read forward
45 bsens<0 read backward
46 bsens==0 read centered
47 \endverbatim
48 \warning ihdu = [1,nhdu]
49*/
50FitsABTColRead::FitsABTColRead(string fname,string collabel
51 ,int ihdu,long blen,long bsens,int lp)
52{
53Init(fname.c_str(),collabel.c_str(),-1,ihdu,blen,bsens,lp);
54}
55
56/*!
57 Constructor.
58 Same as before but the column is identified by its column number
59 \param colnum : number of the column to be read
60 \warning col = [0,ncol[
61*/
62FitsABTColRead::FitsABTColRead(string fname,int colnum
63 ,int ihdu,long blen,long bsens,int lp)
64{
65Init(fname.c_str(),"",colnum,ihdu,blen,bsens,lp);
66}
67
68/*! Constructor. see below */
69FitsABTColRead::FitsABTColRead(const char * cfname,const char* collabel
70 ,int ihdu,long blen,long bsens,int lp)
71{
72Init(cfname,collabel,-1,ihdu,blen,bsens,lp);
73}
74
75/*! Constructor. see below */
76FitsABTColRead::FitsABTColRead(const char * cfname,int colnum
77 ,int ihdu,long blen,long bsens,int lp)
78{
79Init(cfname,"",colnum,ihdu,blen,bsens,lp);
80}
81
82/*! Constructor by copy */
83FitsABTColRead::FitsABTColRead(FitsABTColRead& fbt)
84{
85Init(fbt.GetFileName().c_str(),fbt.GetColLabel().c_str()
86 ,fbt.GetColNum(),fbt.GetHDU()
87 ,fbt.GetBLen(),fbt.GetBSens(),fbt.DbgLevel);
88}
89
90/*! Init routine called by the constructor */
91void FitsABTColRead::Init(const char* fname,const char* collabel,int colnum
92 ,int ihdu,long blen,long bsens,int lp)
93{
94 // Parametres Generaux
95 FitsFN = fname;
96 ColLabel = collabel;
97 ColTUnit = "";
98 ColTForm = "";
99 ColNum = colnum;
100 ColTypeCode = 0;
101 IHdu = ihdu;
102 NHdu = 0;
103 HduType = 0;
104 NBcol = 0;
105 NBline = 0;
106 SetNulVal();
107 SetDebug(lp);
108 NFitsRead = 0;
109 FitsPtr = NULL;
110 LineDeb = LineFin = -1;
111 Buffer = NULL;
112 ChangeBuffer(blen,bsens);
113
114 //////////////////////////
115 // Ouverture du fichier //
116 //////////////////////////
117
118 int sta=0;
119 if(FitsFN.size() <= 0 ) {
120 IHdu = -1; Delete();
121 throw ParmError("FitsABTColRead::Init: Fits file name error\n");
122 }
123 const char * cfitsfn = FitsFN.c_str();
124
125 // Open fits
126 if(fits_open_file(&FitsPtr,cfitsfn,READONLY,&sta)) {
127 printerror(sta); Delete();
128 throw NullPtrError("FitsABTColRead::Init: Error opening Fits file\n");
129 }
130
131 // Get number of hdu
132 if(fits_get_num_hdus(FitsPtr,&NHdu,&sta)) {
133 printerror(sta); Delete();
134 throw NotAvailableOperation("FitsABTColRead::Init: Error getting NHdu\n");
135 }
136 if(DbgLevel>1) cout<<"FitsABTColRead::Init NHdu="<<NHdu<<endl;
137 if(NHdu<=0) {
138 Delete();
139 throw SzMismatchError("FitsABTColRead::Init: Bad NHdu\n");
140 }
141
142 // Get HDU for bin/ascii table
143 // si IHdu <=0 || >NHdu on cherche la 1ere bin/ascii table
144 // sinon on se positionne sur IHdu
145 if(IHdu<=0 || IHdu>NHdu)
146 for(int ihdu=1;ihdu<=NHdu;ihdu++) {
147 if(fits_movabs_hdu(FitsPtr,ihdu,&HduType,&sta)) printerror(sta);
148 if(DbgLevel>1) cout<<"...Init ihdu="
149 <<ihdu<<" HduType="<<HduType<<endl;
150 if(HduType==BINARY_TBL || HduType==ASCII_TBL) {IHdu = ihdu; break;}
151 }
152 if(IHdu<=0 || IHdu>NHdu) {
153 cout<<"NO BINARY or ASCII hdu found"<<endl;
154 IHdu = 0; Delete();
155 throw TypeMismatchExc("FitsABTColRead::Init: NO BINARY or ASCII hdu found\n");
156 }
157 if(fits_movabs_hdu(FitsPtr,IHdu,&HduType,&sta)) {
158 printerror(sta); Delete();
159 throw RangeCheckError("FitsABTColRead::Init: Error moving to requested HDU\n");
160 }
161 if(HduType!=BINARY_TBL && HduType!=ASCII_TBL) {
162 Delete();
163 throw TypeMismatchExc("FitsABTColRead::Init: HDU not ASCII/BINARY table\n");
164 }
165
166 // Get number of columns
167 if(fits_get_num_cols(FitsPtr,&NBcol,&sta)) {
168 printerror(sta); Delete();
169 throw NotAvailableOperation("FitsABTColRead::Init: Error getting number of columns\n");
170 }
171 if(DbgLevel>1) cout<<"...Init NBcol="<<NBcol<<endl;
172 if(NBcol<1) {
173 Delete();
174 throw RangeCheckError("FitsABTColRead::Init: Bad number of colums\n");
175 }
176
177 // Get number of rows
178 if(fits_get_num_rows(FitsPtr,&NBline,&sta)) {
179 printerror(sta); Delete();
180 throw NotAvailableOperation("FitsABTColRead::Init: Error getting number of rows\n");
181 }
182 if(DbgLevel>1) cout<<"...Init NBline="<<NBline<<endl;
183 if(NBline<1) {
184 Delete();
185 throw RangeCheckError("FitsABTColRead::Init: Bad number of rows\n");
186 }
187
188 // Get column number
189 char labelcol[128];
190 if(ColLabel.size() > 0) {
191 strcpy(labelcol,ColLabel.c_str());
192 if(fits_get_colnum(FitsPtr,CASESEN,labelcol,&ColNum,&sta)) {
193 printerror(sta); Delete();
194 throw NotAvailableOperation("FitsABTColRead::Init: Error getting column name\n");
195 }
196 ColNum--; // Convention [0,ncol[
197 }
198 if(DbgLevel>1) cout<<"...Init ColNum="<<ColNum<<endl;
199 if(ColNum<0 || ColNum>=NBcol) {
200 Delete();
201 throw RangeCheckError("FitsABTColRead::Init: Bad column number\n");
202 }
203
204 // Get column type
205 if(fits_get_coltype(FitsPtr,ColNum+1,&ColTypeCode,NULL,NULL,&sta)) {
206 printerror(sta); Delete();
207 throw ParmError("FitsABTColRead::Init: Error getting column type\n");
208 }
209 if(DbgLevel>1) cout<<"...Init ColTypeCode="<<ColTypeCode<<endl;
210 if(ColTypeCode==TSTRING || ColTypeCode==TCOMPLEX || ColTypeCode==TDBLCOMPLEX
211 || ColTypeCode<0 ) {
212 Delete();
213 throw ParmError("FitsABTColRead::Init: Selected column is not Numerical\n");
214 }
215
216 // Get column name back, tunit, tform
217 char tunit[64], tform[64];
218 int rc=0;
219 if(HduType==BINARY_TBL) {
220 fits_get_bcolparms(FitsPtr,ColNum+1,labelcol,tunit,tform,NULL,NULL,NULL,NULL,NULL,&sta);
221 } else {
222 fits_get_acolparms(FitsPtr,ColNum+1,labelcol,NULL,tunit,tform,NULL,NULL,NULL,NULL,&sta);
223 }
224 if(rc) {
225 printerror(sta); Delete();
226 throw RangeCheckError("FitsABTColRead::Init: Error getting the column caracteristics\n");
227 }
228 ColLabel = labelcol;
229 ColTUnit = tunit;
230 ColTForm = tform;
231
232 if(DbgLevel)
233 cout<<"FitsABTColRead::Init Num="<<ColNum<<" Label="<<ColLabel
234 <<" TypeCode="<<ColTypeCode
235 <<" TUnit="<<ColTUnit<<" TForm="<<ColTForm<<endl;
236
237}
238
239/*! Destructor. */
240FitsABTColRead::~FitsABTColRead()
241{
242 Delete();
243}
244
245//////////////////////////////////////////////////////////////
246double FitsABTColRead::ReadKey(char *keyname)
247{
248 if(keyname==NULL) return 0.;
249 int sta=0; double val=0.;
250 if(fits_read_key(FitsPtr,TDOUBLE,keyname,&val,NULL,&sta))
251 printerror(sta);
252 return val;
253}
254
255//////////////////////////////////////////////////////////////
256/*! Change the buffer caracteristiques (see creator) */
257void FitsABTColRead::ChangeBuffer(long blen,long bsens)
258{
259 long oldnbuffer = NBuffer;
260
261 // Compute buffer caracteristics
262 BuffLen = (blen<=0)? 1: blen;
263 BuffSens = bsens;
264 NBuffer = BuffLen;
265 if(bsens==0 && NBuffer%2==0) NBuffer++;
266
267 // De-allocate if necessary
268 if(Buffer!=NULL) {
269 // On des-alloue si pas assez de place
270 // ou si l'ancienne place est beaucoup trop grande (>25%)
271 if(oldnbuffer<NBuffer || (oldnbuffer>NBuffer+long(0.25*NBuffer)) )
272 {delete [] Buffer; Buffer=NULL;}
273 }
274
275 // Re-allocate
276 if(Buffer==NULL) Buffer = new double[NBuffer];
277
278 // Tell program that nothing is into buffer
279 LineDeb = LineFin = -1;
280}
281
282/*! Delete called by the destructor */
283void FitsABTColRead::Delete()
284{
285 if(Buffer!=NULL) {delete [] Buffer; Buffer=NULL;}
286 LineDeb = LineFin = -1;
287 int sta = 0;
288 if(fits_close_file(FitsPtr,&sta)) printerror(sta);
289 FitsPtr = NULL;
290}
291
292/////////////////////////////////////////////////
293/*!
294 Read row "n" and return the value into a double
295 \warning be carefull for the range: row = [0,NRows[
296 \return value in double
297 \param n : number of the row to be read.
298 \verbatim
299 usebuffer == true : use read optimisation with bufferisation
300 == false : no optimisation with bufferisation
301 just read one value
302 \endverbatim
303*/
304double FitsABTColRead::Read(long n,bool usebuffer)
305// Attention: n=nline [0,NBline[, cfistio veut [1,NBline]
306// Attention: colnum [0,NBcol[ , cfistio veut [1,NBcol]
307{
308 int sta=0;
309 if(n<0 || n>=NBline)
310 throw RangeCheckError("FitsABTColRead::Read try to read outside line range\n");
311
312 // Pas de bufferisation, on lit betement
313 if(NBuffer==1 || !usebuffer) {
314 NFitsRead++;
315 double val;
316 fits_read_col(FitsPtr,TDOUBLE,ColNum+1,n+1,1,1,NULL,&val,NULL,&sta);
317 if(sta) {
318 printerror(sta);
319 throw NotAvailableOperation("FitsABTColRead::Read: Error Reading Fits file\n");
320 }
321 // On ne remplit Buffer[0] que si on a choisit
322 // un mode de lecture non bufferise (n==1) DES LE DEBUT.
323 // Si on a initialement choisit un mode bufferise (avec n>1),
324 // Buffer contient les valeurs chargees auparavent.
325 // Il ne faut pas faire {Buffer[0]=val; LineDeb=LineFin=n;}
326 // car on perd l'info de ces valeurs.
327 if(NBuffer==1) {Buffer[0]=val; LineDeb=LineFin=n;}
328 return val;
329 }
330
331 // Gestion avec bufferisation
332 if(!Buffer)
333 throw RangeCheckError("FitsABTColRead::Read: Buffer not allocated\n");
334 if(n<LineDeb || n>LineFin) {
335 NFitsRead++;
336 long row1,row2,nrow;
337 if(BuffSens>0) { // Cas remplissage forward
338 row1 = n+1;
339 row2 = row1+NBuffer-1; if(row2>NBline) row2 = NBline;
340 } else if(BuffSens<0) { // Cas remplissage backward
341 row2 = n+1;
342 row1 = row2-NBuffer+1; if(row1<1) row1 = 1;
343 } else { // Cas remplissage centre
344 row1 = n+1 - NBuffer/2; if(row1<1) row1 = 1;
345 row2 = n+1 + NBuffer/2; if(row2>NBline) row2 = NBline;
346 }
347 nrow = row2 - row1 + 1;
348 LineDeb = row1-1; LineFin = row2-1;
349 //cout<<"DBG-FitsRead: row1="<<row1<<" row2="<<row2<<" nrow="<<nrow
350 // <<" LineDeb,Fin="<<LineDeb<<","<<LineFin<<endl;
351 fits_read_col(FitsPtr,TDOUBLE,ColNum+1,row1,1,nrow,NULL,Buffer,NULL,&sta);
352 if(sta) {
353 printerror(sta);
354 LineDeb = LineFin = -1;
355 throw NotAvailableOperation("FitsABTColRead::Read: Error Reading Fits file\n");
356 }
357 }
358
359 long ibuf = n-LineDeb;
360 return Buffer[ibuf];
361}
362
363/*!
364 Read rows from "n1" to "n2" and return the values into TVector of double
365 \return NREAD the number of values read (n2-n1+1).
366 \warning row = [0,NRows[, the routine read [n1,n2]
367 \verbatim
368 - if n2<0 then read [n1,n2] where "n2=min(n1+vector_size-1,nrows-1)"
369 - Last row read is ALWAYS: "n2 = n1 + NREAD -1"
370 - The TVector is never resized if not necessary
371 -------------------------------------------------------------------------
372 - ex: suppose the column table contains 10 elements: nrows=10, rows=[0,9]
373
374 TVector<double> V(5);
375 bt.Read(3,5,V) -> read rows=3,4,5 -> V.Size()==5 -> return 3
376 bt.Read(3,-1,V) -> read rows=3,4,5,6,7 -> V.Size()==5 -> return 5
377 bt.Read(7,-1,V) -> read rows=7,8,9 -> V.Size()==5 -> return 3
378 bt.Read(2,-1,V) -> read rows=2,3,4,5,6 -> V.Size()==5 -> return 5
379 bt.Read(-1,5,V) -> throw exception
380
381 TVector<double> V(5);
382 bt.Read(3,99,V) -> read rows=3,4,5,6,7,8,9 -> V.Size()==7 -> return 7
383
384 TVector<double> V(5);
385 bt.Read(2,8,V) -> read rows=2,3,4,5,6,7,8 -> V.Size()==7 -> return 7
386
387 TVector<double> V;
388 bt.Read(3,5,V) -> read rows=3,4,5 -> V.Size()==3 -> return 3
389
390 TVector<double> V;
391 bt.Read(3,-1,V) -> throw exception
392 -------------------------------------------------------------------------
393 \endverbatim
394*/
395long FitsABTColRead::Read(long n1,long n2,TVector<double>& data)
396{
397 if(n1<0 || n1>=NBline)
398 throw RangeCheckError("FitsABTColRead::Read TVector bad requested 1srt line \n");
399 if(data.Size()<=0 && n2<n1)
400 throw RangeCheckError("FitsABTColRead::Read TVector bad requested 2sd line \n");
401 if(n2<0) n2 = n1 + data.Size()-1;
402 if(n2>=NBline) n2 = NBline-1;
403
404 sa_size_t nread = n2-n1+1;
405 if(data.Size()<nread) data.SetSize(nread);
406
407 //for(long i=n1;i<=n2;i++) data(i-n1) = Read(i);
408 int sta=0;
409 fits_read_col(FitsPtr,TDOUBLE,ColNum+1,n1+1,1,nread,NULL,data.Data(),NULL,&sta);
410 if(sta) {
411 printerror(sta);
412 throw NotAvailableOperation("FitsABTColRead::Read_TVector<double>: Error Reading Fits file\n");
413 }
414
415 return nread;
416}
417
418/*! idem before but for TVector of float */
419long FitsABTColRead::Read(long n1,long n2,TVector<float>& data)
420{
421 if(n1<0 || n1>=NBline)
422 throw RangeCheckError("FitsABTColRead::Read TVector bad requested 1srt line \n");
423 if(data.Size()<=0 && n2<n1)
424 throw RangeCheckError("FitsABTColRead::Read TVector bad requested 2sd line \n");
425 if(n2<0) n2 = n1 + data.Size()-1;
426 if(n2>=NBline) n2 = NBline-1;
427
428 sa_size_t nread = n2-n1+1;
429 if(data.Size()<nread) data.SetSize(nread);
430
431 //for(long i=n1;i<=n2;i++) data(i-n1) = Read(i);
432 int sta=0;
433 fits_read_col(FitsPtr,TFLOAT,ColNum+1,n1+1,1,nread,NULL,data.Data(),NULL,&sta);
434 if(sta) {
435 printerror(sta);
436 throw NotAvailableOperation("FitsABTColRead::Read_TVector<float>: Error Reading Fits file\n");
437 }
438
439 return nread;
440}
441
442/*! idem before but for TVector of unsigned short */
443long FitsABTColRead::Read(long n1,long n2,TVector<uint_2>& data)
444{
445 if(n1<0 || n1>=NBline)
446 throw RangeCheckError("FitsABTColRead::Read TVector bad requested 1srt line \n");
447 if(data.Size()<=0 && n2<n1)
448 throw RangeCheckError("FitsABTColRead::Read TVector bad requested 2sd line \n");
449 if(n2<0) n2 = n1 + data.Size()-1;
450 if(n2>=NBline) n2 = NBline-1;
451
452 sa_size_t nread = n2-n1+1;
453 if(data.Size()<nread) data.SetSize(nread);
454
455 int sta=0;
456 fits_read_col(FitsPtr,TUSHORT,ColNum+1,n1+1,1,nread,NULL,data.Data(),NULL,&sta);
457 if(sta) {
458 printerror(sta);
459 throw NotAvailableOperation("FitsABTColRead::Read_TVector<uint_2>: Error Reading Fits file\n");
460 }
461
462 return nread;
463}
464
465/*! idem before but for TVector of int_4 */
466long FitsABTColRead::Read(long n1,long n2,TVector<int_4>& data)
467{
468 if(n1<0 || n1>=NBline)
469 throw RangeCheckError("FitsABTColRead::Read TVector bad requested 1srt line \n");
470 if(data.Size()<=0 && n2<n1)
471 throw RangeCheckError("FitsABTColRead::Read TVector bad requested 2sd line \n");
472 if(n2<0) n2 = n1 + data.Size()-1;
473 if(n2>=NBline) n2 = NBline-1;
474
475 sa_size_t nread = n2-n1+1;
476 if(data.Size()<nread) data.SetSize(nread);
477
478 //for(long i=n1;i<=n2;i++) data(i-n1) = Read(i);
479 int sta=0;
480 int T = (sizeof(long)==4) ? TLONG: TINT;
481 fits_read_col(FitsPtr,T,ColNum+1,n1+1,1,nread,NULL,data.Data(),NULL,&sta);
482 if(sta) {
483 printerror(sta);
484 throw NotAvailableOperation("FitsABTColRead::Read_TVector<int_4>: Error Reading Fits file\n");
485 }
486
487 return nread;
488}
489
490/*! idem before but for TVector of int_8 */
491long FitsABTColRead::Read(long n1,long n2,TVector<int_8>& data)
492{
493#ifdef TLONGLONG
494 if(n1<0 || n1>=NBline)
495 throw RangeCheckError("FitsABTColRead::Read TVector bad requested 1srt line \n");
496 if(data.Size()<=0 && n2<n1)
497 throw RangeCheckError("FitsABTColRead::Read TVector bad requested 2sd line \n");
498 if(n2<0) n2 = n1 + data.Size()-1;
499 if(n2>=NBline) n2 = NBline-1;
500
501 sa_size_t nread = n2-n1+1;
502 if(data.Size()<nread) data.SetSize(nread);
503
504 int sta=0;
505 fits_read_col(FitsPtr,TLONGLONG,ColNum+1,n1+1,1,nread,NULL,data.Data(),NULL,&sta);
506 if(sta) {
507 printerror(sta);
508 throw NotAvailableOperation("FitsABTColRead::Read_TVector<int_8>: Error Reading Fits file\n");
509 }
510
511 return nread;
512#else
513 throw PException("FitsABTColRead::Read(..,TVector<int_8>&) Not in that cfitsio version");
514#endif
515}
516
517/////////////////////////////////////////////////
518/*!
519 Return the number of the first row where "val1"<=val<="val2" starting at row "rowstart"
520 \verbatim
521 - The search is performed from "rowstart" to the end
522 in ascending order (from "rowstart" to nrows).
523 - Warning: "rowstart<0" means "rowstart==0" (search all the table column)
524 That is the default
525 \endverbatim
526 \return <0 means not found
527*/
528long FitsABTColRead::FirstRow(double val1,double val2,long rowstart)
529{
530 long row = -1;
531 if(NBline==0) return row;
532 // Change buffer for efficiency
533 long bsens=BuffSens; bool bchange=false;
534 if(bsens<=0) {ChangeBuffer(BuffLen,1); bchange=true;}
535 if(rowstart<0) rowstart = 0;
536 if(rowstart>=NBline) rowstart = NBline-1;
537 for(long i=rowstart;i<NBline;i++) {
538 double val = Read(i);
539 if(val<val1 || val>val2) continue;
540 row = i;
541 break;
542 }
543 if(bchange) ChangeBuffer(BuffLen,bsens);
544 return row;
545}
546
547/*!
548 Return the number of the first row where val1<=val<=val2 starting at row rowstart
549 \return <0 means not found
550 \verbatim
551 - The search is performed from "rowstart" to the beginning
552 in descending order (from "rowstart" to 0).
553 - Warning: "rowstart<0" means "rowstart==nrows-1" (search all the table column)
554 That is the default
555 \endverbatim
556*/
557long FitsABTColRead::LastRow(double val1,double val2,long rowstart)
558{
559 long row = -1;
560 if(NBline==0) return row;
561 // Change buffer for efficiency
562 long bsens=BuffSens; bool bchange=false;
563 if(bsens>=0) {ChangeBuffer(BuffLen,-1); bchange=true;}
564 if(rowstart<0 || rowstart>=NBline) rowstart = NBline-1;
565 for(long i=rowstart;i>=0;i--) {
566 double val = Read(i);
567 if(val<val1 || val>val2) continue;
568 row = i;
569 break;
570 }
571 if(bchange) ChangeBuffer(BuffLen,bsens);
572 return row;
573}
574
575/////////////////////////////////////////////////
576void FitsABTColRead::printerror(int sta) const
577{
578 int stat = sta;
579 fits_report_error(stdout,stat);
580 fflush(stdout);
581 return;
582}
583
584/*! Print on stream os */
585void FitsABTColRead::Print(ostream& os,int lp) const
586{
587 os<<"FitsABTColRead:Print ("<<BuffLen<<","<<BuffSens<<","<<NulVal<<")"
588 <<" ncols="<<NBcol<<" nrows="<<NBline;
589 if(lp>0) os<<" NRead="<<NFitsRead;
590 os<<"\n... "<<FitsFN<<"["<<IHdu<<"/"<<NHdu<<"]"
591 <<"\n... Label["<<ColNum<<"]="<<ColLabel
592 <<" TypeCode="<<ColTypeCode
593 <<" TUnit="<<ColTUnit<<" TForm="<<ColTForm
594 <<endl;
595}
Note: See TracBrowser for help on using the repository browser.