Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

utilities.hh File Reference

#include "constants.hh"
#include "slcimage.hh"
#include "ioroutines.hh"
#include "exceptions.hh"
#include <cmath>

Go to the source code of this file.

Functions

void solve33 (matrix< real8 > &Result, const matrix< real8 > &rhs, const matrix< real8 > &partials)
matrix< real8solve22 (const matrix< real8 > &rhs, const matrix< real8 > &partials)
bool iseven (int16 w)
bool iseven (int32 w)
bool iseven (uint w)
bool isodd (int16 w)
bool isodd (int32 w)
bool isodd (uint w)
bool ispower2 (uint w)
int32 Ncoeffs (int32 degree)
int32 degree (int32 Ncoeffs)
real4 remainder (real4 number, real4 divisor)
real8 remainder (real8 number, real8 divisor)
real4 sinc (real4 x)
real8 sinc (real8 x)
real4 rect (real4 x)
real4 tri (real4 x)
real8 onedecimal (real8 x)
real4 onedecimal (real4 x)
matrix< real4myrect (const matrix< real4 > &X)
matrix< real4myhamming (const matrix< real4 > &fr, real8 RBW, real8 RSR, real8 alpha)
real8 interpbilinear (const real8 r, const real8 c, const real8 P1, const real8 P2, const real8 P3, const real8 P4)
real8 interp_trilinear (const cn &A, const cn &B, const cn &C)
cn ProjectPointOnLine (cn M, cn P, cn S)
template<class Type> matrix< Type > indgen (const Type N)
template<class Type> matrix< Type > linspace (const Type x0, const Type xN, const int32 N)
template<class Type> matrix< Type > ones (const Type Ny, const Type Nx)
template<class Type> matrix< Type > eye (const Type N)
void getorb (const slcimage &image, const input_pr_orbits &inputorb, int16 FILEID)
void convertgetorbout (int16 FILEID, const char *file="scratchorbit")
uint nextpow2 (real8 w)
matrix< real4polyval (const matrix< real4 > &x, const matrix< real4 > &y, const matrix< real8 > &coeff, int32 degree=-1)
real8 polyval (real8 x, real8 y, const matrix< real8 > &coeff)
real8 polyval (real8 x, real8 y, const matrix< real8 > &coeff, int32 degree)
real8 polyval1d (real8 x, const matrix< real8 > &coeff)
void normalize (matrix< real4 > &data, real8 min, real8 max)
void normalize (matrix< real8 > &data, real8 min, real8 max)
real4 normalize (real4 data, real8 min, real8 max)
real8 normalize (real8 data, real8 min, real8 max)
void BBparBperp (real8 &B, real8 &Bpar, real8 &Berp, const cn Master, const cn Point, const cn Slave)
void BBhBv (real8 &B, real8 &Bh, real8 &Bv, const cn Master, const cn Slave)
int32 Btemp (const char *utc_master, const char *utc_slave)
void BalphaBhBvBparBperpTheta (real8 &B, real8 &alpha, real8 &Bh, real8 &Bv, real8 &Bpar, real8 &Bperp, real8 &theta, const cn M, const cn P, const cn S)
void shiftazispectrum (matrix< complr4 > &data, const slcimage &slave, const real4 shift)


Function Documentation

void BalphaBhBvBparBperpTheta real8 B,
real8 alpha,
real8 Bh,
real8 Bv,
real8 Bpar,
real8 Bperp,
real8 theta,
const cn  M,
const cn  P,
const cn  S
 

Definition at line 1369 of file utilities.cc.

References cos(), cn::min(), cn::norm2(), real8, sin(), sqr(), and TRACE_FUNCTION.

Referenced by snaphu_unwrap().

void BBhBv real8 B,
real8 Bh,
real8 Bv,
const cn  Master,
const cn  Slave
 

Definition at line 1296 of file utilities.cc.

References cn::dist(), cn::norm(), bk_messages::print(), real8, sqr(), TRACE_FUNCTION, and WARNING.

void BBparBperp real8 B,
real8 Bpar,
real8 Berp,
const cn  Master,
const cn  Point,
const cn  Slave
 

Definition at line 1267 of file utilities.cc.

References cn::angle(), cn::dist(), cn::min(), real8, sqr(), and TRACE_FUNCTION.

Referenced by dinsar().

int32 Btemp const char *  utc_master,
const char *  utc_slave
 

Definition at line 1323 of file utilities.cc.

References Btemp(), int32, ONE27, real8, strptime(), and TRACE_FUNCTION.

Referenced by Btemp(), and coarseporbit().

void convertgetorbout int16  FILEID,
const char *  file = "scratchorbit"
 

Definition at line 255 of file utilities.cc.

References bk_assert(), DEBUG, bk_messages::get_str(), INFO, int16, int32, MASTERID, ONE27, bk_messages::print(), PRINT_ERROR, processcontrol, real8, bk_messages::reset(), SLAVEID, some_error, TRACE_FUNCTION, and WARNING.

