semvec/pypi-packages huggingface dataset:
astro-what 0.1.4
CLI astronomy toolkit for moon data and lunar phases
Requires Python: >=3.7

 # 🌙 astro_what

A Python command-line tool to explore moon phases, positions, and lunar events — directly from your terminal. Built using Skyfield and Click, it’s perfect for hobbyist astronomers, students, and night-sky enthusiasts.

## Features

- Get real-time moon phase and illumination data
- Forecast upcoming lunar phase transitions
- Visualize the moon’s position using polar charts
- Fully offline-friendly after installation

## Installation

pip install astro-what

## Usage in CLI 
- astro moon --date 2025-06-23
- astro phases --days 5
- astro chart --date 2025-06-23

## 🧰 Available Functions in astro_what

The following functions are accessible when using astro_what as a Python module:

## From astro_what.core:

- get_moon_info(date_str, hour, lat, lon) Returns a dictionary containing:

		- Moon phase (e.g. “Waxing Gibbous”)

		- Illumination percentage

		- Altitude and azimuth in degrees

- get_next_lunar_phases(from_date, days) Returns a list of upcoming lunar phase transitions within a given timeframe.

## From astro_what.moon_tools:
- show_moon_chart(date_str, hour, lat, lon) Opens a polar plot showing the Moon’s position relative to the horizon — useful for visualizing where to look in the sky.

## 🌙 Example: Get Moon Information

		from astro_what.core import get_moon_info

		moon = get_moon_info(date_str="2025-06-23", hour=6, lat=12.2958, lon=76.6394)

		print(f"Phase       : {moon['phase']}")
		print(f"Illumination: {moon['illumination']}%")
		print(f"Altitude    : {moon['altitude']}°")
		print(f"Azimuth     : {moon['azimuth']}°")

## 🌗 Example: Get Upcoming Lunar Phases

		from astro_what.core import get_next_lunar_phases

		phases = get_next_lunar_phases(from_date="2025-06-23", days=5)
		for p in phases:
		    print(f"{p['phase']} → {p['timestamp']} UTC")

## 📈 Example: Plot Moon Position Chart

		from astro_what.moon_tools import show_moon_chart

		show_moon_chart(date_str="2025-06-23", hour=6, lat=12.2958, lon=76.6394)
seral 1.0.2
Implementation of Streaming ERAL algorithm (Stržinar et al., 2024)
Requires Python: >=3.11

# Streaming ERAL Algorithm and application to Evolving Clustering

## Introduction
The sERAL (Streaming Error In Alignment) algorithm is a state-of-the-art method designed for online time series alignment and averaging.
The method obtains the average time series (the prototype) from a set of time series (a class).

## Installation

To use ERAL, please install the package from pypi.org using pip:
```bash
pip install seral
```

## Usage

The main entry point for the end user is `Cluster` class in `seral.seral`:

```py
from seral.seral import Cluster as sERAL

searl = sERAL(sample=initial_sample, id=0)
```

The class constructor accepts two parameters:
- `sample` - the initial sample to be used for the prototype calculation
- `id` - the class identifier

The basic function call is:

```py
import numpy as np
from seral.seral import Cluster as sERAL

data: list[np.ndarray] = [...]

seral: sERAL = sERAL(sample=data[0], id=id, alpha=0.5)
for sample in data[1:]:
    seral.add_sample(sample=sample)

prototype = seral.prototype
    
```

For full examples, please refer to the `examples/` directory at [our repository](https://repo.ijs.si/zstrzinar/streaming-eral).


## Demonstration
The following figure demonstrates sERAL algorithm on a set of time series from the Trace dataset from UCR Archive. The dataset contains 100 time series, each with 275 samples. The time series are aligned and averaged using sERAL, and the resulting prototype is shown in the figure.
![sERAL demonstration]([docs/assets/trace.png](https://repo.ijs.si/zstrzinar/streaming-eral/-/blob/ef7140394485fe04efb1cf1ab7dd0820fd6b5151/docs/assets/trace.png))

## Examples

The `examples/` directory at [our repository](https://repo.ijs.si/zstrzinar/streaming-eral). contains Jupyter notebooks that illustrate different uses and capabilities of the sERAL algorithm. 
To run an example, navigate to the `examples/` directory and execute the desired notebook.

- Notebook titled `01 sERAL demo` demonstrates the sERAL prototyping method using the Trace dataset from UCR Archive.
- Notebook titled `02 sERAL demo on industrial data` downloads an industrial dataset from Mendeley Data [2], and calculates the prototypes for all classes.
- Notebook titled `03 sERAL vs ERAL vs DBA vs SBD` demonstrates the performance of sERAL, ERAL, DBA, and SBD algorithms on the industrial dataset from [2].
- Notebook titled `04 Evolving Time Series Clustering` demonstrates the application of sERAL in the Evolving Time Series Clustering method [1].

## References
[1] Stržinar, Žiga; Škrjanc, Igor; Pratama, Mahardhika and Pregelj, Boštjan (2024), "Evolving Clustering of Time Series for Unsupervised Analysis of Industrial Data Streams", available at SSRN: https://ssrn.com/abstract=5026151 \
[2] Stržinar, Žiga; Pregelj, Boštjan; Petrovčič, Janko; Škrjanc, Igor; Dolanc, Gregor (2024), “Pneumatic Pressure and Electrical Current Time Series in Manufacturing”, Mendeley Data, V2, doi: 10.17632/ypzswhhzh9.2, url: https://data.mendeley.com/datasets/ypzswhhzh9/2