2.5.19. prismatique.load.num_slices

num_slices(filename, skip_validation_and_conversion=False)[source]

From a given prismatique output file, load the number of slices used to partition the sample, stored or specified therein.

See the documentation for the class prismatique.discretization.Params for a discussion on this slicing scheme.

Parameters:
filenamestr

The relative or absolute path to the file containing or specifying the number of slices used to partition the sample. Any non-temporary file generated by the function prismatique.sample.generate_potential_slices(), prismatique.stem.sim.run(), or prismatique.hrtem.sim.run() with originally the basename "sample_model_params.json", or a basename of the form "potential_slices_of_subset_"+str(i)+".h5" is valid, where i is nonnegative integer.

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:
num_sample_supercell_slicesint

The number of slices \(N_{\text{slices}}\) used to partition the sample.