fiesta.disperse.Filament.correct_spine#

Filament.correct_spine(avg, sphere_radius, method='center of density', verbose=False, plot_correction=False, length_unit=Unit('cm'))[source]#

Function to correct the spine of a filament, based on source ArepoVoronoiGrid.

Since DisPerSE works on a regular cubic grid (i.e., ArepoCubicGrid) which has a finite resolution that washes over local overdensities, it can be useful to correct the spine of the filament, once identified on the coarser regular grid, using the original finer Voronoi grid.

The correction is made by querying all AREPO cells within a given sphere_radius of each sampling point, and then shifting the sampling point based on the method of correction.

Note that the filament must have scale='physical' to use this functionality. The function updates the samps and the filament function internally!

Variables:
  • avg (ArepoVoronoiGrid) – Source ArepoVoronoiGrid to use for correcting the spine.

  • sphere_radius (Quantity) – Spherical radius of correction for each sampling point.

  • method (str, optional) – Either 'max density' or 'center of density' (default). The former shifts the sampling point to the densest cell within the given spherical radius, while the latter calculates and shifts it to the center of density in the sphere.

  • verbose (bool, optional) – If True, prints output during spine correction. Default value is False.

  • plot_correction (bool, optional) – If True, plots filament before and after the spine correction. Useful for checks! Default value is False.

  • length_unit (Unit, optional) – The unit of length to use for the plot. Default value is u.cm.