evaluate_supersampled

hcipy.field.evaluate_supersampled(field_generator, grid, oversampling, statistic='mean', make_sparse=True)

Evaluate a Field generator on grid, with an oversampling.

Parameters:
field_generatorField generator or list of Field generators

The field generator to evaluate. If this is a list of Field generators, each Field generator will be evaluated and stored in a ModeBasis.

gridGrid

The grid on which to evaluate field_generator.

oversamplinginteger or scalar or ndarray

The factor by which to oversample. If this is a scalar, it will be rounded to the nearest integer. If this is an array, a different oversampling factor will be used for each dimension.

statisticstring

The statistic to compute (default is ‘mean’). The following statistics are available: * ‘mean’: compute the mean of values for points within each superpixel. * ‘sum’: compute the sum of values for points within each superpixel. This is identical to a weighted histogram. * ‘min’: compute the minimum of values for points within each superpixel. * ‘max’: compute the maximum of values for point within each superpixel.

make_sparseboolean

If the resulting ModeBasis needs to be sparsified. This is ignored if only a single Field generator is provided.

Returns:
Field or ModeBasis

The evaluated field or mode basis.