FFTPACK

FFTPACK - Fast Fourier Transforms - Сообщения

#1 Опубликовано: 07.01.2016 22:39:18
Davide Carpi

Davide Carpi

1415 сообщений из 2872 понравились пользователям.

Группа: 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 КиБ) скачан 235 раз(а).;
  • 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 пользователям понравился этот пост
ioan92 08.01.2016 05:22:00, Radovan Omorjan 08.01.2016 06:54:00, sergio 08.01.2016 07:51:00, Вячеслав Мезенцев 12.01.2016 21:33:00
#2 Опубликовано: 08.01.2016 14:12:03
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: 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 Опубликовано: 08.01.2016 15:21:06
Davide Carpi

Davide Carpi

1415 сообщений из 2872 понравились пользователям.

Группа: 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 Б) скачан 104 раз(а).

    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 пользователям понравился этот пост
ioan92 08.01.2016 18:47:00
#4 Опубликовано: 08.01.2016 20:34:02
Davide Carpi

Davide Carpi

1415 сообщений из 2872 понравились пользователям.

Группа: 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 пользователям понравился этот пост
ioan92 09.01.2016 04:56:00
#5 Опубликовано: 10.01.2016 01:09:57
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: 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 КиБ) скачан 126 раз(а).
Fourier Discrete [fft Style].sm (100 КиБ) скачан 110 раз(а).
1 пользователям понравился этот пост
Davide Carpi 10.01.2016 15:22:00
#6 Опубликовано: 10.01.2016 01:48:50
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: 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 пользователям понравился этот пост
Davide Carpi 10.01.2016 15:22:00
#7 Опубликовано: 10.01.2016 15:48:46
Davide Carpi

Davide Carpi

1415 сообщений из 2872 понравились пользователям.

Группа: 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 пользователям понравился этот пост
ioan92 10.01.2016 15:53:00
#8 Опубликовано: 10.01.2016 18:16:29
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: 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 Опубликовано: 11.01.2016 00:17:22
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: 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 пользователям понравился этот пост
Davide Carpi 11.01.2016 19:51:00, NDTM Amarasekera 07.09.2020 07:35:00
#10 Опубликовано: 11.01.2016 00:45:28
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: 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 Опубликовано: 12.01.2016 02:34:10
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: 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 КиБ) скачан 106 раз(а).
#12 Опубликовано: 12.01.2016 06:53:15
Davide Carpi

Davide Carpi

1415 сообщений из 2872 понравились пользователям.

Группа: 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:

Цитата

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 Опубликовано: 13.01.2016 00:59:27
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: 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 КиБ) скачан 108 раз(а).
#14 Опубликовано: 05.09.2020 19:39:19
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1674 понравились пользователям.

Группа: User

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

Clipboard01.jpg

Best regards.
Alvaro.
#15 Опубликовано: 06.09.2020 13:40:04
Davide Carpi

Davide Carpi

1415 сообщений из 2872 понравились пользователям.

Группа: 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 пользователям понравился этот пост
Alvaro Diaz Falconi 06.09.2020 18:43:00
#16 Опубликовано: 08.09.2020 10:18:41
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Two examples attached.

Image Split-Shift.sm (17 КиБ) скачан 44 раз(а).
#17 Опубликовано: 10.09.2020 12:31:05
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: 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 МиБ) скачан 60 раз(а).
#18 Опубликовано: 11.09.2020 09:44:51
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: 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 МиБ) скачан 58 раз(а).
#19 Опубликовано: 13.09.2020 11:07:16
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

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

Fourier Convol Kernel.sm (429 КиБ) скачан 61 раз(а).
#20 Опубликовано: 14.09.2020 03:14:56
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1674 понравились пользователям.

Группа: User

Just an utility for work with JPG and Fourier transforms.

ZigZagMat.sm (123 КиБ) скачан 69 раз(а).

Best regards.
Alvaro.
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений