adept logo

Event Module:

The event module is a python program in an Anaconda environment; it is the only piece of ADEPT which runs in Anaconda. Anaconda is needed here because the event module (UpdateCatalog.py) relies on an Anaconda release of a python module from the USGS called libcomcat to get access to the USGS earthquake library.

UpdateCatalog.py is run daily from a cron job, via a bash script called RunUpdate.bash. The bash script activates the anaconda environment and then executes UpdateCatalog.py

UpdateCatalog.py requests from the USGS catalog all earthquakes greater than M5.9 and older than 45 days (to allow for revisions of recent earthquakes), and which are new or have been modified since the UpdateCatalog.py module was last successfully run. Events older than 10 years are ignored on the assumption that there will be no timing or location revisions in earthquakes that old.

New earthquakes are added to the event table in the database, and any revised earthquakes are modified in the database. An entry is made in the event log table of the database indicating which events were added or modified.

Here is a representation of the event table in the database:

column name data type notes
eventid text event id assigned by the organization characterizing the earthquake
eventname text usually the approximate location of the event in text
edatetime timestamp without time zone date and time of the event, in UTC
magnitude numeric event magnitude
magtype text magnitude type (mww, etc.)
latitude numeric event location
longitude numeric event location
depth numeric event depth in km
url text url to the USGS event web page
nodal_plane_1_dip numeric dip for nodal plane 1
nodal_plane_1_rake numeric rake for nodal plane 1
nodal_plane_1_strike numeric strike for nodal plane 1
nodal_plane_2_dip numeric dip for nodal plane 2
nodal_plane_2_rake numeric rake for nodal plane 2
nodal_plane_2_strike numeric strike for nodal plane 2
mrr numeric moment tensor
mtt numeric moment tensor
mpp numeric moment tensor
mrt numeric moment tensor
mrp numeric moment tensor
mtp numeric moment tensor
directory text location on disk for the downloaded and processed sac files
stationcount numeric not used
nextprocess timestamp without time zone not used
nextchannels timestamp without time zone next date the Channels module should be run for this event
downloading boolean not used
newfiles boolean if true, new or revised text files for this event will be generated
priority integer higher numbers are processed first
haschannels boolean defaults to false, set to true after channels have been downloaded