Mercurial > repos > muon-spectroscopy-computational-project > larch_artemis
comparison larch_artemis.py @ 4:39ab361e6d59 draft
planemo upload for repository https://github.com/MaterialsGalaxy/larch-tools/tree/main/larch_artemis commit 71cee2ed96b69a2e78a1eb3dadbd2e81bf332798
author | muon-spectroscopy-computational-project |
---|---|
date | Mon, 17 Jun 2024 13:54:30 +0000 |
parents | 84c8e04bc1a1 |
children | 7acb53ffb96f |
comparison
equal
deleted
inserted
replaced
3:2ceaa943a2ad | 4:39ab361e6d59 |
---|---|
3 import gc | 3 import gc |
4 import json | 4 import json |
5 import os | 5 import os |
6 import sys | 6 import sys |
7 | 7 |
8 from common import read_group | 8 from common import read_group, sorting_key |
9 | 9 |
10 from larch.fitting import guess, param, param_group | 10 from larch.fitting import guess, param, param_group |
11 from larch.symboltable import Group | 11 from larch.symboltable import Group |
12 from larch.xafs import ( | 12 from larch.xafs import ( |
13 FeffPathGroup, | 13 FeffPathGroup, |
349 if os.path.isdir(prj_file): | 349 if os.path.isdir(prj_file): |
350 # Sort the unzipped directory, all filenames should be zero-padded | 350 # Sort the unzipped directory, all filenames should be zero-padded |
351 filepaths = [ | 351 filepaths = [ |
352 os.path.join(prj_file, p) for p in os.listdir(prj_file) | 352 os.path.join(prj_file, p) for p in os.listdir(prj_file) |
353 ] | 353 ] |
354 filepaths.sort() | 354 filepaths.sort(key=sorting_key) |
355 else: | 355 else: |
356 # DO NOT sort if we have multiple Galaxy datasets - the filenames | 356 # DO NOT sort if we have multiple Galaxy datasets - the filenames |
357 # are arbitrary but should be in order | 357 # are arbitrary but should be in order |
358 filepaths = prj_file.split(",") | 358 filepaths = prj_file.split(",") |
359 | 359 |