Rotation of Gridded Spherical Coordinates to the Same Grid

In summary, the antennaist is looking for a way to rotate the vector field on the sphere so that the sampled points are more uniform. He has found that the problem is speed, and is looking for a way to do the rotation in the spherical mode domain.
  • #1
antennaist
2
0
I have a uniform grid of data in spherical coordinates. e.g. theta = 0, 1, 2, ... 180 and phi = 0, 1, 2, ... 359 which forms a 2D matrix. I wish to rotate these points around a cartesian axis (x, y, z-axis) by some angle alpha. To accomplish this I currently do the following:

1. Convert to cartesian coordinates
2. Multiply by rotation matrix
3. Convert back to spherical coordinates
4. Non-uniform interpolation over the original uniform grid

The problem with this is two-fold:

1. The non-uniform interpolation of step 4 e.g. using MATLAB's griddata function is slow. For instance a non-uniform interpolation of a 360 x 181 matrix on my machine takes about 1.8 seconds.
2. Most non-uniform interpolation functions such as MATLAB's griddata are not in spherical coordinates which means that convex hull typically does not contain theta = 0 and 180 or phi = 0 or 360. I currently get around this by seeding the non-uniform data with points outside of phi = 0,360 and theta = 0,180 which is both inaccurate and adds to the computation time.

My main problem is speed. It's simply too slow for what I need. It seems like this would be a common problem that must have some elegant solution that I have not heard of. My question is simply:

Is there a better way to do this?
 
Physics news on Phys.org
  • #2
antennaist said:
I have a uniform grid of data in spherical coordinates. e.g. theta = 0, 1, 2, ... 180 and phi = 0, 1, 2, ... 359 which forms a 2D matrix.
This does not look uniform (as seen on the sphere) to me.
Do you need this special point density (denser at small and large theta), which depends on the choice of your coordinate system anyway?
 
  • #3
It is uniform in the sense that phi and theta angle increments are the same. I understand that this means they have non-uniform distance on a sphere.

If it helps, these are measurements of an antenna's radiation pattern. This uniform angle spacing is typical of many setups which measure the radiation pattern. As for your other question about whether it is necessary: I do not control the data I obtain. They are obtained by instruments for me. I could, of course, interpolate this to obtain your version of uniform but this would just require another interpolation and thus more time.

I do not care if you want to call this uniform of not, my problem still remains.
 
  • #4
Hi antennaist!

I found this post when searching for a solution for the exact same problem: I have several near-field measurements of the same antenna which were taken in different mounting positions and want to compare them - so I need to rotate this vector field on the spere.

Actually I have not started to implement the stuff in Matlab yet, but was already puzzeled by the same problems as you describe (nonuniform sampling points) and the necessary locally dependent transformation of the unit vectors.
Interestingly, I could not find anything online - and my idea of doing it is basically identical to yours. I would be happy if you could provide me some code to have something to start with..

One thing that came to my mind was doing the rotation in the sperical mode domain - I will talk to one college who is doing NF-FF transform stuff.
 
  • #5


I understand your frustration with the slow and inaccurate process of rotating gridded spherical coordinates. Fortunately, there are some solutions that can help improve the speed and accuracy of this process.

One approach is to use a spherical harmonic transform, which allows for efficient and accurate rotation of gridded spherical coordinates. This method involves converting the data into a spectral representation and then applying a rotation matrix directly to the spectral coefficients. This eliminates the need for interpolation and can significantly reduce computation time.

Another option is to use a fast Fourier transform (FFT) based method, which also avoids the need for interpolation. This technique involves converting the data into a Fourier series representation and then applying a rotation matrix directly to the Fourier coefficients. This can also greatly improve computation time.

Additionally, there are specialized interpolation methods specifically designed for spherical coordinates, such as the HEALPix interpolation scheme. These methods take into account the unique properties of spherical coordinates and can provide more accurate and efficient results compared to general interpolation methods like MATLAB's griddata.

In summary, there are several alternatives to the current method you are using that can improve the speed and accuracy of rotating gridded spherical coordinates. I recommend exploring these options and choosing the one that best fits your specific needs and data.
 

1. What is the purpose of rotating gridded spherical coordinates to the same grid?

The purpose of rotating gridded spherical coordinates to the same grid is to align the coordinates with a specific direction or orientation. This allows for easier analysis and comparison of data on a spherical surface.

2. How is the rotation of gridded spherical coordinates achieved?

The rotation of gridded spherical coordinates is achieved by applying a transformation matrix to the original coordinates. This matrix takes into account the desired direction of rotation and the specific grid being used.

3. What are some applications of rotating gridded spherical coordinates?

Rotating gridded spherical coordinates is commonly used in atmospheric and oceanographic modeling, as well as in remote sensing and GIS applications. It can also be useful in climate studies and weather forecasting.

4. Are there any challenges or limitations to rotating gridded spherical coordinates?

One potential challenge is the distortion that can occur when rotating coordinates, particularly near the poles. This can affect the accuracy of data analysis and may require additional steps to correct for the distortion.

5. Can the rotation of gridded spherical coordinates be automated?

Yes, the rotation of gridded spherical coordinates can be automated using software programs or scripts. This allows for efficient and consistent application of the transformation to large datasets.

Similar threads

  • Linear and Abstract Algebra
Replies
3
Views
8K
  • Calculus and Beyond Homework Help
Replies
7
Views
700
Replies
8
Views
1K
Replies
2
Views
983
Replies
11
Views
5K
  • Classical Physics
Replies
1
Views
1K
  • Classical Physics
Replies
7
Views
718
  • Special and General Relativity
Replies
13
Views
2K
Replies
14
Views
1K
Back
Top