Skip to content

Commit

Permalink
Initial commit for visualization of gaps in marker data
Browse files Browse the repository at this point in the history
  • Loading branch information
rmndrs89 committed Aug 19, 2024
1 parent 6d4fd66 commit 67e519a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Empty file.
17 changes: 17 additions & 0 deletions kielmat/modules/markers/visualization.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd


def show_marker_gaps(marker_data: pd.DataFrame, skip_markers: None | str | list[str] = None) -> None:
# Parse skip_markers
skip_markers = skip_markers or []
skip_markers = [skip_markers] if isinstance(skip_markers, str) else skip_markers

# Get the marker position values, and duplicate the values to similate additional color channels
X = marker_data.to_numpy() # recommended
X = X[:, :, np.newaxis]
X = np.repeat(X, 3, axis=-1)

Y = np.where(np.isnan(X), 1, X)
return

0 comments on commit 67e519a

Please sign in to comment.