Skip to content

Commit eaa9ad0

Browse files
committed
debug cbf test 1
1 parent 2085db5 commit eaa9ad0

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

.github/workflows/smoke_test.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ jobs:
2626
matrix:
2727
os:
2828
- name: 'ubuntu-22.04'
29-
- name: 'macos-latest'
29+
# - name: 'macos-latest'
3030
# windows build is broken; don't test for now
3131
# - name: 'windows-latest'
3232
# cmd_extra: '-win'
33-
env: ['py310', 'py311', 'py312', 'py313']
33+
# env: ['py310', 'py311', 'py312', 'py313']
34+
env: ['py313']
3435
runs-on: ${{ matrix.os.name }}
3536
steps:
3637
# checkout repo

.github/workflows/win-gitstrap-selftest.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
name: GSAS-II self-tests on Windows via gitstrap
2+
print('\\r\\n in header','\r\n' in header, 'size',imageBeg)
23

34
on:
45
workflow_dispatch: # Allows running this workflow manually
56
# Runs on pushes targeting the default branch
6-
push:
7-
branches-ignore:
8-
- master
7+
# push:
8+
# branches-ignore:
9+
# - master
910
# branches: ['main']
1011
# pull_request:
1112
# branches: ['main']

GSASII/imports/G2img_CBF.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)