# Quick overview

The gridding of spectra is done in CLASS with 2 commands and 3 files involved:

1. the spectra found in the input CLASS (.30m) file,
2. the table of spectra (.tab) created by the command TABLE,
3. the gridded spectra in a cube (.lmv) created by the command XY_MAP.

If the input table and the output cube fit both in memory at the same time, the command XY_MAP will read and write them at once: this is the ideal and most efficient case.

On the other hand, for larger datasets, the command splits the problem in slices of velocities (contiguous channels). With the way the input and output files can be ordered by default on the disk, reading or writing one slice may imply traversing entirely a file, and to repeat this process each time for each slice. This is known to decrease strongly the efficiency of the command XY_MAP.

Subsections

- Efficient table reading
- Efficient cube writing
- Efficient transpositions