fiesta.disperse.Filament.characterize_filament#
- Filament.characterize_filament(avg, cylinder_radius, npoints=None, verbose=False, plot_filament=False, length_unit=Unit('cm'))[source]#
Function to query all simulation cells around the filament, based on source
ArepoVoronoiGrid
.The function splits the filament into equidistant
npoints
, joining them by cylinders of radiuscylinder_radius
. All AREPO cells within these cylinders are considered “part” of the filament. The indices of the cells are then stored as the instance variablearepo_ids
, and thecylinder_radius
sets the instance variableradius
.Note that double-counting is not corrected for in the indices. In order to do this, try
np.unique(np.hstack(arepo_ids))
.- Variables:
avg (
ArepoVoronoiGrid
) – SourceArepoVoronoiGrid
to use for characterizing the filament.cylinder_radius (
float
orQuantity
) – Radius of cylinder to query AREPO cells within. If not aQuantity
, assumed to be inu.cm
units.npoints (
int
, optional) – Number of points to split the filament into. IfNone
(default), then the sampling pointssamps
are used.verbose (
bool
, optional) – IfTrue
, prints output during filament characterization. Default value isFalse
.plot_filament (
bool
, optional) – IfTrue
, plots the filament along with all its AREPO cells Useful for checks! Default value isFalse
.length_unit (
Unit
, optional) – The unit of length to use for the plot. Default value isu.cm
.