iostream
- edrixs.iostream.dump_poles(obj, file_name='poles')[source]
Dump the objects of poles returned from XAS or RIXS calculations to file for later plotting.
- Parameters:
- obj: Python object
Object of poles, a dict or a list of dicts.
- file_name: string
File name.
- edrixs.iostream.load_poles(file_name='poles')[source]
Load the objects of poles from file.
- Parameters:
- file_name: string
- Returns:
- obj: Python objects
Poles object.
- edrixs.iostream.write_tensor(tensor, fname, only_nonzeros=False, tol=1e-10, fmt_int='{:10d}', fmt_float='{:.15f}')[source]
Write \(n\) -dimension numpy array to file, currently, \(n\) can be 1, 2, 3, 4, 5.
- Parameters:
- tensor: :math:`n` d float or complex array
The array needs to be written.
- fname: str
File name.
- only_nonzeros: logical (default: False)
Only write nonzero elements.
- tol: float (default: 1E-10)
Only write the elements when their absolute value are larger than tol and only_nonzeros=True.
- fmt_int: str (default: ‘{:10d}’)
The format for printing integer numbers.
- fmt_float: str (default: ‘{:.15f}’)
The format for printing float numbers.