katmlutils


Namekatmlutils JSON
Version 0.1.3 PyPI version JSON
download
home_pageNone
SummaryThis is a package that keeps all the Machine learning Utils in the Software Team.
upload_time2025-10-08 09:18:53
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT
keywords machine learning utils
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

```python

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

```python

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 

```python

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

```python

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_time = 1 + 59 / 60 + 0 / 3600
date = datetime.now()
utc_time = LST_to_UTC_time(lst_time, date, SKA_LONGITUDE)
print(f"UTC Time: {int(utc_time)}:{int((utc_time % 1) * 60):02}")
```


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "katmlutils",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "machine learning, utils",
    "author": null,
    "author_email": "SARAO MLOps <saraomlops@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/ed/f2/8c8b5a70ba7bf0a2fd9a0df4bbfe13aeceb7c73e35324ef611df6d8929bc/katmlutils-0.1.3.tar.gz",
    "platform": null,
    "description": "# SARAO Machine Learning Utility functions \n\nMachine Learning utils is a library for a convenient experience. It consists of helper functions for creating astronomy/machine learning tools.\n\n## Installation \n\n```\npip install katmlutils\n\n```\n\n## Example 1\n\n```python\n\nfrom katmlutils.utils import get_night_window\nfrom datetime import datetime\n\n# Get the night window for the proposed date\nnightwindow = get_night_window(datetime.datetime.now())\n\nnightwindow\n\n```\n\n## Example 2\n\n```python\n\nfrom katmlutils.utils import get_UTC_sunrise_sunset_times\nfrom datetime import datetime\n\ndate = datetime.today()\n\nnum_days = 7\nsunrise_sunset_times = get_UTC_sunrise_sunset_times(date, num_days)\nfor entry in sunrise_sunset_times:\n    print(\n        f\"Date: {entry['date']}, Sunrise: {entry['sunrise']}, Sunset: {entry['sunset']}\"\n    )\n```\n\n## Example 3 \n\n```python\n\nfrom katmlutils.utils import SKA_LATITUDE, SKA_LONGITUDE, MINUTES_IN_SIDEREAL_DAY, MINUTES_IN_SOLAR_DAY\n\nprint(f\"SKA Latitude: {SKA_LATITUDE} degrees\")\nprint(f\"SKA Longitude: {SKA_LONGITUDE} degrees\") \nprint(f\"Minutes in Sidereal Day: {MINUTES_IN_SIDEREAL_DAY}\")\nprint(f\"Minutes in Solar Day: {MINUTES_IN_SOLAR_DAY}\")\n```\n\n\n## Example 4\n\n```python\n\nfrom katmlutils.utils import SKA_LONGITUDE, lst_to_utc\nfrom datetime import datetime, time, date\n\n# Example Usage of lst_to_utc function \ndate = date.today()\nlst_time = time(12, 30, 45)\nutc_time = lst_to_utc(date, lst_time, SKA_LONGITUDE)\nprint(f\"UTC Time: {utc_time}\")\n\n# Example Usage of LST_TO_UTC_hours function \nlst_time = 1 + 59 / 60 + 0 / 3600\ndate = datetime.now()\nutc_time = LST_to_UTC_time(lst_time, date, SKA_LONGITUDE)\nprint(f\"UTC Time: {int(utc_time)}:{int((utc_time % 1) * 60):02}\")\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "This is a package that keeps all the Machine learning Utils in the Software Team.",
    "version": "0.1.3",
    "project_urls": null,
    "split_keywords": [
        "machine learning",
        " utils"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3c9e3900155d09aede78d0704a969c0ad0bc40b87bfe52be87b1a788d962af0f",
                "md5": "bd8a8953551698d150220bb2302d0dc7",
                "sha256": "c3f8c57a0b404fe33d2ee2bf4bdfe34aa66081aab3ca7b610487182da444f61b"
            },
            "downloads": -1,
            "filename": "katmlutils-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bd8a8953551698d150220bb2302d0dc7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 7454,
            "upload_time": "2025-10-08T09:18:52",
            "upload_time_iso_8601": "2025-10-08T09:18:52.429428Z",
            "url": "https://files.pythonhosted.org/packages/3c/9e/3900155d09aede78d0704a969c0ad0bc40b87bfe52be87b1a788d962af0f/katmlutils-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "edf28c8b5a70ba7bf0a2fd9a0df4bbfe13aeceb7c73e35324ef611df6d8929bc",
                "md5": "307aed6fcaa788b77ffd87c08416e6e4",
                "sha256": "3a1c0435d0012458df53d5f14093b4c5b4d401a22e872ae160a6463819b28d7b"
            },
            "downloads": -1,
            "filename": "katmlutils-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "307aed6fcaa788b77ffd87c08416e6e4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 6482,
            "upload_time": "2025-10-08T09:18:53",
            "upload_time_iso_8601": "2025-10-08T09:18:53.516101Z",
            "url": "https://files.pythonhosted.org/packages/ed/f2/8c8b5a70ba7bf0a2fd9a0df4bbfe13aeceb7c73e35324ef611df6d8929bc/katmlutils-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-08 09:18:53",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "katmlutils"
}
        
Elapsed time: 1.80634s