Skip to main content

methods to translate Python datetime between solar apparent time and Coordinate Universal Time (UTC)

Project description

solar_apparent_time Python Package

The solar_apparent_time Python package translates Python datetime between solar apparent time and Coordinate Universal Time (UTC).

Gregory H. Halverson (they/them)
gregory.h.halverson@jpl.nasa.gov
NASA Jet Propulsion Laboratory 329G

Usage

UTC_to_solar(time_UTC: datetime, lon: float) -> datetime

Converts Coordinated Universal Time (UTC) to solar apparent time at given longitude for single time.

Parameters:

  • time_UTC (datetime): The UTC time.
  • lon (float): The longitude in degrees.

Returns:

  • datetime: The solar time at the given longitude.

solar_to_UTC(time_solar: datetime, lon: float) -> datetime

Converts solar apparent time to Coordinated Universal Time (UTC) at given longitude for single time.

Parameters:

  • time_solar (datetime): The solar time.
  • lon (float): The longitude in degrees.

Returns:

  • datetime: The UTC time at the given longitude.

UTC_offset_hours(geometry: rasters.RasterGeometry) -> rasters.Raster

Calculates the UTC offset in hours for an area defined by a RasterGeometry object from the rasters package.

Parameters:

  • geometry (rasters.RasterGeometry): The raster geometry.

Returns:

  • rasters.Raster: The UTC offset in hours.

day_of_year(time_UTC: datetime, geometry: rasters.RasterGeometry) -> rasters.Raster

Calculates the day of the year for a given UTC time and an area defined by a RasterGeometry object from the rasters package.

Parameters:

  • time_UTC (datetime): The UTC time.
  • geometry (rasters.RasterGeometry): The raster geometry.

Returns:

  • rasters.Raster: The day of the year.

hour_of_day(time_UTC: datetime, geometry: rasters.RasterGeometry) -> rasters.Raster

Calculates the hour of the day for a given UTC time and an area defined by a RasterGeometry object from the rasters package.

Parameters:

  • time_UTC (datetime): The UTC time.
  • geometry (rasters.RasterGeometry): The raster geometry.

Returns:

  • rasters.Raster: The hour of the day.

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

solar_apparent_time-1.1.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

solar_apparent_time-1.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file solar_apparent_time-1.1.0.tar.gz.

File metadata

  • Download URL: solar_apparent_time-1.1.0.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for solar_apparent_time-1.1.0.tar.gz
Algorithm Hash digest
SHA256 dc5dc3be16947b9e05b21b9b0ceba1b2826ef045c24beb882ca9d1794cd80e7c
MD5 9c0435367cf5e1f7883d4f873bd370e4
BLAKE2b-256 e04f7cb88ed772ecef91f101c31448a33754e652519c698d2645798f7145afd3

See more details on using hashes here.

File details

Details for the file solar_apparent_time-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for solar_apparent_time-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef7c620e5ea6ba89b32ae8f8c7cd00431f10c191d9814393cb46ee1aac1eabdb
MD5 fa9086fdfd6d3de1ff22619dcf7b87fe
BLAKE2b-256 a47e1367c02d946f3f8880b3ffa572fe595205a8e3c6978cec5cabdaecee34a6

See more details on using hashes here.

Supported by

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