File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ def plot_interactive_spectra(
108108 Creates an interactive plot of spectra with a slider to select different indices.
109109 Parameters:
110110 -----------
111- spectra : list of list of float
111+ spectra : list of list of float or a dictionary with tuple or string keys
112112 A list of spectra, where each spectrum is a list of lists of float values, each
113113 corresponding to the transmission of a single wavelength.
114114 wavelengths : list of float
@@ -128,6 +128,8 @@ def plot_interactive_spectra(
128128 port_keys .append ((key .split ("," )[0 ], key .split ("," )[1 ]))
129129 elif isinstance (key , tuple ):
130130 port_keys .append (key )
131+ else :
132+ raise ValueError ("Port keys must be either a string or a tuple." )
131133
132134 # Defaults
133135 if spectrum_labels is None and isinstance (spectra , dict ):
You can’t perform that action at this time.
0 commit comments