2.9.1. prismatique.thermal.Params

class Params(enable_thermal_effects=False, num_frozen_phonon_configs_per_subset=1, num_subsets=1, rng_seed=None, skip_validation_and_conversion=False)[source]

Bases: PreSerializableAndUpdatable

The simulation parameters related to the thermal properties of the sample and its environment.

In STEM experiments, the intensity pattern for a given probe collected by the STEM detector measures the diagonal elements of the state operator \(\hat{\rho}_{t}\) of a transmitted beam electron, in the electron’s transverse momentum basis:

(2.9.1.1)\[I_{\text{STEM}}\left(k_{x},k_{y}\right)\Delta k_{x}\Delta k_{y} \approx N_{e}\left\langle k_{x},k_{y}\right| \hat{\rho}_{t}\left|k_{x},k_{y}\right\rangle \Delta k_{x}\Delta k_{y},\]

where \(N_{e}\) is the number of electrons collected by the detector for said intensity pattern; \(\left|k_{x},k_{y}\right\rangle\) is the electron transverse momentum eigenvector; \(\Delta k_{x}\) is the resolution of the STEM detector in the \(k_{x}\)-direction; \(\Delta k_{y}\) is the resolution of the STEM detector in the \(k_{y}\)-direction; \(I_{\text{STEM}}\left(k_{x},k_{y}\right)\Delta k_{x}\Delta k_{y}\) is the measured intensity, i.e. electron count, over the STEM detector pixel with the effective transverse momentum coordinates \(\left(k_{x},k_{y}\right)\). Similarly, in HRTEM experiments, the intensity image for a given beam collected by the TEM detector measures the diagonal elements of the state operator \(\hat{\rho}_{t}\) of a transmitted beam electron, in the transverse (i.e. \(xy\)) position basis:

(2.9.1.2)\[I_{\text{HRTEM}}\left(x,y\right)\Delta x\Delta y\approx N_{e}\left\langle x,y\right|\hat{\rho}_{t}\left|x,y\right\rangle \Delta x\Delta y,\]

where \(\left|x,y\right\rangle\) is the electron transverse position eigenvector; \(\Delta x\) is the resolution of the TEM detector in the \(x\)-direction; \(\Delta y\) is the resolution of the TEM detector in the \(y\)-direction; \(I_{\text{HRTEM}}\left(x,y\right)\Delta x\Delta y\) is the measured intensity, i.e. electron count, over the TEM detector pixel with the effective transverse position coordinates \(\left(x,y\right)\).

Due to various sources of decoherence, a given transmitted beam electron will generally be in a mixed state. In prismatique, we consider thermal fluctuations in the sample and chromatic aberrations as the dominant sources of decoherence for STEM and HRTEM simulations, where for the latter we also consider finite source size effects. At finite temperature, the atoms in the sample collectively vibrate to form phonons. Typically, the phonons have vibration periods on the order of \(10^{-13}`s [Loane1]_. A beam electron will typically pass through the sample in a time on the order of :math:`10^{-16}`s [Loane1]_, which is several orders of magnitude faster than the typical phonon vibration period. Hence, at a semiclassical level, any beam electron passing through the sample will interact with the vibrating atoms as if they were effectively stationary, i.e. the atoms are effectively in a frozen atomic or phonon configuration during the time interval it takes for a beam electron to pass through the sample. For typical beam currents, the average time between successive electrons passing through the specimen is about :math:`10^3\) phonon vibration periods, therefore the effective frozen phonon configurations that successive beam electrons interact with are essentially uncorrelated. In scenarios where chromatic aberrations are present, and there are small fluctuations in the electron beam energy over time, there will be correspondingly small fluctuations in the defocus of the electron beam over time. In HRTEM experiments, the electron beam will generally illuminate the sample with a small distribution of angles, due to finite source size effects from the electron gun.

To model the decoherence effects, we consider the following general state operator for a transmitted beam electron:

