Skip to content

added chirp-z transform to calculate non-power-of-2 fft#2900

Merged
josdejong merged 4 commits into
josdejong:developfrom
cyavictor88:non-power-of-2-FFT
Feb 23, 2023
Merged

added chirp-z transform to calculate non-power-of-2 fft#2900
josdejong merged 4 commits into
josdejong:developfrom
cyavictor88:non-power-of-2-FFT

Conversation

@cyavictor88
Copy link
Copy Markdown
Contributor

@cyavictor88 cyavictor88 commented Feb 17, 2023

for #2577

There is one concern, in the newly created _czt function, I basically duplicate the ifft function, so its not really DRY. I tried to import 'ifft' with dependencies list and factory function. But I when I try to run it, I got Error: Cannot resolve dependencies of factory I wonder if it is because of circular dependency.

@josdejong
Copy link
Copy Markdown
Owner

Thanks cyavictor88! This looks good, and well tested.

I guess you mean it adresses #2577 :)

There would indeed be a circular dependency between ifft and fft. Since ifft is only two lines of code, I think it's ok to duplicate it. Alternatively, we could pull out the logic in an internal util function and reuse it. What does have your preference?

@cyavictor88
Copy link
Copy Markdown
Contributor Author

Hi,

thanks for pointing out the mislabeling!

I am ok with leaving that one line of ifft operation inside the _czf function. I actually think it is more straight forward for people who want to read the code :)

Thanks!

@josdejong
Copy link
Copy Markdown
Owner

Ok sounds good. Indeed, too much indirection makes code harder to read, we should be pragmatic.

Will merge your PR now, thanks again!

@josdejong josdejong merged commit 5171871 into josdejong:develop Feb 23, 2023
@josdejong
Copy link
Copy Markdown
Owner

Published now in v11.6.0, thanks again!

jakubriegel pushed a commit to jakubriegel/mathjs that referenced this pull request Mar 1, 2023
…ong#2900)

* added chirp-z transform to calculate non-power-of-2 fft

* simplify/remove _ifft function inside _czt function
josdejong added a commit that referenced this pull request Mar 9, 2023
* #2567: accept array as parameter for gcd()

* #2567: accept 1d matrix as gcd() argument

* #2567: support nested 1d array in gcd

* #2567: simplify matrix signature

* [fix] intersect method parameter type (#2897)

* Update history and authors (see #2897)

* feat: added chirp-z transform to calculate non-power-of-2 fft (#2900)

* added chirp-z transform to calculate non-power-of-2 fft

* simplify/remove _ifft function inside _czt function

* chore: remove an unused dependency from `simplifyConstant`

* fix: quantileSeq not accepting a matrix as second argument `prob` (see #2902)

* fix a broken example of function `to`

* fix a typo in the examples functions `distance`, `getMatrixDataType`, `subset`, and `max` (see #2902)

* fix linting issue

* Broadcasting (#2895)

* broadcasting

* Simplified broadcasting

* Updated for broadcasting

* Changed to camel case

* Camel case and auto formating

* Added comments

* Skip if matrices have the same size

* Fixed issue with undefined variable

missing dot  in `A._size`

* Implemented broadcasting in all functions

* Added helper functions

* Added function to check for broadcasting rules

* Tests for broadcasted arithmetic

* Fixed issue with matrix the size of a vector

* Documented and updated broadcasting

* Included broadcast.test

---------

Co-authored-by: David Contreras <david.contreras@guentner.com>
Co-authored-by: Jos de Jong <wjosdejong@gmail.com>

* Update history and authors

* Update devDependencies

* publish v11.6.0

* fix #2906: improve description of the behavior of `subset` for scalar values in the docs

* fix #2907: determinant of empty matrix should be 1

* chore: add a few more unit tests to `det`

---------

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
Co-authored-by: Jaeu Jeong <wodndb@gmail.com>
Co-authored-by: cyavictor88 <100557319+cyavictor88@users.noreply.github.com>
Co-authored-by: David Contreras <dvd.cnt@gmail.com>
Co-authored-by: David Contreras <david.contreras@guentner.com>
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.

2 participants