Skip to main content

Downloader for ISMR Query Tool (RINEX, ISMR, 1min-ISMR, SBF)

Project description

ISMR Downloader

A Python tool for downloading GNSS/ISMR (Ionospheric Scintillation Monitoring Receiver) data from the ISMR Query Tool API. It supports multiple data types, automatic token management, rate limiting, logging, progress bars, automatic date normalization, and chunk-based downloads for large time intervals.


Requirements

⚠ We recommend following Conventional Commits (cheatsheet) when contributing.


Getting started

  • Clone the repository
git clone git@github.com:GEGE-UNESP/ismr_downloader.git
  • Create a virtual environment

Windows (PowerShell)

python -m venv .venv
.venv\Scripts\Activate.ps1

Linux/Mac

python3 -m venv .venv
source .venv/bin/activate
  • Create a .env file

Windows

type .env.example > .env

Linux/Mac

cp .env.example .env

Fill in your API credentials and settings inside .env:

ISMR_EMAIL=your_email@example.com
ISMR_PASSWORD=your_password

# Data type: ismr | ismr1min | sbf | rinex
DATA_TYPE=ismr

ISMR_STATIONS=PRU2,MOR3

# When only a date is provided (YYYY-MM-DD),
# the downloader automatically expands:
#   start → 00:00:00
#   end   → 23:59:59
ISMR_START=2025-11-17
ISMR_END=2025-11-17
  • Install dependencies
pip install -r requirements.txt
  • Run the project
python -m ismr_downloader

From prebuilt binary (Windows)

If you downloaded the .exe from the Releases page, just place it in the same folder as your .env file and run:

ismr_downloader.exe -f -e .env
  • This avoids the need for Python or pip installation.
  • Token caching, date normalization, chunking, and logs all work the same as in the Python version.

⚠ Make sure your .exe file has the same structure as the example.


Date & Time Handling (UTC)

The downloader includes automatic datetime normalization:

  • If you provide a full ISO timestamp:
2025-11-17T05:30:00

It is used exactly as written.

  • If you provide only a date:
2025-11-17

It is expanded automatically to the full-day range:

Field Value assigned
Start 2025-11-17 00:00:00
End 2025-11-17 23:59:59

This ensures correct, full-day coverage without manual timestamps.


Chunked Download Strategy

The downloader automatically splits large date ranges into smaller chunks based on max_days:

  • Prevents oversized API queries
  • Improves reliability for long time spans
  • Ensures the server returns complete data

Example: If max_days=15 and your range covers 90 days, it will automatically generate 6 chunks.


Token Management

  • API tokens are cached in .token.json
  • Valid tokens are reused between runs
  • Expired tokens are refreshed automatically
  • Thread safety prevents race conditions during renewal

Error Handling & Retries

The downloader includes robust handling for:

Status Action
401 Refresh token and retry
404 Logs a "no data" entry into a CSV
429 Automatic backoff with safe stop after repeated failures
503 Clean shutdown with clear maintenance message
Timeouts Retries with delay

Any interval without data is recorded into:

logs/no_data_YYYYMMDD_HHMMSS.csv

Logs

All run logs are saved under the logs/ folder with a timestamp:

  • run_YYYYMMDD_HHMMSS.log → detailed logs
  • downloaded_files_YYYYMMDD_HHMMSS.txt → list of downloaded/skipped files
  • no_data_YYYYMMDD_HHMMSS.csv → intervals where the API returned no data

Progress bars are shown for each file download.


Notes

  • Default download folder is downloads/.
  • The downloader automatically enforces request pacing via a built-in rate limiter.
  • The tool supports both bundle and temp_urls modes from the API.
  • The maximum query range is automatically chunked according to max_days.
  • Progress bars appear for every downloaded file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ismr_downloader-0.1.0.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ismr_downloader-0.1.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file ismr_downloader-0.1.0.tar.gz.

File metadata

  • Download URL: ismr_downloader-0.1.0.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for ismr_downloader-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9e3908f40e5270897170c839435b339878e47b93d40b6990c30fdf1cbf803d04
MD5 111736d0ca864dc78fa278d1ab385f66
BLAKE2b-256 8687b8cc1a688dc1a32ef504d534d18c9205f32bb08e71044f94154e96e1b924

See more details on using hashes here.

File details

Details for the file ismr_downloader-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ismr_downloader-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a51fa1a10d8f07d67e30293e0bde28c278784c78d79f31937f3a198415aa4eca
MD5 2bfe824c941280daf65c9b9df55c164b
BLAKE2b-256 c071a8685c4a2d24412be0775442a016489cf8ed5c261a526c50c8688856505d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page