Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the gravitational constant #412

Merged
merged 2 commits into from
May 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions harmonica/_forward/prism.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def prism_gravity(
>>> # the prism generates on the computation points
>>> gz = prism_gravity(coordinates, prism, density, field="g_z")
>>> print("({:.5f}, {:.5f}, {:.5f})".format(*gz))
(0.06551, 0.06628, 0.06173)
(0.06552, 0.06629, 0.06174)

Define two prisms with positive and negative density contrasts

Expand All @@ -120,7 +120,7 @@ def prism_gravity(
>>> # Compute the g_z that the prisms generate on the computation points
>>> gz = prism_gravity(coordinates, prisms, densities, field="g_z")
>>> print("({:.5f}, {:.5f}, {:.5f})".format(*gz))
(-0.05379, 0.02908, 0.11235)
(-0.05380, 0.02908, 0.11237)

"""
kernels = {"potential": kernel_potential, "g_z": kernel_g_z}
Expand Down
4 changes: 2 additions & 2 deletions harmonica/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
Fundamental constants used throughout the library.
"""

#: The gravitational constant in SI units :math:`m^3 kg^{-1} s^{-1}`
GRAVITATIONAL_CONST = 0.00000000006673
#: Gravitational constant :math:`G` in SI units (:math:`m^3 kg^{-1} s^{-2}`)
GRAVITATIONAL_CONST = 6.6743e-11
100 changes: 50 additions & 50 deletions harmonica/tests/data/sample_point_gravity.csv
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
# Sample coordinates and the gravitational potential of a point source located
# on the origin with a mass of 5000kg/m3
# easting, northing, upward, potential
-131.70,931.10,-893.20,2.57255956e-10
-576.22,-91.03,-786.09,3.40840298e-10
190.04,-849.97,520.99,3.28755946e-10
143.74,365.09,-968.22,3.19373431e-10
509.58,-276.50,-242.84,5.30811352e-10
-166.58,232.36,834.79,3.78120228e-10
-102.59,312.70,584.30,4.97535021e-10
465.18,-134.88,577.25,4.42784528e-10
-417.79,409.50,44.58,5.68681662e-10
950.07,-346.05,-231.41,3.21660901e-10
-224.93,557.02,-749.64,3.47321344e-10
114.93,-932.30,482.39,3.15962629e-10
-968.02,-300.25,979.16,2.36758242e-10
-591.11,-110.90,-681.41,3.67107594e-10
855.88,-583.77,975.01,2.34525408e-10
-844.75,-546.05,371.44,3.11165293e-10
940.84,-95.70,579.73,3.00790080e-10
69.15,-734.09,490.48,3.76761486e-10
669.43,290.47,206.78,4.39902348e-10
867.80,993.40,19.65,2.52917136e-10
-316.07,684.20,-790.08,3.05566907e-10
-630.61,437.78,654.36,3.30767142e-10
109.24,-677.84,924.03,2.89831237e-10
777.67,-304.01,-615.07,3.21725254e-10
-213.65,-807.34,962.74,2.61791978e-10
116.96,-376.36,-22.40,8.45216625e-10
304.36,900.98,-136.43,3.47285934e-10
-902.88,-955.56,-690.57,2.24682726e-10
-989.56,576.78,-303.72,2.81568701e-10
629.47,223.98,693.82,3.46391550e-10
-434.78,-13.06,940.05,3.22115681e-10
35.17,830.86,137.74,3.95819881e-10
109.05,339.04,478.93,5.59030697e-10
414.24,-285.78,-732.37,3.75473325e-10
-517.95,366.23,-439.04,4.32490838e-10
491.98,174.36,337.17,5.36938727e-10
3.43,48.05,544.70,6.10157544e-10
764.76,820.27,-994.25,2.22619730e-10
-546.27,-108.76,681.77,3.78988711e-10
-324.06,-38.23,317.31,7.33054099e-10
-512.52,-484.50,261.09,4.43651743e-10
26.20,312.16,285.83,7.86794201e-10
709.40,-380.09,-892.43,2.77642065e-10
119.21,-334.75,-543.00,5.14149526e-10
-49.98,77.81,-532.01,6.17884105e-10
-645.65,902.84,-800.70,2.43786767e-10
497.76,847.66,510.58,3.01211538e-10
599.79,450.64,577.19,3.52487507e-10
854.61,791.34,519.46,2.61622637e-10
82.29,622.71,868.59,3.11267220e-10
-131.70,931.10,-893.20,2.57306073e-10
-576.22,-91.03,-786.09,3.40906699e-10
190.04,-849.97,520.99,3.28819993e-10
143.74,365.09,-968.22,3.19435650e-10
509.58,-276.50,-242.84,5.30914762e-10
-166.58,232.36,834.79,3.78193891e-10
-102.59,312.70,584.30,4.97631948e-10
465.18,-134.88,577.25,4.42870789e-10
-417.79,409.50,44.58,5.68792450e-10
950.07,-346.05,-231.41,3.21723565e-10
-224.93,557.02,-749.64,3.47389007e-10
114.93,-932.30,482.39,3.16024183e-10
-968.02,-300.25,979.16,2.36804366e-10
-591.11,-110.90,-681.41,3.67179112e-10
855.88,-583.77,975.01,2.34571097e-10
-844.75,-546.05,371.44,3.11225913e-10
940.84,-95.70,579.73,3.00848678e-10
69.15,-734.09,490.48,3.76834885e-10
669.43,290.47,206.78,4.39988048e-10
867.80,993.40,19.65,2.52966408e-10
-316.07,684.20,-790.08,3.05626436e-10
-630.61,437.78,654.36,3.30831580e-10
109.24,-677.84,924.03,2.89887700e-10
777.67,-304.01,-615.07,3.21787931e-10
-213.65,-807.34,962.74,2.61842979e-10
116.96,-376.36,-22.40,8.45381286e-10
304.36,900.98,-136.43,3.47353590e-10
-902.88,-955.56,-690.57,2.24726498e-10
-989.56,576.78,-303.72,2.81623555e-10
629.47,223.98,693.82,3.46459032e-10
-434.78,-13.06,940.05,3.22178434e-10
35.17,830.86,137.74,3.95896993e-10
109.05,339.04,478.93,5.59139605e-10
414.24,-285.78,-732.37,3.75546473e-10
-517.95,366.23,-439.04,4.32575094e-10
491.98,174.36,337.17,5.37043331e-10
3.43,48.05,544.70,6.10276412e-10
764.76,820.27,-994.25,2.22663100e-10
-546.27,-108.76,681.77,3.79062544e-10
-324.06,-38.23,317.31,7.33196909e-10
-512.52,-484.50,261.09,4.43738173e-10
26.20,312.16,285.83,7.86947480e-10
709.40,-380.09,-892.43,2.77696154e-10
119.21,-334.75,-543.00,5.14249690e-10
-49.98,77.81,-532.01,6.18004478e-10
-645.65,902.84,-800.70,2.43834260e-10
497.76,847.66,510.58,3.01270219e-10
599.79,450.64,577.19,3.52556177e-10
854.61,791.34,519.46,2.61673605e-10
82.29,622.71,868.59,3.11327860e-10