Skip to content

Commit

Permalink
Fix method calls
Browse files Browse the repository at this point in the history
  • Loading branch information
matteobachetti committed Jan 11, 2024
1 parent 17c7bf1 commit 83681ca
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions stingray/crossspectrum.py
Expand Up @@ -2316,8 +2316,8 @@ def power_colors(
power_color(
self.freq,
ps.real,
frequency_edges=freq_edges,
frequencies_to_exclude=freqs_to_exclude,
freq_edges=freq_edges,
freqs_to_exclude=freqs_to_exclude,
df=self.df,
poisson_power=poisson_power,
m=self.m,
Expand Down
12 changes: 6 additions & 6 deletions stingray/powerspectrum.py
Expand Up @@ -1077,19 +1077,19 @@ def _make_matrix(self, lc):

def power_colors(
self,
frequency_edges=[1 / 256, 1 / 32, 0.25, 2.0, 16.0],
frequencies_to_exclude=None,
freq_edges=[1 / 256, 1 / 32, 0.25, 2.0, 16.0],
freqs_to_exclude=None,
poisson_power=None,
):
"""
Return the power colors of the dynamical power spectrum.
Parameters
----------
frequency_edges: iterable
freq_edges: iterable
The edges of the frequency bins to be used for the power colors.
frequencies_to_exclude : 1-d or 2-d iterable, optional, default None
freqs_to_exclude : 1-d or 2-d iterable, optional, default None
The ranges of frequencies to exclude from the calculation of the power color.
For example, the frequencies containing strong QPOs.
A 1-d iterable should contain two values for the edges of a single range. (E.g.
Expand Down Expand Up @@ -1118,8 +1118,8 @@ def power_colors(
)

return super().power_colors(
freq_edges=frequency_edges,
freqs_to_exclude=frequencies_to_exclude,
freq_edges=freq_edges,
freqs_to_exclude=freqs_to_exclude,
poisson_power=poisson_power,
)

Expand Down
2 changes: 1 addition & 1 deletion stingray/tests/test_powerspectrum.py
Expand Up @@ -1034,7 +1034,7 @@ def test_works_with_events(self):

dps_ev = DynamicalPowerspectrum(ev, segment_size=10, sample_time=self.lc.dt)
assert np.allclose(dps.dyn_ps, dps_ev.dyn_ps)
dps_ev.power_colors(frequency_edges=[1 / 5, 1 / 2, 1, 2.0, 16.0])
dps_ev.power_colors(freq_edges=[1 / 5, 1 / 2, 1, 2.0, 16.0])

def test_rms_is_correct(self):
lc = copy.deepcopy(self.lc)
Expand Down

0 comments on commit 83681ca

Please sign in to comment.