ocssw
V2022
|
Interpolation.hpp
Go to the documentation of this file.
33 typedef double (*interpolation_method2D)(double *x, double *y, size_t n, size_t ix, size_t iy, double *lut,
40 double bilinear2D(double *x, double *y, size_t n, size_t ix, size_t iy, double *lut, double x0, double y0);
64 EXIT_LOG(std::cerr << "--Error--: size of the time vector and interpolatros vector are different. ")
116 std::transform(x, x + x_grid.size(), x_grid.begin(), [](U var) { return static_cast<double>(var); });
117 std::transform(y, y + y_grid.size(), y_grid.begin(), [](U var) { return static_cast<double>(var); });
an array had not been initialized Several spelling and grammar corrections were which is read from the appropriate MCF the above metadata values were hard coded A problem calculating the average background DN for SWIR bands when the moon is in the space view port was corrected The new algorithm used to calculate the average background DN for all reflective bands when the moon is in the space view port is now the same as the algorithm employed by the thermal bands For non SWIR changes in the averages are typically less than Also for non SWIR the black body DNs remain a backup in case the SV DNs are not available For SWIR the changes in computed averages were larger because the old which used the black body suffered from contamination by the micron leak As a consequence of the if SV DNs are not available for the SWIR the EV pixels will not be the granule time is used to identify the appropriate tables within the set given for one LUT the first two or last two tables respectively will be used for the interpolation If there is only one LUT in the set of it will be treated as a constant LUT The manner in which Earth View data is checked for saturation was changed Previously the raw Earth View DNs and Space View DNs were checked against the lookup table values contained in the table dn_sat The change made is to check the raw Earth and Space View DNs to be sure they are less than the maximum saturation value and to check the Space View subtracted Earth View dns against a set of values contained in the new lookup table dn_sat_ev The metadata configuration and ASSOCIATEDINSTRUMENTSHORTNAME from the MOD02HKM product The same metatdata with extensions and were removed from the MOD021KM and MOD02OBC products ASSOCIATEDSENSORSHORTNAME was set to MODIS in all products These changes are reflected in new File Specification which users may consult for exact the pow functions were eliminated in Emissive_Cal and Emissive bands replaced by more efficient code Other calculations throughout the code were also made more efficient Aside from a few round off there was no difference to the product The CPU time decreased by about for a day case and for a night case A minor bug in calculating the uncertainty index for emissive bands was corrected The frame index(0-based) was previously being used the frame number(1-based) should have been used. There were only a few minor changes to the uncertainty index(maximum of 1 digit). 3. Some inefficient arrays(Sigma_RVS_norm_sq) were eliminated and some code lines in Preprocess_L1A_Data were moved into Process_OBCEng_Emiss. There were no changes to the product. Required RAM was reduced by 20 MB. Now
const std::map< std::string, interpolation_method2D > methods
Definition: Interpolation.hpp:42
Interp(T *lut, std::vector< U * > &grid, Args &&...dims)
Definition: Interpolation.hpp:193
double bilinear2D(double *x, double *y, size_t n, size_t ix, size_t iy, double *lut, double x0, double y0)
std::time_t pt_to_time_t(const bt::ptime &pt)
Definition: Interpolation.hpp:50
double seconds_from_epoch(const std::string &s)
const boost::posix_time::ptime epoch(boost::gregorian::date(1970, 1, 1))
RegularGridInterpolator2D()
friend Interp interp(T *lut, std::vector< U * > &grid, Args &&...dims)
Definition: Interpolation.hpp:278
Definition: Interpolation.hpp:44
double(* interpolation_method2D)(double *x, double *y, size_t n, size_t ix, size_t iy, double *lut, double x0, double y0)
Definition: Interpolation.hpp:33
Interp()=default
Interp< T, U, K > interp(T *lut, std::vector< U * > &grid, Args &&...dims)
Definition: Interpolation.hpp:278
RegularGridInterpolator2D(T *lut, U *x, U *y, size_t nx, size_t ny, const std::string &methodstr="bilinear")
Definition: Interpolation.hpp:101
Interpolator()=default
size_t search(T *arr, size_t s, size_t e, T val, size_t *i_s, size_t *i_e)
Definition: Interpolation.hpp:130
std::string & granule_end_time()
std::string & granule_start_time()
TimeInterpolator()=default
TimeInterpolator(std::vector< T > &interpolators, std::vector< double > ×, double current_time)
Definition: Interpolation.hpp:60
Definition: Interpolation.hpp:179
Definition: Interpolation.hpp:31
void set_dimensions(Arg &&dim, Args &&...dims)
Definition: Interpolation.hpp:202
Definition: Interpolation.hpp:11
double operator()(double x, double y)
T get_value(T *lut_ptr, Arg &&val, Args &&...vals)
Definition: Interpolation.hpp:218