Project: “Expansion of the TARDIS Atomic Database”
Organization: The Python Software Foundation – TARDIS-SN
Mentors: Wolfgang E. Kerzendorf, Christian Vogl, Andreas Flörs
TARDIS is a Monte Carlo radiative transfer code for simulating supernovae spectra. The associated package Carsus retrieves atomic data from multiple sources and stores it into an SQL database. It also takes care of making atomic files suitables for TARDIS.
During the last three months I’ve been working alongside the TARDIS team. It was an incredible opportunity to learn about open source software development and improving my coding skills.
The work I did on these two packages during this summer can be summarized in the following way:
Making TARDIS available for the Anaconda distribution. Ease of installation is always desired, and the Anaconda distribution is a convenient way of distributing scientific software. My first task was to package TARDIS following the
conda-forge guidelines. This was specially useful because allowed me to know more about the TARDIS dependencies.
Porting Carsus to Python 3. Carsus was written in Python legacy before GSoC 2019. Migrating to Python 3 was an important and time consuming task. It was specially difficult because updating dependencies introduced small bugs hard to trace (“the devil is in the details”). Also was extremely useful because I got familar with the entire Carsus codebase.
Continuous Integration. Set up a pipeline in Travis CI for Carsus. It was my first approach to the CI/CD technologies.
Parsers for the CMFGEN atomic database. The CMFGEN database consists of thousands of text files with atomic measurements. I focused on parsing three different file types: energy levels & oscillator strengths, collisional strengths and photoionization cross-sections. Also, the first two types have ~5 slighty different formats. This code was mostly written using the Pandas library. Includes unit tests and integration with the CI pipeline.
New parsers for NIST and Knox’s Long zeta. At this point the idea was to allow Carsus to create TARDIS atomic files without storing data in a SQL database. These new parsers can read and dump data straight to HDF5.
Up-to-date Carsus documentation.
Other fixes and improvements.
New module for creating TARDIS atomic files. This module retrieves atomic data with the new parsers and creates TARDIS atomic files using only Pandas. Files made with this module are consistent with the ones created from an SQL database.
Pull requests: #148
In order to have atomic files identical to the ones obtained with the Carsus SQL database, we need to add the Chianti source.
Carsus documentation: https://carsus.readthedocs.io
Python GSoC 2019 blog: https://blogs.python-gsoc.org/en/epassaros-blog/
* Pull requests still open at 26/8/2019. A complete list of PRs made during the entire GSoC 2019 period can be found here.