add new analysis code to write the ANSII txt of calibrated spectrum