FourierFilter¶
This module defines the FourierFilter class that performs the Fourier filter for a given range to exclude.
-
class
pystog.fourier_filter.
FourierFilter
[source]¶ The FourierFilter class is used to exlude 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 vector
- gr (numpy.array or list) – vector
- q (numpy.array or list) – -space vector
- dcs (numpy.array or list) – vector
- cutoff (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, [, , , , ,
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
Parameters: - r (numpy.array or list) – -space vector
- gr (numpy.array or list) – vector
- q (numpy.array or list) – -space vector
- fq (numpy.array or list) – vector
- cutoff (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, [
, , , , ,
]
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 vector
- gr (numpy.array or list) – vector
- q (numpy.array or list) – -space vector
- fq (numpy.array or list) – vector
- cutoff (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, [
, , , , ,
]
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 vector
- gr (numpy.array or list) – vector
- q (numpy.array or list) – -space vector
- fq (numpy.array or list) – vector
- cutoff (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, [
, , , , ,
]
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 vector
- gr (numpy.array or list) – vector
- q (numpy.array or list) – -space vector
- dcs (numpy.array or list) – vector
- cutoff (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, [, , , , ,
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
Parameters: - r (numpy.array or list) – -space vector
- gr (numpy.array or list) – vector
- q (numpy.array or list) – -space vector
- fq (numpy.array or list) – vector
- cutoff (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, [
, , , , ,
]
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 vector
- gr (numpy.array or list) – vector
- q (numpy.array or list) – -space vector
- fq (numpy.array or list) – vector
- cutoff (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, [
, , , , ,
]
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 vector
- gr (numpy.array or list) – vector
- q (numpy.array or list) – -space vector
- fq (numpy.array or list) – vector
- cutoff (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, [
, , , , ,
]
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 vector
- gr (numpy.array or list) – vector
- q (numpy.array or list) – -space vector
- dcs (numpy.array or list) – vector
- cutoff (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, [, , , , ,
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
Parameters: - r (numpy.array or list) – -space vector
- gr (numpy.array or list) – vector
- q (numpy.array or list) – -space vector
- fq (numpy.array or list) – vector
- cutoff (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, [
, , , , ,
]
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 vector
- gr (numpy.array or list) – vector
- q (numpy.array or list) – -space vector
- fq (numpy.array or list) – vector
- cutoff (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, [, , , , ,
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 vector
- gr (numpy.array or list) – vector
- q (numpy.array or list) – -space vector
- sq (numpy.array or list) – vector
- cutoff (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, [, , , , ,
Return type: tuple of numpy.array
-