Get rid of the last hstack
use rfft for real inputs