ncempy.eval.ring_diff module

Module to process ring diffraction patterns.

ncempy.eval.ring_diff.cur_eva_vers = 'ring_diffraction_evaluation_vers0.1'

(str) – Used to identify evaluation hdf5 groups.

ncempy.eval.ring_diff.cur_set_vers = 'ring_diffraction_setting_vers0.1'

(str) – Used to identify settings hdf5 groups.

ncempy.eval.ring_diff.dummie_settings = {'rad_sigma': 0.1, 'lmax_range': (1.0, 2.0), 'lmax_r': 1, 'fit_funcs': ('voigt',), 'back_xswidth': 0.1, 'fit_init': (1.0, 1.0, 1.0, 1.0), 'rad_dr': 0.1, 'fit_rrange': (1.0, 2.0), 'lmax_thresh': 1, 'back_init': (1.0, 1.0, 1.0), 'fit_maxfev': 10, 'rad_rmax': 1, 'mask': array([[ 1., 1., 1., 1., 1.], [ 1., 1., 1., 1., 1.], [ 1., 1., 1., 1., 1.], [ 1., 1., 1., 1., 1.], [ 1., 1., 1., 1., 1.]]), 'plt_imgminmax': (0.0, 1.0), 'back_xs': (1.0, 2.0, 3.0), 'ns': (1,), 'lmax_cinit': (1, 1)}

(dict) – Dummy settings with all parameters set.

ncempy.eval.ring_diff.get_settings(parent)[source]

Get settings for radial profile evaluation.

Parameters:parent (h5py._hl.group.Group) – Input group.
Returns:Settings read from parent.
Return type:(dict)
ncempy.eval.ring_diff.min_dummie_settings = {'rad_sigma': None, 'lmax_range': (1.0, 2.0), 'lmax_r': 1, 'fit_funcs': ('voigt',), 'back_xswidth': 0.1, 'fit_init': (1.0, 1.0, 1.0, 1.0), 'rad_dr': None, 'fit_rrange': (1.0, 2.0), 'lmax_thresh': 1, 'back_init': (1.0, 1.0, 1.0), 'fit_maxfev': None, 'rad_rmax': None, 'mask': None, 'plt_imgminmax': None, 'back_xs': (1.0, 2.0, 3.0), 'ns': (1,), 'lmax_cinit': (1, 1)}

(dict) – Dummy settings with all parameters set but all optional ones as Nones.

ncempy.eval.ring_diff.put_settings(parent, settings)[source]

Put settings for radial profile evaluation.

Creates a subgroup in parent holding the settings as attributes.

Parameters:
  • parent (h5py._hl.group.Group) – Group to hold settings subgroup.
  • setting (dict) – Settings to write.
Returns:

Handle to settings group.

Return type:

(h5py._hl.group.Group)

ncempy.eval.ring_diff.put_sglgroup(parent, label, data_grp)[source]

Puts the todo evaluation into parent.

Remember that the ressource of the external link must not be already opened elsewhere to access data.

Parameters:
  • parent (h5py._hl.group.Group) – Hdf5 group to add this evaluation group to.
  • label (str) – Label for the evaluation group.
  • data_grp (h5py._hl.group.Group) – Emdtype group where to find the data.
Returns:

Handle to group.

Return type:

(h5py._hl.group.Group)

ncempy.eval.ring_diff.run_all(parent, outfile, overwrite=False, verbose=False, showplots=False)[source]

Run on a set-up emd file to do evaluations and save results.

All evaluations within parent are run.

Parameters:
  • parent (h5py._hl.group.Group) – Handle to parent.
  • outfile (ncempy.io.emd.fileEMD) – Emdfile for output.
  • overwrite (bool) – Set to overwrite existing results in outfile.
  • verbose (bool) – Set to get verbose output during run.
  • showplots (bool) – Set to directly show plots interactively.
ncempy.eval.ring_diff.run_sglgroup(group, outfile, overwrite=False, verbose=False, showplots=False)[source]

Run evaluation on a single group.

Parameters:
  • group (h5py._hl.group.Group) – Handle to evaluation group to execute.
  • outfile (ncempy.io.emd.fileEMD) – Emdfile for output.
  • overwrite (bool) – Set to overwrite existing results in outfile.
  • verbose (bool) – Set to get verbose output during run.
  • showplots (bool) – Set to directly show plots interactively.