Skip to content

Commit

Permalink
Save for some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
GarethCabournDavies committed Sep 10, 2024
1 parent 32030e0 commit 52c97e9
Show file tree
Hide file tree
Showing 4 changed files with 243 additions and 242 deletions.
6 changes: 3 additions & 3 deletions pycbc/fft/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ def _list_available(possible_list, possible_dict):
available_list = []
available_dict = {}
for backend in possible_list:
try:
# try:
mod = __import__('pycbc.fft.' + possible_dict[backend], fromlist = ['pycbc.fft'])
available_dict.update({backend:mod})
available_list.append(backend)
except (ImportError, OSError):
pass
# except (ImportError, OSError):
# pass
return available_list, available_dict

# The main purpose of the top-level module is to present a
Expand Down
2 changes: 1 addition & 1 deletion pycbc/psd/variation.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def calc_filt_psd_variation(strain, segment, short_segment, psd_long_segment,
# Create a bandpass filter between low_freq and high_freq
filt = sig.firwin(4 * srate, [low_freq, high_freq], pass_zero=False,
window='hann', fs=srate)
filt.resize(int(psd_duration * srate))
filt.resize(int(psd_duration * srate), refcheck=False)
# Fourier transform the filter and take the absolute value to get
# rid of the phase.
filt = abs(rfft(filt))
Expand Down
6 changes: 3 additions & 3 deletions pycbc/scheme.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,10 @@ def _scheming_function(*args, **kwds):

return schemed_fn(*args, **kwds)

err = """Failed to find implementation of (%s)
for %s scheme." % (str(fn), current_prefix())"""
err = (f"Failed to find implementation of {func}"
f"for {current_prefix()} scheme.")
for emsg in exc_errors:
err += print(emsg)
err += repr(emsg)
raise RuntimeError(err)
return _scheming_function

Expand Down
Loading

0 comments on commit 52c97e9

Please sign in to comment.