FFTPACK - Fast Fourier Transforms - Messages
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 265 time(s).;
- sources: SVN repository.
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
WroteThanks 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.
Wrote1. 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.
Wrote2. 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:
- Go in the download page and download the Desktop Linux version of SS
- 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)
- 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). - 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.
WroteThanks 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"
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 154 time(s).
Fourier Discrete [fft Style].sm (100 KiB) downloaded 143 time(s).
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
WrotePlease, 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.
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
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
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 135 time(s).
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)
WroteProblem 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:
QuoteSMath 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]
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).

You may want try/compare with the FFTPACK.
Fourier 2D ZOOM Cosmos Vectorise Copy.sm (3 MiB) downloaded 83 time(s).
WroteThe 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).
Fourier Convol Kernel.sm (429 KiB) downloaded 93 time(s).
ZigZagMat.sm (123 KiB) downloaded 98 time(s).
Best regards.
Alvaro.
-
New Posts
-
No New Posts