Skip to main content

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

# Example Usage of lst_to_utc function 
date = date.today()
lst_time = time(12, 30, 45)
utc_time = lst_to_utc(date, lst_time, SKA_LONGITUDE)
print(f"UTC Time: {utc_time}")

# Example Usage of LST_TO_UTC_hours function 
lst_hours = 1 + 59 / 60 + 0 / 3600
date = datetime.now()
utc_time = LST_to_UTC_time(lst_hours, date, SKA_LONGITUDE)
print(f"UTC Time: {int(utc_time)}:{int((utc_time % 1) * 60):02}")

Metadata

Release files for katmlutils 0.1.8

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

Source distribution (sdist)

Source distribution for katmlutils 0.1.8
File Size Uploaded
katmlutils-0.1.8.tar.gz 6.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for katmlutils 0.1.8
File Interpreter ABI Platform
katmlutils-0.1.8-py3-none-any.whl Python 3 none any Details

Total release size: 14.1 kB

Release files / katmlutils-0.1.8.tar.gz

Download URL katmlutils-0.1.8.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d6b12b0c5a4bdf9f5539dead50112f759628b3eb4ee393b8f0c19551121fe7b1
BLAKE2b-256 checksum
How to use checksums
ba42b97bb927e1037de88e9844e85521f2fabfd0cb6406c45ca216f52b6d41ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / katmlutils-0.1.8-py3-none-any.whl

Download URL katmlutils-0.1.8-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c7a52476c62f99db4b659d6f1852bafac0cd5af4bb10d9a032f30f1dcc2af788
BLAKE2b-256 checksum
How to use checksums
65ee2a75233ccc39672f7a39eeebee65ab4dceb5eb560214b629964e0e395183
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.8 This release

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

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