model.ClusterModel.from_arrays#
- classmethod ClusterModel.from_arrays(fields, stellar_density=None, **kwargs)[source]#
Initialize the
model.ClusterModel
fromfields
alone.- Parameters:
fields (
dict
ofstr
:unyt.array.unyt_array
) –The fields from which to generate the model.
development note
The
fields
parameter must be self-consistent in its definition, and must contain aradius
key, from which the class assesses the number of elements.stellar_density (
radial_profiles.RadialProfile
, optional) – The stellar density component.kwargs – Additional attributes to pass through to the
model.ClusterModel.properties
attribute.
- Return type: