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_model  (  model ,  sub_model  )[source]

Find the first submodel of a given type. For Listed models, only the first branch is searched.

Parameters:
model_base.Model | None

The model to search in.

sub_modeltype[T]

The type of the submodel to find.

Returns:
subT | None

The first submodel of type sub_model. If model already has the type sub_model, model is returned. Returns None if model has no submodel of type sub_model.