Skip to content
Guillermo Giménez de Castro edited this page Jul 21, 2025 · 12 revisions

HATSpy: User and Developer Manual

V0.01

Introduction

HATSpy is a set of programs written in python and C used to reduce and analyze data from HATS telescope. It is an ipython profile as well to ease the use of the software. This manual was written and tested in Linux Debian version 11 with kernel 5.10.0-35-amd64 python 3.9 and ipython 7.20 and with Ubuntu 20.04.6, kernel 5.4.0-216-generic, python 3.8.10 and ipython 7.13.

Installation

HATSpy is developed in python 3.7 or later and standard C. The most updated version of the software can be downloaded from https://github.com/guigue/CRAAM-Instruments/HATS. The software can be installed in any directory, and environment variables must be defined.

  1. PYTHONPATH: must include the path where the python code is installed.
  2. HATSXMLPATH: must point to the directory where .xml HATS files are copied.
  3. HATS_DATA_InputPath: Directory where data is downloaded. We will talk about the structure of this directory later.
  4. HATS_WS_InputPath: weather station data directory.
  5. HATS_FFTProgram: full path to the binary code of the FFT program.

hatspy profile

To create this profile you run the command ipython profile create hats. The go to the directory $HOME/ipython/profile_hats/startup and create the file 00-hats.py with the following lines

              import HATS 
              from HATSTools import *
              import numpy as np
              from matplotlib.pyplot import plot
              from matplotlib import pyplot as plt
              from astropy import units as u
              from astropy import constants as c
              from astropy.time import Time
              plt.ion() 

Finally, create an alias:

(BASH) > alias hatspy='ipython3 --pylab --profile=hats'

(CSH) > alias hatspy 'ipython3 --pylab --profile=hats'

You can (have to) add one of the previous lines in $HOME/.bashrc or $HOME/.cshrc files. Next shell you open, you should be able to run

> hatspy
Python 3.8.10 (default, Mar 18 2025, 20:04:55) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.13.0 -- An enhanced Interactive Python. Type '?' for help.

IPython profile: hats
Using matplotlib backend: TkAgg

HOMS Configuration

The HATS Operation, Monitoring and Storage (HOMS) computer at the *OAFA observatory is configured as follows:

                        PYTHONPATH=/opt/HAX/python
                        HATSXMLPATH=/opt/HAX/python/XMLTables
                        HATS_DATA_InputPath=/homs/HATS/data
                        HATS_WS_InputPath=/homs/HATS/data/aux
                        HATS_FFTProgram=/opt/HAX/python/HATS_fft

Clone this wiki locally