yt.data_objects.profiles.
create_profile
(data_source, bin_fields, fields, n_bins=64, extrema=None, logs=None, units=None, weight_field='cell_mass', accumulation=False, fractional=False, deposition='ngp')[source]¶Create a 1, 2, or 3D profile object.
The dimensionality of the profile object is chosen by the number of fields given in the bin_fields argument.
Parameters: | data_source : YTSelectionContainer Object
bin_fields : list of strings
fields : list of strings
n_bins : int or list of ints
extrema : dict of min, max tuples
logs : dict of boolean values
units : dict of strings
weight_field : str or tuple field identifier
accumulation : bool or list of bools
fractional : If True the profile values are divided by the sum of all
deposition : Controls the type of deposition used for ParticlePhasePlots.
|
---|
Examples
Create a 1d profile. Access bin field from profile.x and field data from profile[<field_name>].
>>> ds = load("DD0046/DD0046")
>>> ad = ds.h.all_data()
>>> profile = create_profile(ad, [("gas", "density")],
... [("gas", "temperature"),
... ("gas", "velocity_x")])
>>> print profile.x
>>> print profile["gas", "temperature"]