Skip to content

Commit

Permalink
A few bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jadball committed Feb 1, 2024
1 parent 0650e6d commit a88c466
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions ImageD11/sinograms/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,15 @@ def update_paths(self):
# root of analysis for this dataset for this sample:
self.analysispath = os.path.join(self.analysisroot, self.sample, self.dsname)

self.dsfile_default = os.path.join(self.analysispath, 'dataset.h5')
self.dsfile_default = os.path.join(self.analysispath, self.dsname + '_dataset.h5')
# at the moment, set self.dsfile to be the default
# if save or load is ever called, this will be replaced
self.dsfile = self.dsfile_default
self.pksfile = os.path.join(self.analysispath, 'peaks_table.h5')
self.grainsfile = os.path.join(self.analysispath, 'grains.h5')
self.sparsefile = os.path.join(self.analysispath, 'sparse.h5')
self.pksfile = os.path.join(self.analysispath, self.dsname + '_peaks_table.h5')
self.col4dfile = os.path.join(self.analysispath, self.dsname + '_peaks_4d.h5')
self.col2dfile = os.path.join(self.analysispath, self.dsname + '_peaks_2d.h5')
self.grainsfile = os.path.join(self.analysispath, self.dsname + '_grains.h5')
self.sparsefile = os.path.join(self.analysispath, self.dsname + '_sparse.h5')

def __repr__(self):
r = []
Expand Down Expand Up @@ -529,10 +531,10 @@ def load(self, h5name=None, h5group='/'):
setattr(self, name, data)
self.guessbins()

# if we got here, we loaded the file successfully
self.dsfile = h5name
# analysis paths can only be calculated once
self.update_paths()
# if we got here, we loaded the file successfully
self.dsfile = h5name

return self

Expand Down

0 comments on commit a88c466

Please sign in to comment.