Add truncate function to unpad padded correlations

Unpadding removes spurious data from the padded arrays due to the
non-periodic convolution. truncate is a stand alone function that
takes an array and a new shape and outputs the unpadded array.