Port from BEAM: [SBOX-69] Review the distance module
spectra csv are exported correctly