Typedefs for the EW5 Oracle API


EWDB_EW_SnippetStruct

Type: TRACE_REQ
Description: Uh. I don't know. We are using EWDB_EW_SnippetStruct for a Snippet data entry struct or something, and we are copying it from the TRACE_REQ definition in the Wave_Server Client II routines Help!


EWDBid

Type: int
Description: The C format of a EWDB Database ID.
Note: Last seen, EWDBids were capable of being larger than an integer, and this could create problems for the storing of EWDBids in C. There is a move to change the type from int to either 64-bit int or string. DavidK 05/01/00 This should not cause problems with operations on existing EW5 databases, but in the existing format, it does prevent existing nodes from coexisting in a tightly coupled manner.


EWDB_EventStruct

Type: struct _EWDB_EventStruct
Description: Structure containing information about a Database Event.

Field Type Description
idEvent EWDBid Database ID for the event
iEventType int Human assigned event-type (avalanche, volcano , nuke). See EWDB_EVENT_TYPE_QUAKE
iDubiocity int Describes the perceived validity of the Event. The Dubiocity range is currently undefined. CLEANUP!!!
szComment char[4000] Description of and comments about the Event.
szSource char[256] Identifier of the source/author that declared the Event. Only one Source is listed here. If more than one Source contributed to the declaration of the Event, then the manner by which this Source is chosen as THE Source is undefined. This could be the Logo of the Earthworm module that generated the Event, or the or the login name of an analyst that reviewed it.
szSourceEventID char[256] Event identifer assigned to this event by the Source. This would be the EventID given by and Earthworm Binder Module to an automatic event that was generated by an Earthworm.



EWDB_EventListStruct

Type: struct _EWDB_EventListStruct DESCRIPTION Structure to
Description:
Note: There is overlap between EWDB_EventListStruct and EWDB_EventStruct. EWDB_EventStruct should be substituted as a member of EWDB_EventListStruct for the existing redundant EWDB_EventListStruct fields. CLEANUP!!!

Field Type Description
idEvent EWDBid See EWDB_EventStruct.
eventType int See iEventType in EWDB_EventStruct.
Dubiocity int See iDubiocity in EWDB_EventStruct.
Comment int See szComment in EWDB_EventStruct.
Source int See szSource in EWDB_EventStruct.
SourceEventID int See szSourceEventID in EWDB_EventStruct.
SourceName int Name of the source/author that declared the Event. The SourceName is a human readable version of the Source. The SourceName could be the name of the network that generated the event, or the name of an Analyst that reviewed it.
OT double Time of the Event's preferred origin of in seconds since 1970.
Lat float Lattitude of the preferred Origin of the Event. Expressed in degrees. (North=positive)
Lon float Longitude of the preferred Origin of the Event. Expressed in degrees. (East=positive)
Depth float Depth of the preferred Origin of the Event. Expressed in kilometers below surface.
Magnitude float preferred Magnitude of the Event.



EWDB_StationStruct

Type: struct _EWDB_StationStruct
Description: Structure that provides information on seismic stations. Specifically it describes the name, location, and orientation of the sensor component for a channel. Station may be an inappropriate name, since there may be multiple components at a Site/Station.

Field Type Description
idChan EWDBid The Database ID of the Channel.
idComp EWDBid The Database ID of the Component.
Sta char[10] The Station code of the SCNL for the Component.
Comp char[10] The Channel/Component code of the SCNL for the Component.
Net char[10] The Network code of the SCNL for the Component.
Loc char[10] The Location code of the SCNL for the Component.
Lat float The lattitude of the Component. Expressed in Degrees.
Lon float The longitude of the Component. Expressed in Degrees.
Elev float The elevation of the Component above sea level. Expressed in meters.
Azm float The horizontal orientation of the Component. Expressed in degrees clockwise of North.
Dip float The vertical orientation of the Component. Expressed in degrees below horizontal.



EWDB_OriginStruct

Type: struct _EWDB_OriginStruct
Description: Structure containing information about an Event Origin. Includes error information.

