|
TECA
The Toolkit for Extreme Climate Analysis
|
An algorithm that applies a convolution along the time axis. More...
#include <teca_time_axis_convolution.h>
Public Member Functions | |
| std::shared_ptr< teca_time_axis_convolution > | shared_from_this () |
| std::shared_ptr< teca_time_axis_convolution const > | shared_from_this () const |
| teca_time_axis_convolution (const teca_time_axis_convolution &src)=delete | |
| teca_time_axis_convolution (teca_time_axis_convolution &&src)=delete | |
| teca_time_axis_convolution & | operator= (const teca_time_axis_convolution &src)=delete |
| teca_time_axis_convolution & | operator= (teca_time_axis_convolution &&src)=delete |
| const char * | get_class_name () const override |
use_high_pass | |
When set the internally generated weights will be converted to a high_pass filter during weight generation. This option has no affect on user provided kernel weights. | |
| void | set_use_high_pass (const int &v) |
| const int & | get_use_high_pass () const |
kernel_width | |
The number of samples to use when generating kernel weights. This option has no affect on user provided kernel weights. | |
| void | set_kernel_width (const unsigned int &v) |
| const unsigned int & | get_kernel_width () const |
kernel_weights | |
Set the kernel weights explicitly. The number of weights defines the stencil width and must be odd for a centered stencil. | |
| size_t | get_number_of_kernel_weights () |
| void | append_kernel_weight (const double &v) |
| void | set_kernel_weight (const double &v) |
| void | set_kernel_weight (size_t i, const double &v) |
| void | set_kernel_weights (const std::vector< double > &v) |
| void | set_kernel_weights (const std::initializer_list< double > &&l) |
| const double & | get_kernel_weight (size_t i) const |
| const std::vector< double > & | get_kernel_weights () const |
| void | clear_kernel_weights () |
| int | set_constant_kernel_weights (unsigned int width) |
| generate constant convolution kernel weights with the given filter width More... | |
| int | set_gaussian_kernel_weights (unsigned int width, int high_pass=0, double a=1.0, double B=0.0, double c=0.55) |
| int | set_kernel_weights (const std::string &name, unsigned int width, int high_pass) |
kernel_name | |
set the name of the user provided kernel, or the kernel to generate. | |
| void | set_kernel_name (const std::string &v) |
| const std::string & | get_kernel_name () const |
variable_postfix | |
a string to be appended to the name of each output variable setting this to an empty string will result in the damped array replacing the input array in the output. default is an empty string "" | |
| void | set_variable_postfix (const std::string &v) |
| const std::string & | get_variable_postfix () const |
Public Member Functions inherited from teca_algorithm | |
| teca_algorithm (const teca_algorithm &src)=delete | |
| teca_algorithm (teca_algorithm &&src)=delete | |
| teca_algorithm & | operator= (const teca_algorithm &src)=delete |
| teca_algorithm & | operator= (teca_algorithm &&src)=delete |
| void | set_communicator (MPI_Comm comm) |
| MPI_Comm | get_communicator () |
| get the active communicator More... | |
| virtual teca_algorithm_output_port | get_output_port (unsigned int port=0) |
| void | set_input_connection (const teca_algorithm_output_port &port) |
| set an input to this algorithm More... | |
| virtual void | set_input_connection (unsigned int id, const teca_algorithm_output_port &port) |
| set an input to this algorithm More... | |
| virtual void | remove_input_connection (unsigned int id) |
| remove input connections More... | |
| void | clear_input_connections () |
| remove all input connections More... | |
| const_p_teca_dataset | get_output_data (unsigned int port=0) |
| void | pop_cache (unsigned int port=0, int top=0) |
| void | set_cache_size (unsigned int n) |
| set the cache size. the default is 1. (threadsafe) More... | |
| virtual int | update () |
| execute the pipeline from this instance up. More... | |
| virtual int | update (unsigned int port) |
| execute the pipeline from this instance up. More... | |
| virtual teca_metadata | update_metadata (unsigned int port=0) |
| get meta data considering this instance up. More... | |
| void | set_executive (p_teca_algorithm_executive exe) |
| set the executive More... | |
| p_teca_algorithm_executive | get_executive () |
| get the executive More... | |
| virtual void | to_stream (std::ostream &s) const |
| virtual void | from_stream (std::istream &s) |
| deserialize from the stream. More... | |
| void | set_verbose (const int &v) |
| const int & | get_verbose () const |
Static Public Member Functions | |
| static p_teca_time_axis_convolution | New () |
stencil_type | |
Select which time steps are convolved. The default stencil is backward. | |
| enum | { backward , centered , forward } |
| void | set_stencil_type (const int &v) |
| const int & | get_stencil_type () const |
| void | set_stencil_type_to_forward () |
| convolve with time steps after the active step More... | |
| void | set_stencil_type_to_backward () |
| convolve with time steps before the active step More... | |
| void | set_stencil_type_to_centered () |
| convolve with time steps centered on the active step More... | |
| int | set_stencil_type (const std::string &type) |
| set the stencil type from a string More... | |
| std::string | get_stencil_type_name () |
| get the stencil as a string More... | |
Additional Inherited Members | |
Protected Member Functions inherited from teca_algorithm | |
| void | set_number_of_input_connections (unsigned int n) |
| void | set_number_of_output_ports (unsigned int n) |
| virtual void | set_modified () |
| void | set_modified (unsigned int port) |
| an overload to set_modified by port More... | |
| virtual teca_metadata | get_cache_key (unsigned int port, const teca_metadata &request) const |
| virtual teca_metadata | get_output_metadata (teca_algorithm_output_port ¤t) |
| virtual const_p_teca_dataset | request_data (teca_algorithm_output_port &port, const teca_metadata &request) |
| virtual int | validate_cache (teca_algorithm_output_port ¤t) |
| virtual void | clear_modified (teca_algorithm_output_port current) |
| const_p_teca_dataset | get_output_data (unsigned int port, const teca_metadata &request) |
| int | cache_output_data (unsigned int port, const teca_metadata &request, const_p_teca_dataset &data) |
| void | clear_cache (unsigned int port) |
| clear the cache on the given output port More... | |
| unsigned int | get_number_of_input_connections () |
| get the number of input connections More... | |
| teca_algorithm_output_port & | get_input_connection (unsigned int i) |
| void | clear_modified (unsigned int port) |
| clear the modified flag on the i'th output More... | |
| int | get_modified (unsigned int port) const |
| return the output port's modified flag value More... | |
Protected Attributes inherited from teca_algorithm | |
| int | verbose |
An algorithm that applies a convolution along the time axis.
Supports constant, Gaussian, and explicitly provided convolution kernels of arbitrary width applied over forward, backward, or centered stencils.
A number of options are provided for specifying kernel weights.
| anonymous enum |
|
inline |
append to the kernel_weight algorithm vector property
|
inline |
clear the kernel_weight algorithm vector property
|
inlineoverridevirtual |
returns the name of the class
Implements teca_algorithm.
|
inline |
Get the value of the kernel_name algorithm property
|
inline |
get the i-th element of the kernel_weight algorithm vector property
|
inline |
get the kernel_weight algorithm vector property
|
inline |
Get the value of the kernel_width algorithm property
|
inline |
get the size of the kernel_weight algorithm vector property
|
inline |
Get the value of the stencil_type algorithm property
| std::string teca_time_axis_convolution::get_stencil_type_name | ( | ) |
get the stencil as a string
|
inline |
Get the value of the use_high_pass algorithm property
|
inline |
Get the value of the variable_postfix algorithm property
|
inlinestatic |
Returns an instance of teca_time_axis_convolution
| int teca_time_axis_convolution::set_constant_kernel_weights | ( | unsigned int | width | ) |
generate constant convolution kernel weights with the given filter width
| int teca_time_axis_convolution::set_gaussian_kernel_weights | ( | unsigned int | width, |
| int | high_pass = 0, |
||
| double | a = 1.0, |
||
| double | B = 0.0, |
||
| double | c = 0.55 |
||
| ) |
generate Gaussian convolution kernel weights with the given filter width.
| [in] | width | the number of samples in the generated kernel |
| [in] | high_pass | transform the weights for use in a high pass filter. |
| [in] | a | peak height of the Gaussian |
| [in] | B | center of the Gaussian (note coordinates range from -1 to 1. |
| [in] | c | width of the Gaussian |
|
inline |
Set the value of the kernel_name algorithm property
|
inline |
set the kernel_weight algorithm vector property to a single value
|
inline |
set the i-th element of the kernel_weight algorithm vector property
|
inline |
set the kernel_weight algorithm vector property
| int teca_time_axis_convolution::set_kernel_weights | ( | const std::string & | name, |
| unsigned int | width, | ||
| int | high_pass | ||
| ) |
set the kernel weights from a string name the kernel type. Default kernel weight generator parameters are used.
| [in] | name | the name of the kernel to generate. (gaussian, or constant) |
| [in] | width | the width of the kernel. |
| [in] | high_pass | convert the weights for use as a high pass filter. |
|
inline |
set the kernel_weight algorithm vector property
|
inline |
Set the value of the kernel_width algorithm property
|
inline |
Set the value of the stencil_type algorithm property
| int teca_time_axis_convolution::set_stencil_type | ( | const std::string & | type | ) |
set the stencil type from a string
|
inline |
convolve with time steps before the active step
|
inline |
convolve with time steps centered on the active step
|
inline |
convolve with time steps after the active step
|
inline |
Set the value of the use_high_pass algorithm property
|
inline |
Set the value of the variable_postfix algorithm property
|
inline |
Enables the static constructor
|
inline |
Enables the static constructor