lapy.io¶
Functions to read and write spectra and vertex functions.
- lapy.io.read_vfunc(filename)[source]¶
Import vertex functions from txt file.
Values can be separated by
;or,and surrounded by{}or()brackets. Also first line can have the keyword “Solution:”, i.e. the PSOL format from ShapeDNA.- Parameters:
- filename
str Filename of input.
- filename
- Returns:
- Raises:
OSErrorIf file is not found or not readable.
ValueErrorIf ‘Solution:’ marker is not found or no vertex function data exists.
- lapy.io.write_ev(filename, d)[source]¶
Save EV data structures as txt file (format from ShapeDNA).
- Parameters:
- Raises:
OSErrorIf file is not writable.
ValueErrorIf ‘Eigenvalues’ key is missing from dictionary.
- lapy.io.write_vfunc(filename, vfunc)[source]¶
Save vertex function in PSOL txt file.
First line “Solution:”, “,” separated values inside ()
- Parameters:
- filename
str Filename to save to.
- vfunc
np.ndarray Array of vfunc parameters, shape (n_vertices,).
- filename
- Raises:
OSErrorIf file is not writable.