(2.9.1.3)\[\begin{split}\hat{\rho}_{t}&=\int_{-\infty}^{\infty}d\delta_{f}\, \prod_{j=1}^{N}\left\{ \int d\mathbf{u}_{j}\right\} \, \int d\boldsymbol{\delta}_{\beta}\\ &\phantom{=}\quad\mathop{\times}p_{\sigma_{f}}\left(\delta_{f}\right) p_{a}\left(\mathbf{u}_{1},\ldots,\mathbf{u}_{N}\right) p_{\sigma_{\beta}}\left(\boldsymbol{\delta}_{\beta}\right)\\ &\phantom{=}\quad\mathop{\times} \hat{\rho}_{t}\left(\delta_{f};\mathbf{u}_{1},\ldots,\mathbf{u}_{N}; \boldsymbol{\delta}_{\beta}\right),\end{split}\]

where \(\delta_{f}\) is the defocal offset, i.e. a deviation from the target operating defocus \(\Delta f\); \(p_{\sigma_{f}}\left(\delta_{f}\right)\) is the distribution of \(\delta_{f}\):

(2.9.1.4)\[p_{\sigma_{f}}\left(\delta_{f}\right)=\frac{1}{\sigma_{f}\sqrt{2\pi}} \exp\left(-\frac{1}{2}\frac{\delta_{f}^{2}}{\sigma_{f}^{2}}\right),\]

with \(\sigma_{f}\) being the defocal spread; \(\boldsymbol{\delta}_{\beta}\) is the deviation from the target operating beam tilt \(\mathbf{k}_{xy,\beta}\); \(p_{\sigma_{\beta}}\left(\boldsymbol{\delta}_{\beta}\right)\) is the distribution of \(\boldsymbol{\delta}_{\beta}\):

(2.9.1.5)\[p_{\sigma_{\beta}}\left(\boldsymbol{\delta}_{\beta}\right)= \frac{1}{\sigma_{\beta}\sqrt{2\pi}} \exp\left(-\frac{1}{2} \frac{\left|\boldsymbol{\delta}_{\beta}\right|^{2}}{\sigma_{\beta}^{2}} \right),\]

with \(\sigma_{\beta}\) being the beam tilt spread; \(N\) is the number of atoms in the sample’s supercell [see the documentation for the class prismatique.discretization.Params for a discussion on sample supercells]; \(\mathbf{u}_{j}\) is the displacement of the \(j^{\text{th}}\) atom of the sample’s supercell from the expectation value of its position at zero-temperature; \(p_{a}\left(\mathbf{u}_{1},\ldots,\mathbf{u}_{N}\right)\) is the distribution of the sample’s supercell atomic configuration \(\left\{ \mathbf{u}_{j}\right\} _{j=1}^{N}\); and

(2.9.1.6)\[\begin{split}&\hat{\rho}_{t}\left(\delta_{f};\mathbf{u}_{1},\ldots,\mathbf{u}_{N}; \boldsymbol{\delta}_{\beta}\right)\\ &\quad=\left|\psi_{t}\left(\delta_{f}; \mathbf{u}_{1},\ldots,\mathbf{u}_{N}; \boldsymbol{\delta}_{\beta}\right)\right\rangle \left\langle \psi_{t}\left(\delta_{f};\mathbf{u}_{1},\ldots,\mathbf{u}_{N}; \boldsymbol{\delta}_{\beta}\right)\right|,\end{split}\]

with \(\left|\psi_{t}\left(\delta_{f};\mathbf{u}_{1},\ldots,\mathbf{u}_{N}; \boldsymbol{\delta}_{\beta}\right)\right\rangle\) being the state vector of a transmitted beam electron for a perfectly coherent beam operating at a defocus of \(\Delta f+\delta_{f}\) and a beam tilt of \(\mathbf{k}_{xy,\beta}+\boldsymbol{\delta}_{\beta}\), and a sample with a frozen supercell atomic configuration \(\left\{ \mathbf{u}_{j}\right\} _{j=1}^{N}\). The defocal spread \(\sigma_{f}\) is calculated by:

