invfourier - not clear why should we transpose at the end!
speclagreg - something wrong with order