Fixed bug when using npol > 1.  Also changed scaling/offset weighting.
Added unsigned/signed data reading and fixed clipping bug