(2.9.1.7)\[\sigma_{f}=C_{c}\sqrt{\left(\frac{\sigma_{E}/e}{V}\right)^{2} +\left(2\frac{\sigma_{I}}{I}\right)^{2} +\left(\frac{\sigma_{V}}{V}\right)^{2}},\]

where \(C_c\) is the chromatic aberration coefficient; \(I\) is the mean current of the lens [the probe forming lens in STEM simulations and the objective lens in HRTEM simulations]; \(\sigma_I\) is the standard deviation of the current of the lens; \(V\) is the mean accelerating voltage; \(e\) is the elementary charge; \(\sigma_V\) is the standard deviation of the accelerating voltage; and \(\sigma_E\) is the standard deviation of the electrons in the gun when operating a voltage supply that does not fluctuate [i.e. \(\sigma_E\) is the intrinsic energy spread of the gun]. As mentioned above, we do not explicitly consider finite source size effects for STEM simulations in prismatique, hence for such scenarios we can set

(2.9.1.8)\[\sigma_{\beta}\to0,\quad\left(\text{for STEM}\right).\]

In prismatic, \(p_{a}\left( \mathbf{u}_{1},\ldots,\mathbf{u}_{N}\right)\) is approximated using a simple Einstein model [Loane1]:

(2.9.1.9)\[p_{a}\left(\mathbf{u}_{1},\ldots,\mathbf{u}_{N}\right)=\prod_{i=1}^{N} \left\{ p_{a}\left(\left|\mathbf{u}_{i}\right|\right)\right\},\]
(2.9.1.10)\[p_{a}\left(\mathbf{u}_{i}\right)= \left(\frac{3}{2\pi u_{i,\text{rms}}^{2}}\right)^{3/2} e^{-\frac{3}{2}\left( \frac{\mathbf{u}_{i}}{u_{i,\text{rms}}}\right)^{2}},\]
(2.9.1.11)\[u_{i,\text{rms}}=\sqrt{\left\langle \mathbf{u}_{i}^{2}\right\rangle } = \frac{A\left(T\right)}{m_i^{\frac{1}{2}}},\]

where \(A\left(T\right)\) is some function of the temperature \(T\) which would need to be determined experimentally, and \(m_i\) is the mass of the \(i^{\text{th}}\) atom. The incoherent average over the phonon configurations in Eq. (2.9.1.3) is approximated by sampling a random set of frozen phonon configurations from the distribution \(p_{a}\left(\mathbf{u}_{1},\ldots,\mathbf{u}_{N}\right)\). The larger the sampling size of frozen phonon configurations, the more accurate the estimate. For a discussion on the convergence of this sampling approach, see Ref. [DaCosta1], in particular Sec. 4.4. Note that throughout the documentation of the prismatique library, we refer to \(u_{i,\text{rms}}\) as the effective root-mean-squared displacement of the \(i^{\text{th}}\) atom.

Parameters:
enable_thermal_effectsbool, optional

If enable_thermal_effects is set to True, then for each atom in the sample supercell, \(u_{i,\text{rms}}\) is set according to the specifications given in the “atomic coordinates file”, which among other things specifies the zero-temperature expectation value of the atomic coordinates for each atom in the unit cell of the sample. If enable_thermal_effects is set to False, then for each atom, \(u_{i,\text{rms}}\) is set to zero. See the documentation for the class prismatique.sample.ModelParams, in particular the documentation for the construction parameter atomic_coords_filename for a description of the file format of the atomic coordinates file.

num_frozen_phonon_configs_per_subsetint, optional

