FFTPACK

FFTPACK - Fast Fourier Transforms - Messages

#1 Posted: 1/7/2016 10:39:18 PM
Davide Carpi

Davide Carpi

1417 likes in 2873 posts.

Group: Moderator

This plugin is based on SharpFFTPACK, the C# version of FFTPACK

FFTPACK is a Public Domain package of Fortran subroutines (these routines are used in several environments, like the python NumPy & SciPy libraries).

Functions: fft(), ifft(), fft2(), ifft2(), rfft(), irfft(), fftfreq(), fftmagnitude(), fftphase(), fftshift(), ifftshift()

  • extension page: http://smath.info/view/FFTPACK
  • requirements (latest relase): SMath Studio 0.97.5737 or later;
  • installation: SMath Studio: Tools > Plugins... > Online Gallery;
  • documentation: (beta) fft.sm (46 KiB) downloaded 266 time(s).;
  • sources: SVN repository.


>>> PLEASE REPORT IN THIS THREAD ANY ISSUE, MORE DETAILED AS POSSIBLE <<<
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
4 users liked this post
ioan92 1/8/2016 5:22:00 AM, Radovan Omorjan 1/8/2016 6:54:00 AM, sergio 1/8/2016 7:51:00 AM, Вячеслав Мезенцев 1/12/2016 9:33:00 PM
#2 Posted: 1/8/2016 2:12:03 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Thanks Davide for that one:

sys2mat("matrix") - Converts systems to matrices
mat2sys("matrix") - Converts recursively matrices to systems.
sys2mat(abs(mat2sys(Q)))

It repaired "Fourier Sampling". Damned puzzling my previous programme didn't do right !
______________________________

1. Though I use previous version 0.97.5346, I was willing to give it a try.
Found no place or link that downloads the FFTPACK

2. I'm not hot to upgrade to 0.97.5737: Will it scrap my 200 Smath work sheets ?
There should be a step by step procedure ... clear procedure .
Not something like: do this, do that, or like "recompile".
Do I need a 5th PC ... another piece of crap from Microsoft as XP SP3 does not exist anymore !
My 3 PC are XP, want to know nothing else. My 4th PC is Millenium [being actually doctored].

1D fft is nice but 2D is also needed ... Ah !

Jean

#3 Posted: 1/8/2016 3:21:06 PM
Davide Carpi

Davide Carpi

1417 likes in 2873 posts.

Group: Moderator

Wrote

Thanks Davide for that one:

sys2mat("matrix") - Converts systems to matrices
mat2sys("matrix") - Converts recursively matrices to systems.
sys2mat(abs(mat2sys(Q)))

It repaired "Fourier Sampling". Damned puzzling my previous programme didn't do right !


You're very welcome, I'll try to add some "tool functions" in this plugin to do these things in a shot w/o additional plugins.

Wrote

1. Though I use previous version 0.97.5346, I was willing to give it a try.
Found no place or link that downloads the FFTPACK


I can compile and publish easily this plugin for almost any version of SMath Studio; as for now I've made it available for the latest version just to limit mass effects in case of critical bugs.

Wrote

2. I'm not hot to upgrade to 0.97.5737: Will it scrap my 200 Smath work sheets ?
There should be a step by step procedure ... clear procedure


Probably there aren't problems but there is an (almost) easy way to test issues before upgrading:

  1. Go in the download page and download the Desktop Linux version of SS

    2016-01-08 19_06_18-SMath Studio 0.97.5737 (17 September 2015).png


  2. Unpack/unzip the archive in a folder where you want (you can use 7zip or anything else - you have to do it twice, both for the gz and the tar archives)

    2016-01-08 19_11_54-SMathStudioDesktop.0_97_5737.Mono.png


  3. In that folder create a new empty txt file, and call it "portable.version" (you must have the "Hide extensions for known file types" option of your OS disabled);
    you can unzip this to make it simple portable.version.zip (166 B) downloaded 137 time(s).

    2016-01-08 19_17_22-SMathStudioDesktop.0_97_5737.Mono.png


  4. That's all, you have a portable* SMath Studio; launch it, open your files, download the extensions made for that version of SS. The installed version or other portable versions does not interact.


As additional precaution, do a backup of all your worksheets before working with the new version (this is always useful)


* The .NET framework must be installed on the system (like for the installable version), this makes the application not "fully portable"; this is why there's not an official portable version in the download page.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 users liked this post
ioan92 1/8/2016 6:47:00 PM
#4 Posted: 1/8/2016 8:34:02 PM
Davide Carpi

Davide Carpi

1417 likes in 2873 posts.

Group: Moderator

Hello Ioan,

Wrote

