added .DAT signature and chi square calculation using Apache commons math