jonathanlilly / jLab

A Matlab toolbox for big data analysis, signal processing, mapping, and oceanographic applications.
Other
108 stars 35 forks source link

Some issues on polysmooth filter #12

Closed nuist2284494698 closed 4 years ago

nuist2284494698 commented 4 years ago

Hi Jonathan,

Nice package and thanks for sharing your MATLAB codes. I am going to use your codes called 'polysmooth.m' that used lowess filter.However,it failed when I did the line 'polysmooth --t' and I further checked the code and finally found that it maybe met a mistake in the 'loop'.Can you check this again and I am looking forward to hearing from you soon. Caizy

selipot commented 4 years ago

Hi Jonathan, have the same issue in Matlab2019a and 2020a update 2. I used to use polysmooth with no issues, but maybe that was with a previous version.

jonathanlilly commented 4 years ago

Hi, please check the latest update (as of just now). Note polysmooth, twodsort, and spheresort have been considerably rewritten (and are much faster). The output format for twodsort and spheresort is now cell arrays, which minimizes memory use, so you can't use the ds, xs, etc that you computed before and will have to re-sort. These are still in progress so please let me know if you have other issues with them.

nuist2284494698 commented 4 years ago

Hi Jonathan,when I run the 'polysmooth --t' again with your latest update codes.I still met a mistake in the line 737 of the function 'polysmooth_test_tangenplane'.Matlab told me that the wrong use of ' . 'and I also did found that the array of cosd(lat) is 7201 , the array of sind(thetapg-long) is 720*1440.

jonathanlilly commented 4 years ago

Oh, ok, I see the source of that error. Interestingly, I wasn't getting an error on my machine. It seems Matlab sometimes allows operators on non-same-sized arrays. Anyway, it's fixed. Let me know if you have any other problems.

nuist2284494698 commented 4 years ago

Hi Jonathan, I guess it was my machine's fault and I used Matlab2015b in windows.I run the 'polysmooth --t ' just now, there still a error in the line 788 where you use 'lat' in the expression tand(lat) , whether we should change it with 'latg'?

jonathanlilly commented 4 years ago

Right, that explains it. Why don't you see where you need to make the changes, let me know, and I'll copy your changes. But honestly I'm surprised it works at all. There have been big changes between here and there, especially in 2017a, so I don't recommend using it with anything less than that. A bunch of the graphics functions won't work with 2015.

Jonathan

On Thu, Jun 11, 2020 at 8:03 AM nuist2284494698 notifications@github.com wrote:

Hi Jonathan, I guess it was my machine's fault and I used Matlab2015b in windows.I run the 'polysmooth --t ' just now, there still a error in the line 788 where you use 'lat' in the expression tand(lat) , whether we should change it with 'latg'?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jonathanlilly/jLab/issues/12#issuecomment-642599747, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWKBAUIDYFJ7RHRLMZTAJ3RWDB2DANCNFSM4N2NC57Q .

nuist2284494698 commented 4 years ago

Oh,I am so sorry that I don't tell you firstly I test it with 2015 and I will update my Matlab to 2017 and so on. This time, the function runs correctly and I am going to use this function to the data of Sea Surface Temperature to describe ocean eddies and I will give you feedback when I get the result.However,I still have a question on this function's 'bandwidth'.In the test example,the bandwidth is 200km,so I get the information of data that more than 200km when I use this function.However,if I want to do a bandpass filter such as 200-500km,whether this function works?

selipot commented 4 years ago

polysmooth, twodhist, twodstats passed all tests successfully for me with R2020a after cloning latest version. Thanks!

jonathanlilly commented 4 years ago

Ok, seems like we're good here, so I'm closing this issue.

nuist2284494698, yes, you can set the bandwidth to whatever you want, it's a free parameter, if that was your question. If you have usage questions (as opposed to bugs) free free to email me at jonathanlilly@gmail.com.

Thanks all!