Referenced by main().

int32 degree int32  Ncoeffs  )  [inline]
 

Definition at line 84 of file utilities.hh.

References int32, Ncoeffs(), and real4.

Referenced by polyval(), resample(), and slant2hrodriguez().

template<class Type>
matrix<Type> eye const Type  N  )  [inline]
 

Definition at line 405 of file utilities.hh.

References int32.

Referenced by coregpm(), dinsar(), flatearth(), BASELINE::model_parameters(), polyfit(), and slant2hschwabisch().

void getorb const slcimage image,
const input_pr_orbits inputorb,
int16  FILEID
 

Definition at line 74 of file utilities.cc.

References bk_assert(), DEBUG, EIGHTY, ERROR, bk_messages::get_str(), getanswer(), int16, int32, window::linehi, window::linelo, input_pr_orbits::m_orbdir, MASTERID, NaN, ONE27, slcimage::originalwindow, slcimage::prf, bk_messages::print(), PRINT_ERROR, PROGRESS, real8, input_pr_orbits::s_orbdir, SLAVEID, some_error, strptime(), input_pr_orbits::timebefore, input_pr_orbits::timeinterval, TRACE_FUNCTION, unhandled_case_error, slcimage::utc1, and WARNING.

Referenced by main().

template<class Type>
matrix<Type> indgen const Type  N  )  [inline]
 

Definition at line 362 of file utilities.hh.

References int32.

Referenced by linspace(), and radarcodedem().

real8 interp_trilinear const cn A,
const cn B,
const cn C
[inline]
 

Definition at line 258 of file utilities.hh.

References EPS, real8, cn::x, cn::y, and cn::z.

Referenced by radarcodedem().

real8 interpbilinear const real8  r,
const real8  c,
const real8  P1,
const real8  P2,
const real8  P3,
const real8  P4
[inline]
 

Definition at line 221 of file utilities.hh.

References real8.

bool iseven uint  w  )  [inline]
 

Definition at line 69 of file utilities.hh.

References uint.

Referenced by phasefilterspectral().

bool iseven int32  w  )  [inline]
 

Definition at line 68 of file utilities.hh.

References int32.

bool iseven int16  w  )  [inline]
 

Definition at line 67 of file utilities.hh.

References int16.

bool isodd uint  w  )  [inline]
 

Definition at line 72 of file utilities.hh.

References uint.

Referenced by coarsecorrel(), readinput(), resample(), rfilterblock(), and spatialphasefilt().

bool isodd int32  w  )  [inline]
 

Definition at line 71 of file utilities.hh.

References int32.

bool isodd int16  w  )  [inline]
 

Definition at line 70 of file utilities.hh.

References int16.

bool ispower2 uint  w  )  [inline]
 

Definition at line 74 of file utilities.hh.

References uint.

Referenced by checkfiltazi(), checkfiltphase(), checkfiltrange(), checkfine(), coarsecorrelfft(), coherencefft(), coherencespace(), corrfft(), and rfilterblock().

template<class Type>
matrix<Type> linspace const Type  x0,
const Type  xN,
const int32  N
[inline]
 

Definition at line 376 of file utilities.hh.

References indgen(), and int32.

matrix<real4> myhamming const matrix< real4 > &  fr,
real8  RBW,
real8  RSR,
real8  alpha
[inline]
 

Definition at line 161 of file utilities.hh.

References abs(), argument_error, cos(), int32, matrix< Type >::lines(), PI, matrix< Type >::pixels(), PRINT_ERROR, real4, real8, and TRACE_FUNCTION.

Referenced by azimuthfilter(), blockazifilt(), rangefiltporbits(), and rfilterblock().

matrix<real4> myrect const matrix< real4 > &  X  )  [inline]
 

Definition at line 126 of file utilities.hh.

References abs(), argument_error, int32, matrix< Type >::lines(), matrix< Type >::pixels(), PRINT_ERROR, real4, and TRACE_FUNCTION.

Referenced by azimuthfilter(), blockazifilt(), rangefiltporbits(), and rfilterblock().

int32 Ncoeffs int32  degree  )  [inline]
 

Definition at line 81 of file utilities.hh.

References int32, and sqr().

Referenced by coregpm(), degree(), flatearth(), main(), polyval(), and slant2hschwabisch().

uint nextpow2 real8  w  ) 
 

Definition at line 483 of file utilities.cc.

References int32, real8, TRACE_FUNCTION, and uint.

Referenced by coherence().

real8 normalize real8  data,
real8  min,
real8  max
[inline]
 

Definition at line 486 of file utilities.hh.

References max(), and real8.

Referenced by compcoherence(), compinterfero(), coregpm(), dinsar(), flatearth(), getoverlap(), resample(), slant2hrodriguez(), slant2hschwabisch(), and subtrrefpha().

real4 normalize real4  data,
real8  min,
real8  max
[inline]
 

Definition at line 481 of file utilities.hh.

References max(), real4, and real8.

