—
Load any file from the Lab.#
This example shows how to open a test data file using sda.io.load.loadany()).
The same workflow can be used with the fplot command from a Bash/Cmd terminal :
Run:
fplot path/to/file.txt
or :
fplot # opens a GUI # then drag-and-drop a file into the GUI
from sda.io.load import loadany
from sda.misc.utils import getTestFile
file_path = getTestFile("data/spectrum.txt") # replace with your own file path
# Open:
data = loadany(getTestFile("data/spectrum.txt"))
print(f"Loaded spectrum: {len(data)} series, lengths: {[len(s) for s in data]}")