DATRW++ library: seismic data I/O with multiple formats

◆ scalefactor()

double datrw::su::scalefactor ( short  s,
const bool &  strict = true 
)

convert scale value to a factor to be applied

Parameters
sSeismicUn*x scale value like scalco or scalel
strictif true: abort if scale does not match original definition
Returns
factor to be multiplied with actual coordinate value

Definition at line 546 of file sucomanager.cc.

References fixscalevalue(), and datrw::su::subformat::key::strict.

Referenced by datrw::su::SUheader::scalcof(), datrw::su::SUheader::scalelf(), and datrw::su::ScalCoo::value().

547  {
548  fixscalevalue(s, strict);
549  double sv=static_cast<double>(s);
550  return(s>0 ? sv : -1./sv);
551  } // double scalefactor(short s, const bool& strict=true)
const char *const strict
strictly interpret header as defined in SeismicUnix source
Definition: suformat.cc:65
void fixscalevalue(short &s, const bool &strict)
fix a SeismicUn*x scale value
Definition: sucomanager.cc:498
Here is the call graph for this function:
Here is the caller graph for this function: