FourierFilter
This module defines the FourierFilter class that performs the Fourier filter for a given range to exclude.
- class pystog.fourier_filter.FourierFilter[source]
Bases:
objectThe FourierFilter class is used to exclude a given range in the current function by a back Fourier Transform of that section, followed by a difference from the non-excluded function, and then a forward transform of the difference function Can currently do: a real space function -> reciprocal space function -> real space function
- Examples:
>>> import numpy >>> from pystog import FourierFilter >>> ff = FourierFilter() >>> r, gr = numpy.loadtxt("my_gofr_file.txt",unpack=True) >>> q = numpy.linspace(0., 25., 2500) >>> q, sq = transformer.G_to_S(r, gr, q) >>> q_ft, sq_ft, q, sq, r, gr = ff.G_using_F(r, gr, q, sq, 1.5)
- GK_using_DCS(r, gr, q, dcs, cutoff, dgr=None, ddcs=None, **kwargs)[source]
Fourier filters real space
using the reciprocal space

- Parameters:
r (numpy.array or list) –
-space vectorgr (numpy.array or list) –
vectorq (numpy.array or list) –
-space vectordcs (numpy.array or list) –
vectorcutoff (float) – The
value to filter from 0. to cutoff
- Returns:
A tuple of the
and
for the 0. to cutoff transform,
the corrected
and
,
and the filtered
and
.Thus, [
,
,
,
,
, ![G_{Keen Version}(r)_{FF}]](../_images/math/9cfe01e8c9695afba344342fcd876eea02181b3c.png)
- Return type:
tuple of numpy.array
- GK_using_F(r, gr, q, fq, cutoff, dgr=None, dfq=None, **kwargs)[source]
Fourier filters real space
using the reciprocal space ![Q[S(Q)-1]](../_images/math/9196f18b3b0ead3d55df8e9f48862e8d1e5141e8.png)
- Parameters:
r (numpy.array or list) –
-space vectorgr (numpy.array or list) –
vectorq (numpy.array or list) –
-space vectorfq (numpy.array or list) –
vectorcutoff (float) – The
value to filter from 0. to cutoff
- Returns:
A tuple of the
and
for the 0. to cutoff transform,
the corrected
and
,
and the filtered
and
.Thus:
[ :math:`Q_{FF}`, :math:`Q[S(Q)-1]_{FF}`, :math:`Q`, :math:`Q[S(Q)-1]`, :math:`r_{FF}`, :math:`G_{Keen Version}(r)_{FF}` ]- Return type:
tuple of numpy.array
- GK_using_FK(r, gr, q, fq, cutoff, dgr=None, dfq=None, **kwargs)[source]
Fourier filters real space
using the reciprocal space 
- Parameters:
r (numpy.array or list) –
-space vectorgr (numpy.array or list) –
vectorq (numpy.array or list) –
-space vectorfq (numpy.array or list) –
vectorcutoff (float) – The
value to filter from 0. to cutoff
- Returns:
A tuple of the
and
for the 0. to cutoff transform,
the corrected
and
,
and the filtered
and
.Thus:
[ :math:`Q_{FF}`, :math:`F(Q)_{FF}`, :math:`Q`, :math:`F(Q)`, :math:`r_{FF}`, :math:`G_{Keen Version}(r)_{FF}` ]- Return type:
tuple of numpy.array
- GK_using_S(r, gr, q, sq, cutoff, dgr=None, dsq=None, **kwargs)[source]
Fourier filters real space
using the reciprocal space 
- Parameters:
r (numpy.array or list) –
-space vectorgr (numpy.array or list) –
vectorq (numpy.array or list) –
-space vectorfq (numpy.array or list) –
vectorcutoff (float) – The
value to filter from 0. to cutoff
- Returns:
A tuple of the
and
for the 0. to cutoff transform,
the corrected
and
,
and the filtered
and
.Thus:
[ :math:`Q_{FF}`, :math:`S(Q)_{FF}`, :math:`Q`, :math:`S(Q)`, :math:`r_{FF}`, :math:`G_{Keen Version}(r)_{FF}` ]- Return type:
tuple of numpy.array
- G_using_DCS(r, gr, q, dcs, cutoff, dgr=None, ddcs=None, **kwargs)[source]
Fourier filters real space
using the reciprocal space

