window_func

Module: missions.nodes.preprocessing.window_func

Multiply a signal with a window

Inheritance diagram for pySPACE.missions.nodes.preprocessing.window_func:

Inheritance diagram of pySPACE.missions.nodes.preprocessing.window_func

Class Summary

InvalidWindowException
WindowFuncNode(window_function_str[, ...]) Multiply the TimeSeries with a window
ScaleNode([factor]) Scale all value by a constant factor

Classes

InvalidWindowException

class pySPACE.missions.nodes.preprocessing.window_func.InvalidWindowException[source]

Bases: exceptions.Exception

__weakref__

list of weak references to the object (if defined)

WindowFuncNode

class pySPACE.missions.nodes.preprocessing.window_func.WindowFuncNode(window_function_str, reduce_window=False, **kwargs)[source]

Bases: pySPACE.missions.nodes.base_node.BaseNode

Multiply the TimeSeries with a window

If the window has trailing zeros, the time series is chopped.

Parameters
window_function_str:
 

This string has to be either the name of a function specified in functions.yaml or a lambda expression that evaluates to a valid window function. Such a window function has to be of the form lambda n: lambda x: something where n is the number of samples (the length of the window function) and x is the respective value.

reduce_window:

If True, zeros at the beginning or ending are chopped.

(optional, default: False)

Exemplary call

-
    node : Windowing
    parameters : 
        window_function_str : "hanning" # loaded from functions.yaml
Author:

Jan Hendrik Metzen (jhm@informatik.uni-bremen.de)

Created:

2008/09/01

Revised:

2009/09/15 (Mario Krell)

POSSIBLE NODE NAMES:
 
  • WindowFunc
  • Windowing
  • WindowFuncNode
POSSIBLE INPUT TYPES:
 
  • TimeSeries

Class Components Summary

_execute(data) Apply the windowing to the given data and return the result
create_window_array() Create a permanent array for the windowing of the data
input_types
__init__(window_function_str, reduce_window=False, **kwargs)[source]
create_window_array()[source]

Create a permanent array for the windowing of the data

_execute(data)[source]

Apply the windowing to the given data and return the result

input_types = ['TimeSeries']

ScaleNode

class pySPACE.missions.nodes.preprocessing.window_func.ScaleNode(factor=1, **kwargs)[source]

Bases: pySPACE.missions.nodes.base_node.BaseNode

Scale all value by a constant factor

Scales (i.e. multiplies) all values with a given factor.

Parameters

factor:The factor

Exemplary Call

-
    node : Scale
    parameters :
        factor : 2
Authors:

Hendrik Woehrle (hendrik.woehrle@dfki.de)

Created:

2013/03/08

POSSIBLE NODE NAMES:
 
  • Scale
  • ScaleNode
POSSIBLE INPUT TYPES:
 
  • TimeSeries

Class Components Summary

_execute(data) Apply the scaling to the given data x and return a new time series.
input_types
input_types = ['TimeSeries']
__init__(factor=1, **kwargs)[source]
_execute(data)[source]

Apply the scaling to the given data x and return a new time series.