We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
And this happens more if I add filters like below:
x = np.array(self.dataBuffer).T
` if self.chunk_idx == 0 or self.mean.size == 0: self.mean = np.mean(x, axis=1).reshape(-1, 1) x2 = copy.deepcopy(x) - self.mean
data_range = (np.max(x2, axis=1) - np.min(x2, axis=1) + 0.0000000000001).reshape(-1, 1) self.scaling = self.channelHeight * CHANNEL_Y_FILL / data_range self.scaling = np.clip(self.scaling, 0.05, 1e8)
`
x = x - self.mean x = x * self.scaling
nyq = 0.5 * 1024 low = 1 / nyq high = 50 / nyq order = 5 b, a = signal.butter(order, [low,high], btype='band') x = signal.filtfilt(b, a, x, axis=1)`
`self.dataBuffer = list(x.T)
This is the signal after filtering:
If there is any question regarding the issue, please feel free to ask me.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
And this happens more if I add filters like below:
convert list to aray
x = np.array(self.dataBuffer).T
set up mean and scaling coef
`
if self.chunk_idx == 0 or self.mean.size == 0:
self.mean = np.mean(x, axis=1).reshape(-1, 1)
x2 = copy.deepcopy(x) - self.mean
`
rescaling and minus mean
x = x - self.mean x = x * self.scaling
bandpass filter
nyq = 0.5 * 1024
low = 1 / nyq
high = 50 / nyq
order = 5
b, a = signal.butter(order, [low,high], btype='band')
x = signal.filtfilt(b, a, x, axis=1)`
turn back to list
`self.dataBuffer = list(x.T)
This is the signal after filtering:
![image](https://user-images.githubusercontent.com/63558758/149206506-13275895-69f6-4cda-9246-dfe0f3bdb873.png)
If there is any question regarding the issue, please feel free to ask me.
The text was updated successfully, but these errors were encountered: