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

feature/added signals transformation and meaviewer #13

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

igorcantele
Copy link
Contributor

Added signal transformations (i.e. Energy, Amplitude, Variance, Raw, Shutter)
Added meaviwer to easily display data

Tests not implemented yet
Documentation not updated yet

@igorcantele
Copy link
Contributor Author

def func(data, mask):
    return data[~mask]

callable = func

amplitude = bwpy.signal.amplitude(slice, 100)
artifacts = bwpy.signal.detect_artifacts(amplitude)
amplitude_data = amplitude.data
shutter = bwpy.signal.shutter(artifacts, amplitude_data, 200, callable)
mea_viewer.MEAViewer().build_view(
    file, slice=shutter, view_method="amplitude", bin_size=10
).show()

Example of flow:

  • Computing the amplitude of a time slice, in order to get amplitude_data.
  • Detecting artifacts indexes with detect_artifacts.
  • Plotting all the artifacts in a HTML page with shutter and cutting them with the callback function.
  • Using MEAViewer to display normal activity without artifacts.

Copy link
Owner

@Helveg Helveg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice new features :)

bwpy/__init__.py Outdated Show resolved Hide resolved
bwpy/mea_viewer.py Outdated Show resolved Hide resolved
bwpy/mea_viewer.py Outdated Show resolved Hide resolved
bwpy/mea_viewer.py Outdated Show resolved Hide resolved
bwpy/mea_viewer.py Outdated Show resolved Hide resolved
bwpy/signal.py Show resolved Hide resolved
bwpy/signal.py Outdated Show resolved Hide resolved
bwpy/signal.py Outdated Show resolved Hide resolved
bwpy/signal.py Outdated Show resolved Hide resolved
bwpy/signal.py Outdated Show resolved Hide resolved
@igorcantele igorcantele requested a review from Helveg July 14, 2023 15:10
@igorcantele igorcantele marked this pull request as ready for review August 3, 2023 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants