Skip to content

Commit

Permalink
check smoothspect_N
Browse files Browse the repository at this point in the history
Signed-off-by: Yiyu Ni <niyiyu@uw.edu>
  • Loading branch information
niyiyu committed Jul 6, 2024
1 parent de7a4b5 commit d5cf001
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ coverage:
project:
default:
target: auto
threshold: 1
threshold: 0
set_pending: yes
if_no_uploads: error
if_not_found: error
Expand Down
1 change: 0 additions & 1 deletion src/noisepy/seis/noise_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,6 @@ def whiten_1D(timeseries, fft_para: ConfigParameters, n_taper):
----------------------
FFTRawSign: numpy.ndarray contains the FFT of the whitened input trace between the frequency bounds
"""

nfft = next_fast_len(len(timeseries))
spec = np.fft.fft(timeseries, nfft)
freq = np.fft.fftfreq(nfft, d=fft_para.dt)
Expand Down
4 changes: 3 additions & 1 deletion tests/test_noise_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ def test_detrend(data: np.ndarray):

@pytest.mark.parametrize("freq_norm", [FreqNorm.NO, FreqNorm.RMA])
@pytest.mark.parametrize("time_norm", [TimeNorm.ONE_BIT, TimeNorm.RMA])
def test_noise_processing(time_norm: TimeNorm, freq_norm: FreqNorm):
@pytest.mark.parametrize("smoothspect_N", [10, 1])
def test_noise_processing(time_norm: TimeNorm, freq_norm: FreqNorm, smoothspect_N: int):
config = ConfigParameters()
config.time_norm = time_norm
config.freq_norm = freq_norm
config.smoothspect_N = smoothspect_N
dataS = np.random.random([2, 500])
noise_processing(config, dataS)

Expand Down

0 comments on commit d5cf001

Please sign in to comment.