fixed a bug with reading unsigned data as signed
wrote more tests of the histogram pyramid