Skip to main content

Tide gravitational correction based on I.M. Longman's Formulas for Computing the Tidal Accelerations Due to the Moon and the Sun

Project description

tidegravity is a Python library which implements the Longman scheme for computing the tidal accelerations due to the moon and sun, as published by I.M. Longman in the Journal of Geophysical Research, Vol 64, no. 12, 1959 This can be useful for correcting survey data collected with a relative gravity meter.

Requirements

The numpy and pandas libraries are required for processing tide corrections, and importing trajectory data for correction

The matplotlib library is currently only used in the examples to give a visual representation of the data.

API

The following API functions are provided (subject to change in future releases):

  • solve_longman_tide(lat, lon, alt, time)

    Solve for total gravity correction due to Sun/Moon from numpy array inputs

  • solve_longman_tide_scalar(lat, lon, alt, time)

    Wrapper around solve_longman_tide, accepts single scalar values for lat/lon/alt and a single DateTime object

  • solve_point_corr(lat, lon, alt, t0, n=3600, increment='S')

    Return tidal correction over a time span defined by t0 with n points at given increment for static (scalar) position parameters

  • solve_tide_df(df, lat='lat', lon='lon', alt='alt')

    Wrapper accepting a pandas DataFrame (df) object as the input, df should have a DatetimeIndex, and lat/lon/alt columns. Alternate column names can be provided via parameters, which will then be used to extract components from the input DataFrame.

References

  • I.M. Longman “Forumlas for Computing the Tidal Accelerations Due to the Moon and the Sun” Journal of Geophysical Research, vol. 64, no. 12, 1959, pp. 2351-2355

  • P. Schureman “Manual of harmonic analysis and prediction of tides” U.S. Coast and Geodetic Survey, 1958

Acknowledgements

This library is based on the work of John Leeman’s LongmanTide Python implementation. LongmanTide

Examples

There are several example scripts in the examples directory illustrating how to use the longmantide solving functions.

Here is a simple demonstration of calculating a correction series for a static latitude/longitude/altitude over a specified time period, with intervals of 1 second.

from datetime import datetime
from tidegravity import solve_point_corr

# Example static data for Denver, January 1, 2018
lat = 39.7392
lon = -104.9903
alt = 1609.3
t0 = datetime(2018, 1, 1, 12, 0, 0)

# Calculate corrections for one day (60*60*24 points), with 1 second resolution
result_df = solve_point_corr(lat, lon, alt, t0, n=60*60*24, increment='S')

# Result is a pandas DataFrame, with a DatetimeIndex, and correction
# values in the 'total_corr' column i.e.
corrections = result_df['total_corr'].values

# Plot the corrections using matplotlib
from matplotlib import pyplot as plt

plt.plot(corrections)
plt.ylabel('Tidal Correction [mGals]')
plt.show()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tidegravity-0.2.0a4.tar.gz (38.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tidegravity-0.2.0a4-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file tidegravity-0.2.0a4.tar.gz.

File metadata

  • Download URL: tidegravity-0.2.0a4.tar.gz
  • Upload date:
  • Size: 38.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for tidegravity-0.2.0a4.tar.gz
Algorithm Hash digest
SHA256 32cd3d3bc704b7e41768d4dbe2be62d460c4a148575b31da3d8245c6d3ef8b17
MD5 f05255c49b8ec67de7818df0f409b25f
BLAKE2b-256 9b118f852224a6854310f5157039cd56721c4b67ceeb6e329bdc7c8db92cd2ec

See more details on using hashes here.

File details

Details for the file tidegravity-0.2.0a4-py3-none-any.whl.

File metadata

File hashes

Hashes for tidegravity-0.2.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 d8120f21427d528b176acd6e51d8207da0b4b8f81224d250028e605a6e0fddc7
MD5 deb2797ecd0ead1cb12959d492146371
BLAKE2b-256 ce6994d38530ddc825a0df83c6e5315727d94b5ae4dfa9195296e8b1621d122c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page