Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline Davide Carpi  
#1 Posted : 08 January 2016 04:39:18(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,208
Man
Italy
Location: Italy

Was thanked: 1115 time(s) in 729 post(s)
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 (47kb) downloaded 93 time(s).;
  • sources: SVN repository.


>>> PLEASE REPORT IN THIS THREAD ANY ISSUE, MORE DETAILED AS POSSIBLE <<<

Edited by user 27 June 2016 02:46:27(UTC)  | Reason: description updated

If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
thanks 4 users thanked Davide Carpi for this useful post.
on 08/01/2016(UTC),  on 08/01/2016(UTC),  on 08/01/2016(UTC),  on 13/01/2016(UTC)
Offline Jean Giraud  
#2 Posted : 08 January 2016 20:12:03(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 4,022
Canada

Was thanked: 709 time(s) in 555 post(s)
Thanks Davide for that one:

sys2mat("matrix"Wink - Converts systems to matrices
mat2sys("matrix"Wink - 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

Offline Davide Carpi  
#3 Posted : 08 January 2016 21:21:06(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,208
Man
Italy
Location: Italy

Was thanked: 1115 time(s) in 729 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
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.

Originally Posted by: Jean Giraud Go to Quoted Post
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.

Originally Posted by: Jean Giraud Go to Quoted Post
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 (1kb) downloaded 53 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.

Edited by user 09 January 2016 13:02:18(UTC)  | Reason: added note about what portable means

If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
thanks 1 user thanked Davide Carpi for this useful post.
on 09/01/2016(UTC)
Offline Davide Carpi  
#4 Posted : 09 January 2016 02:34:02(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,208
Man
Italy
Location: Italy

Was thanked: 1115 time(s) in 729 post(s)
Hello Ioan,

Originally Posted by: ioan92 Go to Quoted Post
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

Originally Posted by: ioan92 Go to Quoted Post
* 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.

Originally Posted by: ioan92 Go to Quoted Post
* 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).

Originally Posted by: ioan92 Go to Quoted Post
* 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"

Edited by user 09 January 2016 02:36:46(UTC)  | Reason: Not specified

If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
thanks 1 user thanked Davide Carpi for this useful post.
on 09/01/2016(UTC)
Offline Jean Giraud  
#5 Posted : 10 January 2016 07:09:57(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 4,022
Canada

Was thanked: 709 time(s) in 555 post(s)
... 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 (21kb) downloaded 54 time(s).
Fourier Discrete [fft Style].sm (101kb) downloaded 51 time(s).
thanks 1 user thanked Jean Giraud for this useful post.
on 10/01/2016(UTC)
Offline Jean Giraud  
#6 Posted : 10 January 2016 07:48:50(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 4,022
Canada

Was thanked: 709 time(s) in 555 post(s)
... 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
thanks 1 user thanked Jean Giraud for this useful post.
on 10/01/2016(UTC)
Offline Davide Carpi  
#7 Posted : 10 January 2016 21:48:46(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,208
Man
Italy
Location: Italy

Was thanked: 1115 time(s) in 729 post(s)
Originally Posted by: ioan92 Go to Quoted Post
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 a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
thanks 1 user thanked Davide Carpi for this useful post.
on 10/01/2016(UTC)
Offline Jean Giraud  
#8 Posted : 11 January 2016 00:16:29(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 4,022
Canada

Was thanked: 709 time(s) in 555 post(s)
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
Offline Jean Giraud  
#9 Posted : 11 January 2016 06:17:22(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 4,022
Canada

Was thanked: 709 time(s) in 555 post(s)
... 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
thanks 1 user thanked Jean Giraud for this useful post.
on 12/01/2016(UTC)
Offline Jean Giraud  
#10 Posted : 11 January 2016 06:45:28(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 4,022
Canada

Was thanked: 709 time(s) in 555 post(s)
... 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
Offline Jean Giraud  
#11 Posted : 12 January 2016 08:34:10(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 4,022
Canada

Was thanked: 709 time(s) in 555 post(s)
... 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 (39kb) downloaded 43 time(s).
Offline Davide Carpi  
#12 Posted : 12 January 2016 12:53:15(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,208
Man
Italy
Location: Italy

Was thanked: 1115 time(s) in 729 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
... 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)

Originally Posted by: Jean Giraud Go to Quoted Post
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). Sad

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]

Edited by user 12 January 2016 22:38:50(UTC)  | Reason: Not specified

If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
Offline Jean Giraud  
#13 Posted : 13 January 2016 06:59:27(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 4,022
Canada

Was thanked: 709 time(s) in 555 post(s)
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 (163kb) downloaded 55 time(s).
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.