This is a package that keeps all the Machine learning Utils in the Software Team.
Project description
SARAO Machine Learning Utility functions
Machine Learning utils is a library for a convenient experience. It consists of helper functions for creating astronomy/machine learning tools.
Installation
pip install katmlutils
Example 1
from katmlutils.utils import get_night_window
from datetime import datetime
# Get the night window for the proposed date
nightwindow = get_night_window(datetime.datetime.now())
nightwindow
Example 2
from katmlutils.utils import get_UTC_sunrise_sunset_times
from datetime import datetime
date = datetime.today()
num_days = 7
sunrise_sunset_times = get_UTC_sunrise_sunset_times(date, num_days)
for entry in sunrise_sunset_times:
print(
f"Date: {entry['date']}, Sunrise: {entry['sunrise']}, Sunset: {entry['sunset']}"
)
Example 3
from katmlutils.utils import SKA_LATITUDE, SKA_LONGITUDE, MINUTES_IN_SIDEREAL_DAY, MINUTES_IN_SOLAR_DAY
print(f"SKA Latitude: {SKA_LATITUDE} degrees")
print(f"SKA Longitude: {SKA_LONGITUDE} degrees")
print(f"Minutes in Sidereal Day: {MINUTES_IN_SIDEREAL_DAY}")
print(f"Minutes in Solar Day: {MINUTES_IN_SOLAR_DAY}")
Example 4
from katmlutils.utils import SKA_LONGITUDE, lst_to_utc
from datetime import datetime, time
date = datetime.now()
# Example Usage of lst_to_utc function with float input
lst_time = 1 + 59 / 60 + 0 / 3600
utc_time = lst_to_utc(date, lst_time, SKA_LONGITUDE)
print(f"UTC Time: {int(utc_time)}:{int((utc_time % 1) * 60):02}")
# Example Usage of lst_to_utc function with time input
lst_time = time(12, 30, 45)
utc_time = lst_to_utc(date, lst_time, SKA_LONGITUDE)
print(f"UTC Time: {utc_time}")
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
katmlutils-0.1.0.tar.gz
(6.4 kB
view details)
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 katmlutils-0.1.0.tar.gz.
File metadata
- Download URL: katmlutils-0.1.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b26896f039173a3f33edad6c1c1f5f17cc0ce2e206a34bcf89329e4915c9d63d
|
|
| MD5 |
b6a5f1e174be07364b919eaa32d9bff4
|
|
| BLAKE2b-256 |
a7f02c3e86b36561f3d87a23ca7b73c2efe10c4c371c2d689a69447feda5e283
|
File details
Details for the file katmlutils-0.1.0-py3-none-any.whl.
File metadata
- Download URL: katmlutils-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b761d86a9ce1517b1e7d02e7394abf01129d1334756b22221a9db3474d859a2b
|
|
| MD5 |
a2cc4972fb2bc42ff8bac19b010882a9
|
|
| BLAKE2b-256 |
e315c6822104f8d7daa1ffde209ec110d186788fe3feb27bd3f33c439c1ecc64
|