jaxrts.plasmastate.PlasmaState.update_default_model
- PlasmaState.update_default_model(model_name: str, model_class: ABCMeta) None[source]
Add a model to the
PlasmaState, if it does not exist, already. If a new Model is appended to this state, issue a warning.This function is intended to be used by a
jaxrts.models.Modelif it relies on having other models set. An example would be models for ionic scattering, which normally require some notion for the form-factors, for which different models exist. To allow a user to get to some reasonable spectra fast, ajaxrts.models.Modelcan modify thePlasmaStateand set defaults. This should, however, be non-destructive, i.e., if a user specifically selected a value, this should not be overwritten. Hence, this convenience-function only adds the model if the givenmodel_nameis not in use, already and will inform a user about the automatically selected model.- Parameters:
model_name (str) – Key under that the model should be saved.
ABCMeta (model_class) – The ModelClass that should be a sane default.
- Warns:
Warning – If a default was set to inform a user about the “default choice”.
Examples
>> s.update_default_model(“form-factors”, PaulingFormFactors)