Skip to content

Commit

Permalink
Merge pull request #186 from jonwright/master
Browse files Browse the repository at this point in the history
fixup fscan2d
  • Loading branch information
jonwright authored Nov 23, 2023
2 parents 7cedbd3 + 034fb49 commit 4de0805
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ImageD11/sinograms/assemble_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ def harvest_masterfile( dset, outname,
hout.attrs["h5input"] = dset.masterfile
print("Harvesting",dset.masterfile,end=": ")
with h5py.File(dset.masterfile, "r") as hin:
done = set()
for scan in dset.scans:
if scan.find("::"):
scan = scan.split("::")[0]
if scan in done:
continue
gin = hin[scan]
bad = False
for check in ('title','measurement','measurement/'+dset.detector):
Expand Down Expand Up @@ -87,13 +92,14 @@ def harvest_masterfile( dset, outname,
g.attrs["shape0"] = frms.shape[1]
g.attrs["shape1"] = frms.shape[2]
print(scan, end=', ')
done.add(scan)
print()

# Finished with master file. Now harvest the segmented files.
idx = 0
titles = ('row','col','intensity','nnz')
print('Loading pixels:',end=' ')
for scan in dset.scans:
for scan in done:
g = hout.require_group( scan )
for name in 'row', 'col':
if name not in g:
Expand Down

0 comments on commit 4de0805

Please sign in to comment.