Main Page Class Hierarchy Compound List File List Compound Members File Members

# sac_2_ewevent.c File Reference

`#include <earthworm.h>`
`#include <sac_2_ewevent.h>`

Go to the source code of this file.

## Functions
time_t | timegm_ew (struct tm *)
double | SAC_reftime (struct SAChead *)
size_t | SAC_Ktostr (char *, int, char *)
int | Sac2EWEvent (EWEventInfoStruct *pEvent, struct SAChead *sacheadp, char *sacdatap, int CopyData)
int | SacHeaderInit (struct SAChead *sacheadp)
int | WriteSAC_init (char *szOutDir, char *szOutputFormat, int bDebug)
int | WriteSAC_shutdown (void)
int | WriteSAC_Event_BAD (EWEventInfoStruct *pEvent, int WriteHtml)
int | WriteSAC_StartEvent (EWEventInfoStruct *pEvent)
int | WriteSAC_EndEvent (void)
int | ProduceSAC_NextStationForEvent (EWChannelDataStruct *pChannel)
int | WriteSAC_NextStationForEvent (EWChannelDataStruct *pChannel)
int | WriteSAC_Set_dGapThresh (float IN_dGapThresh)
## Variables
float | WriteSAC_dGapThresh = 1.5

## Function Documentation

int ProduceSAC_NextStationForEvent | ( | EWChannelDataStruct * | pChannel | ) |

| Definition at line 750 of file sac_2_ewevent.c. References TRACE_REQ::actEndtime, TRACE_REQ::actLen, TRACE_REQ::actStarttime, _SAC_StationStruct::bResponseIsValid, TRACE_REQ::bufLen, _SAC_ArrivalStruct::cFMotion, TRACE_REQ::chan, _SAC_ArrivalStruct::cOnset, _SAC_ArrivalStruct::cPhase, _SAC_ArrivalStruct::dAzm, _SAC_ArrivalStruct::dCodaLen, _SAC_ArrivalStruct::dDist, _SAC_StationStruct::dElev, _SAC_ResponseStruct::dGain, _SAC_StationStruct::dLat, _SAC_StationStruct::dLon, EW_SUCCESS, _SAC_ResponseStruct::iNumPoles, _SAC_ResponseStruct::iNumZeroes, _SAC_ArrivalStruct::iPhaseWt, logit(), MAGTYPE_DURATION, TRACE_REQ::net, TRACE_REQ::pBuf, _SAC_ResponseStruct::Poles, _SAC_StationStruct::pResponse, TRACE_REQ::reqEndtime, TRACE_REQ::reqStarttime, SACPABase_next_scn(), SACPABase_write_parametric(), SACPABase_write_stainfo(), SACPABase_write_trace(), TRACE_REQ::sta, _SAC_ArrivalStruct::tPhase, and _SAC_ResponseStruct::Zeroes. Referenced by WriteSAC_Event_BAD().

int Sac2EWEvent | ( | EWEventInfoStruct * | pEvent,
|  | struct SAChead * | sacheadp,
|  | char * | sacdatap,
|  | int | CopyData
| ) |

| Definition at line 159 of file sac_2_ewevent.c. References SAChead::a, SAChead::az, SAChead::dist, SAChead::evdp, SAChead::evla, SAChead::evlo, EW_FAILURE, EW_SUCCESS, SAChead::f, InitEWChan(), SAChead::ka, SAChead::kcmpnm, SAChead::knetwk, SAChead::kstnm, SAChead::kt0, logit(), MAGTYPE_DURATION, SAChead::npts, SAChead::o, SAC_Ktostr(), SAC_reftime(), SACUNDEF, SAChead::stel, SAChead::stla, SAChead::stlo, and SAChead::t0.

size_t SAC_Ktostr | ( | char * | ,
|  | int | ,
|  | char * |
| ) |

| Definition at line 604 of file sac_2_ewevent.c. References K_LEN. Referenced by Sac2EWEvent().

double SAC_reftime | ( | struct SAChead * |  | ) |

| Definition at line 563 of file sac_2_ewevent.c. References logit(), SAChead::nzhour, SAChead::nzjday, SAChead::nzmin, SAChead::nzmsec, SAChead::nzsec, SAChead::nzyear, and timegm_ew(). Referenced by Sac2EWEvent().

int SacHeaderInit | ( | struct SAChead * | sacheadp | ) |

| Definition at line 499 of file sac_2_ewevent.c. References EW_FAILURE, EW_SUCCESS, logit(), MAXINT, MAXSTRING, NUM_FLOAT, SAC_I_D, SAC_IBEGINTIME, SAC_ITIME, SAC_IUNKN, SAChead2::SACfloat, SAChead2::SACint, SAChead2::SACstring, SACUNDEF, and SACVERSION.

time_t timegm_ew | ( | struct tm * |  | ) |

| Definition at line 107 of file time_ew.c.

int WriteSAC_EndEvent | ( | void |  | ) |

| Definition at line 739 of file sac_2_ewevent.c. References SACPABase_end_ev(). Referenced by WriteSAC_Event_BAD().

int WriteSAC_Event_BAD | ( | EWEventInfoStruct * | pEvent,
|  | int | WriteHtml
| ) |

| Definition at line 670 of file sac_2_ewevent.c. References EW_SUCCESS, logit(), ProduceSAC_NextStationForEvent(), WriteSAC_EndEvent(), WriteSAC_NextStationForEvent(), and WriteSAC_StartEvent().

int WriteSAC_init | ( | char * | szOutDir,
|  | char * | szOutputFormat,
|  | int | bDebug
| ) |

| Definition at line 642 of file sac_2_ewevent.c. References SACPABase_Debug(), and SACPABase_init().

int WriteSAC_NextStationForEvent | ( | EWChannelDataStruct * | pChannel | ) |

| Definition at line 956 of file sac_2_ewevent.c. References EW_SUCCESS, logit(), and SACPABase_end_scn(). Referenced by WriteSAC_Event_BAD().

int WriteSAC_Set_dGapThresh | ( | float | IN_dGapThresh | ) |

| Definition at line 976 of file sac_2_ewevent.c. References WriteSAC_dGapThresh.

int WriteSAC_shutdown | ( | void |  | ) |

| Definition at line 657 of file sac_2_ewevent.c. References SACPABase_close().

int WriteSAC_StartEvent | ( | EWEventInfoStruct * | pEvent | ) |

| Definition at line 719 of file sac_2_ewevent.c. References _SAC_OriginStruct::dElev, _SAC_OriginStruct::dLat, _SAC_OriginStruct::dLon, SACPABase_next_ev(), and _SAC_OriginStruct::tOrigin. Referenced by WriteSAC_Event_BAD().

## Variable Documentation

float WriteSAC_dGapThresh = 1.5

| Definition at line 141 of file sac_2_ewevent.c. Referenced by WriteSAC_Set_dGapThresh().