2.5.19. prismatique.load.num_slices
- num_slices(filename, skip_validation_and_conversion=False)[source]
From a given
prismatiqueoutput file, load the number of slices used to partition the sample, stored or specified therein.See the documentation for the class
prismatique.discretization.Paramsfor 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(), orprismatique.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, whereiis nonnegative integer.- 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:
- num_sample_supercell_slicesint
The number of slices \(N_{\text{slices}}\) used to partition the sample.