Adapting Kurucz to SpectrumFactory and what is next ?
After my first pull request I received some feedback.
Optional and major changes were requested. The most important changes were that my code should better integrate the existing Radis code. Indeed, though I added a new database with Kurucz, its API remained distinct which is something which will make Radis progress toward a common API.
Another key remark was that my code didn’t take into account the Broadening effects that modify the lineshapes.
This is why I had a Team meeeting with my mentors to discuss the physics behind the code. It helped me a lot to understand what was expected.
After this I worked on adding broadening and merging the new AdB Kurucz with SpectrumFactory. In order to do so, I worked on an example which allows to plot a spectrum using the Kurucz atomic data and SpectrumFactory. My first attempt was to use one of the existing Radis formats for databanks named hdf5-radisdb since I worked with hdf5 files in my Class.
This attempt happened to be too difficult because the formats were made for molecules and too many columns of my dataframe were different from the expected columns.
This is why I eventually decided to add a new format named “kurucz” to the load_databank method which allows to load the kurucz data with the proper form.
Then, I worked on the eq_spectrum method to adjust it to this newformat.
I added some methods and adapted methods from Exojax to handle linestrength computation, broadening,convolution,pressure layers and create a Spectrum Object. It took me a lot of efforts and I modified many files as Broadening.py, Base.by,Factory.py or loader.py.
However, the results of the Spectrum I obtained were not convincing and some parameters and units didn’t fit properly.
Moreover, by the time I wrote this spectrocopy code, I fell behind in my project, that’s why we organized a long meeting with one of my supervisors in order to take stock, we adjusted the objectives of the project.
We gave up the last one about adding the CIA database and agreed on the following timeline :
- finishing with SpectrumFactory for Kurucz ASAP
- Moving to NIST
- Then working on the DatabaseManager Class architecture and adapting to AdB and MdB manager subclasses
- Moving to the TheoreTS ( it will require to reach people in Reims to fix the db that I still cannot access).
- Working on developing an example during the last week to show what applications the atomic spectra physics brings.
We also noticed that I had written my Spectrum Factory example from the beginning rather than using the existing radis methods which is why I lost time and it was unaccurate. However, the meeting brought me the right guidelines and working on this code allowed me to getting a better understanding of the architecture and adapting the example to the existing structure of the code should be easier now. We also discussed about a few existing codes which could be a could starting point for adding NIST to Kurucz.
The next weeeks will take me a lot of time and effort to complete the objectives but in the end, I am happy that we had this meeting because it unblocked me when I was kinda stuck with Kurucz for a while.