Sometimes one might be implementing a simulation that requires significant computational resources, namely RAM. In such cases, rather than call a single session of prismatic to calculate \(p_{\text{STEM}}\left(k_{x},k_{y}\left|\mathbf{u}_{1},\ldots, \mathbf{u}_{N}\right.\right)\) for all sampled frozen phonon configurations, it is advantageous to partition the set of sampled frozen phonon configurations into disjoint subsets and subsequently call multiple sessions of prismatic sequentially, wherein for each session \(p_{\text{STEM}}\left(k_{x},k_{y}\left|\mathbf{u}_{1},\ldots, \mathbf{u}_{N}\right.\right)\) is calculated for a different subset of the sampled frozen phonon configurations. This way, one need only store the potential slice data or the S-matrix data [depending on the algorithm used] for a single subset of frozen phonon configurations at a time, thus reducing memory requirements. See the documentation for the class prismatique.sample.ModelParams for a discussion on potential slices, and the subpackage prismatique.stem for a discussion on S-matrices.

num_frozen_phonon_configs_per_subset is the number of frozen phonon configurations to sample per subset.

num_subsetsint, optional

Continuing from above, num_subsets is the number of subsets of frozen phonon configurations. The total number of frozen phonon configurations to sample is num_frozen_phonon_configs_per_subset*num_subsets.

rng_seedint | None, optional

A seed to pass to the random number generator used to sample the frozen phonon configurations. If set, rng_seed must be a non-negative integer or None.

skip_validation_and_conversionbool, optional

Let validation_and_conversion_funcs and core_attrs denote the attributes validation_and_conversion_funcs and core_attrs respectively, both of which being dict objects.

Let params_to_be_mapped_to_core_attrs denote the dict representation of the constructor parameters excluding the parameter skip_validation_and_conversion, where each dict key key is a different constructor parameter name, excluding the name "skip_validation_and_conversion", and params_to_be_mapped_to_core_attrs[key] would yield the value of the constructor parameter with the name given by key.

If skip_validation_and_conversion is set to False, then for each key key in params_to_be_mapped_to_core_attrs, core_attrs[key] is set to validation_and_conversion_funcs[key] (params_to_be_mapped_to_core_attrs).

Otherwise, if skip_validation_and_conversion is set to True, then core_attrs is set to params_to_be_mapped_to_core_attrs.copy(). This option is desired primarily when the user wants to avoid potentially expensive deep copies and/or conversions of the dict values of params_to_be_mapped_to_core_attrs, as it is guaranteed that no copies or conversions are made in this case.

Attributes:
core_attrs

dict: The “core attributes”.

de_pre_serialization_funcs

dict: The de-pre-serialization functions.

pre_serialization_funcs

dict: The pre-serialization functions.

validation_and_conversion_funcs

dict: The validation and conversion functions.

Methods

de_pre_serialize([serializable_rep, ...])

Construct an instance from a serializable representation.

dump([filename, overwrite])

Serialize instance and save the result in a JSON file.

dumps()

Serialize instance.

get_core_attrs([deep_copy])

Return the core attributes.

get_de_pre_serialization_funcs()

Return the de-pre-serialization functions.

get_pre_serialization_funcs()

Return the pre-serialization functions.

get_validation_and_conversion_funcs()

Return the validation and conversion functions.

load([filename, skip_validation_and_conversion])

Construct an instance from a serialized representation that is stored in a JSON file.

loads([serialized_rep, ...])

Construct an instance from a serialized representation.

pre_serialize()

Pre-serialize instance.

update([new_core_attr_subset_candidate, ...])

Update a subset of the core attributes.

Methods

de_pre_serialize

Construct an instance from a serializable representation.

dump

Serialize instance and save the result in a JSON file.

dumps

Serialize instance.

get_core_attrs

Return the core attributes.

get_de_pre_serialization_funcs

Return the de-pre-serialization functions.

get_pre_serialization_funcs

Return the pre-serialization functions.

get_validation_and_conversion_funcs

Return the validation and conversion functions.

load

Construct an instance from a serialized representation that is stored in a JSON file.

loads

Construct an instance from a serialized representation.

pre_serialize

Pre-serialize instance.

update

Update a subset of the core attributes.

Attributes

core_attrs

dict: The "core attributes".

de_pre_serialization_funcs

dict: The de-pre-serialization functions.

pre_serialization_funcs

dict: The pre-serialization functions.

validation_and_conversion_funcs

dict: The validation and conversion functions.

property core_attrs

dict: The “core attributes”.

The keys of core_attrs are the same as the attribute validation_and_conversion_funcs, which is also a dict object.

Note that core_attrs should be considered read-only.

property de_pre_serialization_funcs

dict: The de-pre-serialization functions.

de_pre_serialization_funcs has the same keys as the attribute validation_and_conversion_funcs, which is also a dict object.

Let validation_and_conversion_funcs and pre_serialization_funcs denote the attributes validation_and_conversion_funcs pre_serialization_funcs respectively, the last of which being a dict object as well.

Let core_attrs_candidate_1 be any dict object that has the same keys as validation_and_conversion_funcs, where for each dict key key in core_attrs_candidate_1, validation_and_conversion_funcs[key](core_attrs_candidate_1) does not raise an exception.

Let serializable_rep be a dict object that has the same keys as core_attrs_candidate_1, where for each dict key key in core_attrs_candidate_1, serializable_rep[key] is set to pre_serialization_funcs[key](core_attrs_candidate_1[key]).

The items of de_pre_serialization_funcs are expected to be set to callable objects that would lead to de_pre_serialization_funcs[key](serializable_rep[key]) not raising an exception for each dict key key in serializable_rep.

Let core_attrs_candidate_2 be a dict object that has the same keys as serializable_rep, where for each dict key key in validation_and_conversion_funcs, core_attrs_candidate_2[key] is set to de_pre_serialization_funcs[key](serializable_rep[key]).

The items of de_pre_serialization_funcs are also expected to be set to callable objects that would lead to validation_and_conversion_funcs[key](core_attrs_candidate_2) not raising an exception for each dict key key in core_attrs_candidate_2.

Note that de_pre_serialization_funcs should be considered read-only.

classmethod de_pre_serialize(serializable_rep={}, skip_validation_and_conversion=False)

Construct an instance from a serializable representation.

Parameters:
serializable_repdict, optional

A dict object that has the same keys as the attribute validation_and_conversion_funcs, which is also a dict object.

Let validation_and_conversion_funcs and de_pre_serialization_funcs denote the attributes validation_and_conversion_funcs de_pre_serialization_funcs respectively, the last of which being a dict object as well.

The items of serializable_rep are expected to be objects that would lead to de_pre_serialization_funcs[key](serializable_rep[key]) not raising an exception for each dict key key in serializable_rep.

Let core_attrs_candidate be a dict object that has the same keys as serializable_rep, where for each dict key key in serializable_rep, core_attrs_candidate[key] is set to de_pre_serialization_funcs[key](serializable_rep[key])``.

The items of serializable_rep are also expected to be set to objects that would lead to validation_and_conversion_funcs[key](core_attrs_candidate) not raising an exception for each dict key key in serializable_rep.

skip_validation_and_conversionbool, optional

Let core_attrs denote the attribute core_attrs, which is a dict object.

If skip_validation_and_conversion is set to False, then for each key key in serializable_rep, core_attrs[key] is set to validation_and_conversion_funcs[key] (core_attrs_candidate), with validation_and_conversion_funcs and core_attrs_candidate_1 being introduced in the above description of serializable_rep.

Otherwise, if skip_validation_and_conversion is set to True, then core_attrs is set to core_attrs_candidate.copy(). This option is desired primarily when the user wants to avoid potentially expensive deep copies and/or conversions of the dict values of core_attrs_candidate, as it is guaranteed that no copies or conversions are made in this case.

Returns:
instance_of_current_clsCurrent class

An instance constructed from the serializable representation serializable_rep.

dump(filename='serialized_rep_of_fancytype.json', overwrite=False)

Serialize instance and save the result in a JSON file.

Parameters:
filenamestr, optional

The relative or absolute path to the JSON file in which to store the serialized representation of an instance.

overwritebool, optional

If overwrite is set to False and a file exists at the path filename, then the serialized instance is not written to that file and an exception is raised. Otherwise, the serialized instance will be written to that file barring no other issues occur.

Returns:
dumps()

Serialize instance.

Returns:
serialized_repdict

A serialized representation of an instance.

get_core_attrs(deep_copy=True)

Return the core attributes.

Parameters:
deep_copybool, optional

Let core_attrs denote the attribute core_attrs, which is a dict object.

If deep_copy is set to True, then a deep copy of core_attrs is returned. Otherwise, a shallow copy of core_attrs is returned.

Returns:
core_attrsdict

The attribute core_attrs.

classmethod get_de_pre_serialization_funcs()[source]

Return the de-pre-serialization functions.

Returns:
de_pre_serialization_funcsdict

The attribute de_pre_serialization_funcs.

classmethod get_pre_serialization_funcs()[source]

Return the pre-serialization functions.

Returns:
pre_serialization_funcsdict

The attribute pre_serialization_funcs.

classmethod get_validation_and_conversion_funcs()[source]

Return the validation and conversion functions.

Returns:
validation_and_conversion_funcsdict

The attribute validation_and_conversion_funcs.

classmethod load(filename='serialized_rep_of_fancytype.json', skip_validation_and_conversion=False)

Construct an instance from a serialized representation that is stored in a JSON file.

Users can save serialized representations to JSON files using the method fancytypes.PreSerializable.dump().

Parameters:
filenamestr, optional

The relative or absolute path to the JSON file that is storing the serialized representation of an instance.

filename is expected to be such that json.load(open(filename, "r")) does not raise an exception.

Let serializable_rep=json.load(open(filename, "r")).

Let validation_and_conversion_funcs and de_pre_serialization_funcs denote the attributes validation_and_conversion_funcs de_pre_serialization_funcs respectively, both of which being dict objects as well.

filename is also expected to be such that de_pre_serialization_funcs[key](serializable_rep[key]) does not raise an exception for each dict key key in de_pre_serialization_funcs.

Let core_attrs_candidate be a dict object that has the same keys as de_pre_serialization_funcs, where for each dict key key in serializable_rep, core_attrs_candidate[key] is set to de_pre_serialization_funcs[key](serializable_rep[key])``.

filename is also expected to be such that validation_and_conversion_funcs[key](core_attrs_candidate) does not raise an exception for each dict key key in serializable_rep.

skip_validation_and_conversionbool, optional

Let core_attrs denote the attribute core_attrs, which is a dict object.

Let core_attrs_candidate be as defined in the above description of filename.

If skip_validation_and_conversion is set to False, then for each key key in core_attrs_candidate, core_attrs[key] is set to validation_and_conversion_funcs[key] (core_attrs_candidate), , with validation_and_conversion_funcs and core_attrs_candidate being introduced in the above description of filename.

Otherwise, if skip_validation_and_conversion is set to True, then core_attrs is set to core_attrs_candidate.copy(). This option is desired primarily when the user wants to avoid potentially expensive deep copies and/or conversions of the dict values of core_attrs_candidate, as it is guaranteed that no copies or conversions are made in this case.

Returns:
instance_of_current_clsCurrent class

An instance constructed from the serialized representation stored in the JSON file.

classmethod loads(serialized_rep='{}', skip_validation_and_conversion=False)

Construct an instance from a serialized representation.

Users can generate serialized representations using the method dumps().

