DATRW++ library: seismic data I/O with multiple formats
datrw::su::ScalCoo Struct Reference

scaled coordinate.This struct holds one coordinate together with a scale value. It provides functions to support appropriate scaling and to explore dynamic range. More...

#include <sucomanager.h>

Collaboration diagram for datrw::su::ScalCoo:

Public Member Functions

 ScalCoo (const datrw::su::options::SpatialSampling &ctrl, const bool &debug=false)
 constructor More...
 
void adjustscale ()
 adjust scale to optimal representation of significant digits More...
 
int power () const
 return decimal power of scaling factor More...
 
void scaletopower (const int &p)
 scale to given scaling factor as defined by decimal power More...
 
void set (const short &s, const int &c)
 set from header fields More...
 
void set (const double &v)
 set from coordinate value in meters More...
 
int smallestpower (const short &desiredscale=datrw::su::subformat::def::scalco) const
 smallest possible power larger or equal desired More...
 
double value () const
 return coordinate value More...
 

Public Attributes

int coo
 coordinate More...
 
datrw::su::options::SpatialSampling Mcontrol
 control parameters More...
 
bool Mdebug
 debug mode More...
 
short scale
 scale like scalco More...
 

Static Public Attributes

static double effectivezero =datrw::su::subformat::def::thresholdzero
 lower limit of values More...
 
static int maxnsigdigits
 maximum number of significant digits to be used More...
 

Detailed Description

scaled coordinate.

This struct holds one coordinate together with a scale value. It provides functions to support appropriate scaling and to explore dynamic range.

This class is used insed datrw::su::Coordinates to scale coordinates coherently, since SU provides only scaling factors for all horizontal coordinates on one hand and all vertical cooridnates on the other hand together. The functions inside this class are primarily required upon writing SU data.

See also
Coordinates

Definition at line 124 of file sucomanager.h.


The documentation for this struct was generated from the following files: