-
Notifications
You must be signed in to change notification settings - Fork 76
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
Update attenuation modules #320
Conversation
""" | ||
Esyn_temp = np.zeros((npts // 2)) | ||
Eobs_temp = np.zeros((npts // 2)) | ||
PLOT_CHECK = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering moving this as the function arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion. I will add the PLOT_CHECK
as a function argument. Esyn_temp
and Eobs_temp
will keep recalculating via get_energy_density based on the parameters. Maybe we can leave them as they are.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. There are just two very minor comments.
@@ -50,6 +50,7 @@ class ConfigParameters_monitoring(BaseModel): | |||
ratio: float = Field(default=3.0, description="ratio for determining noise level by Mean absolute deviation (MAD)") | |||
|
|||
# --- paramters for measuring attenuation | |||
single_station: bool = Field(default=True, description="make measurement one one lag or two") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single_station: bool = Field(default=True, description="make measurement one one lag or two") | |
single_station: bool = Field(default=True, description="make measurement on one lag or two") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for noticing this typo. I would need to update the description of this.
Co-authored-by: Yiyu Ni <[email protected]> Signed-off-by: Kuan-Fu Feng <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #320 +/- ##
=======================================
Coverage 83.52% 83.52%
=======================================
Files 9 9
Lines 1973 1973
Branches 330 332 +2
=======================================
Hits 1648 1648
Misses 207 207
Partials 118 118 ☔ View full report in Codecov by Sentry. |
This PR is for updating attenuation modules with the multi-window option.
get_SSR
is renamed asget_codawindow_SSR
.get_codawindow_SSR
, can handle both single and multiple windows cases.window_determine
, slices the input coda window into ten small windows and returns the first 30% and the 30% after a half point to the call.There is one more modification, regardless of the monitoring module. For correction, the parameter
smooth_N
is replaced bysmoothspect_N
in noise_module.