MCPcopy Create free account
hub / github.com/NanoComp/meep / __init__

Method __init__

python/simulation.py:914–971  ·  view source on GitHub ↗

Construct a Padé DFT object. A `PadeDFT` is a step function that collects data from the field component `c` (e.g. `meep.Ex`, etc.) at the given point `pt` (a `Vector3`). Then, at the end of the run, it uses the scipy Padé algorithm to approximate the analytic

(
        self,
        c: int = None,
        vol: Volume = None,
        center: Vector3Type = None,
        size: Vector3Type = None,
        m: Optional[int] = None,
        n: Optional[int] = None,
        m_frac: float = 0.5,
        n_frac: Optional[float] = None,
        sampling_interval: int = 1,
        start_time: int = 0,
        stop_time: Optional[int] = None,
    )

Source from the content-addressed store, hash-verified

912 """
913
914 def __init__(
915 self,
916 c: int = None,
917 vol: Volume = None,
918 center: Vector3Type = None,
919 size: Vector3Type = None,
920 m: Optional[int] = None,
921 n: Optional[int] = None,
922 m_frac: float = 0.5,
923 n_frac: Optional[float] = None,
924 sampling_interval: int = 1,
925 start_time: int = 0,
926 stop_time: Optional[int] = None,
927 ):
928 """
929 Construct a Padé DFT object.
930
931 A `PadeDFT` is a step function that collects data from the field component `c`
932 (e.g. `meep.Ex`, etc.) at the given point `pt` (a `Vector3`). Then, at the end
933 of the run, it uses the scipy Padé algorithm to approximate the analytic
934 frequency response at the specified point.
935
936 + **`c` [ `component` constant ]** — The field component to use for extrapolation.
937 No default.
938 + **`vol` [ `Volume` ]** — The volume over which to accumulate the fields
939 (may be 0d, 1d, 2d, or 3d). No default.
940 + **`center` [ `Vector3` class ]** — Alternative method for specifying volume, using a center point
941 + **`size` [ `Vector3` class ]** — Alternative method for specifying volume, using a size vector
942 + **`m` [ `int` ]** — The order of the numerator $P$. If not specified,
943 defaults to the length of aggregated field data times `m_frac`.
944 + **`n` [ `int` ]** — The order of the denominator $Q$. Defaults
945 to length of field data - `m` - 1.
946 + **`m_frac` [ `float` ]** — Method for specifying `m` as a fraction of
947 field samples to use as the order for numerator. Default is 0.5.
948 + **`n_frac` [ `float` ]** — Fraction of field samples to use as order for
949 denominator. No default.
950 + **`sampling_interval` [ `int` ]** — The interval at which to sample the field data.
951 Defaults to 1.
952 + **`start_time` [ `int` ]** — The time (in increments of $\\Delta t$) at which
953 to start sampling the field data. Default is 0 (beginning of simulation).
954 + **`stop_time` [ `int` ]** — The time (in increments of $\\Delta t$) at which
955 to stop sampling the field data. Default is `None` (end of simulation).
956 """
957 self.c = c
958 self.vol = vol
959 self.center = center
960 self.size = size
961 self.m = m
962 self.n = n
963 self.m_frac = m_frac
964 self.n_frac = n_frac
965 self.sampling_interval = sampling_interval
966 self.start_time = start_time
967 self.stop_time = stop_time
968 self.data = []
969 self.data_dt = 0
970 self.dft: Callable = None
971 self.step_func = self._pade()

Callers

nothing calls this directly

Calls 1

_padeMethod · 0.95

Tested by

no test coverage detected