Coder Social home page Coder Social logo

Comments (6)

kkappler avatar kkappler commented on September 27, 2024

It looks like the stage gain is not being added to the kwargs dictionary in filter.py
in the method from_obspy_stage().

Here is the kwargs dict that we are getting
{'input_units': 'units_in',
'name': 'name',
'output_units': 'units_out',
'_zeros': '_zeros',
'_poles': '_poles',
'normalization_factor': 'normalization_factor'}

One solution maybe to add stage_gain to /timeseries/filters/standards/pole_zero_filter.json, but it maybe better in the generic obspy_mapping since obspy always populates this field. I'll runs some tests on this

from mt_metadata.

kkappler avatar kkappler commented on September 27, 2024

adding stage_gain to the global OBSPY_MAPPING is not enough, will try adding it to filter.json

This brings up a question -- shall we put gain as an attr for any filter? We are doing this now to accommodate populating via obspy, but if we add it in general then we need to define it ... and as mentioned in the initial ticket, how this related to normalization_factor ... it maybe best to make an @Property called total_gain that returns the gain*normalization_factor for pole_zero, but returns gain for most other filters. ...

from mt_metadata.

kkappler avatar kkappler commented on September 27, 2024

Added total_gain() methods to both filter base class and pole-zero filter.

Also added a placeholder test called test_correct_sense_of_normalization_factor() to test_filters.py

Hopefully we can leverage:
mth5/examples/make_mth5_from_nims.py to do this

from mt_metadata.

kujaku11 avatar kujaku11 commented on September 27, 2024

@kkappler What about a normalization frequency, is that something the user should input, or is that something we can estimate from the filters, like finding the pass band of the combined filters?

could do this by finding the minimum slope in the amplitude of the combined filters? Or could have a function that estimates the normalization frequency for each filter. Or just take it from the ZPK or FAP filters?

from mt_metadata.

kujaku11 avatar kujaku11 commented on September 27, 2024

@kkappler I added a simple function in PoleZerosFilter to estimate the normalization frequency of the pass band. This is then used in ChannelResponseFilter to estimate the instrument sensitivity. Its simple for now, might want to check my work.

from mt_metadata.

kujaku11 avatar kujaku11 commented on September 27, 2024

By multiplying the stage gain and the normalization factor we get the correct sensitivity estimate. We are setting the normalization frequency in the pass band, which is estimated from the filter. Appears to be correct.

from mt_metadata.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.