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

Fk transform #105

Closed
wants to merge 19 commits into from
Closed

Fk transform #105

wants to merge 19 commits into from

Conversation

SeunghooKim
Copy link
Contributor

Description

Checklist

I have (if applicable):

  • referenced the GitHub issue this PR closes.
  • documented the new feature with docstrings or appropriate doc page.
  • included a test. See testing guidelines.
  • your name has been added to the contributors page (docs/contributors.md).
  • added the "ready_for_review" tag once the PR is ready to be reviewed.

@codecov-commenter
Copy link

Codecov Report

Merging #105 (75e8a6b) into master (c0d96a7) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #105      +/-   ##
==========================================
+ Coverage   96.69%   96.71%   +0.01%     
==========================================
  Files          50       50              
  Lines        3089     3102      +13     
==========================================
+ Hits         2987     3000      +13     
  Misses        102      102              
Flag Coverage Δ
unittests 96.71% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
dascore/transform/__init__.py 100.00% <100.00%> (ø)
dascore/transform/fft.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@d-chambers
Copy link
Contributor

Hey @SeunghooKim,

Thanks for revisiting this. There are a few small points we probably need to get nailed down here before merging. I don't have a lot of experience with f-k analysis, so maybe @eileenrmartin, @aaronjgirard, or @jinwar can weigh in. We may even want to spend some time on the design of this transform (and its inverse) in our next developer meeting.

  1. Right now it looks like you are modifying coordinates for the frequency axis but not the other axis. They both need to change since we apply the dft to both axis.

  2. We may want to perform an fft_shift so the zero frequency appears in the center of the coordinate array as most would expect.

  3. It looks like you are following what I did with the rft transform in naming the new dimension "frequency_{dim}" which works for generic dimensions. This is probably the best, most general, approach but I would be curious if anyone else has ideas for naming the new dimensions.

There is an xarray package called xrft which might be a useful reference.

@d-chambers
Copy link
Contributor

Hey @SeunghooKim, sorry for sitting on this soooooo long.

It turns out the implementation was quite a bit more complicated than we anticipated when placing this item on the sprint board back in December. We had to account for proper scaling, frequency shifting, unit transformations, and making the transform reversible (which has complexities related to going from absolute time, in datetime, to frequency, then back to absolute time).

Anyway, I finally found some time to tackle this in #192. I would love to get your feedback, both on the new notes section of the documentation and the method interfaces. We can always change the master branch before a release is made if you have suggestions on how to improve it.

Thanks again for your efforts though, and sorry for setting you up with such a complicated task on this one.

@d-chambers d-chambers closed this Jul 17, 2023
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

Successfully merging this pull request may close these issues.

3 participants