Particle filters

Filter particles to produce SubSnaps.

plonk.analysis.filters.annulus(snap, radius_min, radius_max, height, center=<Quantity([0 0 0], 'astronomical_unit')>)

Particles within an annulus.

Parameters
  • snap (Union[plonk.snap.snap.Snap, plonk.snap.snap.SubSnap]) – The Snap object.

  • radius_min (pint.quantity.build_quantity_class.<locals>.Quantity) – The inner radius of the annulus.

  • radius_max (pint.quantity.build_quantity_class.<locals>.Quantity) – The outer radius of the annulus.

  • height (pint.quantity.build_quantity_class.<locals>.Quantity) – The height of the annulus.

  • center (optional) – The center of the annulus as a Quantity like (x, y, z) * au. Default is (0, 0, 0).

Returns

The SubSnap with particles in the annulus.

Return type

SubSnap

plonk.analysis.filters.box(snap, xwidth, ywidth, zwidth, center=<Quantity([0 0 0], 'astronomical_unit')>)

Particles within a box.

Parameters
  • snap (Union[plonk.snap.snap.Snap, plonk.snap.snap.SubSnap]) – The Snap object.

  • xwidth (pint.quantity.build_quantity_class.<locals>.Quantity) – The x-width of the box.

  • ywidth (pint.quantity.build_quantity_class.<locals>.Quantity) – The y-width of the box.

  • zwidth (pint.quantity.build_quantity_class.<locals>.Quantity) – The z-width of the box.

  • center (optional) – The center of the box as a Quantity like (x, y, z) * au. Default is (0, 0, 0).

Returns

The SubSnap with particles in the box.

Return type

SubSnap

plonk.analysis.filters.cylinder(snap, radius, height, center=<Quantity([0 0 0], 'astronomical_unit')>)

Particles within a cylinder.

Parameters
  • snap (Union[plonk.snap.snap.Snap, plonk.snap.snap.SubSnap]) – The Snap object.

  • radius (pint.quantity.build_quantity_class.<locals>.Quantity) – The radius of the cylinder.

  • height (pint.quantity.build_quantity_class.<locals>.Quantity) – The height of the cylinder.

  • center (optional) – The center of the cylinder as a Quantity like (x, y, z) * au. Default is (0, 0, 0).

Returns

The SubSnap with particles in the cylinder.

Return type

SubSnap

plonk.analysis.filters.shell(snap, radius_min, radius_max, center=<Quantity([0 0 0], 'astronomical_unit')>)

Particles within a spherical shell.

Parameters
  • snap (Union[plonk.snap.snap.Snap, plonk.snap.snap.SubSnap]) – The Snap object.

  • radius_min (pint.quantity.build_quantity_class.<locals>.Quantity) – The inner radius of the shell.

  • radius_max (pint.quantity.build_quantity_class.<locals>.Quantity) – The outer radius of the shell.

  • center (optional) – The center of the shell as a Quantity like (x, y, z) * au. Default is (0, 0, 0).

Returns

The SubSnap with particles in the shell.

Return type

SubSnap

plonk.analysis.filters.sphere(snap, radius, center=<Quantity([0 0 0], 'astronomical_unit')>)

Particles within a sphere.

Parameters
  • snap (Union[plonk.snap.snap.Snap, plonk.snap.snap.SubSnap]) – The Snap object.

  • radius (pint.quantity.build_quantity_class.<locals>.Quantity) – The radius of the sphere.

  • center (optional) – The center of the sphere as a Quantity like (x, y, z) * au. Default is (0, 0, 0).

Returns

The SubSnap with particles in the sphere.

Return type

SubSnap