Skip to content

Commit

Permalink
Fix PBP refine filename bug when refining minor phase
Browse files Browse the repository at this point in the history
  • Loading branch information
jadball committed Dec 2, 2024
1 parent 09f4c70 commit 6ee83cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ImageD11/sinograms/point_by_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,7 @@ def to_h5(self, filename=None, h5group='PBPRefine'):
def from_h5(cls, filename, h5group='PBPRefine'):
# load the stuff in
# then make an object
manager_filename = filename

with h5py.File(filename, "r") as hin:
parent_group = hin[h5group]
Expand Down Expand Up @@ -1007,6 +1008,7 @@ def from_h5(cls, filename, h5group='PBPRefine'):
# load the dataset
dset = ImageD11.sinograms.dataset.load(dsfile)
refine_obj = cls(dset=dset, **pars_dict)
refine_obj.own_filename = manager_filename
for filename_attr, filename in filenames.items():
setattr(refine_obj, filename_attr, filename)
for array_attr, array in arrays.items():
Expand All @@ -1030,7 +1032,6 @@ def from_h5(cls, filename, h5group='PBPRefine'):
refine_obj.loadmap(refine_obj.refinedmap_filename, refined=True)
except (AttributeError, OSError):
pass

return refine_obj

def get_origins(self, guess_speed=True, guess_npks=10000, save_peaks_after=True):
Expand Down

0 comments on commit 6ee83cf

Please sign in to comment.