Skip to content

Commit

Permalink
add method from aurora
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl Kappler committed Jan 6, 2025
1 parent de537ba commit 380cf63
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions mth5/timeseries/spectre/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,3 +349,33 @@ def calibrate_stft_obj(
# TODO: FIXME Sometimes raises a runtime warning due to DC term in calibration response = 0
stft_obj[channel_id].data /= calibration_response
return stft_obj


def get_degenerate_fc_decimation(sample_rate: float) -> list:
"""
TODO: consider placing this in mt_metadata.decimation.py
Makes a default fc_decimation list. WIP
This "degenerate" config will only operate on the first decimation level.
This is useful for testing. It could also be used in future on an MTH5 stored time series in decimation
levels already as separate runs.
Parameters
----------
sample_rate: float
The sample rate associated with the time-series to convert to spectrogram
Returns
-------
output: list
List has only one element which is of type FCDecimation, aka.
"""
output = fc_decimations_creator(
sample_rate,
decimation_factors=[
1,
],
max_levels=1,
)
return output

0 comments on commit 380cf63

Please sign in to comment.