An utility to read low-pressure gaseous cross sections data
Project description
ZCross
ZCross is a python library used to read low pressure gas sections from various sources like LXCat.
Installation
To install this package just use pip:
pip install zcross
Cross section databases are not provided by ZCross
: however, it is possible to download the cross section tables of interest from the download section of LXCat.
Once you download the cross sections in XML
format, you can save it somewhere (we suggest under /opt/zcross_data
) and to define an enviroment variable pointing to that path:
export ZCROSS_DATA=/opt/zcross_data
(you can add it to your .profile
file)
Examples
List the database availables:
import zcross
zs = zcross.load_all()
# be patient, it will take a while ...
for z in zs:
print(z.database)
Show the groups and references of a speficic database:
import zcross
z = zcross.load_by_name('ccc')
for group in z.database:
print(group)
for reference in z.database.references:
print('[{}]:'.format(reference.type))
for k,v in reference.items():
print(' {:<10} : {}'.format(k,v))
Show the process of a specific group:
import zcross
z = zcross.load_by_name('itikawa')
group = z.database[0]
for process in group:
print("Process {}: {}".format(process.id, process.get_simple_type()))
print("Comment: {}\n".format(process.comment))
Show the cross section table of a specific process:
import zcross
z = zcross.load_by_name('phelps')
process = z.database['H2O'][5]
print('Reaction:')
print(process.get_reaction())
print('Energy [{}],\tArea [{}]'.format(process.energy_units, process.cross_section_units))
for energy, area in process:
print('{:8.2f}\t{:e}'.format(energy, area))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file zcross-0.0.21.tar.gz
.
File metadata
- Download URL: zcross-0.0.21.tar.gz
- Upload date:
- Size: 26.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07ec240adc72cc7825ac0543d89ecaec72464513063039e5cbf45f27d2bd3de2 |
|
MD5 | 76e9d1a7cdb498b5be9384e8e7dd8311 |
|
BLAKE2b-256 | d311d3d2ef4143e4ca5ecb1d9fd4ef6f78bf6859604567048421a9e48812ce12 |