2.5.7. prismatique.load.cbed_wavefunctions
- cbed_wavefunctions(filename, multi_dim_slice=None, use_two_axes_to_map_probe_position_if_possible=False, skip_validation_and_conversion=False)[source]
From a given STEM simulation output file that stores CBED wavefunction patterns, load a specified subcollection of said CBED wavefunction patterns into a
hyperspysignal.See the documentation for the class
prismatique.cbed.Paramsfor a discussion on CBED wavefunction patterns, which we denote as \(\left|\psi_{t}\left(\delta_{f};\mathbf{u}_{1}, \ldots,\mathbf{u}_{N}; \boldsymbol{\delta}_{\beta}\right)\right\rangle\) throughout the documentation. See also the documentation for the classprismatique.thermal.Paramsfor additional information and context on said patterns.- Parameters:
- filenamestr
The relative or absolute path to the file containing the CBED wavefunction patterns. Any non-temporary file generated by the function
prismatique.stem.sim.run(), with originally a basename of the form"stem_sim_wavefunction_output_of_subset_"+str(i)+".h5"is valid, whereiis a nonnegative integer. See the documentation for the classprismatique.stem.output.Paramsfor a discussion on the layout and structuring ofprismatiqueSTEM simulation output files.- multi_dim_slicetuple (int | slice | list (int)) | None, optional
The “multidimensional slice object”, which specifies the subcollection of CBED wavefunction patterns to load from file. We define a multi-dimensional slice object as a tuple of items which contains at most one item being a list of integers, and the remaining items being slice and/or int objects.
If
multi_dim_sliceis a tuple of length 4, then thenmulti_dim_slice[0]specifies a set of output layer indices, where each output layer index corresponds to a different output layer;multi_dim_slice[1]specifies a set of atomic configuration indices, where each atomic configuration index corresponds to a frozen phonon configuration;multi_dim_slice[2]specifies a set of defocus indices, where each defocus index corresponds to a different beam defocus; andmulti_dim_slice[3]specifies a set of probe indices, where each probe index corresponds to a different probe position. In this case, the current Python function will load the CBED wavefunction patterns of the frozen phonon configurations specified bymulti_dim_slice[1], generated by electrons exiting from the output layers specified bymulti_dim_slice[0], the electrons of which coming from probes operating at the defocii specified bymulti_dim_slice[2]and centered at the positions specified bymulti_dim_slice[3]. Note thatprismatique.load.output_layer_depths(filename)[multi_dim_slice[0]]yields the depths of the specified output layers;prismatique.load.defocii(filename)[multi_dim_slice[2]]yields the specified defocii; andprismatique.load.probe_positions(filename, force_2_col_shape=True)[multi_dim_slice[3]]yields the specified probe positions.Otherwise, if
multi_dim_sliceis set to None, then all the CBED wavefunction patterns stored in the file are loaded.- use_two_axes_to_map_probe_position_if_possiblebool, optional
If
use_two_axes_to_map_probe_position_if_possibleis set toTrue,prismatique.load.scan_pattern_type(filename) == "rectangular grid", andmulti_dim_slicesatisfies eithermulti_dim_slice[-1]==slice(None)ormulti_dim_slice is None, then twohyperspyaxes are used rather than one to map the probe position. In this case, the two axes have the same dimensions as the rectangular grid on which the probe positions lie. Otherwise, onehyperspyaxis is used to map the probe positions.- skip_validation_and_conversionbool, optional
If
skip_validation_and_conversionis set toFalse, then validations and conversions are performed on the above parameters.Otherwise, if
skip_validation_and_conversionis set toTrue, no validations and conversions are performed on the above parameters. This option is desired primarily when the user wants to avoid potentially expensive validation and/or conversion operations.
- Returns:
- cbed_wavefunction_signal
hyperspy._signals.complex_signal2d.ComplexSignal2D The subcollection of CBED wavefunction patterns, stored in an instance of the
hyperspy._signals.complex_signal2d.ComplexSignal2Dclass. See the documentation and/or reference guide for thehyperspypackage for details on how to use instances of thehyperspy._signals.complex_signal2d.ComplexSignal2Dclass.- navigational_to_original_indices_mapdict
A dictionary that maps the navigational indices of the hyperspy signal
cbed_wavefunction_signalto the original indices specified bymulti_dim_slice. For example, if the original atomic configuration indices map to a set of corresponding navigational indices, thennavigational_to_original_indices_map["atomic_config_indices"][i]yields the atomic configuration index specified in the expressionsingle_dim_slice=multi_dim_slice[1] if multi_dim_slice is not None else slice(None)that corresponds to theith atomic configuration index in the nagivation index space ofcbed_wavefunction_signal, whereiis a nonnegative integer smaller than the total number of atomic configuration indices specified insingle_dim_slice.
- cbed_wavefunction_signal