Skip to content

GSoC 2023 Aryan Shukla

Nabil Freij edited this page Feb 22, 2024 · 2 revisions

Project Proposal

Student Information

Personal Details

Education

  • University: Indian Institute of Technology, Roorkee

  • Major: Metallurgical and Material Science Engineering

  • Current Academic Year: Third Year (6th semester)

  • Expected Graduation Year: 2024

Personal Background

I am a third-year undergraduate, and my passion for full-stack development and machine learning has driven me to immerse myself in the field. Over the past two years, I've honed my skills using Python, which I've come to love for its versatility and dynamic power.

Programming Experience

  • I received a Full Stack Development certification from my university and also participated in the Machine Learning Boot Camp organized by Amazon.
  • Most of my projects involve Python frameworks and libraries. Some are a 'blog web application,' an 'Asteroid diameter predictor,' and a 'Material classifier.'
  • I've worked with Git and GitHub for the past two years and am well-versed in using these essential tools to manage code and collaborate with other developers.

Contribution to the SunPy Project

  • As per sunpy's GSoC requirement, I have opened two pull requests in sunkit-image
  • #137 that adds persistence transform example to the gallery,
  • #139 that declasses the asda.py
  • I have been contributing to the broader SunPy project. One merged pull request,    #6854, adds a query to sort the event type by magnitude.
  • Also, I have two ongoing pull requests, #6843, which adds type hints with single dispatch, and #6842, which provides a "millionths of solar hemisphere" unit.

Open-Source Experience

I have experience working with open-source software, an excellent way to learn new skills and collaborate with other developers. I've contributed to several open-source projects, including    AstroPy, where I helped to explain masked arrays in  sigma_clip. I've also used open-source software extensively in my work. For example, I used  pymatgen for the Material classifier.

Project Title: sunkit-image and integration with sunpy

Mentor: Nabil FreijWill Barnes

Abstract

The sunkit-image library, designed for analyzing images in solar physics, was developed as part of a previous GSoC project. The initial design of the library involved functions that took a numpy.array as input and returned a numpy.array as output, which was later recognized as a mistake for the public API. One of the key objectives of the SunPy Project is to ensure seamless interoperability between packages, which necessitates the ability to pass a sunpy.map.Map as input to a function and receive a sunpy.map.Map as output. This project aims to address this issue by enhancing the Sunkit-image library's functionality to enable the use of sunpy.map.Map in its functions, ensuring consistency with the SunPy Project's overarching goals.

My motivation

Since childhood, I have had a deep-seated desire to explore the world and positively impact it. This passion has driven me to pursue this project that enables researchers to analyze and process solar images in a more efficient and automated manner. I was particularly drawn to this project as it merges my interests in image analysis and astronomy. I was part of my university's Physics and Astronomy Club, where I learned about OpenAstronomy libraries and used them in my work. This experience can help me contribute to a project in OpenAstronomy. With a track record of contributing to open-source, I have the skills to utilize Python in the real world. I began working on this project before the GSoC organizations were even announced. I aspire to join the Open Astronomy community and continue contributing to it in the long run.

My Goals

There are four major tasks and some optional tasks that need to be done during the GSoC coding period. If everything goes according to the timeline I have proposed, a little below, I will have enough time to complete the primary tasks and get my hands on the optional job. The four primary tasks are

  • Inconsistent input types across functions.

Overview A refactoring process is required to modify certain functions to accept and return a sunpy.map.Map object instead of a numpy array. This will improve the usability and consistency of SunPy's API, as the sunpy.map.Map object provides several useful features for handling and manipulating solar data. This change will make it easier for users to work with map objects throughout their workflows without the need for frequent conversions between numpy arrays and map objects.

Deliverables A working implementation on a few functions, written by David Stansby. This implementation can be applied to most of the remaining functions. Examples need to be updated to demonstrate the updated functions. Also, integration of the decorator into documentation is required after refactoring.

  • Refactor the coalignment module.

