Updated to reflect the new file storage location and access abilities of EarthScope National Geophysical Facility (NGF) as of 9/8/2026. If you encounter any issues, please submit a GitHub issue and/or contact Lkeen@mathworks.com
This repository simplifies access to those services from MATLAB®, enabling users to retrieve seismic waveform data in formats such as MiniSEED and SAC, import them directly into MATLAB, and integrate them into existing analysis workflows without manual URL construction or file handling.
A workflow for automatically accessing data from the NSF National Geophysical Facilities Web Services (operated by Earthscope) seismic data services via their FDSNWS interface.
This workflow allows you to:
- Specify FDSNWS dataselect parameters in a single table.
- Programmatically build a standards-compliant URL.
- Retrieve and parse seismic traces (MiniSEED or SAC) directly into MATLAB®.
Examples on how to plot and process the data provided.
The code centers around the seisFetchObj.m object, which contains functions to call for retrieving data based on variable inputs.
-
MATLAB® (R2019b or newer)
-
At least one of the following third-party MATLAB File Exchange utilities by François Beauducel must be installed on your MATLAB path::
- rdmseed (for MiniSEED)
- rdsac (for SAC)
-
rdmseed/mkmseed: https://www.mathworks.com/matlabcentral/fileexchange/28803-rdmseed-and-mkmseed-read-and-write-miniseed-files
-
rdsac/mksac: https://www.mathworks.com/matlabcentral/fileexchange/46356-rdsac-and-mksac-read-and-write-sac-seismic-data-file
Note: These third-party utilities are not included with this repository and must be installed separately.
No data returned / 404
- Verify network, station, channel, and time window.
- Try broadening the time range or removing optional filters (e.g., quality).
Decoding errors
- Ensure rdmseed is installed for MiniSEED and rdsac for SAC.
- Confirm that the selected file_format aligns with the parser you have.
Timestamp issues
- Use datetime(..., 'ConvertFrom','datenum') as shown to visualize real time.
- Check for timezone assumptions in headers if times look shifted.
Authentication
- If using useAuth = true, make sure you have valid credentials

