Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nf chunking #469

Merged
merged 12 commits into from
Oct 5, 2022
10 changes: 7 additions & 3 deletions hexrd/grainmap/nfutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -1325,11 +1325,15 @@ def gen_trial_exp_data(grain_out_file,det_file,mat_file, mat_name, max_tth, comp

return experiment, nf_to_ff_id_map

def process_raw_confidence(raw_confidence,vol_shape,id_remap=None,min_thresh=0.0):
def process_raw_confidence(raw_confidence,vol_shape=None,id_remap=None,min_thresh=0.0):

print('Compiling Confidence Map...')
confidence_map=np.max(raw_confidence,axis=0).reshape(vol_shape)
grain_map=np.argmax(raw_confidence,axis=0).reshape(vol_shape)
if vol_shape == None:
confidence_map=np.max(raw_confidence,axis=0)
grain_map=np.argmax(raw_confidence,axis=0)
else:
confidence_map=np.max(raw_confidence,axis=0).reshape(vol_shape)
grain_map=np.argmax(raw_confidence,axis=0).reshape(vol_shape)


#fix grain indexing
Expand Down
Loading