Add a compare function for custom sorting to util.pretty_print
Replace power spectrum code in Mara-drvtrb.lua

****
That feature exposed a memory error in the buffer.copy function: when
data was copied into an array of a different shape but the buffers are
the correct size. Deal with this error in a separate test file.
****