Skip to content

Input unit with a metrix prefix not implemented in remove_response #3369

@luvec

Description

@luvec

Avoid duplicates

  • I searched existing issues

Bug Summary

I'm not quite sure if it's a bug or feature. Remove_response cannot recognize the correct scale for a unit with a metric prefix (such as nm/s). The description on the remove_response webpage says: "VEL velocity, output unit is meters/second" but in reality, it remains in the original prefixed unit.

I can see that in Response._call_eval_resp_for_frequencies it is already prepared to scale a response according to the input unit:

# Scale factor with the same logic as evalresp.
if key in ["CM/S**2", "CM/S", "CM/SEC", "CM"]:
scale_factor[0] = 1.0E2
elif key in ["MM/S**2", "MM/S", "MM/SEC", "MM"]:
scale_factor[0] = 1.0E3
elif key in ["NM/S**2", "NM/S", "NM/SEC", "NM"]:
scale_factor[0] = 1.0E9

but is not used finally:
# XXX: Check if this is really not needed.
# output *= scale_factor[0]

Code to Reproduce

No response

Error Traceback

No response

ObsPy Version?

1.4.0

Operating System?

Windows

Python Version?

3.10.8

Installation Method?

conda

Metadata

Metadata

Assignees

No one assigned

    Labels

    .coreissues affecting our functionality at the very core.signalissues related to our signal processing functionalitiesbugconfirmed bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions