Skip to main content

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

Installation

This package is available on PyPi as a pip package called solar-apparent-time with dashes.

Usage

Importing

Import this package as solar_apparent_time with under-scores.

import solar_apparent_time

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_for_area(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.

solar_day_of_year_for_area(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.

solar_hour_of_day_for_area(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.

Release files for solar-apparent-time 1.5.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for solar-apparent-time 1.5.4
File Size Uploaded
solar_apparent_time-1.5.4.tar.gz 12.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for solar-apparent-time 1.5.4
File Interpreter ABI Platform
solar_apparent_time-1.5.4-py3-none-any.whl Python 3 none any Details

Total release size: 22.1 kB

Release files / solar_apparent_time-1.5.4.tar.gz

Download URL solar_apparent_time-1.5.4.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6c9c768a89f55476e5cc55d3e8ce72707fbcf37d14716977b11641884be75045
BLAKE2b-256 checksum
How to use checksums
0a8d5635b5e8cbcd3c1fd027e35bceda02bca55fba749cd78c94c2c464601990
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.23

Release files / solar_apparent_time-1.5.4-py3-none-any.whl

Download URL solar_apparent_time-1.5.4-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
807fcd8af836393d8fab9e7f7aca9e5c6dc0e558f05a1ae914147181efee2ee4
BLAKE2b-256 checksum
How to use checksums
e8fbf9dc88556c048045c1b534984f89024b0c7c06179bf32c01004b534c48c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.23

Release history Release notifications | RSS feed

This release

1.5.4 This release

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.4.0

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page