Skip to content

Commit 2a9a335

Browse files
authored
Adding a Band-pass filter (#44)
* Added bandpass filter function place holder. * added a bandpass filter. Function is written in gprpyTools and then it is called from gprpy module. I mimicked the existing strucutre and the undo function appears to work. Need to add some more documentation. I converted self.data into an array (from a matrix) to do the calcuation and then make sure is a matrix being passed back. * Added a plot spectrum funciton, mainly to verify the band pass filter * Added descriptions to the functions * Added a band-pass button. It is not funcitonal yet. I coppied the format from Alain's other buttons * Added the functionality to the band-pass button. I really wanted to plot the spectrum to confirm that it was working. I don't know how to get it to pop up a new window though. This is becasue I think that I have to place the plot onto a TK canvs??. It is also unclear if the undu button is working, but it does write the script properly * removed wrong/old test function
1 parent 69609ea commit 2a9a335

File tree

5 files changed

+227
-12
lines changed

5 files changed

+227
-12
lines changed

Flinchum_testGPRAdditions.py

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
3+
"""
4+
Created on Sat Dec 14 04:35:09 2024
5+
6+
@author: bflinch
7+
"""
8+
9+
import gprpy.gprpy as gp
10+
from gprpy.gprpyGUI import GPRPyApp
11+
from gprpy.gprpyCWGUI import GPRPyCWApp
12+
import tkinter as tk
13+
14+
15+
rightcol=9
16+
figrowsp=19+1
17+
18+
root = tk.Tk()
19+
20+
for col in range(rightcol):
21+
root.columnconfigure(col, weight=1)
22+
for row in range(figrowsp):
23+
root.rowconfigure(row, weight=1)
24+
25+
app = GPRPyApp(root)
26+
27+
root.mainloop()
28+
29+
30+
31+
# testFile = '/Users/bflinch/Dropbox/Clemson/Research/ResearchProjects/BotanicalGardens_Oak/Data/DATA07/LINE79.DT1'
32+
33+
# mygpr = gp.gprpyProfile()
34+
# mygpr.importdata(testFile)
35+
# mygpr.dewow(1)
36+
# mygpr.remMeanTrace(100)
37+
# mygpr.bpFilter(400, 1200)
38+
# mygpr.plotFreqSpectrum(False)
39+
40+
41+
# mygpr.data = bpData(mygpr.data,lf,hf,dt,1)
42+
# #mygpr.topoCorrect('/Users/bflinch/Dropbox/Clemson/Research/ResearchProjects/BCZN/Panola/GPRTrench/Line0Topo.txt',delimiter='\t')
43+
# data = np.asarray(mygpr.data)
44+
# #mygpr.depth

0 commit comments

Comments
 (0)