Skip to content

szunigaf/SPECULOOS-DataTransfer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

53 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SPECULOOS-DataTransfer

Automated data transfer pipeline for SPECULOOS South observations from telescope control PCs to ESO archive.

Overview

This repository contains scripts to automate the transfer and formatting of astronomical data from the four SPECULOOS telescopes (Io, Europa, Ganymede, Callisto) to the ESO archive. The pipeline handles:

  • πŸ”„ Automated data transfer from Windows control PCs
  • πŸ”­ Astrometric calibration preparation
  • πŸ“ FITS header standardization to ESO requirements
  • βœ… Data validation and error reporting
  • πŸ“§ Email alerts for transfer issues
  • πŸ“Š Comprehensive logging

Key Features

✨ Telescope-Agnostic Architecture: Single script works across all four telescopes
πŸ” Secure Credential Management: Environment-based configuration keeps secrets safe
⚑ Parallel Processing: Multi-threaded Python scripts for performance
πŸ“ˆ Comprehensive Logging: Detailed tracking of all transfers
πŸ›‘οΈ Multiple Validation Points: Ensures data integrity throughout pipeline

Quick Start

Prerequisites

  • Python 3.7+ with conda environment
  • Packages: astropy, numpy (see requirements.txt)

Setup

  1. Create conda environment:

    conda create -n speculoos_py3 python=3.7
    conda activate speculoos_py3
    pip install -r requirements.txt
  2. Copy credentials template:

    # Choose your telescope: Io, Europa, Ganymede, or Callisto
    cp .credentials.csh.Io.example .credentials.csh
  3. Edit credentials:

    nano .credentials.csh
    chmod 600 .credentials.csh
  4. Run transfer:

    ./transfer_Astra.csh

Repository Structure

.
β”œβ”€β”€ transfer_Astra.csh                    # Main transfer script (Io, Europa, Ganymede)
β”œβ”€β”€ transfer_Astra_spirit.csh             # Transfer script for Callisto (SPIRIT)
β”œβ”€β”€ astrometry.py                         # Astrometric solving (Io, Europa, Ganymede)
β”œβ”€β”€ astrometry_spirit.py                  # File renaming + WCS check (Callisto)
β”œβ”€β”€ headerfix.py                          # FITS header standardization
β”œβ”€β”€ create_datacubes.py                   # 3D datacube creator (Callisto/SPIRIT)
β”œβ”€β”€ mail_alert.py                         # Email notifications
β”œβ”€β”€ requirements.txt                      # Python dependencies
β”‚
β”œβ”€β”€ .credentials.csh.example              # Shell credentials template
β”œβ”€β”€ .credentials.csh.Io.example           # Io-specific template
β”œβ”€β”€ .credentials.csh.Europa.example       # Europa-specific template
β”œβ”€β”€ .credentials.csh.Ganymede.example     # Ganymede-specific template
β”œβ”€β”€ .credentials.csh.Callisto.example     # Callisto-specific template
β”‚
β”œβ”€β”€ INSTALLATION_GUIDE.md                 # Server deployment guide
β”œβ”€β”€ DEPLOYMENT_GUIDE_TEMPLATE.md          # Multi-telescope setup
β”œβ”€β”€ QUICK_REFERENCE.md                    # Daily operations reference
β”œβ”€β”€ CHANGES_SUMMARY.md                    # Complete changelog
β”œβ”€β”€ transfer_Astra_summary.md             # Technical documentation
└── README.md                             # This file

Documentation

Pipeline Workflow

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              Windows Control PC (Raw Data)                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            β”‚ Mount & Copy
                            β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€-┐
β”‚                   Hub Work Directory                         β”‚
β”‚  [Copy Files] β†’ [Astrometry] β†’ [Fix Headers]                 β”‚
β”‚                                                              β”‚
β”‚  Io/Europa/Ganymede: β†’ individual SPECULOOS*.fits            β”‚
β”‚  Callisto (SPIRIT):  β†’ [Create Datacubes] β†’ SPECU*_S/C_*.fitsβ”‚
└───────────────────────────┬─────────────────────────────────-β”˜
                            β”‚ Transfer
                            β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    ESO Archive Directory                    β”‚
β”‚              (Final FITS files, ESO-compliant)              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Telescope Configuration

Each telescope requires specific credentials. See .credentials.csh.<Telescope>.example files for templates with telescope-specific values.

Usage

Automatic Mode (Process Yesterday's Data)

./transfer_Astra.csh

Manual Mode (Specify Date)

./transfer_Astra.csh 20240215

Multiple Dates

./transfer_Astra.csh "20240215 20240216 20240217"

Automated Scheduling

Set up cron jobs for automated daily transfers:

env EDITOR=nano crontab -e

Add entry (example for Callisto):

45 13 * * * csh /home/speculoos/ESO_data_transfer/Callisto_Astra/transfer_Astra.csh > /home/speculoos/ESO_data_transfer/Callisto_Astra/cron_logs/`date +\%Y-\%m-\%d_\%H:\%M:\%S`_transfer_cron.log 2>&1

Security

⚠️ Important Security Notes:

  • .env and .credentials.csh contain sensitive information
  • These files are git-ignored and should NEVER be committed
  • Use .example template files for reference
  • Set restrictive permissions: chmod 600 on credential files

Monitoring

# View transfer history
tail -20 Logs/transfer_log.txt

# Check failures
ls Logs/*/non_transferred

# View cron logs
tail -50 cron_logs/*_transfer_cron.log

Email alerts are sent automatically when transfers fail (configure in .env).

"Credentials file not found"

Ensure .credentials.csh exists in the script directory or ~/.credentials.csh

"TELESCOPE_NAME not set"

Edit .credentials.csh and verify TELESCOPE_NAME is properly set

Troubleshooting

Issue Solution
Credentials not found Copy .credentials.csh.example to .credentials.csh
TELESCOPE_NAME not set Verify setting in .credentials.csh
Python import error conda activate speculoos_py3; pip install -r requirements.txt
Email not working Install python-dotenv, verify .env credentials

See INSTALLATION_GUIDE.md for detailed troubleshooting.dding new features 3. Never commit credential files (.env, .credentials.csh) 4. Use telescope-agnostic code - avoid hardcoding telescope names

Contributing

Test thoroughly before deploying. Never commit credential files. Keep code telescope-agnostic.

  • Pipeline architecture: SPECULOOS team

Support

For issues or questions:

  1. Check the documentation in this repository
  2. Review log files for error messages
  3. Verify credential configuration
  4. Contact the SPECULOOS data management team

Support

Check documentation in this repository and log files. Contact SPECULOOS data management team for issues.


Authors: Original by Laetitia Delrez (2018), revised by Seba ZΓΊΓ±iga-FernΓ‘ndez (2026)
Last Updated: March 2026

About

Data transfer scripts for SPECULOOS South observations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors