Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zcross-0.0.21.tar.gz (26.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page