diff --git a/2026/sunpy/sunpy-improving-radiospectra's-functionality-and-interoperability-Abhishek-Lohar.md b/2026/sunpy/sunpy-improving-radiospectra's-functionality-and-interoperability-Abhishek-Lohar.md new file mode 100644 index 0000000..216b2a2 --- /dev/null +++ b/2026/sunpy/sunpy-improving-radiospectra's-functionality-and-interoperability-Abhishek-Lohar.md @@ -0,0 +1,299 @@ +## Page 1 + + + +# GSoC Proposal + +## Contributor Information: + +Name: Abhishek Lohar + +University: VIT - AP University. + +Email: abhisheklohar0509@gmail.com + +GitHub: https://github.com/AbhiLohar + +Time Zone: IST (GMT + 5:30) + +Chat Handel: @abhisheklohar_01:matrix.org + +PR links: open source Code Contributions: + +1. Relevant PR: radioscpectra #164 + +Summary: I refactored the e-Callisto client to fetch remote headers with range requests, to demonstrate that I can work with Fido,FITS file structure and the radioscpectra.net architecture. + +My other PR's in SunPy other packages and Astropy: + +--- + + +## Page 2 + +1. PR : [package-template #241](https://github.com/astropy/package-template/pull/241): Update: Syncing template configurations. +2. [sunpy.org #483](https://github.com/sunpy/sunpy.org/pull/483) & [#482](https://github.com/sunpy/sunpy.org/pull/482): Documentation and Website Updates. +3. [astropy #19162](https://github.com/astropy/astropy/pull/19162): Fix: Use list comprehension for better readability and performance +4. [astropy #19149](https://github.com/astropy/astropy/pull/19149): Fix: Simplify and optimize coordinate logic. +5. [astropy #19144](https://github.com/astropy/astropy/pull/19144): Style: Improve code consistency in core utilities. + +## Background: + +### Interests & Motivation + +My interest in open source software development comes from a fascinating combination of high-level software engineering and the raw complexity of solar physics data. In the past few months, I have progressed from minor changes to coding style to tackling architectural problems in the SunPy and Astropy ecosystems. + +My involvement in the radiospectra project, particularly in my latest endeavors to improve remote metadata retrieval in e-Callisto, has been a real eye-opener, and I realize that there is a lot of potential to improve the overall state of affairs in solar physics data analysis and discovery. The sheer amount of data available from solar observations is incredible, and I feel that the tools we use to analyze and discover this data are still in a rather disorganized state, particularly in comparison to other branches of astronomy, + +--- + + +## Page 3 + +where a higher level of mathematical rigor is employed in data analysis and discovery. + +I'd like to spend my summer working on this project because I think that through integration of standards such as WCS and exploitation of powerful data structures such as NDCube or xarray, we can make solar radio data more accessible to the global research community. My objective is to make sure that a researcher's first experience with radiospectra is smooth, accurate, and physically intuitive. I am excited to use my developing skills in the scientific Python stack to build a foundation that makes life easier for heliophysicists all over the world. + +**Interest in OpenAstronomy:** + +My enthusiasm for OpenAstronomy really boils down to one thing: I want to make complex solar data easier to use. I've always thought that good science shouldn't be hindered by bad software and by seeing OpenAstronomy's goal of creating a unified, open-source toolkit for all is something I find incredibly inspiring. + +By contributing to the PR #164 really opened my eyes, though. It's not just about writing code, it's about realizing how much opportunity there is to learn and to improve the tools heliophysicists use every day. I'm motivated to help radiospectra move towards a coordinate-aware system because I believe researchers should focus their time studying the sun, + +--- + + +## Page 4 + +not array indexing. But beyond all of that, I think the help I've received and will receive in the near future from the community from both GitHub and from the Matrix channels have made me feel motivated , and I'm very excited to contribute and learn from this project and community. + +## Project Proposal Application: + +**Project Title:** Improving radiospectra's Functionality and Interoperability + +**Organisation:** [SunPy] Sunpy organisation + +**Mentors:** samaloney, hayesla + +**Project Size:** Large (350 hours) + +## Project Overview: + +### Abstract: +The sunpy/radiospectra package is the fundamental tool for analyzing radio data from the sun. The data models used in this module are not completely compatible with modern Python data models such as NDCube and xarray. This project will redesign the Spectra class to make it coordinate-based using Astropy WCS, thus + +--- + + +## Page 5 + +providing full interoperability within the SunPy framework. I will also develop a comprehensive background subtraction mechanism and optimize the discovery of metadata using optimized remote header peeking, as I did in my PR. + +**Problem Statement:** + +Presently, the radiospectra tool has three limitations that must be addressed: + +1. **Non-Coordinate-Aware Slicing:** User requires manual computation of array indices based on time and frequency. +2. **Inaccurate Metadata Discovery:** Current Fido clients often rely on filename parsing, resulting in missing or incorrect search results (e.g., missing End Times for e-Callisto). +3. **Fragmented Analysis Tools:** Common tasks like background subtraction lack a standardized, extensible API capable of robustly handling RFI and data gaps through intelligent masking. + +**Technical Implementation:** + +1. **Coordinate-Aware Data Structures (NDCube/xarray):** + + * Implement coordinate-aware data structures using NDCube and xarray to enable automatic slicing based on time and frequency coordinates. + * This will allow users to slice data without manually computing array indices, making the tool more user-friendly and less error-prone. + +--- + + +## Page 6 + +The major objective is to replace the current Spectrogram class with a new Spectra object.Data structures that can be used: + +i. NDCube: Evaluating its performance in WCS-aware slicing and its integration with SunPy. + +ii. Xarray: Evaluating its performance with labeled dimensions and metadata-rich data sets. + +
| NDCube(SunPy/Astropy) | +xarray(PyData ecosystem) | +
| WCS Support as native integration with astropy.wcs, design for astronomy axes. | +It requires rioxarray or xoak for advanced WCS mapping. | +
| Metadata is stored in .meta dict,and can be lost during some slicing operations. | +Metadata are first class citizens and very persistent. | +
| Its core design goal is coordinate based slicing. | +Does label-based slicing. | +
| It fits perfectly into the SunPy ecosystem. | +Considered industry standard for multi-dimensional arrays. | +
| It has strong, native support for extra_coords and complex array masks for RFI. | +High, uses Numpy masked arrays or NaNs. It is very good for broadcasting operations across gaps. | +
| Period | +Tasks | +
|---|---|
| May 8 - May 20 (Community Bonding) |
+
+ 1. Connect with mentors and understand expectations for the project. + 2. Revisit radiospectra to understand the scope of porting and do analysis into NDCube and xarray for radio data structure. + |
+
| + |
+ 3. Familiarize with the internals of the core radiospectra code: Spectrogram legacy code, Fido search architecture, WCS coordinate systems. + 4. Discuss and finalize milestones, coding standards, testing strategies,and the new Spectra object structure. + |
+
|
+ May 25 – June 20 + (Coding Phase 1) + |
+
+ 1.Finalize Data Model: Decide on the underlying structure(NDCube/xarray) based on research. + 2. Core Implementation: Create the initial Spectra object with Astropy WCS integration for time/frequency mapping. + 3. I/O Enhancements: Generalize the “Remote Header Peeking” logic(PR #164) as a utility for all radiospectra clients. + 3. Document code and get early feedback from mentors via notebooks. + 4. Overall, completing this milestone. + 5. Drift Rate Characterization: Use of new coordinate-aware API + |
+
| + | for calculating frequency drift rate of solar radio bursts. For distinguishing between Type II and Type III solar bursts. | +
| June 21 - July 12 (Midterm Evaluation) |
+ 1. Coordinate Slicing: Complete the implementation of the code for slicing the data by physical coordinates. 2. Background Subtraction: Initialize the framework for noise reduction (Constant and Rolling-Median methods). 3. Ensure consistency with SunPy standards and Astropy units (MHz, GHz, s). 4. Visualization: Add matplotlib recipes for the new Spectra object to handle gappy or irregular data. 5. Prepare midterm documentation and submit progress reports for mentor evaluation. |
+
| July 13 - August 16 (Coding Phase 2) |
+ 1. Advanced Analysis: Develop energy-dependent variability and frequency-drift analysis modules. 2. Cross-Client Support: Add |
+
| + | 1.Integrate the optimized Fido search hooks to the Mexico City and Nobeyama clients. 3.Performance Optimization: Enhance memory usage and error catching for large FITS files. 4.Validation: Apply the new framework to synthetic and actual datasets from the e-Callisto network. 5.Continue writing unit tests and update documentation. |
+
| August 17 - August 31 | +1.Final performance benchmarking and stress testing of the Spectra object. 2.Refactoring: Replace all remaining legacy patterns with the new coordinate-aware implementation. 3.Final Deliverables: Deliver clean code, documentation, an "Example Gallery", and user tutorials. 4.Write the final GSoC blog post and usage guide for the radiospectra community. |
+
| Post-GSoC | +1.Work on further integrating this tool with other OpenAstronomy packages, e.g., ndcube and astropy. | +