mmspy.compute.particle.grid.ParticleGrid#

class mmspy.compute.particle.grid.ParticleGrid(name, center, log_scale=False, index=None)#

Dataclass for the support of the distribution function.

__init__(name, center, log_scale=False, index=None)#

Method generated by attrs for class ParticleGrid.

Methods

__init__(name, center[, log_scale, index])

Method generated by attrs for class ParticleGrid.

check_dimension()

Ensure the grid is 1D and has at least 2 grid points.

check_units()

Check the units of the grid center and return a valid unit.

to_log()

Attributes

name

center

log_scale

index

edge

Grid edges including the left-most and right-most boundaries.

log_center

Base-10 logarithm of the grid center, respecting signs.

size

Size of the grid.

units

Units of the grid.