I think the logic which set the value of bzero in wfits
The bscale should be set to the minimum of the allowed
datavalues or the actual datavalues , which ever is
least. This preserves the most dynamic range. Here's
the diff that should impove things.
< $bzero = $dmin < $min ? $dmin : $min ;
> $bzero = $min;