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

Improve RecSec preprocessing architecture #139

Merged
merged 7 commits into from
Feb 29, 2024
Merged

Improve RecSec preprocessing architecture #139

merged 7 commits into from
Feb 29, 2024

Conversation

bch0w
Copy link
Member

@bch0w bch0w commented Feb 29, 2024

Warning: This PR contains some critical API changes here that will affect the normal RecSec experience, and order of operation for processing

Problem

Current preprocessing is a bit obfuscated behind a single preprocess flag which is off by default and must be turned on by the User, and then preprocessing is either all or nothing, with no knobs to turn off individual features. Want to make this more usable and intuitive for the User

Update

This PR tries to improve the preprocessing system by adding a few more knobs. The new approach turns preprocessing
ON by default and puts individual processing steps behind flags so that User can turn on/off what they need. The individual knobs are trim, taper, zero_pad_s, integrate, min_period_s and max_period_s.

This PR also turns figure overwrite OFF by default, so that Users no longer have to manually set on to overwrite figures.

Related

#133

Change Log

  • RecSec parameter preprocess now turned ON by default (preprocessing occurs be default), and options have been changed to True, False, 'st' and 'st_syn' (previously 'st', 'st_syn' and 'both'). False will turn preprocessing off completely
  • RecSec parameter overwrite now turned OFF by default (new figures will overwrite by default)
  • Adds RecSec parameter trim that acts as a flag to turn on/off waveform trimming
  • Adds RecSec parameter taper that acts as a flag to turn on/off waveform tapering
  • Adds new processing kwargs max_percentage, zerophase, taper_type, fill_value that allow the User more fine control over underlying processing steps
  • Reorganizes RecSec input parameters for additional clarity when reading source code and updates docstrings accordingly
  • Updates tests to pass

default value for overwrite is now set True so User does not have to unset
changed default preprocess flag to True, removed 'both' option
…ehind a boolean flag so that they can be turned on/off at will

also expose some key arguments as keyword arguments so the User has more control
reorganized init parameter input to organize a bit better
added new parameters to main docstring
… if available, removed hard check on preprocess=True requireing st_syn to be more intutive by users

bugfix move fill value to after assignment of trace in loop
…d allow passing them in through command line
@bch0w bch0w changed the title Improve preprocessing architecture Improve RecSec preprocessing architecture Feb 29, 2024
@bch0w bch0w merged commit f7f6d2d into devel Feb 29, 2024
@bch0w bch0w deleted the feature-improve_ui branch February 29, 2024 22:00
@bch0w bch0w mentioned this pull request Apr 19, 2024
bch0w added a commit that referenced this pull request Apr 19, 2024
* added read function for asdfdatasets and allow RecSec to plot windows on top of record section (#136)

* added test to check zero division error, (#137)

added logger warning about zero amplitude scaling
feature: user can now set kwargs for obs_color and syn_color

* Improve SAC header append functions (#138)

* extending read_sem_cartesian test to check for evdp related to #132
adding warning messages to sac header append when evdp or mag not
present

* extended cartesian sac headers to match all normal sac header values except for cmpinc and cmpaz
added better warning message for missing sac header values in normal sac header reading
extended tests to cover new functionalities

* Improve RecSec preprocessing architecture (#139)

* reorganizing docstring, restructuring preprocess flag
default value for overwrite is now set True so User does not have to unset
changed default preprocess flag to True, removed 'both' option

* fixed up check function to reflect new preprocess flag

* restructuring preprocessing function to put each individual feature behind a boolean flag so that they can be turned on/off at will
also expose some key arguments as keyword arguments so the User has more control

* all preprocessing now behind tunable knobs

* moved kwargs to args of process_st
reorganized init parameter input to organize a bit better
added new parameters to main docstring

* allow preprocess=True to be more flexible and just take st and st_syn if available, removed hard check on preprocess=True requireing st_syn to be more intutive by users
bugfix move fill value to after assignment of trace in loop

* moved parameters back to internal kwargs to match recsec structure and allow passing them in through command line

* bump version 0.6.0 and bump copyright year in docs

* update changelog

* slim down changelog to include only most recent
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