Parameters:
serialized_repstr | bytes | bytearray, optional

The serialized representation.

serialized_rep is expected to be such that json.loads(serialized_rep) does not raise an exception.

Let serializable_rep=json.loads(serialized_rep).

Let validation_and_conversion_funcs and de_pre_serialization_funcs denote the attributes validation_and_conversion_funcs de_pre_serialization_funcs respectively, both of which being dict objects as well.

serialized_rep is also expected to be such that de_pre_serialization_funcs[key](serializable_rep[key]) does not raise an exception for each dict key key in de_pre_serialization_funcs.

Let core_attrs_candidate be a dict object that has the same keys as serializable_rep, where for each dict key key in de_pre_serialization_funcs, core_attrs_candidate[key] is set to de_pre_serialization_funcs[key](serializable_rep[key])``.

serialized_rep is also expected to be such that validation_and_conversion_funcs[key](core_attrs_candidate) does not raise an exception for each dict key key in serializable_rep.

skip_validation_and_conversionbool, optional

Let core_attrs denote the attribute core_attrs, which is a dict object.

If skip_validation_and_conversion is set to False, then for each key key in core_attrs_candidate, core_attrs[key] is set to validation_and_conversion_funcs[key] (core_attrs_candidate), with validation_and_conversion_funcs and core_attrs_candidate_1 being introduced in the above description of serialized_rep.

Otherwise, if skip_validation_and_conversion is set to True, then core_attrs is set to core_attrs_candidate.copy(). This option is desired primarily when the user wants to avoid potentially expensive deep copies and/or conversions of the dict values of core_attrs_candidate, as it is guaranteed that no copies or conversions are made in this case.

Returns:
instance_of_current_clsCurrent class

An instance constructed from the serialized representation.

property pre_serialization_funcs

dict: The pre-serialization functions.

pre_serialization_funcs has the same keys as the attribute validation_and_conversion_funcs, which is also a dict object.

Let validation_and_conversion_funcs and core_attrs denote the attributes validation_and_conversion_funcs and core_attrs respectively, the last of which being a dict object as well.

For each dict key key in core_attrs, pre_serialization_funcs[key](core_attrs[key]) is expected to yield a serializable object, i.e. it should yield an object that can be passed into the function json.dumps without raising an exception.

Note that pre_serialization_funcs should be considered read-only.

pre_serialize()

Pre-serialize instance.

Returns:
serializable_repdict

A serializable representation of an instance.

update(new_core_attr_subset_candidate={}, skip_validation_and_conversion=False)

Update a subset of the core attributes.

Parameters:
new_core_attr_subset_candidatedict, optional

A dict object.

skip_validation_and_conversionbool, optional

Let validation_and_conversion_funcs and core_attrs denote the attributes validation_and_conversion_funcs and core_attrs respectively, both of which being dict objects.

If skip_validation_and_conversion is set to False, then for each key key in core_attrs that is also in new_core_attr_subset_candidate, core_attrs[key] is set to validation_and_conversion_funcs[key] (new_core_attr_subset_candidate).

Otherwise, if skip_validation_and_conversion is set to True, then for each key key in core_attrs that is also in new_core_attr_subset_candidate, core_attrs[key] is set to new_core_attr_subset_candidate[key]. This option is desired primarily when the user wants to avoid potentially expensive deep copies and/or conversions of the dict values of new_core_attr_subset_candidate, as it is guaranteed that no copies or conversions are made in this case.

property validation_and_conversion_funcs

dict: The validation and conversion functions.

The keys of validation_and_conversion_funcs are the names of the constructor parameters, excluding skip_validation_and_conversion if it exists as a construction parameter.

Let core_attrs denote the attribute core_attrs, which is also a dict object.

For each dict key key in core_attrs, validation_and_conversion_funcs[key](core_attrs) is expected to not raise an exception.

Note that validation_and_conversion_funcs should be considered read-only.