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
Use trace.remove_response()
for instrument correction
#27
Conversation
TODO: use config.trace_units when a generic PAZ file id provided
…object Rename PAZFile() class to PAZ() and move more functions inside the class.
TODO: _add_paz() will be removed when moving to modern deconvolution routines
Also, removed the option `sensitivity_only` from `correct_instrumental_response`
To support the "DEF" option in `trace.remove_response()`
To check if instrument type is consistent with units in inventory
Claudio, I will try it. |
Unfortunately, I have a problem with my obspy version. I'm still on 1.2.2, but now 1.3.0 is required. |
The reason why I moved to ObsPy 1.3.0 is the option A workaround could be to retrieve nominal units from I can do that! ;-) |
Ok, done! |
Thanks for the quick fix! |
The example also reminds me that I should ask you if it is possible to constrain |
Yes, you can either provide limits in From the Configuration File: # Initial value for t_star (seconds)
t_star_0 = 0.045
# Try to invert for t_star_0.
# If the inverted t_star_0 is non-positive, then fixed t_star_0 will be used
invert_t_star_0 = False
# Allowed variability around inverted t_star_0 in the main inversion
# (expressed as a fraction of t_star_0, between 0 and 1).
# If the inverted t_star_0 is non-positive, then t_star_min_max is used
# (see below).
t_star_0_variability = 0.1 and # t_star_min_max does not superseed t_star_0_variability
t_star_min_max = None
# optional : Qo bounds (converted into t_star bounds in the code).
# (comment out or use None to indicate no bound)
# Note: if you want to explore negative t_star values, you have to specify
# -Qo_min, Qo_min. This beacause t_star is proportional to 1/Qo.
# Example, for searching only positive t_star values:
# Qo_min_max = 10, 1000
# If you want to search also negative t_star values:
# Qo_min_max = -10, 10
Qo_min_max = None I generally set |
What's your metadata format? StationXML, datalessSEED, PAZ, other? |
Thanks for the pointer! |
It's StationXML in this case; in other cases it may also be dataless SEED. |
Ok, thanks. Do you think we can validate this, or do you prefer to do more testing? |
I don't think I can test more from my side. I always work with full obspy station inventories, not with PAZ. |
Ok, thanks. So, I'm going to merge this and wait for bug reports ::😜 |
OK! |
This PR modernizes the instrument correction routine
remove_instr_response()
which goes from usingtrace.simulate()
and poles and zeros totrace.remove_response()
and full response, as defined in theInventory()
object.In case users provide a PAZ file, this is converted to an
Inventory()
object using a custom routine.Tested and validated on all my examples.
@krisvanneste, I don't know if you use instrument correction from SourceSpec. If that's the case, I'll wait on your feedback before merging. Thanks!