Thanks for the very nice demonstration of a portable SMath generation


You're welcome; just a reworking of what written some time ago by Andrey

Wrote

* the folder with the portable version is containing only some of the available plugins.


Once you add the install.portable file, all the built-in links are about the executable directory. Thus running that executable you have just the plugins provided in the archive you downloaded.

Wrote

* where this plugins are located (in the Roaming folder ?) ?


In the extensions folder, created by the program after downloading the first extension (if you have install.portable).

Wrote

* can this plugins be copied in the portable folder to generate a true portable and transportable version - that do not need the inline loading ?


In principle, yes; you can copy the extension folder from the directory: %APPDATA%\SMath\extensions
Important notes about this approach:
  • To reduce the weight of the directory, you have to browse the pasted portable directory and delete the old versions of the plugins (old plugins are kept because in case of update exceptions you have the previous working plugins without new download)
  • In some plugins log files or other files may be produced; the portability of those files may have different "shadows of portability"
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 users liked this post
ioan92 1/9/2016 4:56:00 AM
#5 Posted: 1/10/2016 1:09:57 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

... interesting "fft". The minmal must include:
fft, ifft, cfft, icfft ... and the 2D which means
take matrix as well as one col vector.
these 4 [these 8] not too limited. Why not at least
1000. Mathcad 11 native takes matrix 4096 x 4096.

In the work sheet "... fft Style", there is a red region
I can't find why "ifft" bugs ? The function is OK but
does not compute correct. The other work sheet
"Fourier Discrete fft, ifft" is the sanity check.
Both functions are OK then, fft < 30, ifft < 15.
NOT, NOT enough, still fine for College Edu.

Jean

Fourier Discrete fft, ifft.sm (20 KiB) downloaded 159 time(s).
Fourier Discrete [fft Style].sm (100 KiB) downloaded 144 time(s).
1 users liked this post
Davide Carpi 1/10/2016 3:22:00 PM
#6 Posted: 1/10/2016 1:48:50 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

... I found the "bugger" the 'k' from the last "Stem style".
This module is not a closed item, i.e: there is no return value.
Very interesting from smath, but often creates problem as it
resident an recaptured even if not invoke by another result.
In my preference, it should go dead outside its own module.

Jean
1 users liked this post
Davide Carpi 1/10/2016 3:22:00 PM
#7 Posted: 1/10/2016 3:48:46 PM
Davide Carpi

Davide Carpi

1417 likes in 2873 posts.

Group: Moderator

Wrote

Please, what's your position on this topic [...]



That's a tightrope... about compatibility .NET Framework 2.0 is available in a lot of OS directly or through .NET 3.5 (that can be installed or enabled in the most recent 8/8.1/10) while .NET Framework 4.5 is not available for OS prior to Vista (see .NET Framework Versions and Dependencies);
In the other hand there are more features in .NET 4.5 and as you mentioned (and documented in the official page) is not always easy to enable the 3.5 version.

An upgrade would be useful in a several ways (f.e. new wrappers or features), but who can't install the new framework will be out from updates.

I really don't know how many users are using the MS OS older than Vista or newer than 7, so I don't have idea how much this will impact the SMath community.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 users liked this post
ioan92 1/10/2016 3:53:00 PM
#8 Posted: 1/10/2016 6:16:29 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

I really don't know how many users are using the MS OS
older than Vista or newer than 7 ... {Davide].
_______________________

Most "Professional Users" will never switch from XP Sp3.
The last !Update! was July 13, 2015 . XP lasted perfect
for what, 12 years and suddenly 7, Vista, 8, 10 ,,,
I know some QA [Quality Assurance] using slide rule.
Myself, cross check "Orifice Plate" vs Foxboro printing [decade 1960].

That was just talk.

Jean
#9 Posted: 1/11/2016 12:17:22 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

... there are more issues than OS in this topic.
OS is object oriented, it has nothing to do with the aritmetic ALU + some logical operations + peak/poke memory.
Mathcad 8 was object oriented. I "beta tested" 2001i more oriented "machine langage" or something like to be
installed, i.e: in some way compiled. Two same math tool except for 2001i the index in the argument and some
more than 200 in the Given/Find. My testing ranged globaly ~ 3 times faster than 8 [tested Millenium].

The crucial problem with Smath is "Result is above max allowed positive number", "Value was either too large
or too small for double". Sometimes, eval(,) does the trick. In clear, the Smath calculation bloc is in cause.
The proof "ad absurdum" is done, fresh from bakery. The Fourier ifft Padding [Dirac filter], posted this night,
it spits the 64 points in no time. My other work sheet under construction chokes @ ~ 32, at 64: "Result is above
max allowed positive number". Just a memory allocation that Smath does not manage. There is no trick to manage
the non manageable. Just cross checked the 64 fft ... still running over an hour, eventually, it will crah Smath.
I couldn't guess better: it just crashed Smath ... Ah ! worksheet is back "Input string was not in correct format",
Bologna !

