Skip to content
Console

QuakeWatch-Pro

QuakeWatch-Pro is the computer companion for ES series seismometers. It is written in Python and runs on Windows, macOS, and Linux. It reads seismometer data over USB Type-C, stores it in a local database, and plots the last 60 seconds of the three-axis waveform, spectrum, acceleration, and instrumental seismic intensity in real time.

QuakeWatch-Pro is two programs. Keep both of them running:

Program Purpose
data_collector.py Reads seismometer data from the serial port, stores it in earthquake_data.db, and provides it to main.py
main.py Opens the chart window and shows the waveform and seismic intensity

On the GitHub page, download the source with git clone or Download ZIP, and extract it anywhere.

Run the commands below in the QuakeWatch-Pro folder.

  1. Open a terminal and change to the QuakeWatch-Pro folder

    終端機視窗
    cd your/path/QuakeWatch-Pro
  2. Create and activate a virtual environment

    A virtual environment keeps this install from conflicting with other Python packages on the computer.

    終端機視窗
    python -m venv venv
    .\venv\Scripts\activate
  3. Install the dependencies

    終端機視窗
    pip install -r requirements.txt
  1. Connect the seismometer

    Connect the seismometer to the computer with a USB Type-C cable. First close other programs that use the serial port, such as the recovery tool.

  2. Start the data collector

    In a terminal with the virtual environment activated, run:

    終端機視窗
    python data_collector.py

    The program lists the available serial ports. If there is only one, it selects it. If there are several, enter the seismometer’s number and press Enter:

    可用串列埠:
    [0] COM4 - Silicon Labs CP210x USB to UART Bridge (COM4)
    [1] COM1 - 通訊連接埠 (COM1)
    請選擇 [0-1] 或 q 退出: 0

    After you see 「開始收集數據」, the program periodically prints a line that starts with [統計. If the sample count in that line keeps increasing, data is coming in.

    The serial port name is COM plus a number, for example COM4.

  3. Open the chart window

    Open another terminal, change to the same folder, activate the virtual environment, and then run:

    終端機視窗
    python main.py

    The window shows charts of the three-axis acceleration, the 0–25 Hz spectrum, PGA, and instrumental seismic intensity for the last 60 seconds.

Data that comes in is stored in earthquake_data.db (SQLite) in the QuakeWatch-Pro folder. You can query it with any SQLite tool:

Table Contents
sensor_data Three-axis acceleration, 50 samples per second. Columns: timestamp_ms, x, y, z, received_time
intensity_data Instrumental seismic intensity and acceleration value a, about one row every 0.5 seconds. Columns: timestamp_ms, intensity, a, received_time
終端機視窗
sqlite3 earthquake_data.db "SELECT * FROM intensity_data ORDER BY received_time DESC LIMIT 10;"

The database does not delete old data on its own. If the file gets too large, close both programs, then delete earthquake_data.db. The next launch creates it again.

  • The statistics stay at 0: Confirm that you selected the seismometer’s serial port, and that QuakeWatch-Pro supports the firmware version on the seismometer (see Firmware compatibility above).
  • The statistics were increasing, then stopped: The seismometer stopped sending data. Check the USB cable, or unplug it and plug it back in.
  • The serial port is not found: See The computer cannot find the seismometer serial port.