cluster_collections.ProtoCluster.__init__#
- ProtoCluster.__init__(profiles, parameters, names, load_method)[source]#
Loads the
ProtoCluster
instance.- Parameters:
profiles (
dict
ofstr
:callable
ordict
ofstr
:str
) –A dictionary containing the profile definitions for the cluster initialization. There are two available options for the formatting of each element in this argument:
If the dictionary value is a
str
type, then it is assumed to be a pre-defined profile already defined in thecluster_generator.radial_profiles
module. If a corresponding built-in profile cannot be found, an error will be raised.If the dictionary value is a
callable
instance of any kind, it is assumed to be a user defined function (either explicit or lambda). It will be wrapped in acluster_generator.radial_profiles.RadialProfile
instance during initialization.
parameters (
dict
ofstr
:list
) –A dictionary containing the parameters for the profiles. For each profile in
profiles
, there should be a corresponding key-value pair in theparameters
argument containing alist
with the values of each of the necessary parameters for the specific cluster being modeled.Note
If the type of the elements in the list is
float
orint
, then it will be assumed that these parameters are already following the unit conventions of the CGP. If there is any doubt, we recommend passing the parameters asunyt.array.unyt_quantity
instances instead. These will be processed to the correct units before proceeding.load_method (
str
) – Theload_method
should correspond to the analogous class method onmodel.ClusterModel
for loading the full model instance. Typically, these should be something likefrom_dens_and_temp
orfrom_dens_and_tden
.