<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="http://code29563.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="http://code29563.github.io/" rel="alternate" type="text/html" /><updated>2024-08-25T12:02:15+00:00</updated><id>http://code29563.github.io/feed.xml</id><title type="html">code29563’s site</title><subtitle>just another site</subtitle><author><name>code29563</name></author><entry><title type="html">A summary</title><link href="http://code29563.github.io/A-summary/" rel="alternate" type="text/html" title="A summary" /><published>2024-08-25T00:00:00+00:00</published><updated>2024-08-25T00:00:00+00:00</updated><id>http://code29563.github.io/A-summary</id><content type="html" xml:base="http://code29563.github.io/A-summary/"><![CDATA[<p>RADIS describes itself as <a href="https://radis.readthedocs.io/en/latest/">‘a fast line-by-line code for high resolution infrared molecular spectra’</a>. My project focussed on adding support for atomic line databases to RADIS, which has up till now catered only for molecular databases. Atomic lines differ significantly from molecular lines in how they are affected by Lorentzian broadening and how non-equilibrium spectra are handled.</p>

<p>The main goal was <a href="https://github.com/radis/radis/pull/652">adding support for the Kurucz atomic database</a>, which is now complete. This laid the basic structure for adding new atomic databases, and <a href="https://github.com/radis/radis/pull/689">a PR is now open for adding NIST</a>.</p>

<p>A number of side issues have arisen throughout the course of the project and been tended to within those PRs, whereas independent issues and PRs have been opened for other issues:</p>
<ul>
  <li>The non-equilibrium linestrength calculation for both atoms and molecules now <a href="https://github.com/radis/radis/pull/676">uses the Einstein Coefficient instead of the reference linestrength</a>, thereby allowing weaker spectra to be seen</li>
  <li><a href="https://github.com/radis/radis/issues/661">The issue was also raised</a> as to whether RADIS should be automatically modifying the user config file, and if so then how. That has been tended to in the Kurucz and NIST implementation so far and could be expanded to the molecular databases too.</li>
  <li><a href="https://github.com/radis/radis/pull/675">fixing the removal of ‘object’ type columns from the line dataframe</a></li>
  <li><a href="https://github.com/radis/radis/issues/666">Debugging a docstring example that didn’t actually work</a></li>
</ul>

<p>Prior to the project starting, <a href="https://github.com/radis/radis/pull/646">a PR</a> was also opened to allow users to specify the minimum linestrength at which to cut off weaker lines by specifying them as the weakest x% of lines.</p>]]></content><author><name>code29563</name></author><category term="GSoC" /><summary type="html"><![CDATA[RADIS describes itself as ‘a fast line-by-line code for high resolution infrared molecular spectra’. My project focussed on adding support for atomic line databases to RADIS, which has up till now catered only for molecular databases. Atomic lines differ significantly from molecular lines in how they are affected by Lorentzian broadening and how non-equilibrium spectra are handled.]]></summary></entry><entry><title type="html">Implementing the NIST database</title><link href="http://code29563.github.io/Implementing-the-NIST-database/" rel="alternate" type="text/html" title="Implementing the NIST database" /><published>2024-08-12T00:00:00+00:00</published><updated>2024-08-12T00:00:00+00:00</updated><id>http://code29563.github.io/Implementing-the-NIST-database</id><content type="html" xml:base="http://code29563.github.io/Implementing-the-NIST-database/"><![CDATA[<ul>
  <li>The Einstein A coefficient is now used directly for calculating the non-equilibrium linestrength, given that it is calculated anyway for non-equilibrium spectra where it isn’t already present, rather than removing the temperature-dependent component of the reference linestrength, which was found to result in some atomic spectra not appearing. This also removes the need to calculate the reference linestrength for databanks where it’s not already present.</li>
  <li>Removed some redundnant code and miscellaneous fixes and improvements.</li>
  <li>Fixed the documentation for many parts of the new code for atomic spectra so the formatting appears correct on Read the Docs.</li>
  <li>The pull request for the implementation of the Kurucz database has been merged</li>
  <li>Work has started on adding support for the NIST atomic database and it is currently at a stage where it produces working spectra.</li>
</ul>]]></content><author><name>code29563</name></author><category term="GSoC" /><summary type="html"><![CDATA[The Einstein A coefficient is now used directly for calculating the non-equilibrium linestrength, given that it is calculated anyway for non-equilibrium spectra where it isn’t already present, rather than removing the temperature-dependent component of the reference linestrength, which was found to result in some atomic spectra not appearing. This also removes the need to calculate the reference linestrength for databanks where it’s not already present. Removed some redundnant code and miscellaneous fixes and improvements. Fixed the documentation for many parts of the new code for atomic spectra so the formatting appears correct on Read the Docs. The pull request for the implementation of the Kurucz database has been merged Work has started on adding support for the NIST atomic database and it is currently at a stage where it produces working spectra.]]></summary></entry><entry><title type="html">Implementing non-equilibrium spectra</title><link href="http://code29563.github.io/Implementing-non-equilibrium-spectra/" rel="alternate" type="text/html" title="Implementing non-equilibrium spectra" /><published>2024-07-29T00:00:00+00:00</published><updated>2024-07-29T00:00:00+00:00</updated><id>http://code29563.github.io/Implementing-non-equilibrium-spectra</id><content type="html" xml:base="http://code29563.github.io/Implementing-non-equilibrium-spectra/"><![CDATA[<ul>
  <li>Support has been added for non-equilibrium spectra. Comparisons with SpectraPlot are still showing discrepancies, the source of which is not yet resolved.</li>
  <li>References have been added for the Kurucz databank</li>
  <li>Miscellaneous minor improvements and fixes in the code and docs</li>
</ul>]]></content><author><name>code29563</name></author><category term="GSoC" /><summary type="html"><![CDATA[Support has been added for non-equilibrium spectra. Comparisons with SpectraPlot are still showing discrepancies, the source of which is not yet resolved. References have been added for the Kurucz databank Miscellaneous minor improvements and fixes in the code and docs]]></summary></entry><entry><title type="html">Finishing up equilibrium spectra</title><link href="http://code29563.github.io/Finishing-up-equilibrium-spectra/" rel="alternate" type="text/html" title="Finishing up equilibrium spectra" /><published>2024-07-14T00:00:00+00:00</published><updated>2024-07-14T00:00:00+00:00</updated><id>http://code29563.github.io/Finishing-up-equilibrium-spectra</id><content type="html" xml:base="http://code29563.github.io/Finishing-up-equilibrium-spectra/"><![CDATA[<ul>
  <li>Tests have been added for the implementation of the Kurucz database and associated parts of the code</li>
  <li>Examples have been added relating to the Lorentzian broadening of atomic lines and partition functions.</li>
  <li>The function to parse Kurucz linelists has been re-written based on Pandas.</li>
  <li>The precision of some parts of the code has been improved by using <code class="language-plaintext highlighter-rouge">numpy.expm1</code> rather than <code class="language-plaintext highlighter-rouge">numpy.exp</code>, thereby showing weaker spectra that otherwise weren’t being seen</li>
  <li>Support has been added for loading existing databanks of atomic species without specifying the species initially.</li>
  <li>A greater range of formats are now accepted as input to specify the species for which to calculate a spectrum.</li>
  <li>Documentation for atomic spectra and the Kurucz database has been updated further</li>
</ul>]]></content><author><name>code29563</name></author><category term="GSoC" /><summary type="html"><![CDATA[Tests have been added for the implementation of the Kurucz database and associated parts of the code Examples have been added relating to the Lorentzian broadening of atomic lines and partition functions. The function to parse Kurucz linelists has been re-written based on Pandas. The precision of some parts of the code has been improved by using numpy.expm1 rather than numpy.exp, thereby showing weaker spectra that otherwise weren’t being seen Support has been added for loading existing databanks of atomic species without specifying the species initially. A greater range of formats are now accepted as input to specify the species for which to calculate a spectrum. Documentation for atomic spectra and the Kurucz database has been updated further]]></summary></entry><entry><title type="html">Partition functions</title><link href="http://code29563.github.io/Partition-functions/" rel="alternate" type="text/html" title="Partition functions" /><published>2024-06-30T00:00:00+00:00</published><updated>2024-06-30T00:00:00+00:00</updated><id>http://code29563.github.io/Partition-functions</id><content type="html" xml:base="http://code29563.github.io/Partition-functions/"><![CDATA[<p>Support has been added for the species-specific partition functions that are usually included along with the new linelists. In doing so, a new config parameter was added to allow the user to enable RADIS to automatically modify the local database files and update the config file accordingly.</p>]]></content><author><name>code29563</name></author><category term="GSoC" /><summary type="html"><![CDATA[Support has been added for the species-specific partition functions that are usually included along with the new linelists. In doing so, a new config parameter was added to allow the user to enable RADIS to automatically modify the local database files and update the config file accordingly.]]></summary></entry><entry><title type="html">Stark broadening and the Common API</title><link href="http://code29563.github.io/Stark-broadening-and-the-Common-API/" rel="alternate" type="text/html" title="Stark broadening and the Common API" /><published>2024-06-23T00:00:00+00:00</published><updated>2024-06-23T00:00:00+00:00</updated><id>http://code29563.github.io/Stark-broadening-and-the-Common-API</id><content type="html" xml:base="http://code29563.github.io/Stark-broadening-and-the-Common-API/"><![CDATA[<p>Stark broadening for atomic lines has been implemented with different temperature scalings for neutral and ionised radiators.</p>

<p>I integrated the API for atomic Kurucz linelists into the Common API, and in doing so the issue related to <code class="language-plaintext highlighter-rouge">truncation</code> and <code class="language-plaintext highlighter-rouge">optimization</code> seems to have been resolved.</p>

<p>The main differentiating aspect so far in the Common API for Kurucz is that new versions of linelists and lab lines aren’t available for all species, the result being that the url from which to download the Kurucz linelist isn’t known with certainty before actually attempting to download it, so the possibilities are ranked and attempted in order of preference and the first to return a valid response is used.</p>]]></content><author><name>code29563</name></author><category term="GSoC" /><summary type="html"><![CDATA[Stark broadening for atomic lines has been implemented with different temperature scalings for neutral and ionised radiators.]]></summary></entry><entry><title type="html">The start</title><link href="http://code29563.github.io/the-start/" rel="alternate" type="text/html" title="The start" /><published>2024-06-10T00:00:00+00:00</published><updated>2024-06-10T00:00:00+00:00</updated><id>http://code29563.github.io/the-start</id><content type="html" xml:base="http://code29563.github.io/the-start/"><![CDATA[<p>The first aim for this project is to add support for the atomic Kurucz database to RADIS. A <a href="https://github.com/radis/radis/pull/601">PR</a> containing previous work done on this provides a starting point. Much use had been made of code from the ExoJax project, which had already implemented support for the Kurucz database and with which RADIS is pursuing a common API.</p>

<p>After examining the work done so far in that PR, I merged it onto the latest <code class="language-plaintext highlighter-rouge">develop</code> branch with few conflicts to resolve. There are a number of errors and/or placeholders in the previous code that are gradually being corrected.</p>

<p>I began looking into an outstanding issue from the previous work which was implementing Lorentzian broadening for atomic lines, as RADIS has previously catered mainly for molecular databases. ExoJax provides <a href="https://github.com/HajimeKawahara/exojax/blob/78466cef0170ee1a2768b6a6f7b7c911d715c1bd/documents/userguide/atomll.rst#broadening-parameters">5 functions to choose from</a> for this, the results of which can <a href="https://github.com/HajimeKawahara/exojax/blob/920bce49e9bf30c33b5d349425dc9b837237974f/tests/endtoend/metals/opacity_Fe_test.py#L59">differ from each other by up to an order of magnitude</a>. The <code class="language-plaintext highlighter-rouge">gamma_vald3</code> function is the one regularly used in ExoJax and we chose to use it as a basis for the default function in RADIS. I have been reviewing its handling of Stark broadening in particular as some corrections were required.</p>

<p>Considering the numerous different formulae that have been proposed for Lorentzian broadening of atomic lines, and the significantly different results they produce, I also added a parameter in the <code class="language-plaintext highlighter-rouge">SpectrumFactory</code> class for a user to specify their own function to use instead of <code class="language-plaintext highlighter-rouge">gamma_vald3</code>. I also added a similar parameter in <code class="language-plaintext highlighter-rouge">calc_spectrum</code> (a typical entry point for the end user) for a user to specify a class to use in place of <code class="language-plaintext highlighter-rouge">SpectrumFactory</code>, which allows them even more flexibility and control over other parts of the spectrum calculation too.</p>

<p>I started a PR for this project to enquire about <a href="https://github.com/radis/radis/pull/652#issuecomment-2141212791">an issue</a> related to the <code class="language-plaintext highlighter-rouge">truncation</code> parameter used in calculating the lineshape and the differing results depending on the choice of <code class="language-plaintext highlighter-rouge">optimization</code> method.</p>

<p>I’ve also been looking into third-party tools to generate plots of spectra for the same atoms for comparison with the results being generated in RADIS and to potentially indicate through any discrepancies whether there’s an error to be resolved.</p>]]></content><author><name>code29563</name></author><category term="GSoC" /><summary type="html"><![CDATA[The first aim for this project is to add support for the atomic Kurucz database to RADIS. A PR containing previous work done on this provides a starting point. Much use had been made of code from the ExoJax project, which had already implemented support for the Kurucz database and with which RADIS is pursuing a common API.]]></summary></entry></feed>