2.5.10. prismatique.load.grid_dims_in_units_of_probe_shifts
- grid_dims_in_units_of_probe_shifts(filename, skip_validation_and_conversion=False)[source]
From a given STEM simulation output file, load the underlying grid dimensions of the probe scan pattern, in units of probe shifts, stored or specified therein.
- Parameters:
- filenamestr
The relative or absolute path to the file containing or specifying underlying grid dimensions of the probe 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 structure ofprismatiqueSTEM simulation output files.- 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:
- grid_dims“N/A” | array_like (float, shape=(
2)) If
prismatique.load.scan_pattern_type(filename) == "no underlying rectangular grid", thengrid_dimensions_in_units_of_probe_shifts == "N/A", indicating that there is no notion of grid dimensions that is applicable to the scan pattern used. Otherwise, ifprismatique.load.scan_pattern_type(filename) != "no underlying rectangular grid", thengrid_dims[0]andgrid_dims[1]are the number of probe positions along the \(x\)- and \(y\)-dimensions respectively of the underlying rectangular grid of the scanning pattern.
- grid_dims“N/A” | array_like (float, shape=(