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

◆ wid2line()

sff::WID2 datrw::thiesdl1::FileHeader::wid2line ( ) const

return WID2 header

Definition at line 217 of file thiesdl1file.cc.

References DATRW_assert, datrw::thiesdl1::dl1samplinginterval, earliestdate, expectedfinaldataline, nsamples(), datrw::thiesdl1::precipitationID, and readsuccessfully.

Referenced by datrw::ithiesdl1stream::settraceheader(), and datrw::thiesdl1::File::wid2line().

218  {
220  "FileHeader::wid2line: Data is not set ready");
221  sff::WID2 retval;
222  retval.date=this->earliestdate+(dl1samplinginterval/2);
223  retval.dt=libtime::time2double(dl1samplinginterval);
224  retval.nsamples=(this->nsamples());
225  retval.station=expectedfinaldataline.substr(12,5);
226  retval.instype=expectedfinaldataline.substr(21,5);
227  retval.channel=precipitationID;
228  return(retval);
229  } // sff::WID2 FileHeader::wid2line() const
#define DATRW_assert(C, M)
Check an assertion and report by throwing an exception.
Definition: error.h:92
bool readsuccessfully
true if header data was read successfully
Definition: thiesdl1file.h:106
const libtime::TRelativeTime dl1samplinginterval
expected sampling interval of DL1
unsigned int nsamples() const
number of samples
std::string expectedfinaldataline
Expected final data line (as announced in header lines)
Definition: thiesdl1file.h:96
libtime::TAbsoluteTime earliestdate
earliest date
Definition: thiesdl1file.h:100
const char *const precipitationID
SEED channel identifier for precipitation.
Definition: thiesdl1file.cc:75
Here is the call graph for this function:
Here is the caller graph for this function: