@@ -16,17 +16,19 @@ def __init__(self):
1616 extensionlist = ('.cbf' ,),
1717 strictExtension = True ,
1818 formatName = 'CBF image' ,
19- longFormatName = 'CIF Binary Data Format image file (NB: Slow!)'
19+ longFormatName = 'CIF Binary Data Format (CBF) image file (NB: Slow!)'
2020 )
2121
2222 def ContentsValidator (self , filename ):
2323 '''no test used at this time
2424 '''
25+ print ('CBF ContentsValidator' )
2526 return True
2627
2728 def Reader (self ,filename , ParentFrame = None , ** unused ):
2829 '''Read using Bob's routine :func:`GetCbfData`
2930 '''
31+ print ('CBF Reader' )
3032 self .Comments ,self .Data ,self .Npix ,self .Image = GetCbfData (self ,filename )
3133 if self .Npix == 0 or not self .Comments :
3234 return False
@@ -37,6 +39,7 @@ def GetCbfData(self,filename):
3739 'Read cif binary detector data cbf file'
3840
3941 import unpack_cbf as cbf
42+ print ('CBF GetCbfData' ,filename )
4043 if GSASIIpath .GetConfigValue ('debug' ):
4144 print ('Reading cif binary detector data cbf file: ' + filename )
4245 File = open (filename ,'rb' )
@@ -53,6 +56,7 @@ def GetCbfData(self,filename):
5356 stream = stream .decode ('latin-1' )
5457 starter = '\x0c \x1a \x04 \xd5 '
5558 imageBeg = stream .find (starter )+ 4
59+ print ('\\ r\\ n in header' ,'\r \n ' in header , 'size' ,imageBeg )
5660 head = stream [:imageBeg ]
5761 term = '\r \n ' #CR-LF
5862 if term in head :
@@ -86,7 +90,6 @@ def GetCbfData(self,filename):
8690 if compImageSize is None :
8791 print ('CBF failed to read header' )
8892 print (header )
89- print ('\\ r\\ n in header' ,'\r \n ' in header , 'size' ,imageBeg )
9093 return
9194
9295 nxy = sizexy [0 ]* sizexy [1 ]
0 commit comments