# [SciPy-user] sine transform prefactor - SOLVED

Lubos Vrbka lists@vrbka....
Wed Aug 6 02:16:06 CDT 2008

```hi guys,

it seems that the problems i had with the prefactors involved in the
sine transformation were more or less caused by my ignorance and a lack
of knowledge (as usually) :)

just in case somebody would stumble upon this issue in the future, i
will summarize my 'findings'.

the function for forward/inverse discrete sine transformation are
themselves normalized to the number of sampling points. therefore,
F' = DST(f)
iDST(F') = f

however, to get the real sine transformation of f, it's necessary to
multiply the abovementioned expression with the step size in the real space
F = DST(f) dr
this expression leads to the equivalent of the sine transformation,
where the 2/pi normalization is carried out in the inverse
transformation. for the equivalent of the unitary sine transform, it's
needed to further multiply with sqrt(2/pi)

the same then applies for the inverse transformation, so in the end
x = 2/pi dr dk iDST(DST(f))
but the dr dk product brings in the number of sampling points. for the
sine transformation, dk = pi/(Ndr) and, therefore,
x = 2/pi pi/N iDST(DST(f)) = 2/N f
in order to get the function f back, it's necessary to multiply the
inverse FT with N/2.

this essentially solves the question posted in
sine transformation weirdness

--
Lubos _@_"
http://www.lubos.vrbka.net
```