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.3.0.tar.gz
.
File metadata
- Download URL: solar_apparent_time-1.3.0.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aed2965d3c1fcaf6913b74c1545a28dce0973d7928c0fe3a8471cd0c2dd203c3 |
|
MD5 | 9d0f8797687bdf385a066f037e622cb1 |
|
BLAKE2b-256 | cdf3d00337ff65c9b66cc12686f3d037942489f226e48e7453882a8d24958e3f |
File details
Details for the file solar_apparent_time-1.3.0-py3-none-any.whl
.
File metadata
- Download URL: solar_apparent_time-1.3.0-py3-none-any.whl
- Upload date:
- Size: 7.6 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 | 062dcd1044bc106bb94ba92baedce6f4f18c438b60a15060de9035acf4866c17 |
|
MD5 | 36809817d8055a0b06043a26b01ed6f4 |
|
BLAKE2b-256 | 87658fd1cf5e30c935f5a2397fd678c969bc726e4b6177f38d4f23d048a3ce57 |