Package mvpa :: Package featsel :: Module helpers :: Class RangeElementSelector

[hide private]
[frames] | no frames]

# Class RangeElementSelector

source code

Select elements based on specified range of values

Nested Classes | [hide private]

Inherited from `misc.state.ClassWithCollections`: `__metaclass__`

Instance Methods | [hide private]

__init__(self, lower=None, upper=None, inclusive=False, mode='select', **kwargs) Initialization RangeElementSelector | source code

__call__(self, seq) Returns selected IDs. | source code

Inherited from `ElementSelector` (private): `_setMode` Inherited from `misc.state.ClassWithCollections`: `__getattribute__`, `__new__`, `__repr__`, `__setattr__`, `__str__`, `reset` Inherited from `object`: `__delattr__`, `__format__`, `__hash__`, `__reduce__`, `__reduce_ex__`, `__sizeof__`, `__subclasshook__`

Class Variables | [hide private]

Inherited from `ElementSelector`: `mode`, `ndiscarded` Inherited from `misc.state.ClassWithCollections`: `_DEV__doc__`, `descr`

Instance Variables | [hide private]

| __range Values on which to base selection

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, lower=None, upper=None, inclusive=False, mode='select', **kwargs)
(Constructor)

source code

Initialization RangeElementSelector

`upper` could be lower than `lower` -- then selection is done on values <= lower or >=upper (ie tails). This would produce the same result if called with flipped values for mode and inclusive.

If no upper no lower is set, assuming upper,lower=0, thus outputing non-0 elements

Parameters:
  - `lower` - If not None -- select elements which are above of specified value
  - `upper` - If not None -- select elements which are lower of specified value
  - `inclusive` - Either to include end points
  - `mode` - overrides parent's default to be 'select' since it is more native for RangeElementSelector XXX TODO -- unify??
Overrides: object.__init__

### __call__(self, seq)
(Call operator)

source code

Returns selected IDs.

Overrides: ElementSelector.__call__