Changeset 1752 in Sophya
- Timestamp:
- Nov 13, 2001, 3:35:05 PM (24 years ago)
- Location:
- trunk/SophyaExt/FitsIOServer
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaExt/FitsIOServer/fitsfile.cc
r1703 r1752 839 839 // status = 0; 840 840 // } 841 if (nentries != nrows_*repeat)842 {843 cout << " found " << nentries << " pixels, expected: " << nrows_*repeat << endl;844 throw PException(" FitsFile:::GetBinTabFCol ");845 }841 // if (nentries != nrows_*repeat) 842 // { 843 // cout << " found " << nentries << " pixels, expected: " << nrows_*repeat << endl; 844 // throw PException(" FitsFile:::GetBinTabFCol "); 845 // } 846 846 fits_read_col(fptr_,TDOUBLE,NoCol+1,1,1,nels,&dnull,valeurs, 847 847 &anull,&status); … … 878 878 // status = 0; 879 879 // } 880 if (nentries != nrows_*repeat)881 {882 cout << " found " << nentries << " pixels, expected: " << nrows_*repeat << endl;883 throw PException(" FitsFile:::GetBinTabFCol ");884 }880 // if (nentries != nrows_*repeat) 881 // { 882 // cout << " found " << nentries << " pixels, expected: " << nrows_*repeat << endl; 883 // throw PException(" FitsFile:::GetBinTabFCol "); 884 // } 885 885 fits_read_col(fptr_,TFLOAT,NoCol+1,1,1,nels,&fnull,valeurs, 886 886 &anull,&status); … … 899 899 long repeat,width; 900 900 fits_get_coltype(fptr_, NoCol+1,&DTYPE,&repeat,&width,&status); 901 if( DTYPE != TLONG && DTYPE != TINT && DTYPE != TSHORT ) 902 { 903 throw IOExc("FitsFile::GetBinTabFCol, tentative de lecture non entier"); 901 cout << " en lecture fits trouve le type " << DTYPE << endl; 902 if( DTYPE != TLONG && DTYPE != TINT) 903 { 904 throw IOExc("FitsFile::GetBinTabFCol, probleme de lecture d'entiers"); 904 905 } 905 906 long nels=nentries; … … 913 914 // status = 0; 914 915 // } 915 if (nentries != nrows_*repeat) 916 { 917 cout << " found " << nentries << " pixels, expected: " << nrows_*repeat << endl; 918 throw PException(" FitsFile:::GetBinTabFCol "); 919 } 916 // if (nentries != nrows_*repeat) 917 // { 918 // cout << " found " << nentries << " pixels, expected: " << nrows_*repeat << endl; 919 // throw PException(" FitsFile:::GetBinTabFCol "); 920 // } 921 922 923 924 // voir commentaire dans putColToFits() 920 925 fits_read_col(fptr_,TINT,NoCol+1,1,1,nels,&inull,valeurs, 921 926 &anull,&status); … … 942 947 int anull; 943 948 char* cnull= ""; 944 if (nentries != nrows_*repeat/width)945 {946 cout << " found " << nentries << " pixels, expected: " << nrows_*repeat/width << endl;947 throw PException(" FitsFile:::GetBinTabFCol ");948 }949 // if (nentries != nrows_*repeat/width) 950 // { 951 // cout << " found " << nentries << " pixels, expected: " << nrows_*repeat/width << endl; 952 // throw PException(" FitsFile:::GetBinTabFCol "); 953 // } 949 954 long frow=1; 950 955 long felem=1; … … 1623 1628 // for (int toto=0; toto < 10; toto++) cout << donnees[toto] << endl; 1624 1629 fits_write_col(fptr_,TDOUBLE,nocol+1,1,1,nentries, donnees ,&status); 1625 if( status ) printerror( status,"erreur ecriture dufichier fits" );1630 if( status ) printerror( status,"erreur ecriture col. double, dans fichier fits" ); 1626 1631 } 1627 1632 … … 1656 1661 } 1657 1662 fits_write_col(fptr_,TFLOAT,nocol+1,1,1,nentries, donnees ,&status); 1658 if( status ) printerror( status,"erreur ecriture dufichier fits" );1663 if( status ) printerror( status,"erreur ecriture col. floats, dans fichier fits" ); 1659 1664 } 1660 1665 … … 1683 1688 long repeat, width; 1684 1689 fits_get_coltype(fptr_, nocol+1, &code, &repeat,&width, &status); 1685 if( code != TLONG && code != TINT && code != TSHORT ) 1686 { 1687 cout << " WARNING : types don't match (PutColToFits) : on fits file= " << code << " (FITS code), to be written= INT " << endl; 1690 1691 1692 // la logique voudrait qu'on distingue TLONG et TINT. Mais si j'ecris 1693 // et relis immediatement quelque chose en TLONG l'experience montre 1694 // que ca foire. Donc, je fais tout en TINT, d'ailleurs cfitsio n'a pas 1695 // (apparemment) d'entiers de longueur superieure a 32 bits. 1696 // En fait, je n'y comprend rien. A suivre (GLM). 1697 if (code == TINT || code == TLONG ) 1698 { 1699 cout << " j'ecris des TINT" << endl; 1700 fits_write_col(fptr_,TINT,nocol+1,1,1,nentries, donnees ,&status); 1701 } 1702 else if (code == TSHORT) 1703 { 1704 cout << " j'ecris des TSHORT " << endl; 1705 fits_write_col(fptr_,TSHORT,nocol+1,1,1,nentries, donnees ,&status); 1706 } 1707 else 1708 { 1709 cout << " WARNING : types don't match (PutColToFits) : on fits file= " << code << " (FITS code), to be written= integers " << endl; 1688 1710 } 1689 fits_write_col(fptr_,TINT,nocol+1,1,1,nentries, donnees ,&status); 1690 if( status ) printerror( status," ecriture du fichier fits" ); 1711 if( status ) printerror( status,"erreur ecriture col. entiers, dans fichier fits" ); 1691 1712 } 1692 1713 … … 1719 1740 } 1720 1741 fits_write_col(fptr_,TSTRING,nocol+1,1,1,nentries, donnees ,&status); 1721 if( status ) printerror( status,"erreur ecriture dufichier fits" );1742 if( status ) printerror( status,"erreur ecriture col. chars, dans fichier fits" ); 1722 1743 } 1723 1744 -
trunk/SophyaExt/FitsIOServer/fitsspherehealpix.h
r1353 r1752 30 30 void Mollweide_picture_projection(char flnm[]); 31 31 void sinus_picture_projection(char flnm[]); 32 void ReWriteFromFitsToFits(FitsInFile& headerin, FitsOutFile& os); 33 32 //void ReWriteFromFitsToFits(FitsInFile& headerin, FitsOutFile& os); 34 33 35 34 inline operator SphereHEALPix<T>() { return(*dobj_); }
Note:
See TracChangeset
for help on using the changeset viewer.