add_view #8

Merged
madrigal merged 4 commits from add_view into main 2025-10-27 10:38:45 -04:00
2 changed files with 26 additions and 2 deletions
Showing only changes of commit 4ba0dc170e - Show all commits

View File

@ -55,7 +55,7 @@ def view_sig(
subtitle_fontsize: Optional[int] = 20, subtitle_fontsize: Optional[int] = 20,
) -> None: ) -> None:
""" """
Create a plot of various signal visualizations as a png image. Create a plot of various signal visualizations as a png or svg image.
:param recording: The recording object to plot. :param recording: The recording object to plot.
:type recording: Recording :type recording: Recording

View File

@ -147,7 +147,31 @@ def view_simple_sig(
slice: Optional[tuple] = None, slice: Optional[tuple] = None,
title: Optional[str] = "Signal", title: Optional[str] = "Signal",
): ):
"""Render the multi-panel viewer used by the CLI.""" """
Create a simple plot of various signal visualizations as a png or svg image.
:param recording: The recording object to plot.
:type recording: Recording
:param output_path: The output image path. Defaults to "images/signal.png"
:type output_path: str, optional
:param saveplot: Whether or not to save the plot. Defaults to True.
:type saveplot: bool, optional
:param fast_mode: Use fast mode for faster render. Defaults to False.
:type fast_mode: bool, optional
:param compact_mode: Use compact mode for compact plot. Defaults to False.
:type compact_mode: bool, optional
:param horizontal_mode: Display plots horizontally. Defaults to False.
:type horizontal_mode: bool, optional
:param constellation_mode: Display constellation plot and PSD if not using compact mode. Defaults to False.
:type constellation_mode: bool, optional
:param labels_mode: Display more thorough labels. Defaults to False.
:type labels_mode: bool, optional
:param slice: Slice of signal to display. Defaults to None.
:type slice: tuple[int, int], optional
:param title: Title of plot. Defaults to "Signal".
:type title: str, optional
"""
signal = recording.data[0] signal = recording.data[0]
sample_rate_hz, center_freq_hz, sdr = extract_metadata_fields(recording.metadata) sample_rate_hz, center_freq_hz, sdr = extract_metadata_fields(recording.metadata)