Field Type Description
idOrigin EWDBid Database identifier of the Origin.
idEvent EWDBid Database identifier of the Event with which this origin is associated.
BindToEvent int Boolean flag indicating whether or not this Origin should be bound to an Event when it is inserted into the DB. If yes, it is associated with the Event identified by idEvent upon insertion into the DB.
SetPreferred int Boolean flag indicating whether or not this Origin should be set as the Preferred Origin for the Event identified by idEvent. This flag is ignored if BindToEvent is FALSE.
tOrigin double Origin time in seconds since 1970.
dLat float Lattitude of the Origin. Expressed in degrees. (North=positive)
dLon float Longitude of the Origin. Expressed in degrees. (East=positive)
dDepth float Depth of the Origin. Expressed in kilometers below surface.
dErrLat float Potential lattitude error of the Origin. Expressed in degrees.
dErrLon float Potential longitude error of the Origin. Expressed in degrees.
dErZ float Potential vertical(depth) error of the Origin. Expressed in km.
ExternalTableName char[256] Reserved
xidExternal char[256] Reserved
sSource char[256] Identifier of the source/author that declared the Origin. This could be the Logo of the Earthworm module that generated the Origin, or the login name of an analyst that reviewed it.
Comment char[4000] Comment about the Origin. Currently unused.
iGap int Largest gap between stations used to compute the origin. The gap is the largest arc between stations, based on a epicentral circle. Expressed in degrees.
dMin float Epicentral distance to nearest station used in origin computation.
dRms float RMS misfit for the origin. What does RMS mean? CLEANUP dk 05/01/00.
iAssocRD int Number of readings associated with the Origin.
iAssocPh int Number of phases associated with the Origin.
iUsedRd int Number of readings used to calculate the Origin.
iUsedPh int Number of phases used to calculate the Origin.
iE0Azm int Azimuth of the smallest principal error of the error elipse. Expressed as Degrees east of North.
iE1Azm int Azimuth of the intermediate principal error of the error elipse. Expressed as Degrees east of North.
iE2Azm int Azimuth of the largest principal error of the error elipse. Expressed as Degrees east of North.
iE0Dip int Dip of the smallest principal error of the error elipse. Expressed as Degrees below horizontal.
iE1Dip int Dip of the intermediate principal error of the error elipse. Expressed as Degrees below horizontal.
iE2Dip int Dip of the largest principal error of the error elipse. Expressed as Degrees below horizontal.
dE0 float Magnitude of smallest principle error of the error elipse.
dE1 float Magnitude of intermediate principle error of the error elipse.
dE2 float Magnitude of largest principle error of the error elipse.
dMCI double Confidence interval. CLEANUP??? Help? Units, detailed meaning?
iFixedDepth int Flag indicating whether a fixed depth model was used to calculate the Origin.



EWDB_MagStruct

Type: struct _EWDB_MagStruct
Description: Summary magnitude struct.

Field Type Description
idMag EWDBid Database ID for the Magnitude.
szMagType char[256] Magnitude type: Duration, Local, BodyAmp, Surface. CLEANUP!! This is somewhat hosed(technical term), as what we describe here is not what we expect. I believe that we expect to see either "DurCoda" for duration magnitudes, or "AmpBody" for anything else. Need to review the code.
dMagAvg float The summary magnitude. It is computed as a weighted average of a bunch of station magnitudes.
iNumMags int Number of station magnitudes used to compute the dMagAvg.
dMagErr float The potential error of the summary magnitude. CLEANUP! Detailed units, meaning? I believe this is the Median Absolute Deviation of the station mags.
idEvent EWDBid Database identifier of the Event with which this Magnitude is associated.
BindToEvent int Boolean flag indicating whether or not this Magnitude should be bound to an Event when it is inserted into the DB. If yes, it is associated with the Event identified by idEvent upon insertion into the DB.
SetPreferred int Boolean flag indicating whether or not this Magnitude should be set as the Preferred Magnitude for the Event identified by idEvent. This flag is ignored if BindToEvent is FALSE.
ExternalTableName char[256] Reserved
xidExternal char[256] Reserved
szSource char[256] Identifier of the source/author that declared the Origin. This could be the Logo of the Earthworm module that generated the Origin, or the login name of an analyst that reviewed it. CLEANUP Should this be the human readable version of the source name?? It should be consistent with Origin and Mechanism.



EWDB_ArrivalStruct

Type: struct _EWDB_ArrivalStruct
Description: Arrival structure describing information about a phase, possibly with information relating the phase to an Origin.
Note: The fields szCalcPhase - tResPick are only legitimate if a phase is associated with an Origin. If idOrigin is not set then these feels should be ignored.

