reveal.AtlasReveal
reveal.AtlasReveal(one=None, pid=None, df_pid=None)Methods
| Name | Description |
|---|---|
| figure_01_features_with_histology_columns | Create feature visualization with histology columns. |
| figure_02_classifier_results | Create classifier results visualization. |
| figure_03_histology_slices | Create histology slice visualization with probe trajectories. |
| figure_04_ap_voltage | Create AP band voltage visualization. |
| figure_05_lfp_voltage | Create LFP voltage and CSD visualization. |
| figure_06_bad_channels | Create bad channel detection visualization. |
figure_01_features_with_histology_columns
reveal.AtlasReveal.figure_01_features_with_histology_columns(
scaler=None,
df_pid=None,
)Create feature visualization with histology columns.
This method creates a comprehensive visualization showing electrophysiological features plotted in channel space with histology overlays.
Args: scaler (sklearn.preprocessing.StandardScaler, optional): Scaler for normalizing features. If provided, features are scaled to [-1.2, 1.2] range. Defaults to None. df_pid (pd.DataFrame, optional): DataFrame containing probe data. If None, uses self.df_pid. This is useful for displaying raw features if needed. Defaults to None.
Returns: tuple: A tuple containing: - fig (matplotlib.figure.Figure): The created figure. - axs (matplotlib.axes.Axes): The axes containing the plot.
figure_02_classifier_results
reveal.AtlasReveal.figure_02_classifier_results(
df_predictions=None,
path_model=None,
)Create classifier results visualization.
This method creates a comprehensive visualization showing the results of the channel regions classifier, including true labels, predictions, confidence scores, and cumulative probabilities.
Args: df_predictions (pd.DataFrame, optional): DataFrame containing classifier predictions. If None, predictions are computed using the loaded model. Defaults to None. path_model (Path, optional): Path to the trained model directory. Required if df_predictions is None. Defaults to None.
Returns: tuple: A tuple containing: - fig (matplotlib.figure.Figure): The created figure. - axs (matplotlib.axes.Axes): Array of axes containing the plots.
Note: The figure shows: - Brain regions with Allen labels - True labels (Allen and Cosmos) - Classifier predictions - Confidence scores - Cumulative probabilities across depths
figure_03_histology_slices
reveal.AtlasReveal.figure_03_histology_slices()Create histology slice visualization with probe trajectories.
This method creates a visualization showing three orthogonal slices through the brain atlas with overlaid probe trajectories, including both planned and aligned coordinates.
Returns: tuple: A tuple containing: - fig (matplotlib.figure.Figure): The created figure. - axs (matplotlib.axes.Axes): Array of axes containing the three slice views.
Note: The figure shows: - Coronal slice (AP view) at median y-coordinate - Sagittal slice (ML view) at median x-coordinate - Horizontal slice (DV view) at median z-coordinate - Both planned (target) and aligned (actual) probe trajectories
figure_04_ap_voltage
reveal.AtlasReveal.figure_04_ap_voltage()Create AP band voltage visualization.
This method creates visualizations showing AP band voltage traces, comparing raw and preprocessed data. The data is filtered and destriped to show the effects of preprocessing.
Returns: tuple: A tuple containing: - figs (list): List of two figures showing raw and preprocessed AP data. - axs (list): List of axes arrays for each figure.
Note: The method shows: - Raw AP voltage traces with high-pass filtering - Preprocessed AP voltage traces after destriping - Both visualizations include brain region overlays and channel information - Data is extracted from a 1-second window starting at 600 seconds
figure_05_lfp_voltage
reveal.AtlasReveal.figure_05_lfp_voltage()Create LFP voltage and CSD visualization.
This method creates visualizations showing LFP voltage traces and current source density (CSD) analysis. The data is filtered, destriped, and processed to show both voltage and CSD representations.
Returns: tuple: A tuple containing: - figs (list): List of two figures showing preprocessed LFP and CSD data. - axs (list): List of axes arrays for each figure.
Note: The method shows: - Preprocessed LFP voltage traces after filtering and destriping - Current source density (CSD) analysis with Cadzow denoising - Both visualizations include brain region overlays and channel information - Data is extracted from a 4-second window starting at 600 seconds - CSD is computed with 5x decimation and 200 Hz maximum frequency
figure_06_bad_channels
reveal.AtlasReveal.figure_06_bad_channels()Create bad channel detection visualization.
This method creates a visualization showing the results of bad channel detection on AP band voltage data, including channel labels and feature analysis.
Returns: tuple: A tuple containing: - fig (matplotlib.figure.Figure): The created figure. - axs (matplotlib.axes.Axes): The axes containing the bad channel analysis.
Note: The method shows: - Raw AP voltage traces - Bad channel detection results - Channel features used for detection - Data is extracted from a 1-second window starting at 600 seconds