Skip to content

Commit

Permalink
fix calc_spec_poission to work with f_lists
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusSifft committed Nov 2, 2023
1 parent 050411c commit aad136c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/signalsnap/spectrum_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class SpectrumConfig:

def __init__(self, path=None, group_key=None, dataset=None, delta_t=None, data=None,
corr_data=None, corr_path=None, corr_group_key=None, corr_dataset=None,
f_unit='Hz', f_max=None, f_min=0, backend='cpu', spectrum_size=100, order_in='all',
f_unit='Hz', f_max=None, f_min=0, f_lists=None, backend='cpu', spectrum_size=100, order_in='all',
corr_shift=0, filter_func=False, verbose=True, coherent=False, corr_default=None,
break_after=1e6, m=20, m_var=None, m_stationarity=None, interlaced_calculation=True,
random_phase=False,
Expand All @@ -104,7 +104,7 @@ def __init__(self, path=None, group_key=None, dataset=None, delta_t=None, data=N
raise ValueError("f_unit must be one of 'Hz', 'kHz', 'MHz', 'GHz', 'THz', 'mHz'.")
if backend not in ['cpu', 'opencl', 'cuda']:
raise ValueError("backend must be one of 'cpu', 'opencl', 'cuda'.")
if not isinstance(spectrum_size, int) or spectrum_size <= 0:
if (not isinstance(spectrum_size, int) or spectrum_size <= 0) and f_lists is not None:
raise ValueError("spectrum_size must be a positive integer.")

if order_in != 'all' and (not isinstance(order_in, list) or not all(1 <= i <= 4 for i in order_in)):
Expand Down

0 comments on commit aad136c

Please sign in to comment.