UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
psc::TsContainer Class Reference

#include <psc_ts_container.hpp>

Inheritance diagram for psc::TsContainer:
psc::TsContainer3D

Classes

struct  Entry
 

Public Types

typedef std::vector< EntryEntries
 
typedef std::vector< EntriesStorage
 

Public Member Functions

 TsContainer ()
 
virtual ~TsContainer ()
 
virtual bool init (const dba::Seismic &dba, const unsigned int corr_dir_mask, const unsigned int max_stride, const Trace::OffsetT offsets_range[2]=NULL)
 
virtual const Entryoperator() (const int nsp, const int nrp, const unsigned int corr_dir, const unsigned int stride) const
 
virtual Entryoperator() (const int nsp, const int nrp, const unsigned int corr_dir, const unsigned int stride)
 
const std::vector< int > & getIds (const Trace::Header::AttrId &attr_id) const
 
unsigned int getCorrDirMask () const
 
unsigned int getMaxStride () const
 
virtual void applyTimeShift (const Trace::Header::AttrId &attr_id, const int id, const Trace::TimeT dt)
 
void removeIncline (const Trace::Header::AttrId &attr_id)
 
void test_to_file (const std::string &fname) const
 

Protected Member Functions

virtual void progress (const int cur, const int max) const
 
bool get_ids_from_db (const dba::Seismic &dba, const Trace::Header::AttrId &attr_id, std::vector< int > &ids_vec) const
 
Entry tr2entry (Trace &tr, const unsigned int dir, const unsigned int stride) const
 
bool id_of_corr_dir (const unsigned int dir, size_t &id) const
 
bool get_entry_ids (const int nsp, const int nrp, const unsigned int corr_dir, const unsigned int stride, size_t &storage_id, size_t &entries_id) const
 

Protected Attributes

Storage m_storage
 
std::vector< int > m_nsp_ids_vec
 
std::vector< int > m_nrp_ids_vec
 
unsigned int m_corr_dir_mask
 
unsigned int m_max_stride
 
Entry def_inactual_entry
 

Detailed Description

Container for time shifts storing.

Member Typedef Documentation

typedef std::vector<Entry> psc::TsContainer::Entries

Entries of the storage type.

typedef std::vector<Entries> psc::TsContainer::Storage

Storage of time shifts type.

Constructor & Destructor Documentation

psc::TsContainer::TsContainer ( )

Default constructor, container is empty.

virtual psc::TsContainer::~TsContainer ( )
virtual

Destructs container.

Member Function Documentation

virtual void psc::TsContainer::applyTimeShift ( const Trace::Header::AttrId attr_id,
const int  id,
const Trace::TimeT  dt 
)
virtual

Apply time shift for CCFs maximums corresponded to attribute TA_NSP or TA_NRP.

Parameters
attr_idId of header attribute (TA_NSP or TA_NRP supported).
idId of shot or receiver.
dtTime shift.

Reimplemented in psc::TsContainer3D.

bool psc::TsContainer::get_entry_ids ( const int  nsp,
const int  nrp,
const unsigned int  corr_dir,
const unsigned int  stride,
size_t &  storage_id,
size_t &  entries_id 
) const
protected
Returns
true if entry is presents for provided indexies, otherwise return false.
unsigned int psc::TsContainer::getCorrDirMask ( ) const
inline

Get correlation directions mask.

Returns
correlation directions mask.
const std::vector<int>& psc::TsContainer::getIds ( const Trace::Header::AttrId attr_id) const

Access to indexies stored inside container.

Parameters
attr_idHeader attribute of indexies required. TA_NSP, TA_NRP, are supported.
Returns
vector of indexies or TA_NSP indexies vector if not supported indexies provided.
unsigned int psc::TsContainer::getMaxStride ( ) const
inline

Get maximal stride value.

Returns
maximal stride value.
bool psc::TsContainer::id_of_corr_dir ( const unsigned int  dir,
size_t &  id 
) const
protected
Returns
id of direction in the store or -1 if unsupported direction provided.
virtual bool psc::TsContainer::init ( const dba::Seismic dba,
const unsigned int  corr_dir_mask,
const unsigned int  max_stride,
const Trace::OffsetT  offsets_range[2] = NULL 
)
virtual

Initialize container of time shifts from provided data base access object pointed to set of traces with cross correlations. Used traces header attributes are: TA_NSP, TA_NRP, offset, TA_PSC_DIR, TA_PSC_STRIDE.

Parameters
dbaData base access object.
corr_dir_maskMask of used directions of correlations.
max_strideMaximal stride used (>0). If 0 provided => all strides from DB will be used.
offsets_rangeRange of used offsets.
Returns
false on error, true on success.

Reimplemented in psc::TsContainer3D.

virtual const Entry& psc::TsContainer::operator() ( const int  nsp,
const int  nrp,
const unsigned int  corr_dir,
const unsigned int  stride 
) const
virtual

Access to entry with provided indexies for reading.

Parameters
nspShot point number.
nrpReceiver point number.
corr_dirDirection of correlation.
strideStride value.
Returns
Entry correspondent to provided indexies or inactual Entry if no one in the container.

Reimplemented in psc::TsContainer3D.

virtual Entry& psc::TsContainer::operator() ( const int  nsp,
const int  nrp,
const unsigned int  corr_dir,
const unsigned int  stride 
)
virtual

Access to entry with provided indexies for reading and writing.

Parameters
nspShot point number.
nrpReceiver point number.
corr_dirDirection of correlation.
strideStride value.
Returns
Entry correspondent to provided indexies or inactual Entry if no one in the container.

Reimplemented in psc::TsContainer3D.

virtual void psc::TsContainer::progress ( const int  cur,
const int  max 
) const
protectedvirtual

Progress of calculations while object initialization in init() method. Should be reimplemented.

Parameters
cur- current progress value.
max- maximal (finish) progress value.
void psc::TsContainer::removeIncline ( const Trace::Header::AttrId attr_id)

Remove incline from shot or receiver rows of time shifts of CCFs maximums.

Parameters
attr_idId of header attribute (TA_NSP or TA_NRP supported).
Entry psc::TsContainer::tr2entry ( Trace tr,
const unsigned int  dir,
const unsigned int  stride 
) const
protected
Returns
inactual entry if can't obtain time shift from CCF (not a error in general).

Member Data Documentation

unsigned int psc::TsContainer::m_corr_dir_mask
protected

Mask of correlation directions.

unsigned int psc::TsContainer::m_max_stride
protected

Indexies of strides.

std::vector<int> psc::TsContainer::m_nrp_ids_vec
protected

Recvs indexies.

std::vector<int> psc::TsContainer::m_nsp_ids_vec
protected

Shots indexies.

Storage psc::TsContainer::m_storage
protected

Time shifts store.


The documentation for this class was generated from the following file: