ptyrad.params.ptyrad_params#

Defines the integrated pydantic model PtyRADParams used for default filling and validation of PtyRAD params files

pydantic model ptyrad.params.ptyrad_params.PtyRADParams[source]#

Bases: BaseModel

The major params object for PtyRAD.

This object is primarily used to fill in defaults, or validate values from the input params file.

However, this object can also be used as a skeleton to generate valid dict for PtyRADSolver.

Treat this PtyRADParams as the “schema” for the entire params file, or equivalently “the programmic definition of legal PtyRAD params”.

PtyRADParams contains 6 fields, which are:

  1. init_params

  2. hypertune_params

  3. model_params

  4. loss_params

  5. constraint_params

  6. recon_params

These are the same with the nested dict defined in PtyRAD param files.

For detailed explanations of available options, check the API reference at: https://ptyrad.readthedocs.io/en/latest/_autosummary/ptyrad.params.html

Fields:
param init_params: InitParams [Required]#

Defines available options and validation rules for the init_params dictionary.

Note that init_params contains dataset-dependent required fields.

param hypertune_params: HypertuneParams [Optional]#

Defines available options and validation rules for the hypertune_params dictionary.

param model_params: ModelParams [Optional]#

Defines available options and validation rules for the model_params dictionary.

param loss_params: LossParams [Optional]#

Defines available options and validation rules for the loss_params dictionary.

param constraint_params: ConstraintParams [Optional]#

Defines available options and validation rules for the constraint_params dictionary.

param recon_params: ReconParams [Optional]#

Defines available options and validation rules for the recon_params dictionary.