|
Tool for selecting data for next command(s), based on paths, quantities and elevations. More...
Public Member Functions | |
void | exec () const |
Run the command with current parameter values. | |
Public Member Functions inherited from SimpleCommand< std::string > | |
SimpleCommand (const std::string &name, const std::string &description, const std::string &key="value", const std::string &initValue=std::string(), const std::string &unit="") | |
SimpleCommand (const std::string &name, const std::string &description, const std::string &key, std::initializer_list< S > l, const std::string &unit="") | |
Constuctor designer for SimpleCommand<Unituple<> > . | |
SimpleCommand (const SimpleCommand &cmd) | |
Public Member Functions inherited from BasicCommand | |
BasicCommand (const std::string &name, const std::string &description) | |
BasicCommand (const BasicCommand &cmd) | |
Public Member Functions inherited from BeanCommand< BeanLike > | |
BeanCommand (const std::string &name, const std::string &description) | |
BeanCommand (const BeanCommand &cmd) | |
BeanCommand (BeanLike &b) | |
virtual const bean_t & | getBean () const |
virtual bean_t & | getBean () |
const std::string & | getName () const final |
const std::string & | getDescription () const final |
virtual const drain::ReferenceMap & | getParameters () const final |
Public Member Functions inherited from Command | |
Command (const Command &cmd) | |
virtual void | setParameters (const std::string &args) final |
template<class T > | |
void | setParameters (const SmartMap< T > &args) |
template<class T > | |
void | setParameter (const std::string &key, const T &value) |
Set a value to a single parameter. More... | |
Command & | addSection (drain::Flagger::ivalue_t i) |
virtual void | update () |
Optional method for preparing command to execution. More... | |
bool | hasParameters () const |
virtual const std::string & | getType () const |
Description of result, comparable to a return type of a function. ? | |
virtual void | run (const std::string ¶ms="") |
Convenience. Sets parameters and executes the command. More... | |
const std::string & | getLastParameters () const |
After executing this command run a routine, if defined. More... | |
Public Member Functions inherited from Contextual | |
Contextual () | |
Sets internal contextPtr to NULL. | |
Contextual (const Contextual &src) | |
Copies base context (even null) of the source. Notice that the actual instance may be of derived class. | |
Contextual (Context &ctx) | |
Copies internal contextPtr. | |
template<class C > | |
void | setContext () |
Sets internal contextPtr to the static source. | |
void | setExternalContext (Context &ctx) |
Sets internal contextPtr to outside target. | |
bool | contextIsSet () const |
True, if contextPtr has been set. | |
template<class T = Context> | |
T & | getContext () const |
If context has been set, returns it through a cast to base class Context. More... | |
Protected Attributes | |
DataSelector | mySelector |
Protected Attributes inherited from Command | |
std::string | lastParameters |
Protected Attributes inherited from Contextual | |
Context * | contextPtr |
Static Protected Attributes | |
static const std::map< std::string, std::string > | transTable = {{",", "|"}, {"*",".*"}, {"?","."}} |
Additional Inherited Members | |
Public Types inherited from BeanCommand< BeanLike > | |
typedef BeanLike | bean_t |
Static Public Member Functions inherited from Contextual | |
template<class T > | |
static Cloner< Context, T > & | getCloner () |
Public Attributes inherited from SimpleCommand< std::string > | |
std::string | value |
Public Attributes inherited from BeanCommand< BeanLike > | |
BeanLike | bean |
Public Attributes inherited from Command | |
int | section = 1 |
Static Public Attributes inherited from Command | |
static const SprinterLayout | cmdArgLayout = {",", "?", "=", ""} |
Protected Member Functions inherited from BeanCommand< BeanLike > | |
virtual drain::ReferenceMap & | getParameters () final |
Tool for selecting data for next command(s), based on paths, quantities and elevations.
Most commands apply implicit input data selection criteria, typically involving data paths, quantities and/or elevation angles.
Like in general in Rack, the parameters of –select
are positional (ordered), meaning that they can be issued as a comma-separated string without explicit names (keywords), as long as they are given in order. The parameters are:
path
is a string of path elements, separated by slash '/' and consisting of:what
, where
, how
- ie. the groups containing attributes dataset{min}:{max}
, data{min}:{max}
, quality{min}:{max}
- indexed groups containing subgroups for actual data and attributesdata
- unindexed groups containing actual data arrayswhat|where|dataset1:3
data:
equals data1:65535
; further the colon ':' can be omitted for dataset
and quality
(but not for data:
, to bypass naming conflict inherent in ODIM )data{index}
equals data{index}:{index}
(ie. exact match)data{index}:
equals data{index}:65535
data:{index}
equals data1:{index}
what|data|quality1:5
matches what
, data1:5
and quality1:5
what|where|dataset1:3/what|data1:8
– index ranges can vary on different levels, ie. in slash-separated elementsquantity
is a regular expression^DBZH$
, accepting DBZH
only(DBZH|TH)
accepts DBZH
and TH
, but also DBZHC
and WIDTH
...elangle
defines the range of antenna elevations accepted, range limits includedelangle={angle}
abbreviates elangle={angle}:90
(not elangle={angle}:{angle}
)count=1
to pick a single one within a rangecount
is the upper limit of accepted indices of dataset
; typically used with elangle
order
defines criteria
(DATA|TIME|ELANGLE) and operation
(MIN|MAX) in selecting data, applied with count
. Note that the lowest elevations can be measured the latest, appearing as dataset
's with highest indices.dualPRF
determines if sweeps using dual pulse repetition frequency is required (1), accepted like single one (0), or excluded (-1).The selection functionality is best explained with examples.
Note that escaping special characters like '|' is often required on command line.
Often, the first data array matching the criteria are used.
One can explicitly change the criteria with –select
(-s
) command . For example, in data conversions one may wish to focus on certain quantity – like DBZH
or VRAD
– not all the data.
The selection command can be applied the most commands processing data. In computing meteorological products (Product generation) an compositing, it affects the following product only. In case of anomaly detectors (Anomaly Detection and Removal (AnDRe)), it applies to all subsequent operators.
Note that some processing commands may not support explicit data selection. Set selection criteria strictly to one quantity
. Selecting quantities only is frequently needed, so there is a dedicated command –selectQuantity
(-Q
) which accepts comma-separated simple patterns (with * and ?) instead of regular expressions. For example, -Q
DBZH*
,QIND is equal to –select
quantity='^
(DBZH.*|QIND)$' .