Trying to pre-process spectrum data.