Skip to content

Commit

Permalink
fix loading of xye experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
rozyczko committed Feb 5, 2024
1 parent 67eea62 commit 74a0301
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion easyDiffractionApp/Logic/Experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,12 @@ def loadExperimentsFromFiles(self, fpaths):
console.debug(f"Loading experiment(s) from: {fpath}")
with open(fpath, 'r') as file:
fileContent = file.read()
name = pathlib.Path(fpath).stem
if fext == '.xye':
fileContent = _DEFAULT_DATA_BLOCK_NO_MEAS + fileContent
name = None

self.loadExperimentFromCifString(fileContent, pathlib.Path(fpath).stem)
self.loadExperimentFromCifString(fileContent, name)

def loadExperimentFromCifString(self, cifString="", job_name=""):
console.debug(f"Loading experiment(s) from: {job_name}")
Expand Down

0 comments on commit 74a0301

Please sign in to comment.