Performs the Haar-Fisz transform for chi-squares.
Takes:
| data | The sequence of chi-squares, its length must be a power of 2. |
| M | The resolution level, see Section 5.3.1 of the thesis. |
Returns:
| hfdata | The Haar-Fisz transform of data at the resolution level M (vector of length 2^M). |