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

◆ srce()

sff::SRCE datrw::su::SUheader::srce ( ) const

return SRCE line

Definition at line 275 of file suheader.cc.

References datrw::su::TraceHeaderStruct::counit, dateofshot(), DATRW_assert, Mheader, scalcof(), scalelf(), datrw::su::TraceHeaderStruct::sdepth, datrw::su::TraceHeaderStruct::sx, and datrw::su::TraceHeaderStruct::sy.

Referenced by datrw::isustream::isustream(), main(), datrw::isustream::readheader(), and set().

276  {
277  DATRW_assert((Mheader.counit == 1) || (Mheader.counit == 0),
278  "ERROR (SUheader::srce): coordinate units not supported");
279  ::sff::SRCE retval;
280  double scalcof=this->scalcof();
281  retval.cs=::sff::CS_cartesian;
282  retval.cx=static_cast<double>(Mheader.sx)*scalcof;
283  retval.cy=static_cast<double>(Mheader.sy)*scalcof;
284  retval.cz=-static_cast<double>(Mheader.sdepth)*this->scalelf();
285  retval.date=this->dateofshot();
286  return(retval);
287  } // ::sff::SRCE SUheader::srce() const
int sy
Source coordinate - Y.
#define DATRW_assert(C, M)
Check an assertion and report by throwing an exception.
Definition: error.h:92
int sx
Source coordinate - X.
double scalelf() const
return factor defined by scalel
Definition: suheader.cc:197
int sdepth
Source depth below surface (a positive number).
libtime::TAbsoluteTime dateofshot() const
return date of shot
Definition: suheader.cc:261
double scalcof() const
return factor defined by scalco
Definition: suheader.cc:206
short counit
Coordinate units (see details).
TraceHeaderStruct Mheader
the actual data fields are provided for public access
Definition: suheader.h:239
Here is the call graph for this function:
Here is the caller graph for this function: