Skip to content

Commit

Permalink
Add my three Fourier filters (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
prisae authored Oct 17, 2024
1 parent bbe626d commit bb95c97
Show file tree
Hide file tree
Showing 5 changed files with 519 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/python_test_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ jobs:
matrix:
os: [ubuntu, macos, windows]
case:
- python-version: 3.8
- python-version: 3.11

steps:

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4.2.1
with:
fetch-depth: 100
persist-credentials: false
Expand All @@ -38,7 +38,7 @@ jobs:
run: git fetch origin 'refs/tags/*:refs/tags/*'

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5.2.0
with:
python-version: ${{ matrix.case.python-version }}

Expand All @@ -51,7 +51,7 @@ jobs:
run: |
cd packages
python create_python.py
pip install python/. --use-feature=in-tree-build
pip install python/.
cd python
pytest --flake8
Expand All @@ -64,7 +64,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4.2.1
with:
fetch-depth: 100
persist-credentials: false
Expand All @@ -73,7 +73,7 @@ jobs:
run: git fetch origin 'refs/tags/*:refs/tags/*'

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5.2.0
with:
python-version: ${{ matrix.case.python-version }}

Expand Down
130 changes: 130 additions & 0 deletions lib/Fourier/fourier_wer_101_2020a_sincos.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# 101 point Fourier filter, Sine and Cosine
# =========================================
#
# Designed and tested for TEM data with short offsets and high resistive
# ground.
#
# See the notebook `fourier_wer_101_2020a.ipynb` in the repo
# https://github.com/emsig/new-filters
#
# This is based on the filter `fourier_wer_201_2018_sincos` from the article
# (https://github.com/emsig/article-fdesign)
#
#
# > Werthmüller, D., K. Key, and E. Slob, 2019;
# > A tool for designing digital filters for the Hankel and Fourier
# > transforms in potential, diffusive, and wavefield modeling;
# > Geophysics, 84(2), F47-F56;
# > DOI: 10.1190/geo2018-0069.1
#
#
# Copyright 2020 Dieter Werthmüller
#
# This work is licensed under a CC BY 4.0 license.
# <http://creativecommons.org/licenses/by/4.0/>.
#
# This file is part of libdlf.
#
#
# base sin cos
1.671053690650226280e-03 1.177128430410025000e-04 8.612264121043072818e-01
1.867009289629693045e-03 -5.660678178275897884e-04 -4.869802809580678016e+00
2.085943561877559062e-03 1.350278275315356779e-03 1.337178636604660653e+01
2.330551094473372418e-03 -2.120714850591536547e-03 -2.399690723393387870e+01
2.603842454424879112e-03 2.498106416625487953e-03 3.208155091014653948e+01
2.909181241957464314e-03 -2.379605473189794120e-03 -3.460231152804073673e+01
3.250325488846256966e-03 1.944577538525011544e-03 3.189723969767428713e+01
3.631473911310925239e-03 -1.418567318121408041e-03 -2.629879881421922505e+01
4.057317586742053769e-03 9.642364434936241376e-04 2.013466902802267100e+01
4.533097690282951280e-03 -6.199837727970451641e-04 -1.475824022814371972e+01
5.064670001874087106e-03 3.945549458746879044e-04 1.061419935805379566e+01
5.658576977696270528e-03 -2.393100388352208032e-04 -7.625223694795089102e+00
6.322128273049588791e-03 1.528843254982245874e-04 5.543564709830923753e+00
7.063490707723007328e-03 -8.271021059768657346e-05 -4.105507606888341599e+00
7.891788781125530852e-03 5.581042701538605942e-05 3.112384155182696510e+00
8.817216974293377862e-03 -1.353973990819307488e-05 -2.412328829272769593e+00
9.851165220957610116e-03 1.374587638124020642e-05 1.914950744352351908e+00
1.100635909193808069e-02 2.509322987812082322e-05 -1.547494487573237931e+00
1.229701641821740951e-02 -6.876675390328162201e-06 1.276994776249292363e+00
1.373902228037167557e-02 5.506282308040526014e-05 -1.065256475475044207e+00
1.535012451808308656e-02 -1.776344648677357434e-05 9.053279587675648887e-01
1.715015216601577588e-02 8.604152819130784201e-05 -7.717467279965584126e-01
1.916125950450767168e-02 -2.241382904823908346e-05 6.703724340486532096e-01
2.140819872879183919e-02 1.240684052351333103e-04 -5.790491960531590765e-01
2.391862459269064253e-02 -2.062332608794787206e-05 5.115575453456313593e-01
2.672343477625928332e-02 1.749067255838470834e-04 -4.446549364147986405e-01
2.985715016653677639e-02 -9.640975270191073663e-06 3.985990692448891370e-01
3.335833973180266088e-02 2.458408833484348088e-04 -3.465344460941509608e-01
3.727009521858323793e-02 1.605802290557992683e-05 3.152843199131651897e-01
4.164056151385677612e-02 3.472541237730645170e-04 -2.724528306969517533e-01
4.652352920002018888e-02 6.587285733609021853e-05 2.523395450420861663e-01
5.197909659563232365e-02 4.946135060282783914e-04 -2.151391635047220641e-01
5.807440943016210777e-02 1.550905663950061263e-04 2.041191431545700263e-01
6.488448725646953075e-02 7.113511815859764392e-04 -1.699832343683551628e-01
7.249314677229257153e-02 3.081527331386900155e-04 1.669889539930026201e-01
8.099403341474606388e-02 1.033229555683448132e-03 -1.338816635994170279e-01
9.049177392443238932e-02 5.637955063803680488e-04 1.384991555043816047e-01
1.011032640646306324e-01 1.515028134520884744e-03 -1.046324507922065106e-01
1.129591073444805582e-01 9.830407494344575465e-04 1.169417987903709072e-01
1.262052224536011624e-01 2.240792323996612656e-03 -8.060296381644735386e-02
1.410046391920360409e-01 1.661516507476727992e-03 1.011025732586340181e-01
1.575395049993744134e-01 3.339464238126201804e-03 -6.054076589843294942e-02
1.760133267788943079e-01 2.748268829240291342e-03 9.011281865997258778e-02
1.966534756085265845e-01 5.008485710225668228e-03 -4.346434473354218730e-02
2.197139851659833387e-01 4.474070874176995678e-03 8.335190849932624935e-02
2.454786783103509451e-01 7.548834508208851664e-03 -2.860492974839416377e-02
2.742646603013158546e-01 7.193031643296311957e-03 8.036929034322272403e-02
3.064262216496722036e-01 1.141551392152812330e-02 -1.539086290858027867e-02
3.423591986343985094e-01 1.144132055547570498e-02 8.080095195837132260e-02
3.825058451544331994e-01 1.728650330384903094e-02 -3.482231120155680672e-03
4.273602758766554821e-01 1.801396324555867845e-02 8.425024314571209760e-02
4.774745476729463922e-01 2.614721447473505184e-02 7.118256607816434225e-03
5.334654541951034945e-01 2.804958560237751086e-02 9.008785612847836077e-02
5.960221172135007350e-01 3.936827409142958784e-02 1.582710687299826099e-02
6.659144681517497055e-01 4.308101225391140071e-02 9.710008263613641166e-02
7.440027242059250590e-01 5.870302651394198462e-02 2.103149156428574251e-02
8.312479756780057905e-01 6.492911920895842737e-02 1.028851541404327830e-01
9.287240148297292164e-01 8.600845522564160017e-02 1.932515660501906568e-02
1.037630551843367277e+00 9.513545168468470759e-02 1.029032782549754305e-01
1.159307980548093475e+00 1.222325341940400378e-01 4.386791120953463519e-03
1.295253875644727160e+00 1.332714580931727011e-01 8.926507152220521102e-02
1.447141424472483839e+00 1.647510087571587845e-01 -3.415372176385181313e-02
1.616840020171202985e+00 1.729312790233871466e-01 5.008920555998098295e-02
1.806438269694436771e+00 2.016518002904397755e-01 -1.101951445479305430e-01
2.018269699850141485e+00 1.940667048993496568e-01 -2.755564873336105100e-02
2.254941477752355095e+00 2.023642101962166706e-01 -2.339779715187350895e-01
2.519366499167838391e+00 1.532132739110372011e-01 -1.434582052113716477e-01
2.814799239692853838e+00 1.109308646730865489e-01 -3.877376708075122025e-01
3.144875810007203398e+00 -1.315039125990560137e-02 -2.468500500554745014e-01
3.513658708195355196e+00 -1.282157266909626225e-01 -4.757851217062295524e-01
3.925686819934799843e+00 -3.224057506710564791e-01 -1.829888520335686275e-01
4.386031281941161986e+00 -4.438832385914982526e-01 -2.950823755975189866e-01
4.900357896223096255e+00 -5.525717071649929313e-01 2.564392715834030168e-01
5.474996863325652718e+00 -4.179424511621095961e-01 2.467066920175618183e-01
6.117020692821054872e+00 -1.356894418601971575e-01 8.617116323706616177e-01
6.834331249949313403e+00 4.231399316532070132e-01 4.300195697758567581e-01
7.635757009756470204e+00 7.971691376852335642e-01 4.248540516899928510e-01
8.531161715709563609e+00 7.701490911095479897e-01 -8.640271588166310579e-01
9.531565780130783594e+00 -1.494281773339199981e-01 -7.452759629870838731e-01
1.064928192061634427e+01 -1.069745044775420428e+00 -7.463810617484178955e-01
1.189806670181843629e+01 -8.629341171512594499e-01 1.428369988090274045e+00
1.329328984772781652e+01 1.029321612059260094e+00 6.515064400776831022e-01
1.485212340830933364e+01 1.190536963151301419e+00 -5.591703310101934221e-01
1.659375310870499831e+01 -1.371867658698948222e+00 -1.774981964122684053e+00
1.853961448223659403e+01 -6.708803065351398587e-01 2.689348871924182927e+00
2.071365669347246552e+01 2.209014216493316418e+00 -1.563870194260484681e+00
2.314263729842541650e+01 -2.256189608026875959e+00 9.574442462477668336e-02
2.585645156971488490e+01 1.547933856161078481e+00 6.781737340231011046e-01
2.888850043994330363e+01 -8.494057225011281131e-01 -8.101653232881353972e-01
3.227610159183987548e+01 4.075685384262657251e-01 6.598501332935400310e-01
3.606094875476382100e+01 -1.807212648295278556e-01 -4.606593153578323885e-01
4.028962486047174707e+01 7.639004844240789016e-02 2.965356908617542420e-01
4.501417537393832902e+01 -3.106921310947700562e-02 -1.800329421698201871e-01
5.029274885564055353e+01 1.204114929236533779e-02 1.028693788119511288e-01
5.619031263918132879e+01 -4.334377614045730430e-03 -5.444212011753868374e-02
6.277945243263101816e+01 1.391343105367035373e-03 2.601462885776218217e-02
7.014126568487445468e+01 -3.746642635248535530e-04 -1.083717243894689354e-02
7.836635971228983522e+01 7.637865894584300601e-05 3.749095354542213328e-03
8.755596687044570103e+01 -9.318164761079860344e-06 -1.001446803180466383e-03
9.782319049606640249e+01 6.251957489983808947e-08 1.820272649174883340e-04
1.092943969539991116e+02 1.204781709061051936e-07 -1.673822832458466697e-05
130 changes: 130 additions & 0 deletions lib/Fourier/fourier_wer_101_2020b_sincos.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# 101 point Fourier filter, Sine and Cosine
# =========================================
#
# Designed and tested for TEM data with short offsets and high resistive
# ground.
#
# See the notebook `fourier_wer_101_2020b.ipynb` in the repo
# https://github.com/emsig/new-filters
#
# This is based on the filter `fourier_wer_201_2018_sincos` from the article
# (https://github.com/emsig/article-fdesign)
#
#
# > Werthmüller, D., K. Key, and E. Slob, 2019;
# > A tool for designing digital filters for the Hankel and Fourier
# > transforms in potential, diffusive, and wavefield modeling;
# > Geophysics, 84(2), F47-F56;
# > DOI: 10.1190/geo2018-0069.1
#
#
# Copyright 2020 Dieter Werthmüller
#
# This work is licensed under a CC BY 4.0 license.
# <http://creativecommons.org/licenses/by/4.0/>.
#
# This file is part of libdlf.
#
#
# base sin cos
4.623016632091449685e-04 -3.032097930028440080e-01 4.751425628620387087e-02
5.230368770053674685e-04 1.676703845446847474e+00 -1.644355862978697513e-01
5.917512232348732474e-04 -4.351624595138428475e+00 2.106669735821867506e-01
6.694929661649362974e-04 7.086947479717435883e+00 -4.032698608033828680e-02
7.574480865355485591e-04 -8.133993252635450588e+00 -2.453794981484290205e-01
8.569583741601555530e-04 6.924468702003222731e+00 4.021095983898078652e-01
9.695418974548447935e-04 -4.342773461983382433e+00 -3.158777586422166772e-01
1.096916162166661473e-03 1.700628874139152202e+00 7.191806359846980579e-02
1.241024312596534888e-03 1.773755078667151597e-01 1.837097772033341736e-01
1.404064775026715554e-03 -1.125573543220994788e+00 -3.601730958609785094e-01
1.588524795574843647e-03 1.362008685974825495e+00 4.455175520735200068e-01
1.797218384107729513e-03 -1.191644630842478181e+00 -4.651076988177635929e-01
2.033329243064131708e-03 8.541624428245564449e-01 4.525120533514946919e-01
2.300459336082513306e-03 -4.920575990936636446e-01 -4.273886397690213612e-01
2.602683837367248624e-03 1.719935533556375962e-01 4.019851943559138441e-01
2.944613300067361588e-03 8.461068126916276855e-02 -3.765548631079509989e-01
3.331463992070785984e-03 -2.783371828247770408e-01 3.531655436492796563e-01
3.769137472214202297e-03 4.180773355288303628e-01 -3.271967934745331208e-01
4.264310620874756444e-03 -5.141737380367090715e-01 3.009843905465892089e-01
4.824537498395549927e-03 5.756676830559487312e-01 -2.699885011620284381e-01
5.458364585235133196e-03 -6.094472783338126254e-01 2.386591509346867590e-01
6.175461161874547765e-03 6.204367663184469084e-01 -2.020792085085158507e-01
6.986766817478557226e-03 -6.119221822354889984e-01 1.661607862962637683e-01
7.904658337613404417e-03 5.861943332897622261e-01 -1.243151755968321670e-01
8.943138516958661424e-03 -5.448334532704799393e-01 8.360013885792287602e-02
1.011804977742494609e-02 4.893045643465601113e-01 -3.518682939644417196e-02
1.144731585050571057e-02 -4.209258512371511496e-01 -1.188768246522247350e-02
1.295121521082190537e-02 3.413928130123265459e-01 6.835448767567056660e-02
1.465269043219549414e-02 -2.523721499370564225e-01 -1.215137974420559541e-01
1.657769818559968675e-02 1.561256075789022035e-01 1.836017152080373083e-01
1.875560521834196068e-02 -5.472121136034339972e-02 -2.368573571437363745e-01
2.121963635529722225e-02 -4.899104088232311693e-02 2.958703269584098128e-01
2.400738135662556366e-02 1.526877679751290073e-01 -3.376695418891811906e-01
2.716136836428740056e-02 -2.529978140693809330e-01 3.817541395184943509e-01
3.072971268550746607e-02 3.476902255979143486e-01 -4.005968023341335282e-01
3.476685081063342342e-02 -4.331411606915623880e-01 4.217884427123222424e-01
3.933437086311898645e-02 5.079323100503070343e-01 -4.130264206304190000e-01
4.450195215047131336e-02 -5.686512353972341671e-01 4.122896848658380020e-01
5.034842814938064737e-02 6.156640600032469157e-01 -3.801974000642105445e-01
5.696298914128641866e-02 -6.460574185684860860e-01 3.662903877030934119e-01
6.444654284505664521e-02 6.628946836518935237e-01 -3.200883479732006265e-01
7.291325380376492693e-02 -6.634632478666779853e-01 3.039710227688610655e-01
8.249228500951352738e-02 6.542718020862432482e-01 -2.518323510438695290e-01
9.332976833547142193e-02 -6.316669898978216624e-01 2.416736291418400961e-01
1.055910338348395178e-01 6.062926529312162582e-01 -1.874051711130874376e-01
1.194631319155722293e-01 -5.712912901054335579e-01 1.874327772686186500e-01
1.351576868676191701e-01 5.423625031389122109e-01 -1.310664398136574538e-01
1.529141252743614898e-01 -5.058277679331174559e-01 1.434805982130868129e-01
1.730033285589257508e-01 4.844286571597179458e-01 -8.348454786591678889e-02
1.957317653863981377e-01 -4.527181532518958496e-01 1.104220118939801543e-01
2.214461669633548402e-01 4.450691063860118812e-01 -4.476423035032708192e-02
2.505388165582336235e-01 -4.177622273377765705e-01 8.848716580678074595e-02
2.834535339362520556e-01 4.256306896891202673e-01 -1.414417946855840540e-02
3.206924460037708924e-01 -3.970606791403952784e-01 7.616167767385480236e-02
3.628236469509347195e-01 4.217721057257522999e-01 1.138810268770525276e-02
4.104898647510661913e-01 -3.843379792575330467e-01 6.912277304181303761e-02
4.644182662276569729e-01 4.313751427183095677e-01 3.684932846962509639e-02
5.254315502690926065e-01 -3.773254543784242965e-01 6.119389497137291134e-02
5.944604984224478583e-01 4.590694307034969834e-01 6.642896763580267983e-02
6.725581743305756310e-01 -3.795766483824224435e-01 4.721845637526928680e-02
7.609159886304670550e-01 5.160159139632491954e-01 9.861829494368679061e-02
8.608818743891950565e-01 -3.987128450484458964e-01 2.606006923440999309e-02
9.739808503508419202e-01 6.162680465173722144e-01 1.215600637885464186e-01
1.101938285694792352e+00 -4.435862791206623967e-01 2.681511816019880061e-04
1.246706221218395694e+00 7.701814808458400385e-01 1.120196290305757458e-01
1.410493148483947357e+00 -5.233273240249867175e-01 -3.020867007948492902e-02
1.595797701222542830e+00 9.742138042389385522e-01 4.038214105438758111e-02
1.805446772970364711e+00 -6.530373135960823028e-01 -7.674745743558948619e-02
2.042638642436876317e+00 1.195932126521463745e+00 -1.168175606828513458e-01
2.310991764499309209e+00 -8.696566676061742163e-01 -1.579808061646236494e-01
2.614599971149166091e+00 1.356770932362701965e+00 -3.482106656820654900e-01
2.958094924502820078e+00 -1.244873824480665636e+00 -2.548989448558802717e-01
3.346716774621322887e+00 1.344561182323858128e+00 -5.406368156808083469e-01
3.786394100052172806e+00 -1.824048205410305989e+00 -2.104133076774350741e-01
4.283834350617280684e+00 1.170720237309541778e+00 -4.026651986637749259e-01
4.846626172187340487e+00 -2.343926303711984627e+00 2.743957243470537821e-01
5.483355174447052782e+00 1.352645098224602993e+00 2.749460719114533158e-01
6.203734907733889692e+00 -1.970509252545918910e+00 9.533633760777551203e-01
7.018755047053284457e+00 2.544736728292252614e+00 4.674630231287428828e-01
7.940849043875543245e+00 -1.020811267017897928e+00 6.725981031259092857e-02
8.984083803308193339e+00 2.483751015226844494e+00 -1.126532193939353999e+00
1.016437428024349110e+01 -2.850215966072075169e+00 -8.367008423001262019e-01
1.149972626822916411e+01 7.392934954469336795e-01 6.318402801179540118e-01
1.301051108490189989e+01 -1.259666155519126862e+00 1.466967946788555244e+00
1.471977634441742921e+01 3.435582573022490038e+00 -9.822829172813621890e-01
1.665359755783219242e+01 -3.573585042654930710e+00 -1.244214684234585366e+00
1.884147592523835968e+01 1.925920602906467716e+00 2.360082693338028115e+00
2.131678838812697308e+01 -4.319369970487170751e-01 -1.995997442899760443e+00
2.411729680770411477e+01 -2.066290159101869528e-01 1.177652417096545223e+00
2.728572403687504533e+01 2.901652759614390398e-01 -5.593163599828869792e-01
3.087040567409988157e+01 -1.986371115397918274e-01 2.311770407867751176e-01
3.492602744188133101e+01 1.053261414249085093e-01 -8.708288500145118516e-02
3.951445943888185042e+01 -4.789405761297025471e-02 3.056158052506325815e-02
4.470569999251345195e+01 1.926430169996435487e-02 -1.001145811493422098e-02
5.057894351084080853e+01 -6.867456227794205455e-03 3.019796141754367731e-03
5.722378862429705038e+01 2.138400839659128187e-03 -8.177637114247189370e-04
6.474160504788672199e+01 -5.658430719297964390e-04 1.918250930380499346e-04
7.324708001589505102e+01 1.219370901264623048e-04 -3.710436977972587144e-05
8.286996788057008700e+01 -2.000709509574148581e-05 5.502551393845589411e-06
9.375706956559157845e+01 2.214770667547218816e-06 -5.518126551787058583e-07
1.060744720716634504e+02 -1.236622977182922818e-07 2.786527079774762227e-08
Loading

0 comments on commit bb95c97

Please sign in to comment.