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

Decimation Filters should not be removed at downsampled sps #185

Open
kkappler opened this issue Jan 6, 2024 · 1 comment
Open

Decimation Filters should not be removed at downsampled sps #185

kkappler opened this issue Jan 6, 2024 · 1 comment
Labels
bug Something isn't working Filters Functionality dealing with how filters are used, applied, and described

Comments

@kkappler
Copy link
Collaborator

kkappler commented Jan 6, 2024

Currently, decimation filters are removed by default when time series instrument response is removed.

However, this is only appropriate if the data are upsampled at each decimation stage.

Note that the decimation filters for PKD, as stored by NCEDC, have for example:

decimation_input_sample_rate = 32000.0
decimation_input_sample_rate = 2000.0
decimation_input_sample_rate = 200.0

We cannot back these FIR out on 40sps data, they can only be backed out on data sampled at decimation_input_sample_rate.

I am changing the value of include_decimation from True to False.

In future, if we want to back these filters out, we would need to upsample, and then apply them.

Here is PKD Eletric field ex with instrument response removed with include_decimation=True
image

And with include_decimation=False
image

@kkappler kkappler added bug Something isn't working Filters Functionality dealing with how filters are used, applied, and described labels Jan 6, 2024
kkappler added a commit that referenced this issue Jan 6, 2024
- see issue #185, these were being removed but should not be.
@kkappler
Copy link
Collaborator Author

kkappler commented Jan 6, 2024

TODO:
Consider adding this logic to calibration as per this pseudocode:

if decimation filters are in the removal list:
    remove all non decimation filters
    sort the decimation filters from lowest decimation_input_sample_rate to highest
    for dec_filter in sorted_decimation_filters:
        data = upsample_to_previous_sps()
        data = invert_aaf(data) 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Filters Functionality dealing with how filters are used, applied, and described
Projects
None yet
Development

No branches or pull requests

1 participant