Class: DataLayerProcessor
- Inherits:
-
Object
- Object
- DataLayerProcessor
- Defined in:
- lib/technical_graph/data_layer_processor.rb
Overview
Smooth data layer, approximate, ..
Constant Summary
Constants included from DataLayerProcessorNoiseRemoval
DataLayerProcessorNoiseRemoval::DEFAULT_NOISE_REMOVAL_LEVEL, DataLayerProcessorNoiseRemoval::DEFAULT_NOISE_REMOVAL_WINDOW_SIZE, DataLayerProcessorNoiseRemoval::NOISE_COEFF, DataLayerProcessorNoiseRemoval::NOISE_POWER_COEFF
Constants included from DataLayerProcessorSimpleSmoother
DataLayerProcessorSimpleSmoother::DEFAULT_GAUSS_COEFF, DataLayerProcessorSimpleSmoother::DEFAULT_SIMPLE_SMOOTHER_STRATEGY, DataLayerProcessorSimpleSmoother::MAX_SIMPLE_SMOOTHER_LEVEL, DataLayerProcessorSimpleSmoother::MIN_SIMPLE_SMOOTHER_LEVEL, DataLayerProcessorSimpleSmoother::PROCESS_WITH_PARAMETER_DISTANCE, DataLayerProcessorSimpleSmoother::SIMPLE_SMOOTHER_STRATEGIES
Instance Attribute Summary
Attributes included from DataLayerProcessorNoiseRemoval
#noise_removal, #noise_removal_level, #noise_removal_window_size, #noise_threshold
Attributes included from DataLayerProcessorSimpleSmoother
#gauss_coeff, #simple_smoother, #simple_smoother_level, #simple_smoother_strategy, #simple_smoother_x, #vector
Instance Method Summary collapse
-
#data ⇒ Object
Data from DataLayer, not raw data.
-
#data_params ⇒ Object
Additional layer parameters, processors options.
-
#initialize(data_layer) ⇒ DataLayerProcessor
constructor
A new instance of DataLayerProcessor.
- #logger ⇒ Object
- #process ⇒ Object
Methods included from DataLayerProcessorNoiseRemoval
#calc_avg_derivative, #noise?, #noise_removal_initialize, #noise_removal_process, #noise_removal_window_from, #noise_removal_window_to
Methods included from DataLayerProcessorSimpleSmoother
#generate_vector, #generate_vector_gauss, #generate_vector_rectangular, #make_mirror, #normalize_vector, #process_part, #process_part_only_x, #process_part_only_y, #simple_smoother_initialize, #simple_smoother_process
Constructor Details
#initialize(data_layer) ⇒ DataLayerProcessor
Returns a new instance of DataLayerProcessor.
16 17 18 19 20 |
# File 'lib/technical_graph/data_layer_processor.rb', line 16 def initialize(data_layer) @data_layer = data_layer simple_smoother_initialize(data_params) noise_removal_initialize(data_params) end |
Instance Method Details
#data ⇒ Object
Data from DataLayer, not raw data
28 29 30 |
# File 'lib/technical_graph/data_layer_processor.rb', line 28 def data @data_layer.processed_data end |
#data_params ⇒ Object
Additional layer parameters, processors options
23 24 25 |
# File 'lib/technical_graph/data_layer_processor.rb', line 23 def data_params @data_layer.data_params end |
#logger ⇒ Object
12 13 14 |
# File 'lib/technical_graph/data_layer_processor.rb', line 12 def logger @data_layer.logger end |
#process ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/technical_graph/data_layer_processor.rb', line 32 def process # before processing old processed data is overwritten by cloned raw data @data = data # update params before processing simple_smoother_initialize(data_params) noise_removal_initialize(data_params) noise_removal_process simple_smoother_process return @data end |