Skip to content

GOA-UVa/pyrano

Repository files navigation

Latest Tag License Proprietary Stargazers


Logo

pyrano

Lightweight tool for reading solar radiometer data and sending it to a central database, with built-in support for graph generation.

View Demo

Table of Contents
  1. About the project
  2. Getting Started
  3. Setting up a Measurement Station
  4. Setting up the Database
  5. Setting up the Database Server
  6. Visualising Data
  7. License
  8. Authors

About the project

Pyrano is a small Python package accompanied by a set of auxiliary utilities for working with solar radiometer data. It allows reading data files, sending measurements to a dedicated database, and visualizing stored data through plots. The project is developed by the Group of Atmospheric Optics at the University of Valladolid (GOA-UVa) as part of the PRESENTE project.

Getting started

Prerequisites

  • Python >= 3.9.0

Installation

Set Up the Virtual Environment and Install the pyrano package and its dependencies.

1. Create and Activate a Virtual Environment

On Linux and macOS
python3 -m venv .venv
source .venv/bin/activate
On Windows
python -m venv .venv
.venv\Scripts\activate

2. Install pyrano package

After activating the virtual environment, install the pyrano package:

pip install -e .

Note: This library depends on GOA's goadb python library

Setting up a Measurement Station

1. Initialise the client configuration file

Copy the config.test.yml as config.yml and fill the adequate values for your installation and station.

2. Run the client

Once installed, you can run send_client.py script which will invoke the code under client, automatically reading the data and sending it to the database server specified in the configuration file.

This should be automatised using either Linux's crontab or Windows' task scheduler.

Setting up the Database

DB Prerequisites

  • mySQL or a compatible DB manager like mariaDB

1. Run the SQL scripts

After creating the user username with the valid permissions for the pyrano database, run:

mysql -u username <db/pyrano.sql -p
mysql -u username <db/start.sql -p

DB Structure

The DB follows the design described in the following diagram:

UML entity relationship diagram

Setting up the Database Server

It's not mandatory to set up both the database server and the database together, although that's the way it's deployed at GOA.

The diagram bellow illustrates a sample pyrano deployment setup: UML deployment diagram

DB Server Requirements

  • Linux
  • pyrano

1. Initialise the server configuration file

Copy the serverconf.test.yml as serverconf.yml and fill the adequate values for your database setup.

2. Set up pyrano service

  • Copy utils/pyrano-api.service to your systems' service folder
  • Modify that copied file, writing the correct path of the project in your machine
  • Activate the system

Visualising Data

This tool allows users to generate visual representations of the radiation data stored in the database.

This is done through the plot_last.py script and must be done with a valid serverconf.yml configuration.

./plot_last.py station_name

Funding

This project is part of the PRESENTE initiative, funded by the following institutions:

  • Agencia Estatal de Investigación (AEI)
  • Unión Europea – NextGenerationEU
  • Plan de Recuperación, Transformación y Resiliencia
  • Ministerio de Ciencia e Innovación (MICINN)

Authors

License

© 2025 Universidad de Valladolid. Grupo de Óptica Atmosférica (GOA-UVa). All rights reserved.

This project and its contents are protected by copyright and are not open source. Reproduction, modification, or distribution is not permitted without prior written authorization.

See the full LICENSE file for details.

About

Lightweight tool for reading radiometer data and sending it to a central database

Resources

License

Stars

Watchers

Forks

Packages

No packages published