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_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.
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
Built Distribution
File details
Details for the file solar_apparent_time-1.2.0.tar.gz
.
File metadata
- Download URL: solar_apparent_time-1.2.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2594860a8d5606efb1978dae9fdd47f3b79617151ca31ec0778dee42a611cbd |
|
MD5 | c004f8d7787b15d3639b688b8fe3c08b |
|
BLAKE2b-256 | 0145af5ad7b6fbf8464145873d3ef0bc7316882961659cf4d7d9bdcd7086131c |
File details
Details for the file solar_apparent_time-1.2.0-py3-none-any.whl
.
File metadata
- Download URL: solar_apparent_time-1.2.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8d28180318116e19d05d790766bc2088e76cb99ab6f6e6ae8b8134ddf6e1220 |
|
MD5 | 5e1da6e04a349a76d9ce920a3c29d948 |
|
BLAKE2b-256 | f330cb14107dccdbf25a997bdfdcbd3bb82e5241517a83abd600949a06b3197f |