Function adas.adf04_om2ups
def adf04_om2ups(adf04_in=None, adf04_out=None, adf37=None, adf04_type=4, kappa=None, x=None, te=None, te_type='Kelvin', inst_file=None, ndlev=4500, ndtrn=250000)
-
Converts a collision strength adf04 file (type 1 or type 5) to an effective collision strength (type 3 or 4) adf04 file. Non-Maxwellian electron energy distribution functions (EEDF) may be specified.
Parameters
adf04_in
:str
- full name of type 1 or type 5 adf04 file.
adf04_out
:str
- full name of converted type 3 or 4 adf04 file.
adf37
:str
- full name of electron energy distribution file.
adf04_type
:int
- If the numerical EEDF is Maxwellian set this to 3 for symmetric effective collision strengths. The default is 4 for separate upward and downward rates.
kappa
:float
- If set assume a kappa EEDF with this parameter.
x
:float
- If set assume a Druyvesteyn EEDF with this parameter.
te
:float, array
- Optional set of electron temperatures. Not used for numerical EEDFs (adf37).
te_type
:str
- Options are 'Kelvin', 'eV' or 'reduced'.
inst_file
:str
, optional- full name of instruction file to use with cli adas7#3.
ndlev
:int
, optional- maximum number of levels in adf04 file - defaults is 4500
ndtrn
:int
, optional- maximum number of transitions in adf04 file - default is 250000
Returns
nothing - the output is a file written to disk
Notes
Convenience function to call the adas7#3 adf04_om2ups code.
This function required a named input and output adf04 file unlike the adas7#3 code which assumes names if not supplied.
The instruction file for command line use of adas7#3/adf04_om2ups.x is an optional output, perhaps for replaying or provenance reasons.
Version History
- Martin O'Mullane, 28-02-2024
- First version
Example
Convert the type 5 distorted wave ar12 adf04 file to a standard Maxwell-averaged adf04 file
>>> import adas as adas >>> adf04_in='/home/adas/adas/adf04/cophps#c/dw/ic#ar12_t5.dat' >>> adas.adf04_om2ups(adf04_in=adf04_in, adf04_out='/tmp/ic#ar12.dat')
The output file should be the same as /home/adas/adas/adf04/cophps#c/dw/ic#ar12.dat