Earth radius missing in sat_xyz computation in parallax modifier
@gerritholl is already working on this.
Since Jun 16, 2025.
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 335
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 10
Description
Hello,
I am working on a parallax correction of the MTG-LI data. Recently, I have realized that my correction for photon travel time is unrealistic and led to wrong results for my matching algorithm with ground-based data. I noticed that maybe the line 158-160 of the script modifiers>parallax.py may have a mistake. Therefore, I start this discussion in case others may have trouble with this as well.
The lines I am unsure about in the script parallax.py are the following:
158 sat_xyz = np.hstack(lonlat2xyz(sat_lon, sat_lat)) * sat_alt
159 cth_xyz = np.stack(lonlat2xyz(lon, lat), axis=-1) * EARTH_RADIUS*1e3 # km → m
160 delta_xyz = cth_xyz - sat_xyz
In my understanding, the variable delta_xyz is a vector coming from the satellite to the parallaxed location of the cloud at the earth surface. But it seems that the origin of the sat_xyz vector is defined at ground level, since it is specified in the code at line 88 that: "This code expects sat_alt and height to be in meter above the Earth's surface." In contrast, the cth_xyz is defined w.r.t. the center of the earth (since we multiply with the earth's radius).
Finally, I get more realistic results for the photon travel time since I have changed line 158 to:
sat_xyz = np.hstack(lonlat2xyz(sat_lon, sat_lat)) * (sat_alt+EARTH_RADIUS)
Would you have comments or other opinion regarding this part of the modifier?
Thank you
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.