Spaces:
Runtime error
Runtime error
Updated app.py
Browse files
app.py
CHANGED
@@ -58,6 +58,12 @@ if __name__ == '__main__':
|
|
58 |
st.header('Savitzky-Golay Filter : ')
|
59 |
st.write('Savitzky-Golay smoothing filters are typically used to "smooth out" a noisy signal. They are also called digital smoothing polynomial filters or least-squares smoothing filters. Savitzky-Golay filters perform better in some applications than standard averaging FIR filters, which tend to filter high-frequency content along with the noise. Savitzky-Golay filters are more effective at preserving high frequency signal components but less successful at rejecting noise.Savitzky-Golay filters are optimal in the sense that they minimize the least-squares error in fitting a polynomial to frames of noisy data.')
|
60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
st.write('---')
|
62 |
|
63 |
|
@@ -83,7 +89,7 @@ if __name__ == '__main__':
|
|
83 |
left,right = st.columns(2)
|
84 |
|
85 |
with left:
|
86 |
-
st.subheader('Detrending
|
87 |
window_size_dt = st.slider('*Window Size for Detrending*',min_value=1,max_value=100,value=20,step=1)
|
88 |
st.write('Window size is the number of samples to be considered for detrending.')
|
89 |
trend_type = st.selectbox('*Trend Type*',['linear','constant','Dont Remove'])
|
@@ -111,8 +117,8 @@ if __name__ == '__main__':
|
|
111 |
left,right = st.columns(2)
|
112 |
|
113 |
with left:
|
114 |
-
st.subheader('Savitzky-Golay Filter
|
115 |
-
window_size_sg = st.slider('*Window Size for
|
116 |
st.write('Window size is the number of samples to be considered for filtering.')
|
117 |
order = st.slider('*Polynomial Order*',min_value=1,max_value=10,value=3,step=1)
|
118 |
st.write('Order is the order of the polynomial to be fitted to the window of data.')
|
@@ -141,7 +147,7 @@ if __name__ == '__main__':
|
|
141 |
left,right = st.columns(2)
|
142 |
|
143 |
with left:
|
144 |
-
st.subheader('Moving Average Filter
|
145 |
window_size_ma = st.slider('*Window Size for Moving Average filter*',min_value=1,max_value=100,value=20,step=1)
|
146 |
st.write('Window size is the number of samples to be considered for filtering.')
|
147 |
|
@@ -168,7 +174,7 @@ if __name__ == '__main__':
|
|
168 |
left,right = st.columns(2)
|
169 |
|
170 |
with left:
|
171 |
-
st.subheader('Gaussian Filter
|
172 |
sigma_gf = st.slider('*Sigma*',min_value=0.1,max_value=10.0,value=3.0,step=0.1)
|
173 |
st.write('Sigma is the standard deviation for Gaussian kernel.')
|
174 |
|
@@ -196,3 +202,5 @@ if __name__ == '__main__':
|
|
196 |
ax5.set_ylabel('Amplitude')
|
197 |
ax5.set_title('Gaussian Filtered Signal')
|
198 |
st.pyplot(fig5)
|
|
|
|
|
|
58 |
st.header('Savitzky-Golay Filter : ')
|
59 |
st.write('Savitzky-Golay smoothing filters are typically used to "smooth out" a noisy signal. They are also called digital smoothing polynomial filters or least-squares smoothing filters. Savitzky-Golay filters perform better in some applications than standard averaging FIR filters, which tend to filter high-frequency content along with the noise. Savitzky-Golay filters are more effective at preserving high frequency signal components but less successful at rejecting noise.Savitzky-Golay filters are optimal in the sense that they minimize the least-squares error in fitting a polynomial to frames of noisy data.')
|
60 |
|
61 |
+
st.header('Moving Average Filter : ')
|
62 |
+
st.write('The moving average is the most common filter in Signal Processing , mainly because it is the easiest digital filter to understand and use. The moving average filter is optimal for a common task: reducing random noise while retaining a sharp step response.This makes it the premier filter for time domain encoded signals.')
|
63 |
+
|
64 |
+
st.header('Gaussian Filter : ')
|
65 |
+
st.write('Gaussian filters are widely used for noise reduction due to their edge preserving properties. Gaussian filters are also used as smoothing filters. The Gaussian filter is a low-pass filter that removes the high-frequency components.')
|
66 |
+
|
67 |
st.write('---')
|
68 |
|
69 |
|
|
|
89 |
left,right = st.columns(2)
|
90 |
|
91 |
with left:
|
92 |
+
st.subheader('Detrending')
|
93 |
window_size_dt = st.slider('*Window Size for Detrending*',min_value=1,max_value=100,value=20,step=1)
|
94 |
st.write('Window size is the number of samples to be considered for detrending.')
|
95 |
trend_type = st.selectbox('*Trend Type*',['linear','constant','Dont Remove'])
|
|
|
117 |
left,right = st.columns(2)
|
118 |
|
119 |
with left:
|
120 |
+
st.subheader('Savitzky-Golay Filter')
|
121 |
+
window_size_sg = st.slider('*Window Size for Savitzky-Golay filter*',min_value=1,max_value=100,value=20,step=1)
|
122 |
st.write('Window size is the number of samples to be considered for filtering.')
|
123 |
order = st.slider('*Polynomial Order*',min_value=1,max_value=10,value=3,step=1)
|
124 |
st.write('Order is the order of the polynomial to be fitted to the window of data.')
|
|
|
147 |
left,right = st.columns(2)
|
148 |
|
149 |
with left:
|
150 |
+
st.subheader('Moving Average Filter')
|
151 |
window_size_ma = st.slider('*Window Size for Moving Average filter*',min_value=1,max_value=100,value=20,step=1)
|
152 |
st.write('Window size is the number of samples to be considered for filtering.')
|
153 |
|
|
|
174 |
left,right = st.columns(2)
|
175 |
|
176 |
with left:
|
177 |
+
st.subheader('Gaussian Filter')
|
178 |
sigma_gf = st.slider('*Sigma*',min_value=0.1,max_value=10.0,value=3.0,step=0.1)
|
179 |
st.write('Sigma is the standard deviation for Gaussian kernel.')
|
180 |
|
|
|
202 |
ax5.set_ylabel('Amplitude')
|
203 |
ax5.set_title('Gaussian Filtered Signal')
|
204 |
st.pyplot(fig5)
|
205 |
+
|
206 |
+
st.write('---')
|