My GSoC Journey - Part 4

Writing the extension modules and Python wrappers for a package is one thing, but a step that is often overlooked is making a build system that complies with the rest of your program, ensures the correct installation based on your dependencies and also is portable enough to be distributable.

I learned these things the hard way in Week 3 and 4, where I went as low level as I could to try to solve all the weird build errors and glitches I had while trying to build a Python Package using GNU Autotools.

Read more…

GSoC 2022: Project Helioviewer — Facade for the API wrapper

GSoC 2022: Project Helioviewer — Facade for the API wrapper

Week 3

The Generic Function got merged with PR #21. This PR adds a function that accepts a URL Endpoint, Input Parameters (dictionary), and a descriptor of Output Parameters (what the endpoint is expected to return), which all the endpoint classes will inherit.

This PR also includes the unittest for the Generic function and brings the first endpoint to the API wrapper, which is getJP2Image. This endpoint retrieves a JP2000 image from the helioviewer.org API.

Week 4

The next task was to create a frontend for the getJP2Image endpoint. The actual front end that users will interface with lives in a file called facade which will hide this internal design. This module contains the API interface in its simplest form. It is responsible for taking user input, constructing the HvpyParameters instance (the base class) and passing it to the core to perform the request.

Read more…

Fifth week - Major updates on literally everything, and non-LTE benchmarking

JSON sample

1. Fitting method benchmarking

The ideal of benchmarking result is to test and assess under what conditions, such as fitting method, pipeline, refinement, etc., the fitting process can achieve a stable and robust result. Firstly, I want to test the fitting method and see which ones are the best to put into the module as the default method. As we use LMFIT.Minimizer, we have 23 fitting methods in total:

Read more…

Fourth week - Intensive benchmarking process for LTE spectra

As my fitting module has completed, now I am clear to start the benchmarking process. Initially, I planned to do it on 4 categories: large, small, LTE and non-LTE. But then, Mr. Erwan’s words helped me realize that my classification was somehow not ideal for this, as he said:

The first need is not fitting performance, its a good fitting interface they would work on every typical condition.

Read more…

GSoC @ Stingray: Begining of the journey. blog #1

Hey there! It has been about 15 days since I had written my last blog. It is time for the next one. In this blog, I will write about my experience in GSoC so far. I want to tell you about how I selected my project, how I prepared my project proposal, and what did I do after getting selected.

How did I select the organization?

So, let’s start from the beginning! I started considering to apply in GSoC in late February. I first came to know about GSoC just a few months back. My knowledge about GSoC and open-source was quite limited. One of the first things that I did was to go through the GSoC website and learn more about the program. Being a beginner in the open-source community and also coming from a non-CS background I had no idea which organizations take part in GSoC and which of them would be most suitable for me. At this time, the mentoring organizations for GSoC”22 were not announced. I decided to check out mentoring organizations from past programs to get an idea. I wanted to work on a project that involve Physics or Astrophysics, and to my surprise, several such organizations did take part in previous programs.

Read more…

Third week - Finalizing fitting module after long days of struggling

To be honest, I started this week realizing I was far behind the deadline. After suffering a traumatizing fever which incapacitated me for one week, I had a fitting module which did not run correctly. Starting this week, the JSON parsing worked normally, but for some reasons the fitting process kept plummeting the Tgas value either to very high or very low guesses, always out of the boundaries. What are they trying to seek? I don’t know. So, I have spent this third week trying my best to fix the fitting module and make it run normally:

  • At first, I suspected this was a fault in the return of cost function, so I tried either get_diff() or get_residual(). The fitting process varied between the two approaches, but in the end the plummeting value prevailed.
  • Read more…

GSoC Blog #1

Its time for my first blog during the coding period! We are into our 3rd week in the coding period, and already the journey is getting exciting, a little challenging, of course, but I am enjoying it. As I had mentioned in the earlier blog, I started the initial week with implementing the helper functions, Fourier analysis, and tests related to them from Python to Julia. By god, it was not an easy way through.

Dealing with tests

I started by understanding what the functions inside fourier.py did and quickly realized that without running tests, I would have a hard time working out the insides of some of the methods. I thus, started writing functions is Julia, understanding the parameters and their types and using external packages like ResumableFunctions or Statistics wherever necessary. After implementing normalizations for arrays, I worked on tests where the problems began. Out of Index errors, types not supported, and the same functionality implemented differently in Julia and Python started to take most of my time.

Read more…