Package topo :: Package pattern :: Module random :: Class GaussianCloud
[hide private]
[frames] | no frames]

Class GaussianCloud

source code


Uniform random noise masked by a circular Gaussian.
Nested Classes [hide private]

Inherited from param.parameterized.Parameterized: __metaclass__

Instance Methods [hide private]
 
__call__(self, **params_to_override)
Call the subclass's 'function' method on a rotated and scaled coordinate system.
source code

Inherited from basic.Composite: function

Inherited from basic.Composite (private): _advance_pattern_generators

Inherited from param.parameterized.Parameterized: __getstate__, __init__, __repr__, __setstate__, __str__, debug, defaults, force_new_dynamic_value, get_param_values, get_value_generator, inspect_value, message, print_param_values, script_repr, set_default, set_dynamic_time_fn, set_param, state_pop, state_push, verbose, warning

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Methods [hide private]

Inherited from param.parameterized.Parameterized: params, print_param_defaults

Class Variables [hide private]
  operator = param.Parameter(numpy.multiply)
Binary Numpy function used to combine the individual patterns.
  gaussian_size = param.Number(default= 1.0, doc= "Size of the G...
Size of the Gaussian pattern.
  aspect_ratio = param.Number(default= 1.0, bounds= (0.0, None),...
Ratio of gaussian width to height; width is gaussian_size*aspect_ratio.
  name = <param.parameterized.String object at 0xb589b2c>
String identifier for this object.

Inherited from basic.Composite: generators, size

Inherited from base.patterngenerator.PatternGenerator: bounds, mask, mask_shape, offset, orientation, output_fns, position, scale, x, xdensity, y, ydensity

Inherited from param.parameterized.Parameterized: print_level

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__call__(self, **params_to_override)
(Call operator)

source code 

Call the subclass's 'function' method on a rotated and scaled coordinate system.

Creates and fills an array with the requested pattern. If called without any params, uses the values for the Parameters as currently set on the object. Otherwise, any params specified override those currently set on the object.

Overrides: base.patterngenerator.PatternGenerator.__call__
(inherited documentation)

Class Variable Details [hide private]

operator

Binary Numpy function used to combine the individual patterns.

Any binary Numpy array "ufunc" returning the same type of array as the operands and supporting the reduce operator is allowed here. Supported ufuncs include:

add
subtract
multiply
divide
maximum
minimum
remainder
power
logical_and
logical_or
logical_xor

The most useful ones are probably add and maximum, but there are uses for at least some of the others as well (e.g. to remove pieces of other patterns).

You can also write your own operators, by making a class that has a static method named "reduce" that returns an array of the same size and type as the arrays in the list. For example:

class return_first(object):
    @staticmethod
    def reduce(x):
        return x[0]
Value:
param.Parameter(numpy.multiply)

gaussian_size

Size of the Gaussian pattern.
Value:
param.Number(default= 1.0, doc= "Size of the Gaussian pattern.")

aspect_ratio

Ratio of gaussian width to height; width is gaussian_size*aspect_ratio.
Value:
param.Number(default= 1.0, bounds= (0.0, None), softbounds= (0.0, 2.0), precedence\
= 0.31, doc= """
        Ratio of gaussian width to height; width is gaussian_size*aspect_ratio."""\
)