title | emoji | colorFrom | colorTo | sdk | pinned | license | thumbnail | short_description |
---|---|---|---|---|---|---|---|---|
Stingray Explorer |
🚀 |
gray |
green |
docker |
false |
mit |
Stingray Explorer Dashboard Demo |
StingrayExplorer is a comprehensive data analysis and visualization dashboard designed for X-ray astronomy time series data. Built on top of the Stingray library, it provides an intuitive graphical interface for analyzing event lists, generating light curves, computing various types of spectra, and performing advanced timing analysis.
StingrayExplorer combines the powerful timing analysis capabilities of the Stingray library with a modern, interactive dashboard built using Panel and HoloViz. It enables astronomers to:
- Load and analyze event lists from various X-ray telescopes
- Generate and manipulate light curves
- Compute power spectra, cross spectra, and bispectra
- Analyze dynamical power spectra and power colors
- Visualize results through interactive plots
- Export analysis results in multiple formats
The dashboard is designed to be user-friendly while providing access to advanced features for experienced users.
- Support for multiple file formats (FITS, HDF5, ASCII, etc.)
- Batch loading of multiple event lists
- Automatic GTI (Good Time Interval) handling
- Energy calibration using RMF (Response Matrix File)
- File preview and metadata inspection
- Event list creation and simulation
- Deadtime correction
- Energy filtering and PI channel conversion
- Event list joining and sorting
- Color and intensity evolution analysis
- Power spectrum computation
- Cross spectrum analysis
- Averaged power/cross spectra
- Bispectrum calculation
- Dynamical power spectrum visualization
- Power color analysis
- Real-time plot updates
- Customizable plot layouts
- Floating plot panels
- Interactive plot manipulation
- Multiple visualization options
- Resource monitoring (CPU, RAM usage)
- Warning and error handling
- Comprehensive help documentation
- Responsive layout design
The project follows a modular architecture with clear separation of concerns:
-
explorer.py: Main entry point and dashboard initialization
- Panel/HoloViz setup
- Layout configuration
- Component integration
-
modules/: Core functionality modules
- DataLoading/: Data ingestion and management
- Home/: Dashboard home page and navigation
- QuickLook/: Analysis tools and visualizations
- EventList handling
- Light curve generation
- Spectral analysis
- Power color computation
-
utils/: Utility classes and functions
- DashboardClasses.py: Reusable UI components
- sidebar.py: Navigation and control
- globals.py: Global state management
- strings.py: Text content
-
assets/: Static resources
- Images and icons
- CSS stylesheets
- Documentation assets
-
files/: Data storage
- Sample data files
- User-loaded data
- Analysis outputs
- Backend: Python 3.11+
- Frontend: Panel, HoloViz
- Data Analysis: Stingray, NumPy, Astropy
- Visualization: Bokeh, Matplotlib
- Deployment: Docker, Hugging Face Spaces
- Python 3.11 or above
- Conda package manager
- Git (for cloning the repository)
Core packages:
- Panel >= 1.3.0
- HoloViews >= 1.18.0
- Stingray >= 0.3
- NumPy >= 1.24.0
- Astropy >= 5.0
- Matplotlib >= 3.7.0
- Bokeh >= 3.3.0
-
Clone the repository:
git clone https://github.com/kartikmandar-GSOC24/StingrayExplorer.git cd StingrayExplorer
-
Create and activate the conda environment:
conda env create -f environment.yml conda activate stingray-env
-
Verify installation:
python -c "import stingray; import panel; import holoviews"
If you encounter dependency conflicts:
-
Check individual package versions:
conda list stingray conda list panel conda list holoviews
-
Try installing missing dependencies:
conda install -c conda-forge <package_name> # or pip install <package_name>
-
Common issues:
- Stingray version compatibility
- Panel/HoloViews version mismatch
- Missing system libraries
-
Support channels:
- Email: [email protected]
- Stingray Slack: @kartikmandar
- GitHub Issues
Run the application locally:
panel serve explorer.py --autoreload --static-dirs assets=./assets
This starts a development server with:
- Auto-reloading on file changes
- Static file serving
- Debug information
- Default port 5006
-
Build the image:
docker build -t stingray-explorer .
-
Run the container:
docker run -p 7860:7860 stingray-explorer
-
Access the application at
http://localhost:7860
The dashboard is deployed on Hugging Face Spaces:
- Live demo: https://kartikmandar-stingrayexplorer.hf.space/explorer
- Repository: https://huggingface.co/spaces/kartikmandar/StingrayExplorer
- Website demo: https://www.kartikmandar.com/gsoc-2024/stingray-explorer
GitHub Actions automatically sync changes to Hugging Face Spaces:
- Triggers on pushes to
main
branch - Builds and deploys Docker image
- Updates Hugging Face Space
-
Launch the application:
panel serve explorer.py --autoreload --static-dirs assets=./assets
-
Navigate to
http://localhost:5006
in your browser -
Basic workflow:
- Use the sidebar navigation
- Load data files
- Generate visualizations
- Export results
- Click "Read Data" in the sidebar
- Choose from multiple options:
- Load local files
- Fetch from URL
- Use sample data
Supported formats:
- FITS event files
- HDF5 files
- ASCII tables
- ECSV files
-
Event List Operations
- Create/simulate event lists
- Apply deadtime corrections
- Filter by energy range
- Convert PI to energy
-
Light Curve Analysis
- Generate light curves
- Apply GTI filters
- Compute statistics
- Plot time series
-
Spectral Analysis
- Compute power spectra
- Generate cross spectra
- Calculate bispectra
- Analyze power colors
-
Advanced Features
- Dynamical power spectra
- Color evolution
- Intensity analysis
- Custom plotting
-
Plot Types
- Time series
- Spectral plots
- Contour plots
- Scatter plots
-
Interactive Features
- Zoom/pan
- Hover tooltips
- Plot customization
- Export options
-
Layout Options
- Floating panels
- Grid arrangements
- Multiple views
- Responsive design
- Save plots as PNG/SVG
- Export data as CSV/FITS
- Save analysis results
- Generate reports
- Fork and clone the repository
- Create development environment:
conda env create -f environment.yml conda activate stingray-env
- Install development dependencies:
pip install -r docs/requirements.txt
stingray-explorer/
├── explorer.py # Main application entry point
├── modules/ # Core functionality modules
│ ├── DataLoading/ # Data ingestion components
│ ├── Home/ # Dashboard home components
│ └── QuickLook/ # Analysis tools
├── utils/ # Utility functions and classes
├── assets/ # Static resources
├── files/ # Data files
└── tests/ # Test suite
-
Create feature branch:
git checkout -b feature/new-feature
-
Make changes and test:
# Run tests pytest tests/ # Start development server panel serve explorer.py --autoreload
-
Submit pull request:
- Fork repository
- Push changes
- Create PR with description
- Follow PEP 8 style guide
- Add docstrings (NumPy format)
- Write unit tests
- Update documentation
Run test suite:
pytest tests/
Test coverage:
pytest --cov=./ tests/
-
Installation Problems
- Dependency conflicts
- Python version mismatch
- Missing system libraries
Solution: Check versions, use conda-forge channel
-
Import Errors
- Missing packages
- Version incompatibilities
- Path issues
Solution: Verify environment, check imports
-
Runtime Errors
- Memory issues
- Performance problems
- Display errors
Solution: Monitor resources, check logs
-
Data Loading Issues
- File format problems
- Permission errors
- Corrupt files
Solution: Verify file integrity, check formats
-
Memory Management
- Use chunked loading
- Clear unused data
- Monitor memory usage
-
Speed Improvements
- Enable caching
- Optimize computations
- Use efficient algorithms
-
Display Performance
- Limit plot sizes
- Use appropriate renderers
- Optimize updates
-
Documentation
- Read the docs
- Check examples
- Review tutorials
-
Support Channels
- GitHub Issues
- Email support
- Slack channel
-
Debugging
- Check logs
- Use debugger
- Print statements
This project is licensed under the MIT License. See LICENSE file for details.
- Stingray Library: Core timing analysis functionality
- Panel/HoloViz: Interactive visualization framework
- Contributors: See GitHub contributors page
- The Stingray development team
- HoloViz community
- X-ray astronomy community
- Google Summer of Code program