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
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.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file solar_apparent_time-1.5.2.tar.gz.
File metadata
- Download URL: solar_apparent_time-1.5.2.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
097525a73ffd470c883aca62743e7e2c0434dedf01301690016300ee0ecbae22
|
|
| MD5 |
3750bd659b0984b62ece5a321f626dd4
|
|
| BLAKE2b-256 |
db4a69bbaed73fd668d1180d6fed369ecf65c0f9bbf2a21d7159552c99bf13e3
|
File details
Details for the file solar_apparent_time-1.5.2-py3-none-any.whl.
File metadata
- Download URL: solar_apparent_time-1.5.2-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e5661835bc84a16614ad15a2676f05bdb448f10fec2b423153da3ad1d79a8f9
|
|
| MD5 |
13492e543aa9c6e1a05f0660aef58631
|
|
| BLAKE2b-256 |
9eaed53f581377b326080858383a58795ac00dabb17d80e994c8ec44ed4aeed2
|