!SrkiFczPSWmYrlSNYF:matrix.org

shtools / pyshtools

30 Members
Spherical harmonic tools | https://shtools.github.io/SHTOOLS/ | Bridged to Gitter and Software Underground3 Servers

Load older messages


SenderMessageTime
11 May 2022
@winash12-58d1e48dd73408ce4f52af1b:gitter.im@winash12-58d1e48dd73408ce4f52af1b:gitter.im left the room.00:49:44
21 May 2022
@mark-wieczorek:matrix.org@mark-wieczorek:matrix.orgWe just uploaded conda packages for linux and macos! We are running into some problems making macos-arm64 packages for the new apple chips, so if you have any experience with this, please check out this PR : https://github.com/conda-forge/pyshtools-feedstock/pull/2915:17:41
30 May 2022
@pedromarting-5d476483d73408ce4fc7b370:gitter.impedromarting (pedromarting)

Hi guys! I have a problem to solve. I want to have the Earth potential at a specific coordinate point from a given set of coefficients. I know that you can get the expansion with SHGravCoeffs.from_array() and then use expand() to get the gravity/potential grid. The issue is that this development is in a grid and I want the value of the potential in a specific set of coordinates.
On the other hand, I also know that the expand() function can be evaluated in a set of coordinates, but in this case I get gravity values, not potential values!

Does anyone know how I can fix this issue? Specifically, I need to obtain the value of the terrestrial potential from a set of spherical harmonic coefficients at a specific point on the Earth.

Thank you!!

clm3 = pysh.SHGravCoeffs.from_array(coeffs = np.array([C_T,S_T]), gm = GM, r0 = a, normalization='4pi',lmax=200)

grav = clm3.expand(lmax_calc=90)
22:26:40
4 Jun 2022
@mark-wieczorek:matrix.org@mark-wieczorek:matrix.orgThere is no built in way of doing this, but we could add it. We probably would just need to make a function like MakeGravPotGridPoint.f95 that is based off of MakeGravGridPoint.f95. Alternatively we could modify the later to return the three vector components and a fourth value for the potential.11:28:27
7 Jun 2022
@_slack_swung_U03K01NUFJ5:matrix.org@_slack_swung_U03K01NUFJ5:matrix.org joined the room.15:26:05
@_slack_swung_U03K01NUFJ5:matrix.org@_slack_swung_U03K01NUFJ5:matrix.org changed their display name from _slack_swung_U03K01NUFJ5 to Ao Wang.15:26:05
@_slack_swung_U03K01NUFJ5:matrix.org@_slack_swung_U03K01NUFJ5:matrix.org set a profile picture.15:26:06
3 Aug 2022
@leouieda:matrix.orgLeonardo Uieda (he/him) changed their profile picture.10:00:45
8 Aug 2022
@leouieda:matrix.orgLeonardo Uieda (he/him) changed their display name from Leo Uieda to Leonardo Uieda (he/him).13:49:54
@leouieda:matrix.orgLeonardo Uieda (he/him) removed their profile picture.13:49:57
@leouieda:matrix.orgLeonardo Uieda (he/him) set a profile picture.13:50:15
12 Aug 2022
@_slack_swung_U094WD399:matrix.org@_slack_swung_U094WD399:matrix.org changed their profile picture.12:56:27
16 Aug 2022
@_slack_swung_U031A3YR4G3:matrix.org@_slack_swung_U031A3YR4G3:matrix.org joined the room.12:10:10
2 Sep 2022
@dipikamishra-617663aa6da037398488b69a:gitter.imdipikamishra (dipikamishra) Hi everyone, I want to create a band limited maps from spherical harmonic coefficients of lunar gravity model.
---Is this the right way to generate bandlimited moon map using the gravity data?
clm=pysh.SHGravCoeffs.from_file('gggrx_1200a_sha.tab', format = 'shtools', lmax = 660)
set_coeffs method of pyshtools is used to set 0 to both cosine (positive) and sine(negative) values of the spherical harmonic coefficients .
i = 1
j = 0
for i in range(18):
for j in range(18):
clm.set_coeffs(0,i,j)
i =1
j = 0
for i in range(18):
for j in range(0,-18,-1):
clm.set_coeffs(0,i,j)
07:27:11
@dipikamishra-617663aa6da037398488b69a:gitter.imdipikamishra (dipikamishra) If not then may I know how can I generate band limited map of the moon from spherical harmonics coefficients? any help would be appreciated. Thank you. 07:29:01
@mark-wieczorek:matrix.org@mark-wieczorek:matrix.org

the easiest way to do this would just be to edit the coefficients in place. For example, to set all the coefficients with degrees between 5 and 10 to zero, you could just do:

clm.coeffs[0,5:11,:] = 0.0
21:40:31
@mark-wieczorek:matrix.org@mark-wieczorek:matrix.org I'm sure that there is a way to do this with set_coeffs, but I rarely use that method.... :) 21:40:57
@mark-wieczorek:matrix.org@mark-wieczorek:matrix.org *

the easiest way to do this would just be to edit the coefficients in place. For example, to set all the coefficients with degrees between 5 and 10 to zero, you could just do:

clm.coeffs[:,5:11,:] = 0.0
21:41:18
4 Sep 2022
@dipikamishra-617663aa6da037398488b69a:gitter.imdipikamishra (dipikamishra) Thank you so much Mark for your quick response :). Yes, that is great idea, fewer line of code, I don't know why I used for loop instead of using slicing. I am really new to gravity map and spherical harmonic coefficients. I just want to know that band limiting means setting the values of coefficients to 0. For example if I am creating a band limited/filter map that starts from 45 to 660.Then I just have to set 0 to all the coefficients up to 45? and does this applies to topographic map as well? if I am creating a band limited map from lunar topographic model ? Thank you . 09:47:18
9 Sep 2022
@mark-wieczorek:matrix.org@mark-wieczorek:matrix.org@room Hi everyone! This is just to let you know that I released a new version of shtools: 4.10.1 : https://github.com/SHTOOLS/SHTOOLS/releases/tag/v4.10.1 This is almost all bug fixes, so there isn't any new functionality. The linux and windows wheels were uploaded to pypi, and I am working on the conda packages (hopefully this will be done this weekend). However, I'm running into problems with the macos wheels, so if there is anyone that could help, that would be great! You can find the github workflow here: https://github.com/SHTOOLS/build-shtools/runs/8272407123?check_suite_focus=true15:18:26
10 Sep 2022
@mark-wieczorek:matrix.org@mark-wieczorek:matrix.orgThe new conda packages are out. The only thing that needs to be done is to create new packages for macos-arm, as well as macos wheels.... Both might take awhile...07:59:38
@mark-wieczorek:matrix.org@mark-wieczorek:matrix.org changed the room topic to "Spherical harmonic tools | https://shtools.github.io/SHTOOLS/ | Bridged to Gitter and Software Underground" from "Spherical harmonic tools | https://shtools.oca.eu | Bridged to Gitter and Software Underground".21:45:33
29 Nov 2022
@izavelmoto:matrix.orgiza joined the room.13:28:49
@izavelmoto:matrix.orgizaHello, I have been using the pyshtools package for a little while (thank you for it). I was comparing the routine to compute the spherical harmonics of pyshtools (the expand routines) with a slow routine made by me, and I was not getting the same results, after checking my code I thought "ah, I am not using the grid correctly", meaning that I believe the array I made with the evaluation of a function in the grid points are in a different order than the suppose one to have by the routines in the expand module, and after reading the documentation, I am not sure of what is the order of the array, the first coefficent of the grid and the last one in the array, what points are supposed to being using there? I thought that I could ask here.13:39:58
@mark-wieczorek:matrix.org@mark-wieczorek:matrix.orgDid you take a look at this page ? https://shtools.github.io/SHTOOLS/grid-formats.html21:46:40
@mark-wieczorek:matrix.org@mark-wieczorek:matrix.orgThe grids we use are standard raster format, withe the first value corresponding to 90 N 0 E.21:47:51
@mark-wieczorek:matrix.org@mark-wieczorek:matrix.orgYou just need to be careful about whether you include the redundant values at 360 E or not…21:48:47
@izavelmoto:matrix.orgizaYes, I did take a look, and I did not included the redundant values. I convert everything to radians though, the longitude between 0 and 2pi, which I imagine is the same order than what is showed https://shtools.github.io/SHTOOLS/grid-formats.html ; I believe my problem is with the latitude, 90 N would correspond to which theta value in the Legendre function ; I read that there are different conventions, if I look at the values of the gauss-legendre quadrature, it would start in theta=pi and would finish in theta=0 (if I remember well, I have changed the order some times to see what happens, so now I am not sure about that), but when I think in 90 N I think that corresponds to theta=0. So, to be sure I wanted to ask.22:12:37
@mark-wieczorek:matrix.org@mark-wieczorek:matrix.org90 N corresponds to theta = 022:15:13
@izavelmoto:matrix.orgizaThank you very much for your answer, I didn't have enough confidence about the order of the points in latitude that I was using, I will see how it goes now. Also, I have seen routines where the first value of the array is interpreted differently, for example, as the first left down point of an image, so thank you very much again.22:34:01

Show newer messages


Back to Room ListRoom Version: 5