Skip to content

Commit

Permalink
window attr of AuroraDecimationLevel now accessed via stft
Browse files Browse the repository at this point in the history
  • Loading branch information
kkappler committed Jan 4, 2025
1 parent e737ac5 commit 53241f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,6 @@ def __init__(self, **kwargs):

super().__init__(attr_dict=attr_dict, **kwargs)

@property
def window(self) -> Window:
"""
Convenience access to STFT window metadata.
This was placed here to allow access to legacy Decimation's window attribute.
Note: This maybe deprecated in future to use only direct access via self.stft.window.
"""
return self.stft.window

@property
def bands(self) -> list:
"""
Expand Down Expand Up @@ -213,7 +201,7 @@ def frequency_sample_interval(self) -> float:
Returns the delta_f in frequency domain df = 1 / (N * dt)
Here dt is the sample interval after decimation
"""
return self.sample_rate_decimation / self.window.num_samples
return self.sample_rate_decimation / self.stft.window.num_samples

@property
def band_edges(self) -> np.ndarray:
Expand Down
2 changes: 1 addition & 1 deletion tests/tf/processing/fcs/test_decimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def test_pre_fft_detrend_type_false(self):
)

def test_window_false(self):
self.adl.window.type = "dpss"
self.adl.stft.window.type = "dpss"
self.assertEqual(
False, self.adl.is_consistent_with_archived_fc_parameters(self.dl, None)
)
Expand Down

0 comments on commit 53241f2

Please sign in to comment.