qspec logo qspec logo

A physics toolbox for laser spectroscopy.

Static Badge Static Badge Static Badge

Static Badge Static Badge

© 2026 Patrick Müller. All rights reserved.

qspec.models. find_models  (  model ,  sub_model ,  model_list=None  )[source]

Find the first submodel of a given type in every branch of a model. The branches are the submodels of Listed models.

Parameters:
model_base.Model | None

The model to search in.

sub_modeltype[T]

The type of the submodels to find.

model_listIterable[T] | None

A list of models to append the found submodels to.

Returns:
subslist[T]

The first submodels of type sub_model of every branch in model, appended to model_list. Branches without a submodel of type sub_model are skipped.