polarch / Spherical-Harmonic-Transform

A collection of MATLAB routines for the Spherical Harmonic Transform and related manipulations in the spherical harmonic spectrum.
BSD 3-Clause "New" or "Revised" License
138 stars 40 forks source link

Fixed bug in sphConvolution.m #7

Open BenTM92 opened 2 years ago

BenTM92 commented 2 years ago

Fixed wrong indexing in sphConcolution.m

polarch commented 2 years ago

Hi BenTM92,

I'm pretty sure the indexing is correct in this one, I have used it in the past quite a lot (?).

polarch commented 2 years ago

Ah, I see, you assume that the filter kernel coefficients are in the full format, of (N+1)^2 of them, in which case your indexing is correct. However, since this is for axisymmetric kernel convolution (the simple case), the kernel is described fully by (N+1) coefficients, which is what I assumed it is passed here.

Both cases can be included though, maybe by passing an extra argument of {0,1} for 'compact' , 'full' ?

BenTM92 commented 2 years ago

Hi polarch,

oh that was my fault. I did not read the comments carefully. I've just used it with the reults of the leastSquaresSHT.m function, which results the full format. This would be a great idea. So there is no confusion, if someonelse does something similar.

polarch commented 2 years ago

Ok, thanks. I'll add the option the soonest I can.