46 #include "drain/util/ReferenceMap.h"
52 #include "data/DataSelector.h"
53 #include "data/Data.h"
54 #include "data/ODIM.h"
55 #include "data/ODIMPathTools.h"
56 #include "data/Quantity.h"
58 #include "hi5/Hi5Write.h"
61 #include "ProductOp.h"
125 mout.
debug(
"start" );
127 mout.
debug2(
"DataSelector: " , this->dataSelector );
133 mout.debug3(
"collect the applicable paths" );
134 ODIMPathList dataPaths;
137 this->dataSelector.getPaths(src, dataPaths);
139 if (dataPaths.empty()){
140 mout.
warn(
"no dataset's selected" );
143 mout.debug3(
"populate the dataset map, paths=" , dataPaths.size() );
153 mout.
warn(
"odd 1st path elem (..), with selector: ", this->dataSelector);
161 mout.
warn(
"path does not start with /dataset.. :", path,
", with selector: ", this->dataSelector);
166 const Hi5Tree & srcDataSet = src(parent);
172 ODIM odd(srcDataSet.data.image);
176 std::string datetime = odd.startdate + odd.starttime;
179 mout.
attention<LOG_DEBUG>(extraInfo.startdate,
'+', extraInfo.starttime,
" ?== ", datetime,
" < ", extraInfo.enddate,
'+', extraInfo.endtime);
181 if (sweeps.find(datetime) == sweeps.end()){
182 mout.
debug2(
"adding time=", datetime,
':', parent);
223 if (!dst.empty() && (&src != &dst)){
224 mout.info(
"clearing previous result, use --append [data|dataset] to avoid");
230 mout.
warn(
"non-standard path location '", dataSetPath,
"', consider --help append ");
237 mout.
debug(
"storing product in path: ", dataSetPath);
249 Hi5Tree & dstDataSet = dst[dataSetPath];
252 this->computeSingleProduct(sweeps, dstProductDataset);
255 ProductBase::setRackVersion(how);
256 if (!dstProductDataset.empty()){
258 how[
"angles"] = dstProductDataset.getFirstData().odim.angles;
264 mout.revised(
"check DataSet metadata");
268 dst[group].data.attributes = src[group].data.attributes;
272 rootWhat[
"object"] = this->odim.object;
273 rootWhat[
"version"] = this->odim.version;
284 if (ODIM::versionFlagger.isSet(ODIM::RACK_EXTENSIONS)){
286 std::stringstream sstr;
289 for (
const std::string & key: params.
getKeyList()){
296 sstr << key <<
'=' << params[key];
LogSourc e is the means for a function or any program segment to "connect" to a Log.
Definition: Log.h:310
Logger & attention(const TT &... args)
Possible error, but execution can continue. Special type of Logger::warn().
Definition: Log.h:474
Logger & warn(const TT &... args)
Possible error, but execution can continue.
Definition: Log.h:428
Logger & debug(const TT &... args)
Public, yet typically used "internally", when TIMING=true.
Definition: Log.h:678
Logger & debug2(const TT &... args)
Debug information.
Definition: Log.h:688
Definition: ReferenceMap.h:207
virtual const keylist_t & getKeyList() const
Derived versions may produce an ordered set of keys.
Definition: SmartMap.h:200
A map of Variables.
Definition: VariableMap.h:61
Computes dot product of intensities of two images.
Definition: PixelVectorOp.h:364
A map of radar data, indexed by quantity code (DBZH, VRAD, etc).
Definition: Data.h:1213
Definition: ODIMPath.h:82
static const group_t WHAT
Metadata group /what , at any depth.
Definition: ODIMPath.h:127
static const group_t DATASET
First level group, /dataset + digit .
Definition: ODIMPath.h:106
bool is(group_t g) const
Abbreviation of (group == NONE)
Definition: ODIMPath.h:294
static const group_t ROOT
Definition: ODIMPath.h:102
static const group_t HOW
Metadata group /how , at any depth.
Definition: ODIMPath.h:133
unsigned int group_t
In H5, "groups" correspond to directories or folders in file system.
Definition: ODIMPath.h:92
static const group_t DATA
Second level group, /data + digit .
Definition: ODIMPath.h:109
static const group_t WHERE
Metadata group /where , at any depth.
Definition: ODIMPath.h:130
ODIM metadata (quantity, gain, offset, undetect, nodata, date, time)
Definition: ODIM.h:79
virtual void updateLenient(const ODIM &odim)
Updates object, quantity, product and time information.
Definition: ODIM.cpp:290
ODIMPathElem appendResults
If set, appends outputs in an hdf5 structure instead of overwriting.
Definition: ProductConf.h:93
Base class for radar data processors.
Definition: VolumeOp.h:88
virtual Hi5Tree & processVolume(const Hi5Tree &src, Hi5Tree &dst) const final
Traverse through given volume and create new, processed data (volume or polar product).
Definition: VolumeOp.h:121
Namespace for images and image processing tools.
Definition: AccumulationArray.cpp:45
Definition: DataSelector.cpp:44