Skip to content
Snippets Groups Projects
Commit d5dcc604 authored by Tobias Hangleiter's avatar Tobias Hangleiter
Browse files

Make processed unit defalut to raw unit

parent 40dba030
Branches
Tags
1 merge request!56Add live view tool
Pipeline #1620771 waiting for manual action
......@@ -30,7 +30,7 @@ class PlotManager:
plot_amplitude: bool = True, plot_density: bool = True,
plot_cumulative_normalized: bool = False, plot_style: _styleT = 'fast',
plot_update_mode: str = 'never', plot_dB_scale: bool = False, prop_cycle=None,
raw_unit: str = 'V', processed_unit: str = 'V',
raw_unit: str = 'V', processed_unit: str | None = None,
uses_windowed_estimator: bool = True, figure_kw: Optional[Mapping] = None,
subplot_kw: Optional[Mapping] = None, gridspec_kw: Optional[Mapping] = None,
legend_kw: Optional[Mapping] = None):
......@@ -49,7 +49,7 @@ class PlotManager:
self._plot_style = plot_style
self._plot_update_mode = plot_update_mode
self._plot_dB_scale = plot_dB_scale
self._processed_unit = processed_unit
self._processed_unit = processed_unit if processed_unit is not None else raw_unit
# For dB scale plots, default to the first spectrum acquired.
self._reference_spectrum: Optional[_keyT] = None
......
......
......@@ -220,7 +220,7 @@ class Spectrometer:
processed_unit : str
The unit of the processed data. Can also be set dynamically by
setting :attr:`processed_unit` in case it changed when using
:meth:`reprocess_data`.
:meth:`reprocess_data`. Defaults to `raw_unit`.
figure_kw, gridspec_kw, subplot_kw, legend_kw : Mappings
Keyword arguments forwarded to the corresopnding matplotlib
constructors.
......@@ -383,7 +383,7 @@ class Spectrometer:
threaded_acquisition: bool = True,
purge_raw_data: bool = False, prop_cycle=None, savepath: _pathT = None,
relative_paths: bool = True, compress: bool = True, raw_unit: str = 'V',
processed_unit: str = 'V', figure_kw: Optional[Mapping] = None,
processed_unit: str | None = None, figure_kw: Optional[Mapping] = None,
subplot_kw: Optional[Mapping] = None, gridspec_kw: Optional[Mapping] = None,
legend_kw: Optional[Mapping] = None):
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment