Skip to content

Commit 87b73b0

Browse files
author
Joel Bernier
committed
Merge branch 'master' of https://github.com/joelvbernier/hexrd
merging edits from APS to local master
2 parents 0bdaa8b + f3944b2 commit 87b73b0

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

conda.recipe/meta.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ app:
2020

2121
requirements:
2222
build:
23+
# - nomkl # in case MKL is broken on Linux
2324
- numpy
2425
- python
2526
- setuptools
2627
run:
2728
- dill
2829
- matplotlib
30+
# - nomkl # in case MKL is broken on Linux
2931
- numba
3032
- numpy
3133
- progressbar >=2.3

hexrd/cli/fitgrains.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,17 @@ def execute(args, parser):
6363
ch.setFormatter(cf)
6464
logger.addHandler(ch)
6565

66+
# ...make this an attribute in cfg?
67+
analysis_id = '%s_%s' %(
68+
cfgs[0].analysis_name.strip().replace(' ', '-'),
69+
cfgs[0].material.active.strip().replace(' ', '-'),
70+
)
71+
6672
# if find-orientations has not already been run, do so:
67-
quats_f = os.path.join(cfgs[0].working_dir, 'accepted_orientations.dat')
73+
quats_f = os.path.join(
74+
cfgs[0].working_dir,
75+
'accepted_orientations_%s.dat' %analysis_id
76+
)
6877
if not os.path.exists(quats_f):
6978
logger.info("Missing %s, running find-orientations", quats_f)
7079
logger.removeHandler(ch)

hexrd/fitgrains.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,20 @@ def get_job_queue(cfg, ids_to_refine=None):
6767
except (ValueError, IOError):
6868
# no estimate available, use orientations and defaults
6969
logger.info('fitting grains using default initial estimate')
70+
71+
# ...make this an attribute in cfg?
72+
analysis_id = '%s_%s' %(
73+
cfg.analysis_name.strip().replace(' ', '-'),
74+
cfg.material.active.strip().replace(' ', '-'),
75+
)
76+
7077
# load quaternion file
7178
quats = np.atleast_2d(
7279
np.loadtxt(
73-
os.path.join(cfg.working_dir, 'accepted_orientations.dat')
80+
os.path.join(
81+
cfg.working_dir,
82+
'accepted_orientations_%s.dat' %analysis_id
83+
)
7484
)
7585
)
7686
n_quats = len(quats)

0 commit comments

Comments
 (0)