Skip to content

Commit 115dd26

Browse files
committed
Remove unnexessary return from station_correction()
1 parent 7c51793 commit 115dd26

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

sourcespec/ssp_build_spectra.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ def _build_signal_and_noise_spectral_streams(
732732
for specnoise in specnoise_st:
733733
specnoise.data_mag = moment_to_mag(specnoise.data)
734734
# apply station correction if a residual file is specified in config
735-
spec_st = station_correction(spec_st, config)
735+
station_correction(spec_st, config)
736736
return spec_st, specnoise_st
737737

738738

sourcespec/ssp_correction.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,14 @@ def station_correction(spec_st, config):
5656
Parameters
5757
----------
5858
spec_st : SpectrumStream or list of Spectrum
59-
List of spectra to be corrected.
59+
List of spectra to be corrected. Corrected spectra are appended
60+
to the list.
6061
config : Config
6162
Configuration object containing the residuals file path.
62-
63-
Returns
64-
-------
65-
spec_st : SpectrumStream or list of Spectrum
6663
"""
6764
res_filepath = config.residuals_filepath
6865
if res_filepath is None:
69-
return spec_st
66+
return
7067
try:
7168
residual = read_spectra(res_filepath)
7269
except Exception as msg:
@@ -113,4 +110,3 @@ def station_correction(spec_st, config):
113110
logger.info(
114111
f'{spec_corr.id}: corrected, frequency range is: '
115112
f'{fmin:.2f} {fmax:.2f} Hz')
116-
return spec_st

0 commit comments

Comments
 (0)