2.5.22. prismatique.load.probe_positions
- probe_positions(filename, force_2_col_shape=True, skip_validation_and_conversion=False)[source]
From a given STEM simulation output file, load the probe positions stored or specified therein.
Note that the cartesian coordinate system used to define the probe positions has its origin coinciding with the bottom left corner of the sample’s supercell [see the documentation for the class
prismatique.discretization.Paramsfor a discussion on sample supercells].- Parameters:
- filenamestr
The relative or absolute path to the file containing the probe positions or specifying the scan pattern. Any non-temporary file generated by the function
prismatique.stem.sim.run()that does not store potential slice or S-matrix data, is a valid file. In other words, any file generated by a STEM simulation with originally the basename"stem_sim_intensity_output.h5","stem_sim_params.json", or a basename of the form"stem_sim_wavefunction_output_of_subset_"+str(i)+".h5", whereiis a nonnegative integer.See the documentation for the class
prismatique.stem.output.Paramsfor a discussion on the layout and structuring ofprismatiqueSTEM simulation output files.- force_2_col_shapebool, optional
If
force_2_col_shapeis set toFalseandprismatique.load.scan_pattern_type(filename) == "rectangular grid", then the return object storing the probe positions,probe_positions, is not a two-column array. Otherwise,probe_positionsis a two-column array. See the description below ofprobe_positionsfor more details.- 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:
- positionsarray_like (float, shape=(
num_probe_positions,2)) | array_like (float, shape=(Y_dim,X_dim,2)) Let
num_probe_positionsbe the number of probe positions. Ifforce_2_col_shape==Trueorprismatique.load.scan_pattern_type(filename) != "rectangular grid", thenpositions[i][0]andpositions[i][1]are the \(x\)- and \(y\)-components of the \(i^{\text{th}}\) probe position in units of Å, whereiis an integer satisfying0<=i<num_probe_positions.If
prismatique.load.scan_pattern_type(filename) == "rectangular grid", then the probe positions lie exactly on a rectangular grid withX_dimpositions along the \(x\)-axis,Y_dimpositions along the \(y\)-axis. Letrxbe the set of possible \(x\)-coordinates of the probe in ascending order, andrybe the set of possible \(y\)-coordinates of the probe in descending order, both in units of Å. In the case thatforce_2_col_shape==Falseandprismatique.load.scan_pattern_type(filename) == "rectangular grid",positions[ry_idx][rx_idx][0]=rx[rx_idx]andpositions[ry_idx][rx_idx][1]=ry[ry_idx], whererx_idxandry_idxare non-negative integers satisfyingrx_idx<X_dimandry_idx<Y_dimrespectively.
- positionsarray_like (float, shape=(