Skip to content

Releases: jpjones76/SeisIO.jl

SeisIO v1.2.1

23 Mar 04:09
Compare
Choose a tag to compare

SeisIO v1.2.1
2020-03-22

Fixes a nuisance issue with writesac, updates the tutorials, and improves the consistency between SeisIO and DSP.jl filtering.

1. Public API Changes

None

2. Bug Fixes

  • The tutorial installer now checks that IJupyer is installed before trying to load it.

3. Consistency, Performance

filtfilt!

SeisIO filtering should now be more robust on Float32 data. Breaking combinations of data and filter parameters should now be nearly identical for DSP.filtfilt and SeisIO.filtfilt!. (Implicit feature request from issue #82)

writesac

Reverted to creating SAC v6 files by default.

  • Create SAC v7 files by using keyword argument nvhdr=7.
  • This is a change from older versions:
    • SeisIO v1.2.0 only created SAC v7 files.
    • Earlier SeisIO releases only created SAC v6 files.

The goal of this change is to match the SAC file version of data requests. IRIS requests in SAC format still download v6 files as of this SeisIO release. If that changes, we will update the default value of nvhdr.

Dev Note: as it turns out, SAC itself is not forward-compatible with respect to file header version (variable NVHDR in SAC files). A file with NVHDR=7 (SAC v102.0) will not read into SAC v101.6a. We were very surprised to discover this, as the file format documentation suggests that v7 of the SAC file header should work with v6 readers.

4. Developer API Changes

None

5. Documentation

Tutorial Updates

  • Added basic information to the first tutorial for users who are completely new to Jupyter.
  • Added code, suggestions, and workarounds to the Processing tutorial to help with potential issues inherent to near-real-time data requests.

SeisIO v1.2.0

02 Feb 09:33
Compare
Choose a tag to compare

SeisIO v1.2.0
2021-02-02

SeisIO v1.2.0 introduces scan_seed for rapid scans of mini-SEED files.

1. Public API Changes

scan_seed

scan_seed is a new function in SeisIO.SEED intended to quickly scan large mini-SEED files. (Feature request, issue #62)

  • scan_seed reports changes within a mini-SEED file, including:
    • Samples per channel (KW npts)
    • Gaps (KW ngaps), or exact gap times (seg_times=true)
    • Changes in sampling frequency (KW nfs), or exact times of fs changes (fs_times=true)
  • Reports to stdout (suppress with quiet=true)
  • Returns a String array of comma-delineated outputs, one entry per channel.
  • Please open feature request Issues to request scans for additional changes.
  • This won't interact directly with online SEED requests. To apply scan_seed to an online request for a seed volume, use w=true to dump the raw request to disk, and scan the file(s) created by the download.

rescale

New processing function rescale! quickly scales data in a structure and adjusts the gain.

SAC updates

  • Read/write support for SAC file version 7 (SAC v102.0).
  • New function fill_sac_evh! in SeisIO.Quake fills some SeisEvent header data from a SAC file.

2. Bug Fixes

  • ungap! should now work correctly on a channel whose only time gap occurs before the last sample. (Fixes issue #74)
  • Attempting to call resample! on a NodalData object should no longer error. Merged PR #68 from tclements/Resample. (Fixes issue #65.)
  • writesac should now write begin time (word 5) in a way that never shifts sample times, even by subsample values. (Fixes issue #60)
  • Parsing a SEED Blockette [061] now correctly returns the stage, rather than nothing.
  • Quake submodule
    • Calling writesac on a SeisEvent object now always writes event header values to the correct byte indices for SAC v101 and above.

3. Consistency, Performance

  • Performance will be slightly better when reading large files whose data contain many negative time gaps. (Partly fixes issue #72)
    • This change decreases memory consumption in this "end member" case by ~75% and read time by ~40%.
    • The memory overhead for extremely large files containing very many negative time gaps is still untenable; this very rare end-member case cannot be fixed without fundamentally rewriting all SeisIO timekeeping.
  • NodalData now uses AbstractArray{Float32, 2} for the :data field, rather than Array{Float32, 2}. (Merged PR #66 from tclements/Nodal)
  • NodalLoc (:loc field of NodalData) now has x, y, z subfields. (Merged PR #64 from tclements/NodalLoc)
  • convert has been expanded:
    • convert(NodalData, S) and convert(EventTraceData, S) should now work for all GphysData subtypes.
    • convert(NodalChannel, C) and convert(EventChannel, C) should now work for all GphysChannel subtypes.
    • EventTraceData(S::T) where T<:GphysData is now aliased to convert(EventTraceData, C).
    • EventChannel(C::T) where T<:GphysChannel is now defined as an alias to convert(EventChannel, C).
    • NodalData(S::T) where T<:GphysData is now aliased to convert(NodalData, C).
    • NodalChannel(C::T) where T<:GphysChannel is now defined as an alias to convert(NodalChannel, C).
    • SeisData(S::T) where T<:GphysData should now be aliased to convert(SeisData, S) for all GphysData subtypes.
  • merge! has been extended to GphysChannel subtypes. For this functionality, the values of each field in (:id, :fs, :gain, :loc, :resp) must be either the same for both objects, or unset in at least one object.

4. Developer API Changes

  • Added function t_bounds(t, Δ) to the suite of internal time functions. This is a fast, low-memory alternative to t_win(t, Δ)[1].
  • Added function cmatch_p!(C1, C2) for partial matches of paired GphysChannels. Given two objects C1, C2, if the values of (:id, :fs, :gain, :loc, :resp) are the same between objects, or unset, they're considered a match. On a match, unset field values are filled automatically from the corresponding field of the matching object.

5. Documentation

  • Merged pull request #77 from tclements/master. (Fixes issue #76)

SeisIO v1.1.0

27 Aug 08:23
Compare
Choose a tag to compare

SeisIO v1.1.0 adds submodule SeisIO.Nodal for nodal data, plus initial support for IRISPH5 requests. Other changes include fixes to several rare and/or minor bugs, code consistency improvements, a much-needed sync! rewrite, and documentation updates.

1. Public API Changes

SAC

  • SAC data files no longer track the LOC field of :id; thus, IDs NN.SSSSS.LL.CCC and NN.SSSSS..CCC will be written and read identically to/from SAC.
    • This change realigns SeisIO SAC handling with the official format spec.
    • Explanation: Some data sources store the LOC field of :id in KHOLE (byte offset 464). We followed this convention through SeisIO v1.0.0. However, KHOLE is usually an event property.

SeedLink

Functions seedlink and seedlink! now accept keyword seq= for starting sequence number, consistent with SeisComp3 protocols.

SEG Y

A minor change to SEGY file support could break user work flows that depend on read_data("segy", ..., full=true). Two keys have been renamed:

  • :misc["cdp"] => :misc["ensemble_no"]
  • :misc["event_no"] => :misc["rec_no"]

New: read_data("segy", ll=...)

read_data("segy", ...) has a new keyword: ll= sets the two-character location field in :id (NNN.SSS.LL.CC), using values in the SEG Y trace header. Specify using UInt8 codes; see official documentation for codes and meanings.

IRISWS timeseries

SeisIO has made some minor changes to get_data("IRIS", ... ) behavior, due to server-side changes to IRISWS timeseries:

  • The Stage 0 (scalar) gain of each channel is logged to :notes for fmt="sacbl" ("sac") and fmt="geocsv".
  • The output of get_data("IRIS", ... , w=true) differs slightly from calling read_data on the files created by the same command:
    • This affects the fields :misc and :notes.
    • :loc will be set in objects read from SAC and GeoCSV files, but not mini-SEED.
    • Data in objects read from SAC or GeoCSV files will be scaled by the Stage 0 gain; fix this with unscale!.

New: .Nodal submodule

Added SeisIO.Nodal for reading data files from nodal arrays

  • New types:
    • NodalData <: GphysData
    • NodalChannel <: GphysChannel
    • NodalLoc <: InstrumentPosition
  • Wrapper: read_nodal(fmt, file, ...)
    • Current file format support:
      • Silixa TDMS ("silixa")
      • Nodal SEG Y ("segy")
  • Utility functions: info_dump

2. Bug Fixes

  • Fixed a minor bug with SEG Y endianness when calling guess.
  • guess now tests all six required SEG Y file header values, rather than five.
  • SEED submodule support functions (e.g. mseed_support()) now correctly info dump to stdout
  • merge! is now logged in a way that show_processing catches
  • read_qml on an event with no magnitude element now yields an empty :hdr.mag
  • show now reports true number of gaps when :x has a gap before the last sample
  • Fixed two breaking bugs that were probably never seen in real data:
    • Extending a time matrix by appending a one-sample segment to :x can no longer break time handling; see changes to t_extend for fix details.
    • write_hdf5 with ovr=false no longer overwrites a trace in an output volume when two sample windows have the same ID, start time string, and end time string; instead, the tag string is incremented.
      • This previously happened when two or more segments from one channel started and ended within the same calendar second.
  • The data processing functions ungap!, taper!, env!, filtfilt!, and resample! now correctly skip irregularly-sampled channels.
  • Irregularly-sampled channels are no longer writable to ASDF, which, by design, does not handle irregularly-sampled data.
  • ASDF groups and datasets are now always closed after reading with read_hdf5.
  • In Julia v1.5+, calling sizeof(R) on an empty MultiStageResp object should no longer error.

SeisIO Test Scripts

Fixed some rare bugs that could break automated tests.

  • test/TestHelpers/check_get_data.jl: now uses a try-catch loop for FDSNWS station requests
  • tests/Processing/test_merge.jl: testing xtmerge! no longer allows total timespan δt > typemax(Int64)
  • tests/Quake/test_fdsn.jl: KW src="all" is no longer tested; too long, too much of a timeout risk
  • tests/Web/test_fdsn.jl: bad request channels are deleted before checking file write accuracy
  • Tests now handle time and data comparison of re-read data more robustly

3. Consistency, Performance

  • The field :x of GphysData and GphysChannel objects now accepts either AbstractArray{Float64, 1} or AbstractArray{Float32, 1}.
  • get_data with w=true now logs the raw download write to :notes
  • show now identifies times in irregular data as "vals", not "gaps"
  • show_writes now prints the filename in addition to the write operation
  • write_qml now:
    • writes :hdr.loc.typ to Event/Origin/type
    • writes :hdr.loc.npol to Event/focalMechanism/stationPolarityCount
    • has a method for direct write of SeisEvent structures
  • write_sxml now works with all GphysData subtypes
  • read_data now uses verbosity for formats "slist" and "lennartz"
  • get_data("IRIS", ...) now accepts fmt="sac" as an alias to fmt="sacbl"
  • sync! has been rewritten based on @tclements suggestions (Issue #31). Notable changes:
    • Much less memory use
    • Much faster; ~6x speedup on tests with 3 channels of length ~10^7 samples
    • More robust handling of unusual time matrices (e.g., segments out of order)
  • SeisIO.RandSeis functions have been optimized.
    • randSeisChannel has two new keywords: fs_min, fc
    • randSeisData has two new keywords: fs_min, a0

4. Developer API Changes

  • Internal function SeisIO.dtr! now accepts ::AbstractArray{T,1} in first positional argument.
  • Most internal functions have switched from keywords to positional arguments. This includes:
    • SeisIO: FDSN_sta_xml , FDSNget! , IRISget! , fdsn_chp , irisws , parse_charr , parse_chstr , read_station_xml! , read_sxml , sxml_mergehdr! , trid
    • SeisIO.RandSeis: populate_arr!, populate_chan!
    • SeisIO.SeisHDF: write_asdf (note: doesn't affect write_hdf5)
  • t_extend is now more robust and no longer needs a mini-API
    • previously, some rare cases of time matrix extension could break. They were likely never present in real data -- e.g., a time matrix with a gap before the last sample would break when extended by another sample -- but these "end-member" cases were theoretically possible.
    • the rewrite covers and tests all possible cases of time matrix extension.
  • check_for_gap! is now a thin wrapper to t_extend, ensuring uniform behavior.
  • Internal functions in SeisIO.RandSeis have changed significantly.

5. Documentation

  • Official documentation updated
  • Many docstrings have been updated and standardized. Notable examples:
    • ?timespec is now ?TimeSpec
    • ?chanspec is now ?web_chanspec
    • ?taper once again exists
    • ?seedlink keywords table is once again current
    • SeisIO.Quake:
      • ?EventChannel now produces a docstring, rather than an error
      • ?get_pha! once again describes the correct function
  • Updated and expanded the Jupyter tutorial
  • Updated and expanded the time API

Index: GitHub Issues Fixed

  • #31 : sync! rewritten.
  • #39 : tutorial updated.
  • #42 : mini-SEED calibration blockettes of this type parse correctly again.
  • #43 : reading Steim-compressed mini-SEED into an existing channel with an empty Float64 data vector should no longer error. get_data should no longer error when the first part of a segmented request includes no data from some channels.
  • #44 : documentation updated.
  • #45 : documentation updated.
  • #48 : mini-SEED Blockette 100 handling should now match the IRIS mini-SEED C library.
  • #49 : the read speed slowdown in HDF5.jl was fixed; SeisIO no longer requires HDF5 v0.12.3.
  • #50 : resample! now consistently allows upsampling.
  • #51 : resample! now correctly updates :t of a gapless SeisChannel.
  • #52: merged PR #53, adding initial support for IRISPH5 requests
  • #54 : SeisIO.dtr! now accepts ::AbstractArray{T,1} in first positional argument
  • #55 : added read_nodal("segy")
  • #56 : implemented as part of initial SeisIO.Nodal release
  • #57 : fixed by addition of KW ll= to read_data

Note: re-release 2020-08-27; v1.1.0 originally released 2020-07-07. This updated re-release fixes an issue that prevented Julia from automatically registering v1.1.0.

SeisIO v1.0.0: Publication release

03 Mar 08:05
Compare
Choose a tag to compare

SeisIO v1.0.0: Publication release
2020-03-02

This release coincides with the first SeisIO publication: Jones, J.P., Okubo, K., Clements. T., & Denolle, M. (2020). SeisIO: a fast, efficient geophysical data architecture for the Julia language. The paper was accepted by Seismological Research Letters in January 2020.

Major feature expansions and code changes include:

  • Standardization of automated logging
  • Workaround for Julia thread locking
  • Significant improvements to read_data
  • Full support for ASDF (Advanced Seismic Data Format)
  • Write support for StationXML and QuakeML

This release is designated SeisIO v1.0.0 because it's the first release that I feel meets all basic goals established when I created SeisIO.

File I/O and Thread Locking

File I/O now avoids the thread-locking disease introduced in Julia v1.3.0. Most low-level I/O commands have been changed in the following ways:

   eof          ⟹ fasteof
   position     ⟹ fastpos
   read         ⟹ fastread
   readbytes!   ⟹ fast_readbytes!
   seek         ⟹ fastseek
   seekend      ⟹ fastseekend
   skip         ⟹ fastskip

In some cases these changes yield significant speed increases. Popular data formats may read slightly slower or faster (±3%), but any observed slowdown is likely due to better logging.

Logging Improvements

Logging to :notes and :src has been broadened and standardized.

:src field in SeisIO structures

  • Reading metadata no longer overwrites :src.
  • :src should now be set consistently with design goals by all functions.

:notes field in SeisIO structures

  • The field separator for a single note has changed to ¦ (including spaces); the old separator (,) was problematic.
  • New data sources should always be logged accurately, allowing user to easily reproduce the acquisition commands.
  • Automated notes now have at least three fields, including the timestamp.
  • Time stamp format for notes is now YYYY:MM:DDThh-mm-ss.
  • Time stamps now have a precision of seconds. Millisecond timestamps were unnecessary.
  • Notes that log data sources now set the second field of the note to +source
  • tnote output changed slightly.
  • note! now extends to SeisHdr and SeisSrc objects in SeisIO.Quake

get_data logging

Bad requests and unparseable formats are now logged to special output channels; see below.

Other logging

  • read_meta logs all reads to :notes in entries that contain "+meta" in the second field
  • All writes are now logged to :notes:
    • writesac now logs all writes to channels written.
    • wseis now logs all writes to (all channels of) objects written.
    • write_hdf5 now logs all writes to all channels written.

New functions for checking logs

  • show_processing tabulates and prints processing steps in :notes
  • show_src tabulates and prints data sources in :notes
  • show_writes tabulates and prints all data writes in :notes

Improvements to read_data

  • A String array can now be passed as the file string pattern argument with method read_data(fmt, filestr [, keywords]). This functionality will eventually be expanded to read_data(filestr [, keywords]).
  • All file formats can now be memory-mapped before reading by passing KW memmap=true. SeisIO benchmarks suggest that this affects some read speeds:
    • Significant speedup: ASCII formats, including metadata formats
    • Slight speedup: mini-SEED
    • Significant slowdown: SAC
    • Other data formats show trivial changes in read speed (at most ±3%).
    • Mmap.mmap signal handling is undocumented. Use with caution.
  • When reading into an existing structure, stricter channel matching can now be enforced with KW strict=true. See below.
  • ASCII data formats now always continue existing channels that match channel ID, rather than starting new ones. Fixes issue #35.
  • Verbose source logging can be enabled with new KW vl=true. There are cases where this can log sources to :notes that are irrelevant to a channel; verbosity isn't always efficient.
  • The format string to read Lennartz SLIST (ASCII) with read_data has changed from "lennasc" to "lennartz".

Channel Extension

Existing data channels should now be extended on a successful channel ID match in all file formats. This is the intended behavior of SeisIO.

Previously, all formats except mini-SEED and ASDF created a new channel for every new file read, which required flattening with merge!. That was a clumsy work flow.

The new behavior standardizes the output because multiple files read with many read_data! calls should yield the same number of channels as passing all filenames to read_data! in an Array{String, 1} or String wildcard.

Behavior with strict=true

  • Does not work with GeoCSV or SUDS formats.
  • Matches on at least both of :id & :fs in all other formats.
  • In the best-case scenario, read_data matches on :id, :fs, :gain,:loc, :resp, & :units.
  • See official documentation for fields matched in each file format.

ASDF/HDF5

ASDF (Adaptable Seismic Data Format) is now fully supported. Specific changes from SeisIO v0.4.1 are below.

write_hdf5 Changes

  • KW chans supports writing only some channels from a structure.
  • calling write_hdf5 on an existing file now appends data to the file, rather than recreating it.
  • users can now specify add=true to add trace data to a file while preserving existing traces in it. See documentation for details.
  • users can now specify ovr=true to overwrite existing trace data in a file.
    See documentation for details.
  • irregularly-sampled channels are now skipped.
  • gapped channels are now written to file by segment.
  • KW tag allows user control over the tag in the trace name string.
    • If unset, the channel name is used.
    • Previously, the default tag was the channel name with a trailing underscore.
  • Includes a method for SeisEvent structures in submodule Quake.

New/Changed ASDF Functions

  • asdf_qml was renamed to asdf_rqml as it reads QuakeML from ASDF files.
  • asdf_wqml writes QuakeML to a new or existing ASDF file.
  • read_asdf_evt reads events from an ASDF archive and returns an array of SeisEvent structures.
  • asdf_waux is a thin wrapper to write to the AuxiliaryData group.

Other Changes

Documentation Improvements

  • The tutorial has been updated and expanded to include more practice working with ASDF volumes and an optional tutorial for the Quake submodule.
  • Several docstrings were greatly truncated to reduce scrolling.
  • The Time developer guide now includes a full API and formal definitions.
  • The File Formats developer guide now includes a full API.

examples.jl

  • Everything in examples.jl is now also part of the Data Acquisition tutorial.
  • using Pkg; Pkg.test("SeisIO") now tells users where to find examples.jl at the end of a successful test set.
  • no longer errors on the second SeedLink example when invoked outside the "tests" directory.

Consistency, Performance, Bug Fixes

  • seedlink, seedlink!
    • now requires MODE ("TIME", "FETCH", or "DATA") as the first string argument, for consistency with other web clients; it's no longer a keyword.
    • SeedLink keyword u= (base URL) now has a default value in SeisIO.KW.SL and
      can be changed with SeisIO.KW.SL.u=URL for string URL.
  • Quake.get_pha! docstring corrected.
  • read_meta now accepts an Array{String, 1} for the file pattern argument.
  • read_sxml is no longer exported; use read_meta("sxml", ... ) instead.
  • Functions that accept a verbosity level v now accept any Integer subtype, not just Int64.
  • Fixed a minor bug that could cause some frequency-domain processing routines to allocate larger arrays than necessary.
  • Fixed issue #30
  • Fixed issue #28
  • endtime(t, fs) once again behaves correctly for irregularly-sampled data.
  • The docstring for read_quake is now correctly accessed with ?read_quake.
  • SeisSrc objects created with randSeisEvent now have :pax and :planes fields whose geometries are consistent with what read_qml produces.
  • rseis now supports memory mapping with KW mmap=true.
  • convert_seis now correctly errors when units_out is invalid.

get_data

Bad requests are now saved to channels with special IDs.

  • Channel IDs that begin with "XX.FAIL" contain bad requests, with the response message stored as a String in :misc["msg"].
  • Channel IDs that begin with "XX.FMT" contain unparseable data. The raw response bytes are stored in :misc["raw"] as an Array{UInt8,1}, and can be dumped to file or parsed with external programs as needed.
  • Information about bad requests is logged to :notes in these special channels.
  • get_data calls during automated tests now use a retry script when servers return no data. This should prevent most test errors due to server-side data availability.

merge!

  • Should work more consistently with MultiStageResp instrument responses.
  • Now handles sample times more robustly in overlapping segments.

ungap! and gapfill!

These low-level processing functions have been optimized for better memory usage. Additional specific changes:

  • ungap! no longer breaks on negative subsample gaps of length -0.5 Δδt < -1.0 Δ at sampling interval Δ. Fixes issue #29.
  • The docstring of ungap! now explicitly warns to call merge! before ungap! if any channel has segments that aren't in chronological order.
  • ungap! with a negative time gap now partly overwrites output with earlier
    segments (corresponding to the time overlap).

GeoCSV

  • Fixed a possible off-by-one error in two-column (tspair) GeoCSV channel start times
  • Fixed a possible off-by-one error in the last entry of :t when reading two-column (tspair) GeoCSV

PASSCAL SEG Y

  • Fixed a bug where PASSCAL SEG Y could store 1.0/gain a...
Read more

SeisIO v0.4.1

13 Oct 08:17
Compare
Choose a tag to compare

SeisIO v0.4.1
2019-10-13

Primarily a bug fix release for v0.4.0, with the addition of write support for FDSN station XML files and the ASDF file format.

New Writers

  • Added write_hdf5 to allow writing complete structures to seismic HDF5 files. Currently only supports ASDF; PH5 may be added later.
  • Added write_sxml to create station XML from SeisData headers.
    • Note: output is valid FDSN station XML 1.1 but the IRIS validator may issue up to two warnings per channel inconsistently; see stationxml-validator issue 78 for details.

Consistency, Performance, Bug Fixes

  • Added a file reader for SLIST (ASCII sample list) (read_data("slist", ...)), since I have readers for two SLIST variants (lennartzascii and geocsv.slist)...
  • resample will no longer throw an error if the desired sampling frequency equals :fs for the largest group of segments. Fixed resample docstrings.
  • SEED.mseed_support() and SEED.seed_support() now output some text; users don't need to check their respective help files.
  • Added kw autoname to get_data; see documentation for functionality and behavior. Implements request in issue #24.
  • Discovered/fixed a rare mini-SEED bug wherein the last packet of a request containing unencoded data could throw a BoundsError if padded with empty bytes. * The memory footprint of SeisIO has been reduced by moving most large files to https://github.com/jpjones76/SeisIO-TestData. SeisIO now requires ~3 MB rather than ~300 MB.
    • The development version is somewhat unwieldy due to the commit history; without test files, it's around 500 MB. This can be safely pruned with BFG Repo-Cleaner with a file size threshold of 50k.
    • Test data now have their own repository. They're downloaded automatically by tests/runtests.jl when the script is first invoked, but runtests.jl now requires a Subversion command-line client to run.
  • read_data("seisio", ...) now works as a wrapper to rseis
    • Note: this is a convenience wrapper and lacks the full functionality of rseis. When reading a SeisIO file that contains multiple objects, read_data("seisio", ...) reads only the first object in each file that can be converted to a SeisData structure.
  • User agent settings are now standardized and should no longer cause error 500 on FDSN servers in California.
  • get_data now warns when requesting a (non-miniseed) format from FDSN dataselect servers that don't implement the format keyword.

SeedLink renamed and fixed

  • Functions SeedLink and SeedLink! have been renamed to lowercase (they're now seedlink and seedlink!) because SeedLink was too easily mistaken for a custom Type.
  • Fixed an import issue that broke SeedLink in v0.4.0; SeedLink once again processes buffered data automatically.

SeisIO v0.4.0: Respocalypse Now

23 Sep 21:17
Compare
Choose a tag to compare

Instrument Response Improvements

SeisIO can now use full (multi-stage) instrument responses or simplified
(pole-zero) instrument responses.

  • Added two new Instrument Response (:resp) types: CoeffResp and
    MultiStageResp. These allow full descriptions of multi-stage instrument
    responses in FDSN station XML.

    • Full multi-stage instrument responses can be requested by passing keyword
      msr=true to appropriate funcitons.
  • Instrument response Types PZResp and PZResp64 have changed in two ways:

    • Field :c renamed to :a0 for consistency with FDSN and SEED
    • Field :f0 added as a container for the frequency at which :a0 is applied.

New/Changed

  • fctoresp(f,c): generate a new instrument response from lower corner
    frequency f and damping constant c. If no damping constant is specified,
    assumes c = 1/√2.
  • remove_resp!(S) remove (flatten to DC) the frequency responses of seismic
    channels in a GphysData object.
  • resptofc(R): attempt to guess critical frequency :f0 from poles and zeros
    of a PZResp or PZResp64 object.
  • translate_resp!(S, R): translate response of seismic data channels
    in GphysData object S to response R.
    • translate_resp works on channels with MultiStageResp responses, with
      two caveats:
      1. Only the first stage of the response changes.
      2. The first stage must be a PZResp or PZResp64 object for the response to
        be translated.

Removed

  • equalize_resp! (replaced by translate_resp!)
  • fctopz (replaced by fctoresp)
  • SeisIO.resp_f (deprecated)

Expanded Read Support

With the addition of the readers below, SeisIO read support now covers many
data formats with a handful of simple wrapper functions:

read_data, read_data!

Wrapper for reading entire data files into memory.

Format String
AH-1 ah1
AH-2 ah2
Bottle bottle
GeoCSV, time-sample pair geocsv
GeoCSV, sample list geocsv.slist
Lennartz ASCII lennartzascii
Mini-SEED mseed
PASSCAL SEG Y passcal
PC-SUDS suds
SAC sac
SEG Y (rev 0 or rev 1) segy
UW datafile uw
Win32 win32

Improvements

  • read_data("passcal", ..., swap=true) reads big-endian PASSCAL SEG Y.
  • read_data method extended to take either one or two Strings as arguments.
    • If one String is passed to read_data, the string is treated as a file pattern; guess is called to determine the file format.
    • If two Strings are passed, the first is treated as a file format String; the second is treated as a file pattern string.
      • Note: read_data is much faster when the file format String is supplied.

read_meta, read_meta!

Wrapper for reading instrument metadata files into memory.

Format String
Dataless SEED dataless
FDSN Station XML sxml
SACPZ sacpz
SEED RESP resp

read_hdf5, read_hdf5!

Extract data from an HDF5 archive that uses a recognized seismic data format.
This works differently from read_data in that HDF5 archives are generally
large and contain data from multiple channels; they are scanned selectively
for data in a user-defined time window matching a user-specified ID pattern.

Format String
ASDF asdf

read_quake

A wrapper to read discrete event data into a SeisEvent structure. Because
seismic event files are typically self-contained, this does not accept
wildcard file strings and has no "in-place" version.

Format String
QuakeML qml
PC-SUDS event suds
UW event uw

Other Changes

Documentation Improvements

  • Public documentation of low-level file formats has been copied into docs/desc.
  • CLI information on supported file formats can now be found in SeisIO.formats,
    a dictionary accessed by format name (as given above).

Processing on Download

get_data can now process requests after download by specifying keywords:
demean, detrend, rr (remove instrument response), taper, ungap, unscale.

  • There are no keywords in get_data to filter data or translate seismometer
    responses to a non-flat curve; too many additional keywords would be needed.

New Functionality

  • ?RESP_wont_read shows some common SEED RESP issues for problem files.
  • convert_seis! converts seismograms in S to other units (m, m/s, m/s²) by differentiation or integration.
  • env! efficiently computes the signal envelope by segment within each (regularly-sampled) channel.
  • get_file_ver gets the version of a SeisIO native format file.
  • get_seis_channels(S) returns numeric indices of channels in S whose instrument codes indicate seismic data.
  • guess guesses data file format and endianness.
  • inst_code(C) returns the instrument code of GphysChannel object C.
  • inst_code(S,i) returns the instrument code of channel i.
  • inst_codes(S) returns the instrument code of every channel in S.
  • resp_a0!(S) updates the sensitivity :a0 of PZResp/PZResp64 responses in GphysData object S, including PZResp/PZResp64 stages of type MultiStageResp responses. It can also be called on individual InstrumentResponse objects.
  • scan_hdf5 scans supported Seismic HDF5 formats and returns a list of strings describing the waveform contents.
  • set_file_ver sets the version of a SeisIO native format file.
  • using SeisIO.SUDS; suds_support() lists current SUDS support.
  • validate_units(S) validates strings in :units to ensure UCUM compliance.
  • vucum(str) validates UCUM units for str.
  • writesacpz(S) writes instrument responses to SACPZ files.

Consistency, Performance, Bug Fixes

  • Adjusted user agent settings when connecting to FDSN servers in California.
  • get_data now warns when requesting a (non-miniseed) format from FDSN
    dataselect servers that don't implement the format keyword.
  • Fixed a bug that could cause buffer size to degrade performance with some
    file readers after reading long files.
  • FDSN_sta_xml and functions that call it (e.g. get_data) now only spam
    "overwrite" warnings at (user-specified verbosity) v > 0.
  • Meta-data readers and parsers now strictly use A0 from file, rather than
    recalculating it under certain circumstances.
  • Rewrote SL_info; performance should be greatly improved and it should no
    longer cause timeout errors in automated tests.
  • Fixed issue #20
  • Fixed issue #19
  • tx_float now always uses Float64 precision; Float32 lacks the resolution
    to handle long time series.
  • detrend! has seen many improvements:
    • now uses linear regression on gapless channels with :fs > 0.0 && n=1,
      yielding a ~12x speedup and >99% less memory use.
    • detrend!(..., n=N) now allows degree n=0, equivalent to demean!.
    • greatly increased accuracy at single precision.
  • Most processing functions now accept a numeric channel list using keyword
    chans= to restrict processing to certain channels.
    • The only exception to the above is sync!; sync! with channel restrictions
      makes no sense.
  • All functions that accept a numeric channel list as a keyword now call this
    keyword chans; chans can be an Integer, UnitRange, or Array{Int64, 1}.
  • Added resample as a "safe" (out-of-place) version of resample!
  • Station XML handling has been rewritten, yielding 97% reduced memory use, 5.1x
    speedup, and a workaround for the GeoNet server-side StationXML error (fixes issue #15)
  • FDSNEvq now returns full event catalogs by default (fixes issue #16)
  • Documentation updated (fixes issue #17)
  • writesac() with a GphysChannel object now accepts keyword fname to set
    the file name (issue #18)
    • When specifying fname=FSTR, if FSTR doesn't end with (case-insensitive)
      ".sac", the suffix ".sac" is appended to FSTR automatically.
  • New PZResp/PZResp64 objects should now always have :a0 = 1.0, :f0 = 1.0,
    regardless of initialization method.

Typeageddon!

05 Jun 18:11
Compare
Choose a tag to compare

The main purpose of this release is to finalize custom Types; major changes to Types are extremely unlikely after this release; minor changes will only happen in response to significant demands. The Type restructuring in this version serves two main purposes:

  1. allow a range of predetermined styles for fields with no universal standard (e.g. location)
  2. improve user experience

Descriptions of Type fields and meanings can be found in the help text of each Type.

Low-level descriptions of how each Type is stored on file can be found in the SeisIO documentation.

Full switch to read_data

Readers for individual file formats (e.g. readsac) have been deprecated (as warned about in the notes to SeisIO-0.2.0). Please use read_data instead.

Changes to SeisData, SeisChannel

  • An abstract Type, GphysData, is now the supertype of SeisData. This will allow variants of SeisData objects to be added easily.
  • For similar reasons, an abstract Type, GphysChannel, is now the supertype of SeisChannel.
  • The :loc field now uses custom types designed for one location format each; current options are:
    • GeoLoc: geographic instrument position using lat/lon
    • UTMLoc: location in UTM coordinates (zone, Northing, Easting)
    • XYLoc: location in local (x-y-z) coordinates relative to a georeferenced origin
    • GenLoc: generic location
    • It is not necessary for all channels in a SeisData object to use the same location Type.
  • The :resp field now uses custom types designed for instrument response formats. Current options are:
    • PZResp: pole-zero response with Float32 fields :c (damping constant), :p (complex poles), :z (complex zeros).
    • PZResp64: pole-zero response with Float64 precision; same field names as PZResp.
    • GenResp: generic instrument response object comprising a descriptive string, :desc, and a complex Float64 matrix, :resp.

Quake submodule

All Types and functions related to handling of discrete earthquake events have been moved to a new submodule, SeisIO.Quake. This includes several (former) SeisIO core functions:

  • UW data format: readuwevt, uwpf, uwpf!
  • Event web functions: FDSNevq, FDSNevt, distaz, get_pha!
  • Miscellaneous: gcdist, show_phases
  • Types: SeisHdr, SeisEvent

SeisIO.Quake Types

  • SeisSrc is a new Type that characterizes an earthquake source process, with fields:
    • :id (String): seismic source id
    • :eid (String): event id
    • :m0 (Float64): scalar moment
    • :misc (Dict{String,Any}): dictionary for non-essential information
    • :mt (Array{Float64,1}): moment tensor values
    • :dm (Array{Float64,1}): moment tensor errors
    • :npol (Int64): number of polarities used in focal mechanism
    • :pax (Array{Float64,2}): principal axes
    • :planes (Array{Float64,2}): nodal planes
    • :src (String): data source
    • :st (SourceTime): source-time description with subfields:
      • :desc (String): description of source-time function
      • :dur (Real): duration
      • :rise (Real): rise time
      • :decay (Real): decay time
  • SeisHdr has changed, hopefully for the last time:
    • Fields describing the seismic source process have moved to SeisSrc.
    • :typ (String) added for event type.
    • :id changed Type (Int64 ==> String) to accommodate ISC IDs.
    • :loc was expanded; added subfields can now fully characterize location quality, type, and source.
    • :mag is now a custom object, rather than Tuple(Float32, String), with fields:
      • :val (Float32): magnitude value
      • :scale (String): magnitude scale
      • :nst (Int64): number of stations used in magnitude calculation
      • :gap (Float64): max. azimuthal gap between stations in magnitude calculation
      • :src (String): magnitude source (e.g,. software name, authoring agency)
  • SeisEvent now has three substructures, rather than two:
    • :data is now Type EventTraceData (<: GphysData), which behaves like SeisData but contains four additional fields for event-specific information:
      • az Azimuth from event
      • baz Backazimuth to event
      • dist Source-receiver distance
      • pha Phase catalog. This is a dictionary of custom objects named SeisPha, keyed to phase names (e.g. "pP"), with fields: (Float64 except as indicated)
        • amp amplitude
        • d distance
        • ia incidence angle
        • pol polarity (Char)
        • qual quality (Char)
        • rp ray parameter
        • res residual
        • ta takeoff angle
        • tt travel time
        • unc uncertainty
    • :hdr (SeisHdr), header information
    • :source (SeisSrc), source process characterization

Note: Seismic data centers typically use different IDs for event location and event source model; hence, for a SeisHdr object H and the corresponding SeisSrc object R, H.id == R.eid, but generally, H.id != H.eid. Please don't open an issue about this, I swear it's not a bug.

QuakeML Support

SeisIO.Quake introduces QuakeML support.

  • A new function, read_qml, reads QuakeML files and parses QuakeML downloads.
  • If multiple focal mechanisms, locations, or magnitudes are present in a single Event element, the following rules are used to select one of each:
    • FocalMechanism
      1. preferredFocalMechanismID if present
      2. Solution with best-fitting moment tensor
      3. First FocalMechanism element
    • Magnitude
      1. preferredMagnitudeID if present
      2. Magnitude whose ID matches MomentTensor/derivedOriginID
      3. Last moment magnitude (in this context, any magnitude whose lowercase
        scale abbreviation begins with "mw")
      4. First Magnitude element
    • Origin
      1. preferredOriginID if present
      2. derivedOriginID from the chosen MomentTensor element
      3. First Origin element
  • Non-essential QuakeML data are saved to each event W in W.source.misc (for earthquake source data) or W.hdr.misc (other data), using the corresponding QuakeML element names as keys.

Changes to former SeisIO core functions

  • FDSNevq now returns both an Array{SeisHdr,1} and a corresponding Array{SeisSrc,1}.
  • SeisIO processing functions must now be called on the :data field of a SeisEvent object. They won't work if called on the SeisEvent object itself.

read/write and SeisIO Types

  • read and write methods now extend to all exported SeisIO Types, including those in SeisIO.Quake. The primary use of rseis and wseis will be creating indexed, searchable files of many SeisIO objects.
  • SeisChannel objects are no longer converted to SeisData on write.
  • The native file format has been rewritten. Please open an issue if you need to access data in the old file format; we don't think anyone was using it yet.
  • Write speed has improved 20-30%. Read speed improved two orders of magnitude by removing automatic compression; it's now comparable to SAC or SEG Y with fewer allocations and less overhead.
  • On write, the field :x of a data object is no longer compressed automatically.
    • Two new keywords, KW.comp (UInt8) and KW.n_zip (Int64), control compression
      • If KW.comp == 0x00, data are not compressed when written.
      • If KW.comp == 0x01, only compress :x if maximum([length(S.x[i])
        for i = 1:S.n]) ≥ KW.n_zip; by default, KW.n_zip = 100000.
      • If KW.comp == 0x02, always compress :x.
  • Switched compressors from blosclz to lz4. This yields orders-of-magnitude write speed improvements for long sequences of compressed data.

New Functionality

  • purge! returns to remove empty and duplicate channels
  • resample! does what the name suggests. Note that this is both (much) slower and more memory-intensive than a typical decimate operation

Consistency, Performance, Bug Fixes

  • The + and * operators on objects of type T<: GphysData now obey
    basic properties of arithmetic:
    • commutativity: S1 + S2 = S2 + S1
    • associativity: (S1 + S2) + S3 = S1 + (S2 + S3)
    • distributivity: (S1*S3 + S2*S3) = (S1+S2)*S3
  • merge!
    • improved speed and memory efficiency
    • duplicates of channels are now removed
    • duplicates of windows within channels are now removed
    • corrected handling of two (previously breaking) end-member cases:
      • data windows within a channel not in chronological order
      • sequential one-sample time windows in a channel
  • mseis! now accepts EventTraceData and EventChannel objects
  • get_data
    • now uses new keyword KW.prune to determine whether or not to remove empty
      channels from partially-successful data requests
    • now calls prune! instead merge! after new downloads
    • no longer throws warnings if removing an empty channel because its data
      were unavailable
  • sort! has been extended to objects of type T<: GphysData
  • FDSN web queries, including get_data, now work correctly with the Northern California Seismic Network.
  • sizeof(S) should now accurately return the total size of (all data and fields) in each custom Type
  • isempty is now defined for all Types
  • fixed incremental subrequests in long get_data requests.
  • eliminated the possibility of a (never-seen, but theoretically possible) duplicate sample error in multiday get_data requests.
  • get_data no longer treats regional searches and instrument selectors as mutually exclusive.
  • SeisIO keyword nd (number of days per subrequest) is now type Real (was: Int).
  • shortened SeisIO keyword xml_file to xf because I'm that lazy about typing. y do u ax
  • writesac:
    • once again stores channel IDs correctly
    • now sets begin time (SAC b) from SeisChannel/SeisData :t, rather than to 0.0. Channel start and end times using writesac should now be identical to wseis and write.

SeisIO v0.2.0: the great read rewrite

04 May 13:04
Compare
Choose a tag to compare

Data Processing

The first batch of common data processing options has been added. These methods
optimize memory use and generally provide greater speed (with less memory
consumption) than DSP functions applied to one channel at a time.

  • filtfilt!: zero-phase filtering
  • taper!: cosine taper each segment of data in each channel. Replaces autotap!
    • taper! typically allocates memory <1% of the size of a SeisData object
    • ungap!(S, w=true) now calls taper! to do windowing
    • unlike autotap!, taper! does not fill NaNs with the mean of non-NaNs
  • ungap! now uses Boolean keyword tap for tapering, rather than w
  • nanfill! fills NaNs in the data field :x with the mean of non-NaN values
  • All processing methods have been extended to SeisChannel, SeisData, and
    SeisEvent objects; in the latter case, they apply to the :data field.
    • Exception: merge cannot be used on SeisChannel or SeisEvent objects;
      mseis! can still merge them into a SeisData structure, as before.
  • All processing functions now have out-of-place (copying) versions, as well as
    in-place versions.

File read optimization

File read functions have been standardized and optimized, yielding significant
performance improvements.

Major Changes

  • Each file read function can either update an existing SeisData object
    (e.g. readsac!(S, ...)) or create a new one (e.g., S = readsac(...)).
  • All file read functions accept wildcards in the file pattern(s).
  • Each file read function now returns a SeisData object, even for a single file

Specific Functions

  • readmseed!
    • now creates Float32 data arrays by default
    • readmseed method added
    • memory allocation reoptimized for large files. This can be changed
      to accommodate smaller files with two new keywords:
      • readmseed(..., nx_new=N) allocates N samples to :x for a new
        channel. After data read, unused memory is freed by resizing :x.
        (Default: 86400000)
      • readmseed(..., nx_add=N) increases S.x[i] by at least N samples
        when new data are added to any channel i. (Default: 360000)
  • readsac
    • now always returns a SeisData object.
  • readsegy
    • if full=true, the file text header is now saved in :misc under
      keyword "txthdr" in each channel.
  • readuw
    • now operates only on data files, accepts wildcard string patterns, and
      returns a SeisData object.
    • can now handle time correction structures
    • the old readuw function still exists, but is renamed readuwevt
  • readwin32
    • now accepts wild card strings for channel files as well as data files
    • by design, this means multiple channel files can be used simultaneously.
      However, no checks are made for redundancy or conflicting info.
  • rlennasc
    • renamed to readlennasc
  • New supported read format: GeoCSV. readgeocsv reads the tspair subformat by
    default. The tslist format can be read with keyword tspair=false.

read_data for file read

A new wrapper, read_data/read_data!, has been written to work with all
supported file formats. This (very thin) wrapper is intended to standardize
file read syntax while adding as little overhead as possible.

General syntax:

  • read_data!(S, fmt::String, filestr, KWs)
  • S = read_data(fmt::String, filestr, KWs)

The old reader function calls like "readsac" are still being exported, but
that will change in a future release. Please adjust your scripts to use the
generic read_data method.

read_data format strings

Format fmt Equivalent function
GeoCSV, time-sample pair geocsv readgeocsv
GeoCSV, sample list geocsv.slist readgeocsv( ..., tspair=false)
Lennartz ASCII lenartzascii readlennasc
Mini-SEED mseed readmseed
PASSCAL SEG Y passcal readsegy( ..., passcal=true)
SAC sac readsac
SEG Y (rev 0 or rev 1) segy readsegy
UW uw readuw
Win32 win32 readwin32

read_data supported keywords

KW Used By Type Default Meaning
cf win32 String "" win32 channel info file
full sac, segy Bool false read full header into :misc?
nx_add seed Int64 360000 minimum increase when resizing :x
nx_new seed Int64 86400000 length(C.x) for new channels
jst win32 Bool true are sample times JST (UTC+9)?
swap seed Bool true byte swap?
v uw, win32 Int64 0 verbosity

Most keywords are identical to those used by reader functions; the exception,
"cf" (channel file) is a workaround to win32's dependence on two file string
patterns.

Other

Keyword defaults can now be changed

Use dump(SeisIO.KW) to see all parameter defaults; change with SeisIO.KW.name
= val, e.g., SeisIO.KW.nx_new = 360000.

Bug fixes

  • FDSN XML can now parse nonstandard time formats in station XML.
  • FDSNevq with keyword src="all" now only queries data centers that run the
    FDSN event service. The keyword was useless before this change.
  • readuwevt
    • no longer fails in Windows and Mac OS when the file string pattern matches a
      datafile with no pickfile.
    • now reads pick files with non-numeric error ("E") line info
    • can now handle time correction structures
  • Help text has been standardized.
  • All poorly-rendering help text was fixed and should now display correctly.
  • Fixed a bug where equalize_resp! stored a (twice-) type-converted response
    in :resp for channels with Float32 data.

Consistency improvements

  • SeisData(n) now initializes :x arrays to Float32 precision
  • Information logged to :notes has been standardized:
    • Format: time: function, options/KWs, human-readable description
    • Fields in an automatic note are comma-separated, with the function name
      always in the first field and human-readable information always in the last.
    • All processing functions should once again log faithfully to :notes.
  • Equality (==) in SeisIO objects no longer checks for equality of :notes.
  • note! extended to lists of channels in SeisData objects
  • detrend! now works with irregularly-sampled data
  • SeisIO.KW is once again a mutable struct

Read Performance: SeisIO v0.2.0

Format Filename Opts Sz_[MB] Mem_[MB] Ovh_[%] Allocs T_[ms] GC_[%]
uw 99011116541W _ 37.61 41.20 9.54 9672 20.93 3.84
passcal test_PASSCAL.segy pa-full 32.96 32.99 0.09 206 19.17 3.97
passcal test_PASSCAL.segy passcal 32.96 32.98 0.06 168 19.15 3.98
sac one_day.sac _ 32.96 32.97 0.04 113 13.44 4.25
mseed one_day.mseed _ 32.96 32.96 0.01 57 57.68 0.99
win32 Restricted/2014092709*.cnt win 10.99 11.25 2.33 4238 23.87 0.00
lennasc 0215162000.c00 _ 8.58 8.60 0.17 117 146.25 0.00
geocsv.slist geocsv_slist.csv _ 6.79 6.87 1.11 1334 69.66 0.00
mseed Restricted/SHW.UW.mseed lo-mem 5.35 6.15 14.98 1257 8.26 0.00
segy Restricted/test_rev_1.segy full 4.53 4.91 8.28 2869 3.66 0.00
segy Restricted/test_rev_1.segy _ 4.41 4.52 2.40 1667 3.20 0.00
sac test_be.sac full 0.55 0.57 2.46 132 0.42 0.00
sac test_be.sac _ 0.55 0.57 2.13 112 0.42 0.00
geocsv FDSNWS.IRIS.geocsv _ 0.39 0.44 12.80 776 158.96 0.00

Comparative performance: SeisIO v0.2.0 vs. v0.1.3

Format Filename Opts Sz_[MB] ΔOvh_[%] ΔAllocs Speedup ΔGC_[%]
uw 99011116541W _ 37.62 -1238.96 -29163748 67.3 -1.0%
passcal test_PASSCAL.segy pa-full 32.96 -99.98 -34 2.0 -32.4%
passcal test_PASSCAL.segy passcal 32.96 -99.98 -38 2.0 -32.4%
sac one_day.sac _ 32.96 0.00 -86 1.0 1.1%
mseed one_day.mseed _ 32.96 -128.35 -1328904 7.0 -4.1%
win32 Restricted/2014092709*.cnt win 10.99 -305.78 -548586 5.9 -14.0%
lennasc 0215162000.c00 _ 8.58 -1343.57 -6753944 5.5 -18.3%
geocsv.slist geocsv_slist.csv _ 6.79
mseed Restricted/SHW.UW.mseed lo-mem 5.35 -26.23 -18695 2.6 0.0%
segy Restricted/test_rev_1.segy full 4.53 -3943.15 -56871 66.9 -27.7%
segy Restricted/test_rev_1.segy _ 4.41 -3759.38 -26121 31.9 -68.2%
sac test_be.sac full 0.55 -102.87 -233 1.5 0.0%
sac test_be.sac _ 0.55 -99.83 -81 1.4 0.0%
geocsv FDSNWS.IRIS.geocsv _ 0.39

Notes on the tables above:

  • Sz is the size of the SeisData object created by reading the file into
    memory.
  • Mem is the total memory used by the read process, including SeisData object
    creation.
  • Ovh is overhead, defined 100*((memory used) - (object size)/(object size)).
    ΔOvh= (new overhead) - (old overhead).
  • Allocs are raw numbers of allocations, with Δ = (new allocs) - (old allocs).
  • Speedup is t_new/t_old.
  • GC% is garbage collection time (as a percent of total time).
  • Opts are the following:
    • passcal: passcal=true
    • pa-full: passcal=true, full=true
    • win: nx_new = 360000, cf="03_02_27_20140927.sjis.ch"
    • lo-mem: nx_new = 36000, nx_add=1400000
  • The UW data file has 240 channels, whence the allocations.
  • The win32 files comprise an hour of continuous data.

SeisIO v0.1.3

08 Apr 02:37
79095c3
Compare
Choose a tag to compare

get_data for Web Requests

Web requests for time-series data (formerly IRISget, FDSNget) now uniformly use the function get_data (or, equivalently, get_data! with an existing SeisData object).

  • get_data works as a mass downloader with FDSN dataselect queries:
    • Long requests are fully supported.
      • Specify subrequest length in days with keyword nd (default: nd=1).
    • Rectangular region data queries can be done with keyword reg.
    • Radial data queries around a central point can be done with keyword rad.
  • FDSN methods now support the full list of standard FDSNWS servers.
    • Type ?seis_www for server list and correspondence.
  • Minor changes:
    • Station XML is now written to file "FDSNsta.xml" by default; change the filename with keyword xml_file.
    • Deprecated keyword q (quality) due to breakingly non-standard implementation.

Float32 Support

  • Arrrays in the "data" field of a SeisData object (:x) can now be either Array{Float64,1} or Array{Float32,1}.
  • readsac, readsegy, readuw, and readwin32 now rMajor changes since last release:

get_data for Web Requests

Web requests for time-series data (formerly IRISget, FDSNget) now uniformly use the function get_data (or, equivalently, get_data! with an existing SeisData object).

  • get_data works as a mass downloader with FDSN dataselect queries:
    • Long requests are fully supported.
      • Specify subrequest length in days with keyword nd (default: nd=1).
    • Rectangular region data queries can be done with keyword reg.
    • Radial data queries around a central point can be done with keyword rad.
  • FDSN methods now support the full list of standard FDSNWS servers.
    • Type ?seis_www for server list and correspondence.
  • Minor changes:
    • Station XML is now written to file "FDSNsta.xml" by default; change the filename with keyword xml_file.
    • Deprecated keyword q (quality) due to breakingly non-standard implementation.

Float32 Support

  • Arrrays in the "data" field of a SeisData object (:x) can now be either Array{Float64,1} or Array{Float32,1}.
  • readsac, readsegy, readuw, and readwin32 now read into single-precision channels, consistent with each file format's native precision.
  • SEED files and SEED data (e.g. SeedLink, readmseed, FDSN requests) use double-precision channels.
  • Data processing operations preserve the precision of SeisData channels.

Data Formats

Mini-SEED

  • Added support for blockette types:
    • [300] Step Calibration Blockette (60 bytes)
    • [310] Sine Calibration Blockette (60 bytes)
    • [320] Pseudo-random Calibration Blockette (64 bytes)
    • [390] Generic Calibration Blockette (28 bytes)
    • [395] Calibration Abort Blockette (16 bytes)
    • [2000] Variable Length Opaque Data Blockette
  • Added support for Geoscope, CDSN, SRO, and DWWSSN decoders.
  • Improved time gap handling. For data sampled at fs, with δ = 1.0/fs, a time gap is now recorded when the gap between the end of one packet and the start of the next exceeds 1.5x the sample rate δ (i.e. when total drift > 0.5δ).
  • Blockettes of unrecognized types are now skipped; they should no longer throw errors.

Other

  • Win32
    • readwin32 is now orders of magnitude faster and uses orders of magnitude less memory.
    • Use kw jst=false to NOT apply a 9h correction to win32 data times.
  • SEG Y
    • Dictionary keys with full=true are now comprehensible.
  • SAC
    • readsac now supports bigendian files

New functions

  • find_regex adds OS-agonstic find functionality.
  • equalize_resp! translates instrument frequency responses to a given complex response matrix.
  • detrend! removes a linear trend from each channel in a SeisData object.
  • demean! removes the mean from each channel of a SeisData object.

Minor Changes

  • FDSNevt has been rewritten.
  • The built-in ls now behaves like Bash ls but outputs full paths in returned file names.
    • Most invocations of ls still invoke readdir or isile.
    • Partial file name wildcards (e.g. "ls(data/*.sac)) now invoke glob.
    • Path wildcards (e.g. ls(/data/*/*.sac)) invoke find_regex to circumvent glob limitations.
    • Passing only "*" as a filename (e.g. "ls(/home/*)) invokes find_regex to recursively search subdirectories, as in the Bash shell.
  • Improved read methods for rseis.

merge!

Functionality, robustness, and speed have been greatly improved.

  • Channels are no longer combined if they have different (non-empty) values for resp, units, or loc, or if they have different fs values.
  • Channels with no data (:x empty) or time info (:t empty) are deleted during a merge.
  • The data array (:x) of each merged channel is now aligned in memory at the end of the merge process.

sync!

Functionality, robustness, and speed have been greatly improved.

  • No longer calls ungap! or requires ungapped data
  • No longer has an option to resample data

RandSeis

The "randseis" functions are now a submodule, SeisIO.RandSeis. Functions have been renamed:

  • randseischannel --> RandSeis.randSeisChannel
  • randseisdata --> RandSeis.randSeisData
  • randseishdr --> RandSeis.randSeisHdr
  • randseisevent --> RandSeis.randSeisEvent
  • Minor changes:
    • randSeisEvent now uses the same keywords as randSeisData

Bug Fixes

  • Mini-SEED:
    • Timing information from mini-SEED blockette type 500 (Timing Blockette) is now saved in the :misc dictionary for the appropriate channel.
    • Fixed parsing of event detection blockettes.
    • Now correctly handles SEED volumes in which record endianness changes.
    • Fixed bug #7.
  • SEG Y:
    • Fixed how elevation are set for PASSCAL SEG Y.
  • Fixed several breaking readwin32 issues.
  • Irregularly-sampled data should now be handled correctly by processing routines.
  • isempty is no longer defined for SeisEvent.
  • rseis, wseis:
    • The :loc field is no longer assumed to contain length-5 vectors.
    • The :resp field is once again read from file correctly.
    • wseis no longer fails to write channels with very few data points.
  • SeisData:
    • SeisData(n) now always allocates memory correctly and uniquely.
    • Creation of SeisData objects from multiple SeisChannels works again.
    • Consolidated methods for channel delete; standardized syntax.

Consistency and Performance

  • Web functions now use standardized keywords (?'SeisIO.kw for a list)
  • Bad web requests no longer throw exceptions.
  • When reading/writing strings from/to SeisIO composite types, the SeisIO native file format now support all Unicode characters supported by the Juila language.
  • Addition of SeisChannel and SeisData objects is once again commutative.
  • Exported functions are now more consistent and complete.
  • SeedLink keywords are now more intuitive.
  • SeisData objects:
    • Can now be created from SeisEvent objects, incorporating (only) the :data subfield.
    • SeisData() no longer sets any fields.
    • SeisData(1) and SeisData(SeisChannel()) are now identical.
    • isempty redefined in a self-consistent way.
  • gcdist now returns an array, rather than a tuple of vectors.
  • get_pha is now correctly exported.
  • note! is a factor of 4 faster due to rewriting the time stamper.
  • readsegy now always returns a SeisData object.

Release for Julia 1.1.0

13 Feb 10:36
Compare
Choose a tag to compare

Updated for Julia 1.1.0. Support for Julia 0.7 has been discontinued.