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", where i is a nonnegative integer.

See the documentation for the class prismatique.stem.output.Params for a discussion on the layout and structure of prismatique STEM simulation output files.

skip_validation_and_conversionbool, optional

If skip_validation_and_conversion is set to False, then validations and conversions are performed on the above parameters.

Otherwise, if skip_validation_and_conversion is set to True, 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", then grid_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, if prismatique.load.scan_pattern_type(filename) != "no underlying rectangular grid", then grid_dims[0] and grid_dims[1] are the number of probe positions along the \(x\)- and \(y\)-dimensions respectively of the underlying rectangular grid of the scanning pattern.