Skip to content

f — File I/O

Command Action
fl <pattern> Load files from disk (glob pattern)
fs Save to disk (.yda format)
fso Save to disk, allow overwrite
fe1 Export: z and y only, one line per spectrum
fe2 Export: one block per spectrum (z header + x-y lines)
fc Copy file in memory
fx Exchange — copy, then delete source
fdel Delete file from memory
fm Make — create a small test file
fr Read in (interactive)
fth Read tab, horizontal (y values, one line per spectrum)
ftv Read tab, vertical (one x-y pair per line)
ftc Read tab, choose columns

Loading files

fl accepts shell glob patterns:

0 > fl xx_20K.y08        # load one file
0 > fl run_*.nxs         # load a series

After loading, df shows the file dimensions, coordinates, and workspace number assigned. The workspace number appears at the prompt (0 >, 1 >, …).

Tab-delimited input

Choose the ft variant based on your file layout:

Variant Layout
fth One spectrum per row; columns are y values. No x column — x is assigned later with ox.
ftv Two columns: x and y, one data point per row. All rows form a single spectrum.
ftc Interactive: choose which columns map to x, y, dy.

Modifiers can be combined with any ft command:

Modifier Effect
m Multi-block: each blank-line-separated block becomes one spectrum
s Read path from script (non-interactive)
d File includes a dy (error) column

Example — load a two-column (x, y) file with errors, multi-block:

0 > ftvmd mydata.dat

Export formats

fe1 and fe2 write plain text suitable for external tools:

  • fe1 — one line per spectrum: z0 y0 y1 y2 …
  • fe2 — one block per spectrum, with a header line # z0 = <value> followed by x-y pairs

For full round-trip fidelity (all metadata, error bars, history), use fs / fso to save in .yda format and fl to reload.