Overview The update regarding the coalignment module in sunkit-image where code from two different sources: sunpy.image.coalignment and sunpy.physics.solar_rotation were patched into one. Both code snippets offer methods for co-aligning images, but the API is currently disorganized. To improve usability and eliminate duplicate code, a decision must be made on how users should interact with this code.

Deliverables For the API issue David Stansby made a pull request that made a bunch of coalignment API private. As per this comment by Will Barnes one possibility is to create a single mapsequence_coalign function with various keywords and different internal helper functions to select the desired co-alignment method. Also, a refactoring process is required to remove duplicate code, and this module requires proper documentation.

  • Add a coalignment example to the gallery.

Overview The SunPy gallery currently features several examples of coalignment between two images using the reproject method. However, the sunkit_image.coalignment subpackage contains a significant amount of code for image alignment based on cross-correlation between a layer and a template using the skimage.feature.match_template function, rather than reprojection using information about the WCS. With numerous functions in this subpackage, a gallery example would help guide users on how to utilize them effectively.

Deliverables As mentioned by David Stansby in the comment, some examples could highlight the uses of reproject in conjunction with the co-alignment functionality like cross-correlation. Upon reviewing the statement made by Jack Ireland, I have examined the image registration algorithm, which appears to be a valuable tool for co-aligning images of the same size.

  • Add persistence transform example to the gallery.

Overview The gallery should include some examples of basic operations that can be performed on maps. These operations will consist of persistence transform maps and mapsequences and overplotting of multiple maps in the same matplotlib Axes instance. Despite being straightforward, these examples represent commonly used operations in solar physics research.

Deliverables Prateek Chanda had initially written an implementation requiring multiple changes since it was made using MapCube, which was later changed to MapSequence after this implementation. I have already started the example as a part of my pull request.

The optional task includes performance profiling of the current functions to find bottlenecks and improve performance where possible.

Timeline

Time Period My Work Plan

Community Bonding Period

(May 4 – May 28)

- Reread the documentation to make myself familiar with all functionalities already present.

- Scope out the functions that need refactoring.

- Go through the coalignment module to scope out what needs to be refactored.

- Learn about scikit-images, which will be helpful later.

- Collect the resources required for the coalignment example.

- Discuss with mentors the resources required for examples.

Week 1 – Week 2

(May 29 – June 11)

- Refactor most of the functions along with the test and API.
Week 3 - Week 4 (June 13 – June 26) 

- Continue refactoring.

- Ensure that tests and API are updated.

- If necessary, update examples and documentation

Week 5

(June 27 – July 2)

- Add persistence transform example to the gallery.

- Refactor the coalignment module.

Week 6

(July 3 – July 9)

- Complete refactoring of the coalignment module.

- Test it thoroughly, along with documentation.

July 10 – July 14 1st Evaluation

Week 7

(July 14 – July 20)

- Integrate the resources for example.

- Add the coalignment example to the gallery.

Week 8

July 21 – July 25

(5 Days)

Review Period

- Make appropriate modifications to the code based on the feedback and suggestions provided by the reviewers

- Complete the remaining tasks, which might not have been completed till now.

- Make sure all the primary tasks are taken care of.

Week 9 - Week 10

(August 1 – August 10)

- Perform performance profiling of the current functions to find bottlenecks.

- Improve performance where possible.

Final Week 

(August 11 – August 16)

- Wrap up everything, and make sure everything is working.

- Incorporate the feedback and suggestions provided by the reviewers to make necessary modifications to the code.

GSoC

I am a first-time applicant for the GSoC program. I am solely applying for the project 'sunkit-image and integration with sunpy'. I have no other commitments or vacation plans during the summer and am not concurrently participating in any internships. I am committed to dedicating at least 20 hours per week to this project. In case of any potential travel-related disruptions, I will inform my mentors in advance and take measures to compensate for the missed work. Additionally, I am eligible to receive payment from Google.

Clone this wiki locally