we now strip leading and trailing NaNs from the data;
Merge remote-tracking branch 'origin'