read_cross_text
- PlasmaCalcs.quantities.collisions.cross_section_tools.read_cross_text(filename)
reads cross sections from text file.
returns a dictionary with keys ‘kT’, ‘cross’.kT = Temperature [eV]. array of valuescross = cross section [crossunits]. array of valuescrossunits = conversion factor; cross * crossunits = cross section [cm^-2]. single value.raises FileContentsError if file is invalid.Text file should look like:; any number of blank lines or lines with comments (starting with ‘;’),; at any point in the file, are permitted.; ALWAYS ignores any portion of a line after a ‘;’1.0e-16 ; a single number. this is the “crossunits”.; Cross sections in this file represent value [cm^-2] = (value in file) * crossunits; E (eV) (ignored values) cross section [crossunits]0.100 -1.0000 33.8730.297 -1.0000 33.3500.801 -1.0000 26.9961.306 -1.0000 22.4751.647 -1.0000 20.0921.988 -1.0000 17.587; … etc. Values above are just an example; any nonzero amount of whitespace between values is allowed.; Extra values (more than 3 values per line) are allowed, but ignored if provided.