- Parameters:
r (numpy.array or list) –
-space vectorgr (numpy.array or list) –
vectorq (numpy.array or list) –
-space vectordcs (numpy.array or list) –
vectorcutoff (float) – The
value to filter from 0. to cutoff
- Returns:
A tuple of the
and
for the 0. to cutoff transform,
the corrected
and
,
and the filtered
and
.Thus, [
,
,
,
,
, ![G_{PDFFIT}(r)_{FF}]](../_images/math/aae2966fee7346f345ba31f79ce4ab0ae8e46c72.png)
- Return type:
tuple of numpy.array
- G_using_F(r, gr, q, fq, cutoff, dgr=None, dfq=None, **kwargs)[source]
Fourier filters real space
using the reciprocal space ![Q[S(Q)-1]](../_images/math/9196f18b3b0ead3d55df8e9f48862e8d1e5141e8.png)
- Parameters:
r (numpy.array or list) –
-space vectorgr (numpy.array or list) –
vectorq (numpy.array or list) –
-space vectorfq (numpy.array or list) –
vectorcutoff (float) – The
value to filter from 0. to cutoff
- Returns:
A tuple of the
and
for the 0. to cutoff transform,
the corrected
and
,
and the filtered
and
.Thus:
[ :math:`Q_{FF}`, :math:`Q[S(Q)-1]_{FF}`, :math:`Q`, :math:`Q[S(Q)-1]`, :math:`r_{FF}`, :math:`G_{PDFFIT}(r)_{FF}` ]- Return type:
tuple of numpy.array
- G_using_FK(r, gr, q, fq, cutoff, dgr=None, dfq=None, **kwargs)[source]
Fourier filters real space
using the reciprocal space 
- Parameters:
r (numpy.array or list) –
-space vectorgr (numpy.array or list) –
vectorq (numpy.array or list) –
-space vectorfq (numpy.array or list) –
vectorcutoff (float) – The
value to filter from 0. to cutoff
- Returns:
A tuple of the
and
for the 0. to cutoff transform,
the corrected
and
,
and the filtered
and
.Thus:
[ :math:`Q_{FF}`, :math:`F(Q)_{FF}`, :math:`Q`, :math:`F(Q)`, :math:`r_{FF}`, :math:`G_{PDFFIT}(r)_{FF}` ]- Return type:
tuple of numpy.array
- G_using_S(r, gr, q, sq, cutoff, dgr=None, dsq=None, **kwargs)[source]
Fourier filters real space
using the reciprocal space 
- Parameters:
r (numpy.array or list) –
-space vectorgr (numpy.array or list) –
vectorq (numpy.array or list) –
-space vectorfq (numpy.array or list) –
vectorcutoff (float) – The
value to filter from 0. to cutoff
- Returns:
A tuple of the
and
for the 0. to cutoff transform,
the corrected
and
,
and the filtered
and
.Thus:
[ :math:`Q_{FF}`, :math:`S(Q)_{FF}`, :math:`Q`, :math:`S(Q)`, :math:`r_{FF}`, :math:`G_{PDFFIT}(r)_{FF}` ]- Return type:
tuple of numpy.array
- g_using_DCS(r, gr, q, dcs, cutoff, dgr=None, ddcs=None, **kwargs)[source]
Fourier filters real space
using the reciprocal space

- Parameters:
r (numpy.array or list) –
-space vectorgr (numpy.array or list) –
vectorq (numpy.array or list) –
-space vectordcs (numpy.array or list) –
vectorcutoff (float) – The
value to filter from 0. to cutoff
- Returns:
A tuple of the
and
for the 0. to cutoff transform,
the corrected
and
,
and the filtered
and
.Thus, [
,
,
,
,
, ![g(r)_{FF}]](../_images/math/9f55cd52d60f22a2d6eed9e88a614ae12087358b.png)
- Return type:
tuple of numpy.array
- g_using_F(r, gr, q, fq, cutoff, dgr=None, dfq=None, **kwargs)[source]
Fourier filters real space
using the reciprocal space ![Q[S(Q)-1]](../_images/math/9196f18b3b0ead3d55df8e9f48862e8d1e5141e8.png)
- Parameters:
r (numpy.array or list) –
-space vectorgr (numpy.array or list) –
vectorq (numpy.array or list) –
-space vectorfq (numpy.array or list) –
vectorcutoff (float) – The
value to filter from 0. to cutoff
- Returns:
A tuple of the
and
for the 0. to cutoff transform,
the corrected
and
,
and the filtered
and
.Thus:
[ :math:`Q_{FF}`, :math:`Q[S(Q)-1]_{FF}`, :math:`Q`, :math:`Q[S(Q)-1]`, :math:`r_{FF}`, :math:`g(r)_{FF}` ]- Return type:
tuple of numpy.array
- g_using_FK(r, gr, q, fq, cutoff, dgr=None, dfq=None, **kwargs)[source]
Fourier filters real space
using the reciprocal space 
- Parameters:
r (numpy.array or list) –
-space vectorgr (numpy.array or list) –
vectorq (numpy.array or list) –
-space vectorfq (numpy.array or list) –
vectorcutoff (float) – The
value to filter from 0. to cutoff
- Returns:
A tuple of the
and
for the 0. to cutoff transform,
the corrected
and
,
and the filtered
and
.Thus, [
,
,
,
,
, ![g(r)_{FF}]](../_images/math/9f55cd52d60f22a2d6eed9e88a614ae12087358b.png)
- Return type:
tuple of numpy.array
- g_using_S(r, gr, q, sq, cutoff, dgr=None, dsq=None, **kwargs)[source]
Fourier filters real space
using the reciprocal space 
- Parameters:
r (numpy.array or list) –
-space vectorgr (numpy.array or list) –
vectorq (numpy.array or list) –
-space vectorsq (numpy.array or list) –
vectorcutoff (float) – The
value to filter from 0. to cutoff
- Returns:
A tuple of the
and
for the 0. to cutoff transform,
the corrected
and
,
and the filtered
and
.Thus:
[ :math:`Q_{FF}`, :math:`S(Q)_{FF}`, :math:`Q`, :math:`S(Q)`, :math:`r_{FF}`, :math:`g(r)_{FF}` ]- Return type:
tuple of numpy.array