Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PySEP v0.5.0 #130

Merged
merged 23 commits into from
Nov 20, 2023
Merged

PySEP v0.5.0 #130

merged 23 commits into from
Nov 20, 2023

Conversation

bch0w
Copy link
Member

@bch0w bch0w commented Nov 20, 2023

Changelog

(In chronological order)

  • Improves functions 'read_forcesolution' and 'read_source', which now return
    obspy.core.event.Event objects, rather than the makeshift Source objects
  • 'read_forcesolution' can now handle FORCESOLUTION files from both SPECFEM3D
    and SPECFEM3D_GLOBE
  • Added function read_events_plus that provides additional support to
    Obspys read_events function by allowing for support of FORCESOLUTION and
    SOURCE files from SPECFEM2D/3D/3D_GLOBE
  • Remove the Source class from Pysep.utils.io.mt. This was a remnant of the
    old Pyatoa approach to building an Obspy Event-like object to mimic certain
    behaviors. This has been replaced by read functions which simply return Events
  • Preprocessing error due to trace with zero length? #117: New quality control function that removes Traces with array length <= 1,
    which would cause preprocessing to fail
  • max amplitude ratios for data and syn #116: RecSec now logs absmax amplitudes and absmax amplitude ratios IFF both
    st and st_syn are provided
  • single-source package version number #120: Version number is now only sourced from pyproject.toml, other
    locations now reference this file to determine version number
  • Update RecordSection data reading #124:
    • API Change: RecordSection parameter cmtsolution has been renamed to
      source.
    • RecordSection now only expects readable files in --pysep_path or
      --syn_path.
      • New RecordSection.read_data()function which handles data reading logic
        and can read both obs data (.SAC from PySEP) and syn data
        (SPECFEM ASCII files or SAC files)
      • Bugfix: Added an exit catch in RecordSection to stop the workflow if no
        data is available
  • Bugfix: RecSec unable to read different source file formats. New parameter
    'srcfmt' allows User to set this manually. If not given, RecSec will attempt
    to guess the file format based on the name of the file.
  • Bugfix: read_specfem3d_cmtsolution_cartesian was unable to handle
    Flinn-Engdahl regions that had spaces in them. Also it was unable to
    handle extra lines in the file.
  • Bugfix Iceland example correct depth #126: Fixed some incorrect parameters in example config files
  • PySEP variable namechange: _legacy_naming -> 'legacy_naming`
  • New RecSec Parameters wildcard and syn_wildcard to specify how to
    search for data to plot with RecSec
  • Removed unnused parameters 'legacy_naming' and 'log_level' from
    Pysep.write_config

bch0w and others added 23 commits August 17, 2023 10:30
…GLOBE format, previously could only handle 3D_CARTESIAN. adds more detailed docstring for the function
…'origin_time' to match other read functions and be slightly more intuitive
…an a PySEP SOURCE object, so that it can be parsed and used by Pyflex which is expecting ObsPy Event or Catalog objects to define sources
…h provides additional file format support to ObsPy's read_events function
… in FORCESOLUTION and SOURCE files from SPECFEM2D/3D. the revised method simply returns barebones ObsPy Event objects which is much cleaner and avoids requiring having to define an entirely new class. Does not affect PySEP routines, these were mainly used by external libraries calling PySEP
…ix zero trace length (#121)

* bumping version numbers to 0.5.0-dev to signify backwards-incompatible changes and that this is the 'dev' version of the code

* Issue #120 single-sourcing version number from pyproject.toml and sourcing version number in docs and __init__ directly from this value

* code fix conf finding version number,
update 'how_to_version_release' to only bump pyproject.toml version number

* #117 added a new pre-preprocessing curtail function that removes Traces whose trace lenght is 0

* #116 RecSec now logs amplitude and amplitude ratios if both obs and syn are plotted together

* amp ratio log messages now for abs max

* update CHANGELOG
…by setting default origin time to 1970-01-01T00:00:00 directly in the input variables
* bugfix: xlim_s was using time and not sample to index the waveform when selecting max amplitudes for normalization, causing incorrect normalization to occur

* tests caught edge case where indicies were None and could not be converted to integer samples. fixing
* BUGFIX: in read_events_plus, read_specfem3d_cmtsolution_cartesian was returning an Event and not a catalog object. This was probably fine but not consistent with the other returns

* new recsec.read_data function that replaces the old generate_synthetic_data function, contains logic for taking paths and return streams and can handle both obs and syn data as well as SAC formatted syn data (#122)
bugfix: added a catch in recsec to kill the object if no stream data are found

* API CHANGE: RecSec parameter 'cmtsolution' has been changed to 'source' for generality because the file does not need to be a cmtsolution, can be a forcesolution or source as well

* small bugfixes to get synthetic stream reading working

* adding Cartesian generated synthetics to test data and added new test data to make sure read_sem can handle these appropriately

* removing some of the test data, only need a few traces

* update API recsec cmtsolution -> source

* update changelog
…parameter added '--srcfmt' which allows the User to set the file format manually. If srcfmt is not provided, RecSec will attempt to guess the file format based on the file name, checking against a list of common SPECFEM source file format types
…ss strict about how it expects the incoming file to be formatted
… and not samples, to index the visible portion of the waveform for use in determining the local max amplitude within the time window. This would have led to incorrectly scaled waveforms when using the option 'xlim_s'. This bugfix sets the correct index unit, and ensures that all indices coming out of getter function 'get_xlim' are integers so that they directly be used to index waveform data
Accommodating parameter name change from 'cmtsolution' to 'source' in the docs to match recent update in #124
…ow user to determine which files are read in
…onfig writing function, remade the template config, added new test to check the example config files are still in order and removed some unncessary parameters from example configs
@bch0w bch0w merged commit 2c9b734 into master Nov 20, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant