Skip to main content

Python library for processing Callisto solar radio spectrometer data

Project description

pyCallisto

What's New in Version 1.2.3

New Features

  • GOES X-ray Flux Overlay: New spectrogramWithGOES() function to overlay GOES satellite X-ray data on spectrograms
  • Enhanced Spectrogram Control: Added blevel (background level) and vmax (maximum value) parameters for better visualization control

Improvements

  • Added beautifulsoup4 and scipy to core dependencies for better out-of-the-box functionality
  • Optional dependencies for GOES integration
  • Improved Windows compatibility

pyCallisto is an image processing and data analysis Python library developed for e-CALLISTO data (http://www.e-callisto.org/). This library can be used to process data obtained using various solar radio spectrometers available around the globe.

Installation

Basic Installation

For core functionality (spectrogram visualization, time/frequency slicing, light curves):

pip install pyCallisto

Installation with GOES Support

For GOES X-ray flux overlay capabilities:

pip install pyCallisto[goes]

Full Installation

For all features:

pip install pyCallisto[all]

⚠️ Important for Windows Users:

  • Python 3.9-3.11 recommended for best compatibility
  • Python 3.12+: Some dependencies may fail to compile. Use the basic installation and install optional dependencies individually if needed
  • If you encounter compilation errors, consider using a conda environment or installing Visual Studio Build Tools

Alternative: Manual Dependency Installation

If you encounter issues with optional dependencies:

pip install pyCallisto
# Then install only what you need:
pip install sunpy  # For GOES features

Prerequisites and Dependencies

Core Dependencies (automatically installed)

  • Python 3.7 or higher
  • numpy
  • matplotlib
  • astropy
  • beautifulsoup4
  • scipy

Optional Dependencies (for GOES integration)

Install with pip install pyCallisto[goes]:

  • sunpy
  • drms
  • zeep
  • lxml
  • h5netcdf
  • h5py
  • cdflib
  • reproject
  • mpl-animators

Features

  • Spectrogram Visualization: Generate spectrograms from FITS files with customizable colormaps and parameters
  • Time and Frequency Slicing: Extract specific time ranges and frequency bands from observations
  • Light Curve Analysis: Create mean light curves by collapsing data along time axis
  • Spectrum Analysis: Generate frequency spectra for specific time instances
  • GOES Integration: Overlay GOES X-ray flux data on spectrograms for comprehensive solar event analysis
  • Background Subtraction: Automated background estimation and removal
  • Universal Plot: Combined visualization of spectrogram, light curve, and spectrum
  • File Concatenation: Merge multiple FITS files along time axis for extended observations

Troubleshooting

Module Not Found Error

If you get ModuleNotFoundError: No module named 'pyCallisto':

  1. Ensure you're using the correct Python environment
  2. Reinstall: pip uninstall pyCallisto && pip install pyCallisto

Import Errors for GOES Features

If you get import errors when using spectrogramWithGOES():

pip install pyCallisto[goes]

Compilation Errors on Windows (Python 3.12+)

  1. Use Python 3.9-3.11 instead, or
  2. Install basic version and skip optional dependencies:
    pip install pyCallisto
    

Visual Studio Build Tools Error

If you see "Microsoft Visual C++ 14.0 or greater is required":

  1. Download Build Tools for Visual Studio
  2. Install "Desktop development with C++"
  3. Retry installation

For more help, please open an issue on GitHub.

Quick Start

GOES Spectrogram Overlay

Overlay GOES X-ray flux data on your spectrogram:

import matplotlib.pyplot as plt

# After loading and processing your data use this function at the end

joined_bg_subtracted.spectrogramWithGOES(    #joined_bg_subtracted is just a variable name
    tstart="2024-07-16 13:05",
    tend="2024-07-16 14:34",
    satellite_number=16,    
    xtick=5,
    save_path='spectrogram_with_goes_overlay_2024-07-16.png'
)
plt.show()

Adjusting Spectrogram Parameters

Control dynamic range and background levels:

# Use blevel to adjust background level
# Use vmax to set maximum value for color scaling
obj.spectrogram(blevel=10, vmax=20) #Example

Contributors

Mr. Ravindra Pawase
Data Scientist
Cummins Inc.
Pune-411 004, India

Dr. K. Sasikumar Raja
Assistant Professor
Indian Institute of Astrophysics
II Block, Koramangala, Bengaluru-560 034, India

Mr. Mrutyunjaya Muduli
B.E. Computer Science and Engineering
Department of Computer Science and Engineering
HKBK College of Engineering
22/1, Opposite Manyata Tech Park, Nagavara, Bengaluru-560 045, India

Feedback

For feedback, queries, or feature requests, please contact:

Citation

If you find pyCallisto useful in your work, we appreciate acknowledgment. We recommend using the following citation:

"This work makes use of the pyCallisto library, which is available at https://github.com/ravipawase/pyCallisto"

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

pycallisto-1.2.3.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

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

pycallisto-1.2.3-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file pycallisto-1.2.3.tar.gz.

File metadata

  • Download URL: pycallisto-1.2.3.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for pycallisto-1.2.3.tar.gz
Algorithm Hash digest
SHA256 870adadc2add10ab16275f4c6337c6dce2fbda7672773734597212fcd497b37b
MD5 93f8cf9a1da8febc784e18dff98d98a9
BLAKE2b-256 4a6e1c7fcaa9a9d682db21a7f93750fb329475305136cc3517b3318e7ecef34f

See more details on using hashes here.

File details

Details for the file pycallisto-1.2.3-py3-none-any.whl.

File metadata

  • Download URL: pycallisto-1.2.3-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for pycallisto-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 dc090be32836f0961c79dac4829db22d55ce0e73cc850cf1b0ac3b0eae23f25b
MD5 6124eead1debb0072172b123e281942a
BLAKE2b-256 ffacff5108093afb236edc09842cd1dfbde19ee839529073597161dc3ccc5119

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