void normalize matrix< real8 > &  data,
real8  min,
real8  max
 

Definition at line 1246 of file utilities.cc.

References max(), real8, and TRACE_FUNCTION.

void normalize matrix< real4 > &  data,
real8  min,
real8  max
 

Definition at line 1218 of file utilities.cc.

References max(), real4, real8, and TRACE_FUNCTION.

real4 onedecimal real4  x  )  [inline]
 

Definition at line 115 of file utilities.hh.

References int32, and real4.

Referenced by coarseporbit().

real8 onedecimal real8  x  )  [inline]
 

Definition at line 113 of file utilities.hh.

References int32, and real8.

template<class Type>
matrix<Type> ones const Type  Ny,
const Type  Nx
[inline]
 

Definition at line 390 of file utilities.hh.

References matrix< Type >::setdata().

Referenced by radarcodedem().

real8 polyval real8  x,
real8  y,
const matrix< real8 > &  coeff,
int32  degree
 

Definition at line 654 of file utilities.cc.

References input_error, int32, matrix< Type >::lines(), PRINT_ERROR, real8, matrix< Type >::size(), sqr(), sum(), and TRACE_FUNCTION.

Referenced by compcoherence(), compinterfero(), coregpm(), getoverlap(), resample(), slant2hrodriguez(), slant2hschwabisch(), and subtrrefpha().

real8 polyval real8  x,
real8  y,
const matrix< real8 > &  coeff
 

Definition at line 511 of file utilities.cc.

References degree(), input_error, int32, matrix< Type >::lines(), PRINT_ERROR, real8, matrix< Type >::size(), sqr(), sum(), and TRACE_FUNCTION.

matrix<real4> polyval const matrix< real4 > &  x,
const matrix< real4 > &  y,
const matrix< real8 > &  coeff,
int32  degree = -1
 

Definition at line 798 of file utilities.cc.

References DEBUG, degree(), input_error, int32, matrix< Type >::lines(), Ncoeffs(), matrix< Type >::pixels(), bk_messages::print(), PRINT_ERROR, real4, matrix< Type >::setdata(), matrix< Type >::size(), sqr(), sum(), TRACE_FUNCTION, and WARNING.

real8 polyval1d real8  x,
const matrix< real8 > &  coeff
 

Definition at line 1183 of file utilities.cc.

References input_error, int32, matrix< Type >::lines(), PRINT_ERROR, real8, matrix< Type >::size(), sum(), and TRACE_FUNCTION.

Referenced by orbit::getxyz(), and slant2hschwabisch().

cn ProjectPointOnLine cn  M,
cn  P,
cn  S
[inline]
 

Definition at line 323 of file utilities.hh.

References cn::in(), matxmatT(), cn::min(), real8, cn::scale(), cn::x, cn::y, and cn::z.

real4 rect real4  x  )  [inline]
 

Definition at line 101 of file utilities.hh.

References real4.

Referenced by rect(), resample(), ts16(), ts6(), and ts8().

real8 remainder real8  number,
real8  divisor
[inline]
 

Definition at line 90 of file utilities.hh.

References real8.

real4 remainder real4  number,
real4  divisor
[inline]
 

Definition at line 87 of file utilities.hh.

References real4.

void shiftazispectrum matrix< complr4 > &  data,
const slcimage slave,
const real4  shift
 

Definition at line 1429 of file utilities.cc.

References abs(), cos(), dumpasc(), slcimage::f_DC_a0, slcimage::f_DC_a1, slcimage::f_DC_a2, int32, matrix< Type >::lines(), mat2cr4(), ONE27, PI, matrix< Type >::pixels(), slcimage::prf, real4, real8, matrix< Type >::resize(), slcimage::rsr2x, sin(), sqr(), and TRACE_FUNCTION.

real8 sinc real8  x  )  [inline]
 

Definition at line 97 of file utilities.hh.

References PI, real8, and sin().

Referenced by knab(), OversampleSLC(), ts16(), ts6(), and ts8().

real4 sinc real4  x  )  [inline]
 

Definition at line 93 of file utilities.hh.

References PI, real4, and sin().

matrix<real8> solve22 const matrix< real8 > &  rhs,
const matrix< real8 > &  partials
 

Definition at line 445 of file utilities.cc.

References input_error, matrix< Type >::lines(), matrix< Type >::pixels(), PRINT_ERROR, and TRACE_FUNCTION.

void solve33 matrix< real8 > &  Result,
const matrix< real8 > &  rhs,
const matrix< real8 > &  partials
 

Definition at line 381 of file utilities.cc.

References input_error, matrix< Type >::lines(), matrix< Type >::pixels(), PRINT_ERROR, real8, and TRACE_FUNCTION.

Referenced by lp2xyz().

real4 tri real4  x  )  [inline]
 

Definition at line 107 of file utilities.hh.

References real4.

Referenced by resample(), and tri().


Generated on Fri Apr 22 15:58:16 2005 for Doris by doxygen 1.3.6