Field Type Description
idPick EWDBid Database ID of the Pick.
idOriginPick EWDBid Database ID of the OriginPick, the record relating the Pick(phase) to an Origin.
idOrigin EWDBid Database ID of the Origin with which this phase is associated.
idChan EWDBid Database ID of the channel that this pick came from.
pStation EWDB_StationStruct Station/Component information for the channel associated with this phase.
szCalcPhase char[6] The calculated type of the Phase: P, S, PKP(sp?), and others up to 5 chars. This values is assigned by the phase associator or locator that created the Origin that this phase is associated with. This is not the phase type given by the picker.
tCalcPhase double The onset time of the phase, according to the associator/locator.
dWeight float The weight of the phase pick in calculating the Origin.
dWeight float The weight of the phase pick in calculating the Origin.
dDist float The epicentral(CLEANUP! is this right, or is it the distance along the raypath?) distance to the station where the phase was observed.
dAzm float Azimuthal direction from the station where the phase was observed to the epicenter. Expressed as degrees east of North.
dTakeoff float Takeoff angle of the Phase from the hypocenter.
tResPick float Pick residual in seconds.
szExternalPickID char[16] Reserved
szExtPickTabName char[16] Reserved
szObsPhase char[6] The type of the Phase: P, S, PKP(sp?), and others up to 5 chars. This values is assigned by the picker(the entity that observed the phase arrival).
tObsPhase double The onset time of the phase, according to the picker.
cMotion char The initial motion of the phase: U (up), D (down).
cOnset char The onset type of the phase: CLEANUP??? what are the possible onset values? Berkeley has several in their documentation.
dSigma double Potential Phase error. Expressed in seconds. CLEANUP detailed meaning?



EWDB_StationMagnitudeStruct

Type: struct _EWDB_StationMagnitudeStruct
Description: Information for a station magnitude calculation.

Field Type Description
idMagLink EWDBid DB ID of the station magnitude.
idMeasurement EWDBid DB ID of the measurement that the station magnitude is calculated from. The measurement could be an amplitude or Coda duration or other.
idMagLink EWDBid DB ID of the station magnitude.
idChan EWDBid Database ID of the channel that this pick came from.
pStationInfo EWDB_StationStruct Station/Component information for the channel associated with this phase.
dMag float Station magnitude.
dWeight float Weight of the Station Magnitude in calculating the summary magnitude this Station Magnitude is associated with.
dMeasurementObs double Observed measurement upon which this station magnitude is based.
dMeasurementCalc double Calculated measurement upon which this station magnitude is based. This is envisioned to be used primarily with Coda information where there may be both an observed Coda and a calculated Coda.
szMagType char[8] Type of magnitude. See szMagType in EWDB_MagStruct.
tMeasurement double Time of the measurement. Seconds since 1970.
tPeriod double Time period of the measurement. Valid only if the measurement was an amplitude, such as for Mb or ML.



EWDB_PhaseAmpStruct

Type: struct _EWDB_PhaseAmpStruct
Description: Station Magnitude information in a different form than EWDB_StationMagnitudeStruct.

Field Type Description
szExternalTableName char[256] Reserved
xidExternal char[256] Reserved
idChan EWDBid Database ID of the channel that this pick came from.
idAmpBody EWDBid DB ID of the body amplitude record for this station magnitude.
dAmp float Amplitude measurement. CLEANUP Units? Counts or microns or what?
tScaling double Scaling(starting) time of the amplitude. Expressed as seconds since 1970.
tPeriod double Time period of the measurement.
idMagLink EWDBid DB ID of the station magnitude.
idMagnitude EWDBid DB ID of the magnitude that this station magnitude is associated with.
szMagType char[8] Type of magnitude. See szMagType in EWDB_MagStruct.
dMag float Station magnitude.
dWeight float Weight of the Station Magnitude in calculating the summary magnitude this Station Magnitude is associated with.
idDatum EWDBid DB ID of the measurement record. This should be equal to either idAmpBody or idDurCoda depending on the magnitude type.
tOn double[EWDB_MAXIMUM_AMPS_PER_CODA] Array of window starting times for coda average amplitude measurements. Expressed as seconds since 1970.
tOff double[EWDB_MAXIMUM_AMPS_PER_CODA] Array of window ending times for coda average amplitude measurements. Expressed as seconds since 1970.
AvgAmp double[EWDB_MAXIMUM_AMPS_PER_CODA] Array of average amplitude values for coda average amplitude measurements. Expressed as digital counts. tOn[x] and tOff[x] describe a time window during a coda at a component. AvgAmp[x] is the average wave amplitude during that window. A series of timed average amplitude measurements can be combined with a decay algorithm to estimate the coda termination time.
idTCoda EWDBid DB ID of the coda termination record.
tCodaTermObs double Time when the coda associated with this station duration magnitude, was observed to have ended. Time is expressed as seconds since 1970.
tCodaTermXtp double Time when the coda associated with this station duration magnitude, was calculated to have ended, based on coda average amplitude vales and a decay rate. Time is expressed as seconds since 1970.
idDurCoda EWDBid DB ID of the coda duration record calculated by associated a Phase pick with a coda termination.
idPick EWDBid DB ID of the Phase arrival(pick) that is associated with a Coda termination from the same channel, to produce the coda duration(s) that this station magniutde is calculated from.



