using normalize on data with nan in y values causes entire array to be set to nan. can be corrected using nanmax and nanmin I think. related to #10