isce3 0.25.0
Loading...
Searching...
No Matches
Serialization.h File Reference

Serialization functions for isce3::core objects. More...

#include <iostream>
#include <memory>
#include <sstream>
#include <stdexcept>
#include <vector>
#include <isce3/core/Attitude.h>
#include <isce3/core/DateTime.h>
#include <isce3/core/Ellipsoid.h>
#include <isce3/core/Metadata.h>
#include <isce3/core/Orbit.h>
#include <isce3/core/Poly2d.h>
#include <isce3/core/LUT1d.h>
#include <isce3/core/LUT2d.h>
#include <isce3/core/StateVector.h>
#include <isce3/core/TimeDelta.h>
#include <isce3/io/IH5.h>
#include <isce3/io/Serialization.h>

Go to the source code of this file.

Namespaces

namespace  isce3
 base interpolator is an abstract base class
 

Functions

void isce3::core::loadFromH5 (isce3::io::IGroup &group, Ellipsoid &ellps)
 Load Ellipsoid parameters from HDF5.
 
void isce3::core::loadFromH5 (isce3::io::IGroup &group, Orbit &orbit)
 Load orbit data from HDF5 product.
 
void isce3::core::saveToH5 (isce3::io::IGroup &group, const Orbit &orbit, const bool ensureEpochIntegerSeconds=true)
 Save orbit data to HDF5 product.
 
void isce3::core::loadFromH5 (isce3::io::IGroup &group, Attitude &att)
 Save Euler angle data to HDF5 product.
 
void isce3::core::saveToH5 (isce3::io::IGroup &group, const Attitude &att, const bool ensureEpochIntegerSeconds=true)
 Save attitude data to HDF5 product.
 
void isce3::core::loadFromH5 (isce3::io::IGroup &group, Poly2d &poly, std::string name)
 Load polynomial coefficients from HDF5 product.
 
template<typename T>
void isce3::core::loadCalGrid (isce3::io::IGroup &group, const std::string &dsetName, isce3::core::LUT2d< T > &lut)
 Load LUT2d data from HDF5 product.
 
template<typename T>
void isce3::core::saveCalGrid (isce3::io::IGroup &group, const std::string &dsetName, const isce3::core::LUT2d< T > &lut, const isce3::core::DateTime &refEpoch, const std::string &units="", const bool ensureEpochIntegerSeconds=true)
 Save LUT2d data to HDF5 product.
 
template<typename T>
void isce3::core::loadFromH5 (isce3::io::IGroup &group, LUT1d< T > &lut, std::string name_coords, std::string name_values)
 Load polynomial coefficients from HDF5 product.
 

Detailed Description

Serialization functions for isce3::core objects.

Function Documentation

◆ loadCalGrid()

template<typename T>
void isce3::core::loadCalGrid ( isce3::io::IGroup & group,
const std::string & dsetName,
isce3::core::LUT2d< T > & lut )
inline

Load LUT2d data from HDF5 product.

Parameters
[in]groupHDF5 group object.
[in]dsetNameDataset name within group
[in]lutLUT2d to be configured.

◆ loadFromH5() [1/5]

void isce3::core::loadFromH5 ( isce3::io::IGroup & group,
Attitude & att )
inline

Save Euler angle data to HDF5 product.

Parameters
[in]groupHDF5 group object.
[in]eulerEulerAngles object to be save. inline void saveToH5(isce3::io::IGroup & group, const EulerAngles & euler) { Create vector to store all data (convert angles to degrees) const double deg = 180.0 / M_PI; std::vector<double> angles(euler.nVectors() * 3); for (size_t i = 0; i < euler.nVectors(); ++i) { angles[i*3 + 0] = deg * euler.yaw()[i]; angles[i*3 + 1] = deg * euler.pitch()[i]; angles[i*3 + 2] = deg * euler.roll()[i]; }

Save angles std::array<size_t, 2> dims = {euler.nVectors(), 3}; isce3::io::saveToH5(group, "eulerAngles", angles, dims, "degrees");

Save time and reference epoch attribute isce3::io::saveToH5(group, "time", euler.time()); isce3::io::setRefEpoch(group, "time", euler.refEpoch()); }

◆ loadFromH5() [2/5]

void isce3::core::loadFromH5 ( isce3::io::IGroup & group,
Ellipsoid & ellps )
inline

Load Ellipsoid parameters from HDF5.

Parameters
[in]groupHDF5 group object.
[in]ellpsEllipsoid object to be configured.

◆ loadFromH5() [3/5]

template<typename T>
void isce3::core::loadFromH5 ( isce3::io::IGroup & group,
LUT1d< T > & lut,
std::string name_coords,
std::string name_values )
inline

Load polynomial coefficients from HDF5 product.

Parameters
[in]groupHDF5 group object.
[in]polyPoly2d to be configured.
[in]nameDataset name within group.

◆ loadFromH5() [4/5]

void isce3::core::loadFromH5 ( isce3::io::IGroup & group,
Orbit & orbit )
inline

Load orbit data from HDF5 product.

Parameters
[in]groupHDF5 group object.
[in]orbitOrbit object to be configured.

◆ loadFromH5() [5/5]

void isce3::core::loadFromH5 ( isce3::io::IGroup & group,
Poly2d & poly,
std::string name )
inline

Load polynomial coefficients from HDF5 product.

Parameters
[in]groupHDF5 group object.
[in]polyPoly2d to be configured.
[in]nameDataset name within group.

◆ saveCalGrid()

template<typename T>
void isce3::core::saveCalGrid ( isce3::io::IGroup & group,
const std::string & dsetName,
const isce3::core::LUT2d< T > & lut,
const isce3::core::DateTime & refEpoch,
const std::string & units = "",
const bool ensureEpochIntegerSeconds = true )
inline

Save LUT2d data to HDF5 product.

Parameters
[in]groupHDF5 group object.
[in]dsetNameDataset name within group
[in]lutLUT2d to be saved.
[in]unitsUnits of LUT2d data.
[in]ensureEpochIntegerSecondsEnsure that the orbit reference epoch has integer seconds precision (NISAR specs requirement)

◆ saveToH5() [1/2]

void isce3::core::saveToH5 ( isce3::io::IGroup & group,
const Attitude & att,
const bool ensureEpochIntegerSeconds = true )
inline

Save attitude data to HDF5 product.

Parameters
[in]groupHDF5 group object.
[in]attAttitude object to be saved.
[in]ensureEpochIntegerSecondsEnsure that the orbit reference epoch has integer seconds precision (NISAR specs requirement)

◆ saveToH5() [2/2]

void isce3::core::saveToH5 ( isce3::io::IGroup & group,
const Orbit & orbit,
const bool ensureEpochIntegerSeconds = true )
inline

Save orbit data to HDF5 product.

Parameters
[in]groupHDF5 group object.
[in]orbitOrbit object to be saved.
[in]ensureEpochIntegerSecondsEnsure that the orbit reference epoch has integer seconds precision (NISAR specs requirement)

Generated for ISCE3.0 by doxygen 1.13.2.