File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments