snpl.uvvis module¶
I/O interfaces for UV-vis spectrum files
- snpl.uvvis.load_HitachiTXT(fp, encoding='shift-jis')[source]¶
Loader for a text file exported from Hitachi UV-vis spectrometer software.
This function loads a text file exported from Hitachi UV-vis spectrometer and converts it into a hicsv format.
- Parameters:
fp (str or file-like) – Path or file-like object of the source .TXT file.
encoding (str) – Encoding of the source file. Defaults to shift-jis.
- Returns:
A
hicsv.hicsv
object. Contains columns for wavelength and absorbance. The header only includes the time of measurement.
Examples
>>> c = snpl.uvvis.load_HitachiTXT("HitachiTest.TXT") >>> print(c.ga("nm")) [500. 498. 496. ... 204. 202. 200.] >>> print(c.ga("Abs")) [-1.500e-02 -1.500e-02 -1.500e-02 ... 4.519e+00 4.322e+00 4.250e+00] >>> print(c.h["datetime"]) 2020-08-13T21:24:32 >>> print(c.h["timestamp"]) 1597321472.0 >>> c.save("HitachiTest_out.txt")