Skip to content

Commit

Permalink
Added a few lines so fitting correlation functions with no imaginary …
Browse files Browse the repository at this point in the history
…part does not crash
  • Loading branch information
gsuarezr committed Jan 24, 2024
1 parent fa3c8f7 commit 4595496
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qutip/solver/heom/bofin_baths.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def correlation_function(self, t, **kwargs):
----------
The correlation function as an array or float at time t
"""
if self.spectral_density(1) == -self.spectral_density(-1):
if np.isclose(self.spectral_density(t), -self.spectral_density(-t)):

def integrand(w, t):
return (
Expand Down

0 comments on commit 4595496

Please sign in to comment.