PyMSES

Table Of Contents

Previous topic

Sources module

Next topic

Analysis module

This Page

Filters module

pymses.filters — Data sources filters package

class RegionFilter(region, source)

Bases: pymses.core.sources.SubsetFilter

Region Filter class. Filters the data contained in a given region of interest.

Parameters :

region : Region

region of interest

source : Source

data source

class PointFunctionFilter(mask_func, source)

Bases: pymses.core.sources.Filter

PointFunctionFilter class

Parameters :

mask_func : function

function evaluated to compute the data mask to apply

source : Source

PointDataset data source

class PointIdFilter(ids_to_keep, source)

Bases: pymses.core.sources.Filter

PointIdFilter class

Parameters :

ids_to_keep : list of int

list of the particle ids to pick up

source : Source

PointDataset data source

class PointRandomDecimatedFilter(fraction, source)

Bases: pymses.core.sources.Filter

PointRandomDecimatedFilter class

Parameters :

fraction : float

fraction of the data to keep

source : Source

PointDataset data source

class CellsToPoints(source, include_nonactive_cells=False, include_boundary_cells=False, include_split_cells=False, smallest_cell_level=None, remember_data=False, cache_dset={})

Bases: pymses.core.sources.Filter

AMR grid to cell list conversion filter Filters an AMR dataset and converts it into a point-based dataset

source:
AMR source
include_nonactive_cells (default False):
If True, the created PointDataset keeps non active cells (i.e. ghost cells)
include_boundary_cells (default False):
If True, boundary cells are included
include_split_cells (default False):
If True, the created PointDataset will include all points from intermediary AMR resolution level (i.e. cells that are refined). If False, only leaf cell values are converted (this save memory and computation time for cell_to_points splatting rendering)
smallest_cell_level integer (default None):
If not None, the cells that are too small (compared to this given level of resolution) are filtered.
remember_data : boolean (default False)
Option which uses a “self.cache_dset” dictionarry attribute as a cache to avoid reloading dset from disk. This uses a lot of memory as it currently remembers a active_mask by levelmax filtering for each (dataset, levelmax) couple
cache_dset : python dictionary (default {})
Cache dsets dictionnary reference, used only if remember_data == True, to share the same cache between various MapFFTProcessor. It is a dictionary of PointDatasets created with the CellsToPoints filter, referenced by [icpu, lmax] where icpu is the cpu number and lmax is the max AMR level used.
filtered_dset(dset)

Filters an AMR dataset and converts it into a point-based dataset

Returns :PointDataset source :
class SplitCells(source, info, particle_mass)

Bases: pymses.core.sources.Filter

Create point-based data from cell-based data by splitting the cell-mass into uniformly-distributed particles

filtered_dset(dset)

Split cell filtering method

Parameters :

dset : Dataset

Returns :

fdset : Dataset

filtered dataset

class ExtendedPointFilter(source, remember_data=False, cache_dset={})

Bases: pymses.core.sources.Filter

ExtendedParticleFilter class

filtered_dset(dset)

Filter a PointDataset and converts it into an IsotropicExtPointDataset with a given size for each point