Benchmark Tests

I have finished the refactoring the code for vaex and also writtten test cases to compare the spectrum calculated using pandas with the dataframe calculated using vaex dataframe . Also, Various spectroscopic quantities as absorbance , emissitivity is also compared for the both the dataframams. Also, there was many issues that was raised by the maintainers and I have resolved almost all of these , and commented on the other issues to discuss the problem and discuss some possible solution .Issues raised by the maintainers was mainly related to make changes more matainable and easy to understand and simple programming logic is preferred inplace of using some complex code without explaining that in detail. Also , the issue was to ensure a light test suite , that is test cases which takes less resources and time . Initialy , I didn’t focused on this thing and focused on testing the code and changes more elaborately by writing the test cases that cover many areas of code .

Read more…

GSoC Week 9-10

Big progress on the front of algorithm working. Turns out there wasn't that much of a problem in the algorithm. I just had to subtract the mean from the data before taking the fourier transform. The Lomb Scargle seems to work on data that has mean subtracted from it. Furthermore they dont seem to work that well or at all in full spectrum.
The LSFT also is highly sensitive to the time intervals that are input to it. I have found some more clues as to how to make it even better. I will expound upon this further within 2 weeks since my final exams are going on and I have limited time.

Read more…

Docs and Marty and the Moving Around of Code and Tests

Since the last post, I worked on the moving-the-code task. Me, Nabil and Alasdair got on a call to discuss what should go where and I ended up creating a scraper_utils.py file to complement the scraper.py file. The other options were moving the functions to .util.net or inside the scraper.py file but outside the Scraper class. After I moved the tests as well, I wrote new tests, increased test coverage and renamed some functions which were previously named in the JavaScript-style CamelCase. I also added and extended doc-strings to some functions which could use some updating and made fixes as asked in Code-Reviews.

Read more…

Progress on Kurucz and NIST databases

Since the last article, I received a lot of feedback and comments about the Kurucz PR.

Here is and example of a Fe_I spectrum I can obtain with these conditions.

The main remarks where that :

I needed to adjust the code to make it more general and user friendly. I introduced a specie argument to SpectrumFactory and calc_spectrum to replace atom and molecule and gather them under a same name.

Read more…

Adapting Kurucz to SpectrumFactory and what is next ?

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.

Read more…