EWDB_WaveformStruct

Type: struct _EWDB_WaveformStruct
Description: Structure containing waveform information and a raw waveform snippet.
Note: There should probably also be an iStorageMethod value that indicates how the data is stored (in the DB, out of the DB as a file, at an ftp site, etc.)

Field Type Description
idWaveform EWDBid DB ID of the Waveform snippet.
idChan EWDBid Database ID of the channel that this pick came from.
tStart double Beginning time of the waveform snippet. Expressed as seconds since 1970.
tEnd double Ending time of the waveform snippet. Expressed as seconds since 1970.
iDataFormat int Format of the actual waveform snippet data. See EWDB_WAVEFORM_FORMAT_UNDEFINED.
iByteLen int Length of the actual waveform snippet data in bytes.
binSnippet char * Actual waveform snippet. Its length is specified by iByteLen and its format is specified by iDataFormat.



EWDB_CriteriaStruct

Type: struct _EWDB_CriteriaStruct
Description: Structure for specifying criteria for object searches. Criteria can be used to retrieve a list of certian objects, like Events or Stations.

Field Type Description
Criteria int Set of flags specifying which criteria to use. See EWDB_CRITERIA_USE_TIME for a list of the possible criteria flags. The flags are not mutually exclusive. The values of the remaning members will be ignored if their matching criteria flags are not set.
MinTime int The minimum acceptable time for a list value. Specified as seconds since 1970. If time were a criteria for selecting a list of events, then all events in the returned list would have to have occurred after MinTime.
MaxTime int The maximum acceptable time for a list value. Comparable to MinTime. Expressed as seconds since 1970.
MinLon float The minimum acceptable longitude for a list value. Same principal as MinTime. Expressed as degrees. (West=negative)
MaxLon float The maximum acceptable longitude for a list value. Same principal as MinTime. Expressed as degrees. (West=negative)
MinLat float The minimum acceptable lattitude for a list value. Same principal as MinTime. Expressed as degrees. (South=negative)
MaxLat float The maximum acceptable lattitude for a list value. Same principal as MinTime. Expressed as degrees. (South=negative)
MinDepth float The minimum acceptable depth for a list value. Same principal as MinTime. Expressed as kilometers(km) below surface.
MaxDepth float The maximum acceptable depth for a list value. Same principal as MinTime. Expressed as kilometers(km) below surface.



EWDB_External_StationStruct

Type: struct _EWDB_External_StationStruct DESCRIPTION
Description:
Note: This is a redundant structure and it should be replaced by EWDB_StationStruct. The only difference between the two is a Description field. If this is deemed neccessary, then it should either be added to EWDB_StationStruct, or EWDB_External_StationStruct should contain a EWDB_StationStruct as a member.


EWDB_ChanTStruct

Type: struct _EWDB_ChanTStruct
Description: Structure for storing information including a link to the raw infrastructure device information for a channel for a time period.

