lmgs MATLAB add-on to SPM software for fMRI detrending with "Linear Model of the Global Signal" (LMGS) method. This is described in a Neuroimage paper.