yt.lagos.BinnedProfile1D

class yt.lagos.BinnedProfile1D(data_source, n_bins, bin_field, lower_bound, upper_bound, log_space=True, lazy_reader=False, end_collect=False)

A ‘Profile’ produces either a weighted (or unweighted) average or a straight sum of a field in a bin defined by another field. In the case of a weighted average, we have: p_i = sum( w_i * v_i ) / sum(w_i)

We accept a data_source, which will be binned into n_bins by the field bin_field between the lower_bound and the upper_bound. These bins may or may not be equally divided in log_space, and the lazy_reader flag controls whether we use a memory conservative approach. If end_collect is True, take all values outside the given bounds and store them in the 0 and n_bins-1 values.

Methods

add_fields(fields[, weight, accumulation, ...]) We accept a list of fields which will be binned if weight is not
choose_bins(bin_style)
keys()
write_out(filename[, format, bin_style]) Write out data in ascii file, using format and
write_out_h5(filename[, group_prefix, bin_style]) Write out data in an hdf5 file filename.

Previous topic

yt.lagos.FcnSet

Next topic

yt.lagos.BinnedProfile1D.add_fields

This Page