Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FC sample_rate_decimation_level gives inconsistent values #187

Open
5 tasks done
kkappler opened this issue Jan 18, 2024 · 0 comments
Open
5 tasks done

FC sample_rate_decimation_level gives inconsistent values #187

kkappler opened this issue Jan 18, 2024 · 0 comments

Comments

@kkappler
Copy link
Collaborator

kkappler commented Jan 18, 2024

Here is a screenshot of showing decimation_level metadata and channel summary dataframe having two different values for
sample_rate_decimation_level.

image

in mt_metadata/transfer_functions/processing/fourier_coefficients/standards/fc_channel.json this field is described as
"Sample rate of the decimation level."

Should probably

  • Update the metadata description to say:
    "Sample rate of the time series that was Fourier transformed to generate the FC decimation level."
    after agreement that this is what is intended.
  • Review the methods that generate this value and repair. It looks like the bogus value it is coming from max frequency of the FC array *2, but this is not general beacause in general we have no guarantee that frequencies up to and including the Nyquist will be stored in the FC container. The relevant py files are in mth5/groups/
    • fourier_coefficients.py
    • fc_dataset.py
      Probably best if the value in the dataframe were taken from the metadata (and never computed). Hopefully this make a singe place where the info is sourced.
  • Add a test that at least confirms that dec_level.metadata.sample_rate_decimation_level and the fc_level channel_summary df column agree.
kkappler added a commit that referenced this issue Jan 20, 2024
- fc_dataset:
  - frequency property does not assume full half spectrum, but gets frequencies
from linspace (frequecy_min, frequency_max)
  - added doc string about assumption of uniform sampling
  - require sample_rate to be passed to fc_dataset when building from xarray
- fourier_coefficients:
  - add properties frequency_min, frequency_max
- added test condfirm fc summary has correct sample rate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant