Skip to content

Commit

Permalink
include NIST natural broadening
Browse files Browse the repository at this point in the history
  • Loading branch information
sigrimm committed Jun 12, 2020
1 parent c2968e9 commit c74333f
Show file tree
Hide file tree
Showing 85 changed files with 3,201,206 additions and 46 deletions.
4 changes: 2 additions & 2 deletions check/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
print('TestNIST001', file = f)
os.system('pwd')
er = os.system('python3 ../../nist_ELevels.py -Z 26 -I 0')
er = os.system('python3 ../../nist_ELevels2.py -Z 26 -I 0')
er = os.system('python3 ../../nist_partition.py -Z 26 -I 0')
er = filecmp.cmp('NIST2600.pf', '../../data/NIST2600.pf')
Expand All @@ -163,7 +163,7 @@
if(er == False):
success = 0
er = os.system('python3 ../../nist_Lines.py -Z 26 -I 0')
er = os.system('python3 ../../nist_Lines3.py -Z 26 -I 0')
er = os.system('python3 ../../nist_Lines2.py -Z 26 -I 0')
er = filecmp.cmp('NIST2600.param', '../../data/NIST2600.param')
print("error", er)
Expand Down
2 changes: 2 additions & 0 deletions docs/helios_k/bins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ from small to large, and mapped to a new parameter y, rangin from 0 to 1.
When the opcity function has empty parts inside or is not ranging to the full
bin width, then the sorted opacity function is zero (or kmin, if used) on the
lower part.


| Relevant parameters for this example:
- doResampling = 0
Expand Down
57 changes: 28 additions & 29 deletions docs/helios_k/compilation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,46 +10,45 @@ Requirements
- exomol.py and exomol2.py

- bs4
- requests
- sys
- os
- subprocess
- numpy
- argparse
- math
- bs4
- requests
- sys
- os
- subprocess
- numpy
- argparse
- math

- Kurucz2.py

- numpy
- math
- struct
- os
- argparse
- numpy
- math
- struct
- os
- argparse

- nist_ELevels.py and nist_Lines.py
- nist_ELevels2.py and nist_Lines3.py

- sys
- time
- pyperclip
- subprocess
- selenium
- argparse
- sys
- argparse
- csv
- requests

- nist_partition.py

- numpy
- sys
- argparse
- numpy
- sys
- argparse

- nist_Lines2.py

- numpy
- struct
- math
- csh
- pandas
- argparse
- numpy
- struct
- math
- csh
- pandas
- argparse
- re


Note, when using a computing cluster, all these libraries can be installed locally in the home directory with:
Expand Down
26 changes: 26 additions & 0 deletions docs/helios_k/cut.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Cut the line wings
==================


The line wings can be cut by the ``cutMode`` and ``cut`` parameters. Reasons
for cutting the line wings can either be that the line wings would be
overestimated, or just to save computing time. Line wings or cut at the
specified distance from their central peak location. Choosing a broader cutting
lenght can increase the computational time.
In :numref:`figcut` is shown an example with three different cutting lenghts.


| Relevant parameters for this example:
- doStoreFullK = 1
- cutMode = 0
- cut = 25, 100 or 0



.. figure:: ../plots/p008/plot001.png
:name: figcut

Three cutting lengths of the line wings. An infinity cuttoff lengths can be set by `cut = 0`.


4 changes: 2 additions & 2 deletions docs/helios_k/heliosk.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ used parameters are listed here, the order can not be changed.

- 1: Voigt
- 2: Lorentzian
- 3: Gaussia
- 4: cross section
- 3: Gaussian
- 4: Integrated Binned Gaussian

- doTuning:

Expand Down
14 changes: 7 additions & 7 deletions docs/helios_k/nist.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ This step can be done either manually or by using a script.

- Automatical download:

- type ``python3 nist_ELevels.py -Z <z> -I <i>``, where ``<z>``\ is
- type ``python3 nist_ELevels2.py -Z <z> -I <i>``, where ``<z>``\ is
the atomic number and ``<i>``\ the ionization state , e.g. -Z 3 -I 0
- The script will download the data and store it in a file called ``NIST_ELevels<Z><I>.dat``.
- This script will need geckodriver to be installed.

Step 2, Generate partition functions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Step 2, Generate the partition functions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Run ``python3 nist_partition.py - -Z <z> -I <i>``. This script will read
the previously produces file ``NIST_ELevels<Z><I>.dat``, and writes a ``*.pf`` file.
Expand Down Expand Up @@ -53,17 +52,16 @@ This step can be done either manually or by using a script.
- select ``Show Advanced Settings``
- select the Format output to csv
- Select ``Wavenumbers (in cm-1)`` (keep ``Observed``, ``Ritz`` and ``Uncertainties`` selected)
- Select ``Wavenumbers (all wavelenghts)``
- Select ``Vacuum (all wavelengths)``
- Select ``g``
- click ``Retrieve Data``\ and store the data in a file called
``NIST_Lines<Z><I>.dat``.
- remove all ``?, =, [,],( and )``\ from the file

- Automatical download:

- type ``python3 nist_Lines.py -Z <z> -I <i>``.
- type ``python3 nist_Lines3.py -Z <z> -I <i>``.
- The script will download the data and store it in a file called ``NIST_Lines<Z><I>.dat``.
- This script will need geckodriver to be installed .

.. _step-5-create-<-species->.param-file-and-binary-files:

Expand All @@ -76,6 +74,8 @@ All necessary files can be created with:

python3 nist_Lines2.py -Z <z> -I <i>

This step includes the calculation of the natural broadening coefficients. This can take o moment to complete.

Step 6, data path
~~~~~~~~~~~~~~~~~

Expand Down
85 changes: 85 additions & 0 deletions docs/helios_k/profiles.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
Line Profiles
==============


| HELIOS-K supports four different line profiles which can be set by the ``profile`` parameter.
| The supported profiles are:
- 1: Voigt
- 2: Lorentz

.. math::
:label: eq_fL
f_L(\nu) = \frac{1}{\pi} \frac{\gamma_L}{(\nu - \nu_0)^2 + \gamma_L^2}
- 3: Doppler

.. math::
:label: eq_fG
f_G(\nu) = \frac{ln(2)}{\pi} \frac{1}{\alpha_D} \exp\left(-\frac{ (\nu - \nu_0)^2 ln(2)}{\alpha_D^2} \right)
- 4: Binned Gaussian integrated cross section



.. math::
:label: eq_sigma
f_{BG} = \frac{1}{\Delta \nu} \int_{\nu - \nu/2}^{\nu + \nu/2} f_G(\nu) d \nu = \frac{1}{2 \Delta \nu} \left[ erf(\chi^+) - erf(\chi^-) \right]
[Yurchenko et al. 2018: (ExoCross : a general program for generating spectra from molecular
line lists)]



with the Doppler half-width:

.. math::
:label: eq_GD
\alpha_D = \frac{\nu}{c} \sqrt{\frac{2 ln(2) k_B T}{m}}
and the Lorentz half-width for Hitran like data:

.. math::
:label: eqGL1
\gamma_L = \frac{A}{4\pi c} + \left( \frac{T}{T_{ref}}\right)^{-n} \left[ \frac{\alpha_{air} (P-P_{self})}{P_{ref}} + \frac{\alpha_{self} P_{self}}{P_{ref}}\right]
or the Lorentz half-width for ExoMol like data:

.. math::
:label: eqGL2
\gamma_L = \frac{A}{4\pi c} + \left( \frac{T_{ref}}{T} \right)^n \cdot \left( \frac{P}{P_{ref}}\right)
or the Lorentz half-width for Atomic data:

.. math::
:label: eqGL3
\gamma_L = \frac{\Gamma_{nat}}{4\pi c} + \left( \frac{T_{ref}}{T} \right)^n \cdot \left( \frac{P}{P_{ref}}\right)
In :numref:`figprofile` is shown an example with four different line profiles.


| Relevant parameters for this example:
- doStoreFullK = 1
- profile = 1 or 2 or 3 or 4



.. figure:: ../plots/p009/plot001.png
:name: figprofile

Example with four different line profiles

3 changes: 2 additions & 1 deletion docs/helios_k/resampling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ Chebyshev polynomial to resample over these sharp edge would introduce oscillati
into the resampled opacity functions. In order to avoid these oscillations, we resample
only the part of the sorted opacity function, which is not 0 or kmin. That leads
to better results, but when reconstructing the polynomial from the Chebyshev
coefficients, then the empty parts must be added again.
coefficients, then the empty parts must be added again. How this can be done is
shown next.


.. figure:: ../plots/p005/plot001.png
Expand Down
2 changes: 2 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ OPTIONS
.. toctree::
:maxdepth: 1

helios_k/profiles.rst
helios_k/cut.rst
helios_k/bins.rst
helios_k/resampling.rst
helios_k/options.rst
Expand Down
72 changes: 72 additions & 0 deletions docs/plots/p008/Info_c0.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
Name:GeForce GTX 980, Major:5, Minor:2, Max threads per Block:1024, Max x dim:1024
, #Multiprocessors:16, Clock Rate:1215500, Memory Clock Rate:3505000, Global Memory:4230807552, Shared memory per block: 49152

Version: 2
Using device 0

Runtime Version 10000
Driver Version 10010
GIT Describe: v1.0-108-g3f9e55a
Build Date: Di 19. Mai 18:15:05 CEST 2020
Build Path: /home/sigrimm/kCalc
Build System: Linux mashu 4.15.0-96-generic #97-Ubuntu SMP Wed Apr 1 03:25:46 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build Compute Capability: SM=52

name = c0
T = 1500
P = 1
cia System = -
pathToData = ../../../data/
numin = 0
numax = 30000
dnu = 0.1
Nnu per bin = 60000
Number of points: 300000
cutMode = 0
cut = 100
doResampling = 0
nC = 20
doTransmission = 0
nTr = 1000
dTr = 0.05
doStoreFullK = 1
pathToK =
dostoreK = 2
nbins = 5
kmin = 0
qalphaL = 1
gammaF = 1
doMean = 1
Units = 0
Replace files = 1
profile = 1
doTuning = 1
def_TOL = 1.43e-17
def_TOLf = 2.48e-12
def_nthmax = 1048576
def_nlmax = 32768
def_maxlines = 1048576
def_maxfiles = 500
def_NmaxSample = 100

Species Name = 01_hit16
dataBase = 0
Molecule Number = 1
default L = 0
default n = 0

File 0 of 1
Number of lines: 304225
Time for input: 0.0770169 seconds
Time for Lines: 0.00555155 seconds
Time for K(x): 0.402035 seconds

Time for input total: 0 seconds
Time for Lines total: 0 seconds
Time for K(x) total: 0 seconds
Time for write K(x): 0.250061 seconds
Time for mean K(x): 0.00183994 seconds
Time for sort K(x): 0.0025481 seconds
Time for Resampling: 0.000106208 seconds
Time for write K(y): 0.140505 seconds
Time for Transmission: 1.4464e-05 seconds

0 comments on commit c74333f

Please sign in to comment.