Skip to content

Commit

Permalink
Rename 'isce' namespace to 'isce3'
Browse files Browse the repository at this point in the history
  • Loading branch information
gmgunter committed Jul 20, 2020
1 parent ba01763 commit 82b3928
Show file tree
Hide file tree
Showing 562 changed files with 4,920 additions and 4,920 deletions.
26 changes: 13 additions & 13 deletions cxx/isce3/container/RSD.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <isce3/core/LookSide.h>
#include <isce3/io/gdal/Raster.h>

namespace isce { namespace container {
namespace isce3 { namespace container {

/** Radar signal data */
class RSD {
Expand All @@ -24,12 +24,12 @@ class RSD {
* \param[in] range_sampling_rate Range sampling rate (Hz)
* \param[in] look_side Radar look side
*/
RSD(const isce::io::gdal::Raster & signal_data,
const isce::core::DateTime & reference_epoch,
RSD(const isce3::io::gdal::Raster & signal_data,
const isce3::core::DateTime & reference_epoch,
const std::vector<double> & azimuth_time,
double range_window_start,
double range_sampling_rate,
isce::core::LookSide look_side);
isce3::core::LookSide look_side);

/** Number of azimuth lines */
int lines() const { return _signal_data.length(); }
Expand All @@ -38,7 +38,7 @@ class RSD {
int samples() const { return _signal_data.width(); }

/** Reference epoch (UTC) */
const isce::core::DateTime & referenceEpoch() const { return _reference_epoch; }
const isce3::core::DateTime & referenceEpoch() const { return _reference_epoch; }

/** Time of first azimuth line relative to reference epoch (s) */
double azimuthStartTime() const { return _azimuth_time[0]; }
Expand All @@ -50,13 +50,13 @@ class RSD {
double azimuthEndTime() const { return _azimuth_time[lines() - 1]; }

/** DateTime of first azimuth line (UTC) */
isce::core::DateTime startDateTime() const;
isce3::core::DateTime startDateTime() const;

/** DateTime of center of data (UTC) */
isce::core::DateTime midDateTime() const;
isce3::core::DateTime midDateTime() const;

/** DateTime of last azimuth line (UTC) */
isce::core::DateTime endDateTime() const;
isce3::core::DateTime endDateTime() const;

/** Time of first range sample relative to Tx pulse start (s) */
double rangeWindowStartTime() const { return _range_window_start; }
Expand All @@ -71,7 +71,7 @@ class RSD {
double rangeSamplingRate() const { return _range_sampling_rate; }

/** Radar look side */
isce::core::LookSide lookSide() const { return _look_side; }
isce3::core::LookSide lookSide() const { return _look_side; }

/** Read a single line of signal data */
void readLine(std::complex<float> * dst, int line) const;
Expand All @@ -83,18 +83,18 @@ class RSD {
void readAll(std::complex<float> * dst) const { return _signal_data.readAll(dst); }

/** Get signal data Raster */
const isce::io::gdal::Raster & signalData() const { return _signal_data; }
const isce3::io::gdal::Raster & signalData() const { return _signal_data; }

/** Get azimuth timepoints relative to reference epoch (s) */
const std::vector<double> & azimuthTime() const { return _azimuth_time; }

private:
isce::io::gdal::Raster _signal_data;
isce::core::DateTime _reference_epoch;
isce3::io::gdal::Raster _signal_data;
isce3::core::DateTime _reference_epoch;
std::vector<double> _azimuth_time;
double _range_window_start;
double _range_sampling_rate;
isce::core::LookSide _look_side;
isce3::core::LookSide _look_side;
};

}}
Expand Down
30 changes: 15 additions & 15 deletions cxx/isce3/container/RSD.icc
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
#include <isce3/core/TimeDelta.h>
#include <isce3/except/Error.h>

namespace isce { namespace container {
namespace isce3 { namespace container {

RSD::RSD(const isce::io::gdal::Raster & signal_data,
const isce::core::DateTime & reference_epoch,
RSD::RSD(const isce3::io::gdal::Raster & signal_data,
const isce3::core::DateTime & reference_epoch,
const std::vector<double> & azimuth_time,
double range_window_start,
double range_sampling_rate,
isce::core::LookSide look_side)
isce3::core::LookSide look_side)
:
_signal_data(signal_data),
_reference_epoch(reference_epoch),
Expand All @@ -24,43 +24,43 @@ RSD::RSD(const isce::io::gdal::Raster & signal_data,
std::size_t lines = signal_data.length();
if (azimuth_time.size() != lines) {
std::string errmsg = "number of signal data lines must equal number of azimuth timepoints";
throw isce::except::LengthError(ISCE_SRCINFO(), errmsg);
throw isce3::except::LengthError(ISCE_SRCINFO(), errmsg);
}

GDALDataType dtype = signal_data.datatype();
if (dtype != GDT_CFloat32 && dtype != GDT_CFloat64) {
throw isce::except::InvalidArgument(ISCE_SRCINFO(), "signal data must be complex-valued");
throw isce3::except::InvalidArgument(ISCE_SRCINFO(), "signal data must be complex-valued");
}

if (range_window_start <= 0.) {
throw isce::except::DomainError(ISCE_SRCINFO(), "range window start time must be > 0");
throw isce3::except::DomainError(ISCE_SRCINFO(), "range window start time must be > 0");
}

if (range_sampling_rate <= 0.) {
throw isce::except::DomainError(ISCE_SRCINFO(), "range sampling rate must be > 0");
throw isce3::except::DomainError(ISCE_SRCINFO(), "range sampling rate must be > 0");
}

for (int l = 1; l < lines; ++l) {
if (azimuth_time[l - 1] > azimuth_time[l]) {
std::string errmsg = "azimuth time must be monotonically increasing";
throw isce::except::InvalidArgument(ISCE_SRCINFO(), errmsg);
throw isce3::except::InvalidArgument(ISCE_SRCINFO(), errmsg);
}
}
}

isce::core::DateTime RSD::startDateTime() const
isce3::core::DateTime RSD::startDateTime() const
{
return referenceEpoch() + isce::core::TimeDelta(azimuthStartTime());
return referenceEpoch() + isce3::core::TimeDelta(azimuthStartTime());
}

isce::core::DateTime RSD::midDateTime() const
isce3::core::DateTime RSD::midDateTime() const
{
return referenceEpoch() + isce::core::TimeDelta(azimuthMidTime());
return referenceEpoch() + isce3::core::TimeDelta(azimuthMidTime());
}

isce::core::DateTime RSD::endDateTime() const
isce3::core::DateTime RSD::endDateTime() const
{
return referenceEpoch() + isce::core::TimeDelta(azimuthEndTime());
return referenceEpoch() + isce3::core::TimeDelta(azimuthEndTime());
}

double RSD::rangeWindowMidTime() const
Expand Down
16 changes: 8 additions & 8 deletions cxx/isce3/container/RadarGeometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <isce3/core/Orbit.h>
#include <isce3/product/RadarGridParameters.h>

namespace isce {
namespace isce3 {
namespace container {

/**
Expand All @@ -15,13 +15,13 @@ namespace container {
*/
class RadarGeometry {
private:
using DateTime = isce::core::DateTime;
using LookSide = isce::core::LookSide;
using Orbit = isce::core::Orbit;
using RadarGridParameters = isce::product::RadarGridParameters;
using DateTime = isce3::core::DateTime;
using LookSide = isce3::core::LookSide;
using Orbit = isce3::core::Orbit;
using RadarGridParameters = isce3::product::RadarGridParameters;

template<typename T> using Linspace = isce::core::Linspace<T>;
template<typename T> using LUT2d = isce::core::LUT2d<T>;
template<typename T> using Linspace = isce3::core::Linspace<T>;
template<typename T> using LUT2d = isce3::core::LUT2d<T>;

public:
RadarGeometry(const RadarGridParameters& radar_grid, const Orbit& orbit,
Expand Down Expand Up @@ -61,6 +61,6 @@ class RadarGeometry {
};

} // namespace container
} // namespace isce
} // namespace isce3

#include "RadarGeometry.icc"
12 changes: 6 additions & 6 deletions cxx/isce3/container/RadarGeometry.icc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <isce3/except/Error.h>
#include <limits>

namespace isce {
namespace isce3 {
namespace container {

inline RadarGeometry::RadarGeometry(const RadarGridParameters& radar_grid,
Expand All @@ -25,13 +25,13 @@ inline RadarGeometry::RadarGeometry(const RadarGridParameters& radar_grid,
}
}

inline isce::core::Linspace<double> RadarGeometry::sensingTime() const
inline isce3::core::Linspace<double> RadarGeometry::sensingTime() const
{
// check for overflow when converting gridLength() -> int
constexpr static auto maxint =
static_cast<size_t>(std::numeric_limits<int>::max());
if (gridLength() > maxint) {
using isce::except::OverflowError;
using isce3::except::OverflowError;
throw OverflowError(ISCE_SRCINFO(), "grid length exceeds max int");
}

Expand All @@ -41,13 +41,13 @@ inline isce::core::Linspace<double> RadarGeometry::sensingTime() const
return {t0, dt, lines};
}

inline isce::core::Linspace<double> RadarGeometry::slantRange() const
inline isce3::core::Linspace<double> RadarGeometry::slantRange() const
{
// check for overflow when converting gridWidth() -> int
constexpr static auto maxint =
static_cast<size_t>(std::numeric_limits<int>::max());
if (gridWidth() > maxint) {
using isce::except::OverflowError;
using isce3::except::OverflowError;
throw OverflowError(ISCE_SRCINFO(), "grid width exceeds max int");
}

Expand All @@ -58,4 +58,4 @@ inline isce::core::Linspace<double> RadarGeometry::slantRange() const
}

} // namespace container
} // namespace isce
} // namespace isce3
4 changes: 2 additions & 2 deletions cxx/isce3/container/forward.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#pragma once

namespace isce {
namespace isce3 {
namespace container {

class RSD;
class RadarGeometry;

} // namespace core
} // namespace isce
} // namespace isce3
2 changes: 1 addition & 1 deletion cxx/isce3/core/Attitude.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
#include "Attitude.h"

// Define the virtual destructor to do nothing
isce::core::Attitude::~Attitude() {}
isce3::core::Attitude::~Attitude() {}

// end of file
4 changes: 2 additions & 2 deletions cxx/isce3/core/Attitude.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "DateTime.h"

/** Base class for attitude data representation */
class isce::core::Attitude {
class isce3::core::Attitude {

public:
enum class Type { EulerAngles_t, Quaternion_t };
Expand Down Expand Up @@ -49,6 +49,6 @@ class isce::core::Attitude {
};

// Go ahead and define setYawOrientation here
void isce::core::Attitude::yawOrientation(const std::string orientation) {
void isce3::core::Attitude::yawOrientation(const std::string orientation) {
_yaw_orientation = orientation;
}
2 changes: 1 addition & 1 deletion cxx/isce3/core/Baseline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "Peg.h"
#include "Pegtrans.h"

namespace isce { namespace core {
namespace isce3 { namespace core {

void Baseline::init()
{
Expand Down
2 changes: 1 addition & 1 deletion cxx/isce3/core/Baseline.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "Orbit.h"
#include "Vector.h"

namespace isce { namespace core {
namespace isce3 { namespace core {

/** Data structure for computing interferometric baselines */
class Baseline {
Expand Down
2 changes: 1 addition & 1 deletion cxx/isce3/core/Basis.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "Vector.h"

/** Simple class to store three-dimensional basis vectors*/
class isce::core::Basis {
class isce3::core::Basis {

public:
/** Default constructor*/
Expand Down
10 changes: 5 additions & 5 deletions cxx/isce3/core/BicubicInterpolator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ T cubicInterpolate(T p0, T p1, T p2, T p3, const double tfrac) {
* @param[in] y Y-coordinate to interpolate
* @param[in] z 2D matrix to interpolate. */
template<class U>
U isce::core::BicubicInterpolator<U>::interp_impl(double x, double y,
U isce3::core::BicubicInterpolator<U>::interp_impl(double x, double y,
const Map& z) const
{
// the closest pixel to the point of interest
Expand All @@ -62,9 +62,9 @@ U isce::core::BicubicInterpolator<U>::interp_impl(double x, double y,
}

// Forward declaration of classes
template class isce::core::BicubicInterpolator<double>;
template class isce::core::BicubicInterpolator<float>;
template class isce::core::BicubicInterpolator<std::complex<double>>;
template class isce::core::BicubicInterpolator<std::complex<float>>;
template class isce3::core::BicubicInterpolator<double>;
template class isce3::core::BicubicInterpolator<float>;
template class isce3::core::BicubicInterpolator<std::complex<double>>;
template class isce3::core::BicubicInterpolator<std::complex<float>>;

// end of file
10 changes: 5 additions & 5 deletions cxx/isce3/core/BilinearInterpolator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @param[in] y Y-coordinate to interpolate
* @param[in] z 2D matrix to interpolate. */
template<class U>
U isce::core::BilinearInterpolator<U>::interp_impl(double x, double y,
U isce3::core::BilinearInterpolator<U>::interp_impl(double x, double y,
const Map& z) const
{

Expand Down Expand Up @@ -49,9 +49,9 @@ U isce::core::BilinearInterpolator<U>::interp_impl(double x, double y,
}

// Forward declaration of classes
template class isce::core::BilinearInterpolator<double>;
template class isce::core::BilinearInterpolator<float>;
template class isce::core::BilinearInterpolator<std::complex<double>>;
template class isce::core::BilinearInterpolator<std::complex<float>>;
template class isce3::core::BilinearInterpolator<double>;
template class isce3::core::BilinearInterpolator<float>;
template class isce3::core::BilinearInterpolator<std::complex<double>>;
template class isce3::core::BilinearInterpolator<std::complex<float>>;

// end of file
6 changes: 3 additions & 3 deletions cxx/isce3/core/Constants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#include <isce3/except/Error.h>
#include <map>

using isce::except::InvalidArgument;
using isce3::except::InvalidArgument;

namespace isce { namespace core {
namespace isce3 { namespace core {

dataInterpMethod
parseDataInterpMethod(const std::string & method)
Expand All @@ -23,4 +23,4 @@ parseDataInterpMethod(const std::string & method)
throw InvalidArgument(ISCE_SRCINFO(), "Unknown interp method");
}

}} // isce::core
}} // isce3::core
6 changes: 3 additions & 3 deletions cxx/isce3/core/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

// Macro wrapper to check vector lengths (adds calling function and variable name information to the
// exception)
#define checkVecLen(v,l) isce::core::checkVecLenDebug(v,l,#v,__PRETTY_FUNCTION__)
#define check2dVecLen(v,l,w) isce::core::check2dVecLenDebug(v,l,w,#v,__PRETTY_FUNCTION__)
#define checkVecLen(v,l) isce3::core::checkVecLenDebug(v,l,#v,__PRETTY_FUNCTION__)
#define check2dVecLen(v,l,w) isce3::core::check2dVecLenDebug(v,l,w,#v,__PRETTY_FUNCTION__)

// Macro wrapper to provide 2D indexing to a 1D array
#define IDX1D(i,j,w) (((i)*(w))+(j))

namespace isce { namespace core {
namespace isce3 { namespace core {

/**Enumeration type to indicate interpolation method*/
enum dataInterpMethod {
Expand Down
4 changes: 2 additions & 2 deletions cxx/isce3/core/Cube.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
#include <vector>
#include <pyre/grid.h>

// isce::core::Cube definition
// isce3::core::Cube definition
template <typename cell_t>
class isce::core::Cube {
class isce3::core::Cube {

public:
// Types for interfacing with pyre::grid
Expand Down
Loading

0 comments on commit 82b3928

Please sign in to comment.