Field Type Description
idChanT EWDBid DB ID of the channel validity range(ChanT) for which the associated transform function is valid.
idChan EWDBid DB ID of the channel for which this struct represents a validity range.
tOn double[EWDB_MAXIMUM_AMPS_PER_CODA] Array of window starting times for coda average amplitude measurements. Expressed as seconds since 1970.
tOff double[EWDB_MAXIMUM_AMPS_PER_CODA] Array of window ending times for coda average amplitude measurements. Expressed as seconds since 1970.
idCompT EWDBid DB ID of the component timerange that is assocaited with this channel timerange.
idDeviceslot EWDBid DB ID of the raw infrastructure DeviceSlot which holds the first(last) device in this channel for this timerange.
iPlexor EWDBid The output connector (akin to pin#) of the device in the device slot identified by idDeviceSlot that is the final output of the current device channel for the current time period.



EWDB_PZNum

Type: struct _EWDB_PZNum
Description: Describes a Pole/Zero as a complex number.

Field Type Description
dReal double Real portion of this number.
dImag double Imaginary portion of this number.



EWDB_TransformFunctionStruct

Type: struct _EWDB_TransformFunctionStruct
Description: Structure for describing Poles and Zeros based transform/transfer functions.

Field Type Description
idCookedTF EWDBid DB ID of the transfer function.
szCookedTFDesc char[50] Function name or description.
iNumPoles int Number of Poles in the function.
iNumZeroes int Number of Zeroes in the function.
Poles EWDB_PZNum [EWDB_MAX_POLES_OR_ZEROES] Poles of the function.
Zeroes EWDB_PZNum [EWDB_MAX_POLES_OR_ZEROES] Zeroes of the function.



EWDB_ChanTCTFStruct

Type: struct _EWDB_ChanTCTFStruct
Description: Structure for storing the Poles/Zeroes transfer function for a channel/time range, including gain and samplerate.

Field Type Description
idChanT EWDBid DB ID of the channel validity range(ChanT) for which the associated transform function is valid.
dGain double Scalar gain of the channel for the ChanT.
dSampRate double Digital sample rate of the waveforms exiting the channel for the ChanT.
tfsFunc EWDB_TransformFunctionStruct Poles and Zeroes transform function for the channel time interval.



EWDB_SnippetRequestStruct

Type: struct _EWDB_SnippetRequestStruct
Description: Structure for storing parameters for a waveform request. This structure is used to store (in the database) a request for waveform data. Requests are presumably later gathered by a concierge type program that recovers as many desired waveforms as possible. This structure describes a time interval of interest for which it is interested in data from a particular channel. It defines the channel whose data it is interested in, the time interval for which it wants data, how many attempts should be made to retrieve the data, how often each attempt should be made, and what DB idEvent if any that the data should be associated with when retrieved.

Field Type Description
idSnipReq EWDBid DB ID of the waveform request(SnipReq) that this structure's data is associated with.
idChan EWDBid DB ID of the sesimic data channel for which the request wants data.
tStart double Starting time of the desired time interval.
tEnd double Ending time of the desired time interval.
idEvent EWDBid DB ID of the Event with which the desired data should be associated.
iNumAttempts int Number of attempts that should be made to retrieve the desired data.
tAttemptInterval double Time between retrieval attempts (in seconds). (Note: This value may be used as a starting value with which a series of ever increasing intervals can be calculated. (For example using a tAttemptInterval of 1 second, and an AttemptMultiple of 2 might result in retrieval attempts at 1, 2, 4, 8, and 16 seconds if a 2^^x seris is used.) Please see documentation for the retrieval program to see what sort of series is being used.
dAttemptMultiple double Multiple used in calculating a series of retrieval times. See tAttemptInterval above.
idExistingWaveform EWDBid DB ID of a Waveform in the DB that contains partial data for the original request.
ComponentInfo EWDB_StationStruct Station/Component information for the channel associated with this snippet request.



EWDB_FunctionBindStruct

Type: struct _EWDB_FunctionBindStruct
Description: Structure for storing parameters for a function bind. This structure is used to store (in the database raw infrastructure schema) a binding between a device and a response function. This structure's contents dictate that a certain device has a certain piece of functionality (presumably related to signal response) for a time period between tOn and tOff.

Field Type Description
idFunctionBind EWDBid DB ID of the function bind mechanism.
idDevice EWDBid DB ID of the device to which a given functionality is bound.
tOn double Start of the time interval for which the functionality exists for the given device.
tOff double End of the time interval for which the functionality exists for the given device.
idFunction EWDBid DB ID of the Function bound to the device.
szFunctionName char[] Name of the function type of the function identified by idFunction.
bOverridable int Flag indicating whether the function is an overridable default for the device. Devices can be derived from other devices, and the derived devices inherit the functional properties of the inheritees. This flag indicates if this is a property of the inheritee that should be overriden by the derived device.
pFunction void * Pointer to the actual Function that is being bound by this FunctionBind.