My Journey to Python Package Development for Astronomy

I got a chance to participate in the CODE/ASTRO, a Software Engineering Workshop for Astronomy remotely last year. But due to the last year's protest against the tyrant Hasina regime, and internet blackout for days, I was unable to attend the workshop. This year, I was determined to not miss it.

The workshop requires a team of 3 people. I was searching for a team who had a good knowledge on exoplanets. Neha saw my message in discord and she was looking for a team too. She had an idea to develop a Python package for Exoplanet's atmosphere modelling at Multi-Wavelength using different instruments. This would make a useful tool for astronomers who are working on exoplanet atmospheric studies. The idea felt tempting to me and the next second I was in the team. Then Evan joined us who also had a background working on exoplanet atmosphere.

Well, I worked on transiting exoplanets before, but I had no idea about the atmospheric modelling. I was a bit nervous at first, but Neha and Evan were very supportive. The workshop starts at 8:00 PM (BST) and goes on till 11:00 PM. They taught us about version controlling using Git, how to write packages, how to create a neat documentation, how to write good tests and how to publish the package on PyPI. Our instructors Dr. Sarah Blunt and Dr. Jason Wang were so much good at teaching. They made sure that we understood everything and were always there to help us. And the memes! LOL! Those (nerdy) memes made me laugh so much.

Group Photo
Group Photo from CODE/ASTRO 2025.

Every night, after the workshop, our team would sit together and discuss about the plans to develop the package. Primarily Neha and Evan developed the core framework of the package. I was responsible to convert their code into a object oriented design. I also wrote the documentation and tested the package using spectra of WASP-39b obtained from JWST's NIRISS and NIRSpec PRISM instruments.

The fun part was we had a time zone difference of around 12 hours. Neha and Evan was in the US and I was sitting in Bangladesh. At the last day of CODE/ASTRO, we were developing the package and the tests were failing on my computer but it was running successfully on Neha's computer. It was around 2:00 AM in Bangladesh and I was so sleepy. Neha told me to go to sleep telling me that everything will be fine. I woke up in the morning, tried to run the tests and guess what? Nah, the tests were still failing.

But then I saw that it wasn't a issue from our code. The .par file the code supposed to run was large enough for github to not download the data from the .par file. That's why the .par was showing an error. I fixed the issue and finally we were able to run the tests successfully. Neha and Evan were sleeping at that time. I also completed the documentation and published the package on PyPI. We had to hurry because we had to present our package get it installed by another team by today. Around 6:00 PM, Neha and Evan woke up and saw that everything was successfully running, were at relief.

ExoMAFT Doodle
Neha had created a cute doodle for our package now called ExoMAFT (Exoplanet Multi-Wavelength Atmospheric Feature Tracker).

What the package does is, it takes the spectra of an exoplanet using different instruments and then it concatenates the spectra to create a spectrum that covers a wide range of wavelengths. Then it uses the spectra to find the atmospheric features of the exoplanet like which molecules are present the atmosphere of that planet. It also calculates a cross correlation function to find the significance of the atmospheric features. The package is now available on PyPI and can be installed using pip install exomaft.

The workshop ended but this isn't the end. We are now focusing on making this package more user friendly and also add more functionalities to it. You can raise a issue to our repository NehaDushyanthaKumar/Exo-MAFT