Problem with implementing FFTPACK of some source will be the Smath numerical, no matter the OS.
My OriginLab 6.0 [Win 98 SE] works just perfect on XP. I admire all of you collaboration, but things work
from exhausting projects. I do my share for Smath applications, but can do nothing internally.

Cheers, Jean
2 users liked this post
Davide Carpi 1/11/2016 7:51:00 PM, NDTM Amarasekera 9/7/2020 7:35:00 AM
#10 Posted: 1/11/2016 12:45:28 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

... here is my OriginLab Win 98 SE on XP running Fourier filter.
17 years old, fresh from birth day. Comments about OS to
run fft on Smath: I just don't understand.

Jean

OriginLab 6.0.bmp
#11 Posted: 1/12/2016 2:34:10 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

... about that one, I wonder if the limit 16
is due to my Smath version 0.97.5346 ?

Can some Collabs of more recent version test ?

Jean

Fourier fft, ifft Reconciliation_16.sm (38 KiB) downloaded 136 time(s).
#12 Posted: 1/12/2016 6:53:15 AM
Davide Carpi

Davide Carpi

1417 likes in 2873 posts.

Group: Moderator

Wrote

... about that one, I wonder if the limit 16
is due to my Smath version 0.97.5346 ?


18 is the limit here (both in SMath Studio 0.97.5737 and 0.97.5346, i5 M450 2.40 GHz (quad core), 4 Gb ram, Windows 7 64bit)

Wrote

Problem with implementing FFTPACK of some source will be the Smath numerical


Unfortunately true. Another problem is about big matrices (more than 20000 - 30000 elements on my notebook).

One of the performance tests I've made using FFTPACK:

Quote

SMath matrix 512x512 of random numbers (262144 elements, Numeric optimization)

Function side:
- Preprocessing [SMath TNumber -> Complex[,] (an array of doubles) SMath's Re() and Im() involved here]: 3334ms
- 2D FFT (1024 FFTs applied each time to 1024 doubles): 45ms
- Postprocessing [Complex[,] -> SMath TNumber]: 3572ms
(approx 7 seconds, <1% used for FFT operations)

Canvas side [using time(0)]: 23.95s [17s used for outside pre/post processing things]

If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#13 Posted: 1/13/2016 12:59:27 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Hello Davide,

Your testing is most appreciated. What Andrey is saying ?
The attached is padded vector 128: no sweat.

The Wave train puzzles me.
The Apodising is gorgeous.

Jean

Fourier WaveFnct, Apodisation.sm (162 KiB) downloaded 140 time(s).
#14 Posted: 9/5/2020 7:39:19 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Hi. It's seem that there are a bug here, only for vectors, not for matrices.

Clipboard01.jpg

Best regards.
Alvaro.
#15 Posted: 9/6/2020 1:40:04 PM
Davide Carpi

Davide Carpi

1417 likes in 2873 posts.

Group: Moderator

Thank you Alvaro, I'll fix it ASAP
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 users liked this post
Alvaro Diaz Falconi 9/6/2020 6:43:00 PM
#16 Posted: 9/8/2020 10:18:41 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Two examples attached.

Image Split-Shift.sm (17 KiB) downloaded 75 time(s).
#17 Posted: 9/10/2020 12:31:05 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

The Matlab FFT codes does a good job.
You may want try/compare with the FFTPACK.

Fourier 2D ZOOM Cosmos Vectorise Copy.sm (3 MiB) downloaded 84 time(s).
#18 Posted: 9/11/2020 9:44:51 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

The Matlab FFT codes does a good job.
You may want try/compare with the FFTPACK.


... Lena Mathcad added for better understanding zoom [+].
BTW, Mathcad Picture tool is exceptional in may instances.
I never found where it came from, who invented that wonder ?

Jean

Fourier 2D ZOOM Cosmos Vectorise Copy.sm (3 MiB) downloaded 92 time(s).
#19 Posted: 9/13/2020 11:07:16 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

... mwifftshift(Convol) applied to Fourier recenter.

Fourier Convol Kernel.sm (429 KiB) downloaded 94 time(s).
#20 Posted: 9/14/2020 3:14:56 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Just an utility for work with JPG and Fourier transforms.

ZigZagMat.sm (123 KiB) downloaded 100 time(s).

Best regards.
Alvaro.
  • New Posts New Posts
  • No New Posts No New Posts