BdsApi  3.0.12
This is the Blacknest BDS API.
Namespaces | Functions | Variables
BdsLib.cpp File Reference
#include <BdsLib.h>
#include <math.h>
#include <complex>

Namespaces

 Bds
 

Functions

BError Bds::bdsLibInit (DataAccess &bds)
 Initialise the bdsLib with settings from the BdsServer. More...
 
BError Bds::bdsLibInit (DataAddAccess &bds)
 Initialise the bdsLib with settings from the BdsServer. More...
 
BError Bds::bdsLibInit (AdminAccess &bds)
 Initialise the bdsLib with settings from the BdsServer. More...
 
void Bds::bdsDumpPoleZeros (PoleZero poleZeros)
 Debug print out a PoleZeros object. More...
 
void Bds::bdsChannelGetTypeAux (BString name, BString &type, BString &aux)
 Get the channel type and aux fields from a generic channel name. More...
 
BString Bds::bdsChannelGetName (BString type, BString aux)
 Create a full channel name from a channels type and aux fields. More...
 
BError Bds::bdsDataInfoSetTimeRange (DataInfo &dataInfo)
 Restricts the time tange of all of the DataInfo's channels to match the DataInfo's startTime/endTime fields. More...
 
BError Bds::bdsDataInfoFromInfo (BDictString info, DataInfo &dataInfo, Bool append)
 Convert info to DataInfo. More...
 
BError Bds::bdsInfoFromDataInfo (const DataInfo &dataInfo, BDictString &info)
 Converts a DataInfo object into a BDictString list of named strings. More...
 
BError Bds::bdsDataInfoFlatten (DataInfo &dataInfo)
 Flattens a DataInfo to 1 segement per channel for use in dataOpen() calls. More...
 
BError Bds::bdsDataInfoMergeFlatten (DataInfo &dataInfo, const DataInfo &dataInfoAdd)
 Merges a DataInfo into another flattening the segments to 1 for use in dataOpen() calls. More...
 
BString Bds::bdsUnitsConvert (BString units)
 Tidy up units name to standard SI units format. More...
 
static int Bds::responseSort (Response &a, Response &b)
 
BError Bds::bdsMetadataImportFix (ChannelInfos &channelInfos, Bool stageRenumber)
 Fix up ChannelInfos from import. Mainly making sure response stages and their units are correct. More...
 
BError Bds::bdsMetadataExportFix (ChannelInfos &channelInfos, Bool singleResponse, Bool stageRenumber, Bool changeUnits, Bool stageGains, Bool decimation, Bool toDisplacement, Bool toNm)
 Fix up ChannelInfos for export. Mainly making sure response stages and their units are correct. More...
 
BString Bds::bdsStationAlias (Station station)
 Returns the station alias if set else its name. More...
 
void Bds::bdsDumpSelection (Selection sel)
 Debug print out a Selection object. More...
 
void Bds::bdsDumpSelectionInfo (SelectionInfo sel)
 Debug print out a SelectionInfo object. More...
 
void Bds::bdsDumpDataInfo (DataInfo dataInfo, int includeInfo=0)
 Debug print out a DataInfo object. More...
 
void Bds::bdsDumpChannelInfos (const ChannelInfos &channelInfos)
 Debug print out a ChannelInfos object. More...
 
void Bds::bdsDumpData (const DataBlock &dataBlock, int nSamples=0)
 Debug print out a DataBlock object. More...
 
void Bds::bdsDumpLocation (Location location)
 Debug printout location. More...
 
BString Bds::bdsDataChannelInfo (const DataChannel &dataChannel)
 Returns a string representation of a DataChannel object. More...
 
BString Bds::bdsDataChannelRef (const DataChannel &dataChannel)
 Returns the string reference name of a DataChannel object. More...
 
BString Bds::bdsDataChannelRef (const ChannelInfo &channelInfo)
 Returns the string reference name of a ChannelInfo object. More...
 
BError Bds::bdsDataChannelOverallResponse (const ChannelInfo &channelInfo, Response &response)
 Returns the overal response from the list of responses in a ChannelInfo. More...
 
BString Bds::bdsSelectionChannelInfo (const Selection &selection, BUInt channel)
 Returns a string describing the name and time period of a selection channel. More...
 
double Bds::bdsPoleZeroGain (const PoleZero &poleZero, double frequency)
 Calculates the overall gain of the given PoleZero transfer function. More...
 
void Bds::bdsPoleZeroGainPhase (const PoleZero &poleZero, double frequency, double &gain, double &phase)
 Calculates the overall gain and phase of the given PoleZero transfer function. More...
 
void Bds::bdsPoleZeroToFap (const PoleZero &poleZero, BUInt nPoints, double calibrationFrequency, double sampleFrequency, BArray< Fap > &fap)
 Convert PoleZero to FAP. More...
 
static BString Bds::fileNameTime (BTimeStamp t)
 
BString Bds::bdsFileNameExpand (BString fileName, ChannelInfo &channelInfo)
 Default filename from a ChannelInfo. More...
 
BString Bds::bdsFileNameExpand (BString fileName, ChannelInfos &channelInfos)
 Default filename from a list of ChannelInfo's. More...
 
BString Bds::bdsFileNameExpand (BString fileName, Selection &sel)
 Default filename from a Selection. More...
 
void Bds::bdsSpecialChannelsSet (const BList< SpecialChannel > specialChannels)
 Set the special channels list. More...
 
BList< SpecialChannel > Bds::bdsSpecialChannels ()
 Return list of special channels. More...
 
Bool Bds::bdsSpecialChannelIgnore (BString network, BString station, BString channel)
 Check if channel should be ignored. More...
 
char Bds::seedChannelInstrumentCode (BString dataType)
 Returns SEED instrument code from dataType. More...
 
BString Bds::seedChannelDataType (BString channel)
 Returns dataType from channel name based on SEED channel name convention. More...
 
BStringList Bds::bdsDataTypes ()
 Returns all known data types. More...
 
BStringList Bds::bdsUnits ()
 Returns all known SI units. More...
 
BString Bds::bdsUnitCase (BString unit)
 Converts character case of units. More...
 

Variables

static BList< SpecialChannel > Bds::bdsSpecialChannelsList
 
SeedICodeToDataType Bds::seedICodeToDataTypes []