PlasmaCalcs.quantities.collisions.cross_section_tools.CrossTable

class PlasmaCalcs.quantities.collisions.cross_section_tools.CrossTable(kT, cross, crossunits, fc=1.3333333333333333)

Bases: object

stores data about a cross sections table.

kT: temperatures [eV]. array of values cross: cross sections [crossunits]. array of values crossunits: conversion factor; cross * crossunits = cross section [cm^-2]. single value. | fc numerical factor, based on convention of the cross table. | when getting the collision frequency, the formula needs to use fc * cross. | PlasmaCalcs ‘collisions_cross_section’ (‘collcross’) already includes the fc factor. | The value of fc should probably be set as follows: | tables utilizing Bruno+2010 should have fc=4/3. | tables utilizing Vranjes+2013 should have fc=1. | By default, should prefer to use Bruno+2010 (hence the default is 4/3), | as explained in Wargnier+2022.

note: some cross tables are available by default;
these can be loaded with cls.default(name), where name is one of cls.DEFAULTS.keys().
__init__(kT, cross, crossunits, fc=1.3333333333333333)

Methods

__init__(kT, cross, crossunits[, fc])

from_defaults(name)

from_file(filename[, fc])

interp(value[, input, output, log])

keys()

lims(attr)

Attributes

DEFAULTS

T

collcross_si

cross_si

property T
temperatures [K], associated with kT.
property collcross_si
cross sections, in [m^-2], multiplied by fc.
property cross_si
cross sections, in [m^-2].
classmethod from_defaults(name)
return CrossTable from one of the default cross table files.
name = one of cls.DEFAULTS.keys().
classmethod from_file(filename, fc=1.3333333333333333)
return CrossTable from file. Be sure to put the appropriate value of fc.
Bruno+2010 should have fc=4/3. Vranjes+2013 should have fc=1.
see help(CrossTable) for more fc info.
interp(value, input='T', output='collcross_si', *, log=True, **kw_interp)
interpolate value from input (default: ‘T’) to output (default: ‘collcross_si’)
returns result like value (e.g., number if number; array if array),
with numerical values corresponding to output variable instead of input variable.
value: number or array-like
values to interpolate
note: if value is an xarray, return an xarray with same dims, attrs, and coords as value.
input: str
input variable; should be an attribute of self.
value is a value of this variable.
output: str
output variable; should be an attribute of self.
result is a value of this variable.
log: bool, default True
whether to interpolate on log scale.
True –> interpolate log10(value) against log10(input).
additional kwargs go to np.interp.

example: interp(2000, ‘T’, ‘cross_si’) –> single value, with cross section at T=2000 K.

keys()
returns keys of self, as a list.
These are: [‘kT’, ‘cross’, ‘cross_si’, ‘crossunits’, ‘T’]
lims(attr)
return self.attr.min(), self.attr.max()