6#ifndef ARCHIVIATORE_ASSETS_H
7#define ARCHIVIATORE_ASSETS_H
45 log4c_category_t* logging_category;
47 const Site* conf_site;
54 mutable H5::H5File* outfile_devel_data;
80 void configure(
const char* site, time_t acq_time);
131 double read_file_hray(std::function<
void (
unsigned el,
unsigned bin,
double value)> on_sample);
138 double read_file_hray_inf(std::function<
void (
unsigned el,
unsigned bin,
double value)> on_sample);
203 bool read_vpr0(radarelab::algo::VPR& vpr0);
221 void write_vpr0(
const radarelab::algo::VPR& vpr);
289 RadarSite getRadarSite();
double read_file_hray_inf(std::function< void(unsigned el, unsigned bin, double value)> on_sample)
Read the hray file, calling a callback on each parsed value.
Assets(const Config &cfg)
Constructor.
void load_first_level_bb_bloc(radarelab::Matrix2D< unsigned char > &matrix)
Open the first level elevation BB bloc file.
std::string fname_from_acq_time() const
Build a basename (without extension) for a file given the current acquisition time.
void write_vpr0(const radarelab::algo::VPR &vpr)
Write in $VPR0_FILE the vpr calculated.
bool read_0term(float &zeroterm)
Read $FILE_ZERO_TERMICO.
void write_subimage(const radarelab::Matrix2D< unsigned char > &image, unsigned image_side, const char *dir_env_var, const char *ext, const char *desc)
Write an image in a raw file in ${dir_env_var}, with the acquisition date as file name and the given ...
bool save_acq_time(time_t acq_time=0)
Save acq_time in $LAST_FILE, comparing it with the previous value.
double read_file_hray(std::function< void(unsigned el, unsigned bin, double value)> on_sample)
Read the hray file, calling a callback on each parsed value.
void write_vpr_hmax(int hvprmax)
write in $VPR_HMAX the vpr peak's height.
void load_dem(radarelab::Matrix2D< float > &matrix)
Open the dem file.
H5::H5File get_devel_data_output() const
Return an open HDF5 File ( $DIR_QUALITY/devel-data.h5) to which we can write datasets used to debug r...
void load_raw(const std::string &fname, const char *desc, radarelab::Matrix2D< T > &matrix)
Load a Matrix2D, from packed row-major binary data.
void load_ascii(const std::string &fname, const char *desc, radarelab::Matrix2D< float > &matrix)
Load a Matrix2D, from space-separated column-major ascii floats.
bool read_archived_vpr(const radarelab::algo::DBZ &dbz, time_t time, radarelab::algo::VPR &vpr)
Try to read the archived VPR at time time.
bool read_vpr0(radarelab::algo::VPR &vpr0)
Read in $VPR0_FILE the last vpr available.
void write_image(const radarelab::Matrix2D< unsigned char > &image, const char *dir_env_var, const char *ext, const char *desc)
Write an image in a raw file in ${dir_env_var}, with the acquisition date as file name and the given ...
void configure(const Site &site, time_t acq_time)
Configure asset lookup with the given details.
float read_t_ground() const
fornisce temperatura al suolo, da lettura file esterno
void write_vpr_heating(int value) const
Write a new value to $VPR_HEATING (counter of consecutive vpr calculated, see scientific documentatio...
void write_gdal_image(const radarelab::Matrix2D< T > &image, const char *dir_env_var, const char *name, const char *format)
Write a graphic image with gdal.
long int read_profile_gap() const
Read the gap between the time in $LAST_VPR and the current acquisition time.
void write_dbz_coefficients(const radarelab::algo::DBZ &dbz)
Write in $OUTPUT_Z_LOWRIS_DIR/MP_coeff the MP coefficients.
bool find_vpr0(const radarelab::algo::DBZ &dbz, radarelab::algo::VPR &vpr0, long int &gap)
Read the gap and the vpr0, and if vpr0 is not found, look it up among the archived VPRs.
void write_subimage(const radarelab::Matrix2D< unsigned char > &image, unsigned image_side, std::string algos, const char *dir_env_var, const char *ext, const char *desc)
Write an image in a raw file in ${dir_env_var}, with the acquisition date as file name and the given ...
void load_first_level(radarelab::Matrix2D< unsigned char > &matrix)
Open the first level file.
void load_first_level_bb_el(radarelab::Matrix2D< unsigned char > &matrix)
Open the first level elevation BB el file.
int read_vpr_heating() const
Read the value of $VPR_HEATING (counter of consecutive vpr calculated, see scientific documentation)
std::string fname_out_pp_bloc(const char *suffix) const
Compute the file name of a date/time based file in $DIR_OUT_PP_BLOC.
int read_vpr_hmax()
Read in $VPR_HMAX the vpr peak's height.
void write_last_vpr()
Write the acquisition time in $LAST_VPR file.
Class to manage reflectivity functions (simply attenuation correction, conversion between Z,...
name space generale del programma
Base for all matrices we use, since we rely on row-major data.