GenradTableManager
- class PlasmaCalcs.mhd.multifluid.mhd_genrad_tables.GenradTableManager(*args_dict, thresh=(None, None), incrad=(None, None), **kw_dict)
Bases:
dictmanages genrad tables. Dict of {quantity (str): GenradTable}.
thresh: 2-tuple of (values, comment)
thresh values & comment from genrad file. [TODO] what do they mean?internally stored as (self.thresh, self.threshcomment)incrad: 2-tuple of (value, comment)incrad values & comment from genrad file. [TODO] what dooes it mean?internally stored as (self.incrad, self.incradcomment)self.filename will tell abspath to file if created self via GenradTableManager.from_file()Methods
clear()copy()from_defaults([name])return GenradTableManager from one of the default genrad table files.
from_file(genrad_file)load genrad tables from file.
fromkeys([value])Create a new dictionary with keys from iterable and values set to value.
get(key[, default])Return the value for key if key is in the dictionary, else default.
interp(var, invalues, **kw_interp)interpolate var from self[var].interp(values, **kw_interp).
items()keys()neufrac_available([elem])return dict of {element name: neufrac variable}
neufrac_table(elem)return self[var] for var telling neufrac for this elem.
pop(k[,d])If key is not found, default is returned if given, otherwise KeyError is raised
popitem()Remove and return a (key, value) pair as a 2-tuple.
setdefault(key[, default])Insert key with a value of default if key is not in the dictionary.
update([E, ]**F)If E is present and has a .keys() method, then does: for k in E: D[k] = E[k]
values()Attributes
DEFAULTSINDEP_VARS- clear() None. Remove all items from D.
- copy() a shallow copy of D
- classmethod from_defaults(name='radtab')
return GenradTableManager from one of the default genrad table files.
name = one of cls.DEFAULTS.keys().
- classmethod from_file(genrad_file)
load genrad tables from file.
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- genrad_table_cls
alias of
GenradTable
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- interp(var, invalues, **kw_interp)
interpolate var from self[var].interp(values, **kw_interp).
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- neufrac_available(elem=None)
return dict of {element name: neufrac variable}
such that self[neufrac variable] = table telling neutral fraction for this element,as a funtion of temperature.elem: None, str, or ElementHaver (e.g. Element or Specie)if provided, return neufrac variable for elem (if str, else elem.get_element()).if no neufrac variable exists for this elem, return None.
- neufrac_table(elem)
return self[var] for var telling neufrac for this elem.
elem: str or ElementHaver (e.g. Element or Specie)element name, element, or object with elem.get_element().
- pop(k[, d]) v, remove specified key and return the corresponding value.
If key is not found, default is returned if given, otherwise KeyError is raised
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order.
Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update([E, ]**F) None. Update D from dict/iterable E and F.
If E is present and has a .keys() method, then does: for k in E: D[k] = E[k]
If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = vIn either case, this is followed by: for k in F: D[k] = F[k]
- values() an object providing a view on D's values