Rotation of Gridded Spherical Coordinates to the Same Grid

Click For Summary

Discussion Overview

The discussion revolves around the challenges of rotating a uniform grid of data in spherical coordinates for applications such as antenna radiation pattern analysis. Participants explore methods for improving the efficiency of this process, particularly focusing on the computational speed and interpolation issues associated with non-uniform data in spherical coordinates.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant describes a method involving conversion to Cartesian coordinates, application of a rotation matrix, and conversion back to spherical coordinates, highlighting issues with slow non-uniform interpolation.
  • Another participant questions the uniformity of the grid, suggesting that the density of points may not be uniform on the sphere despite equal angular increments.
  • A participant clarifies that the grid is uniform in terms of angle increments but acknowledges the non-uniform distance on the sphere, emphasizing that the data is dictated by measurement instruments.
  • A later reply expresses a shared concern regarding the same problem and suggests a potential approach of performing rotations in the spherical mode domain, indicating interest in collaboration and code sharing.

Areas of Agreement / Disagreement

Participants express differing views on the uniformity of the data grid and the necessity of the specific point density. While there is a shared recognition of the computational challenges, no consensus on a definitive solution or method has emerged.

Contextual Notes

Participants note limitations related to the non-uniform interpolation methods available in MATLAB, particularly concerning the handling of edge cases in spherical coordinates. There is also mention of the need for locally dependent transformations of unit vectors, which adds complexity to the problem.

Who May Find This Useful

This discussion may be of interest to researchers and practitioners working with spherical coordinate systems, particularly in fields such as antenna design, radiation pattern analysis, and computational geometry.

antennaist
Messages
2
Reaction score
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
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?
 
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.
 
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.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
10K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 11 ·
Replies
11
Views
7K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K