Filters, Design, and Resampling

Apply causal, SOS, and zero-phase filters, design FIR and IIR filters, and check the sample rate and time axis after resampling.

Carry the State Across Blocks

An FIR filter with numerator [0.5, 0.5] and denominator [1] computes a two-sample moving average. Pass the final state of the first block to the next block, keeping the real and imaginary components consistent with the model. For SOS filters, associate the state with the individual sections. filter.zero_phase processes the available record in both directions and rejects a causal initial state. Check for edge effects.

Use the Input Sample Rate

With rational resampling, the output sample rate is fs·up/down. Any supplied time axes must be uniform and consistent with sample_rate. In digital filter design, normalized frequencies range between 0 and 1, with 1 representing Nyquist. For bandpass and bandstop filters, provide two edges in increasing order. Some FIR designs impose an even- or odd-order constraint.

Operation Reference

Jump to an Operation

filter.inspect

Access
Registered in the Python Job
Arguments
Typed operands a, b, and c, with an optional typed options struct.
Shape
Struct and two vectors
Units
Keeps the signal unit
Result
Numeric and diagnostic fields.
Purpose
Shows the filter characteristics.
gxtxt_api_call("SIGNAL_API_v1", "filter.inspect", args)
Fields and Options
  • a

    Purpose
    Filter model
    Type
    struct
    Required
    Yes (1)
    Units
    1
    Shape
    Numerator and optional denominator, or a six-column SOS matrix.
    Error
    InvalidModel
  • b

    Purpose
    Unused protocol operand
    Type
    empty
    Required
    No (0)
    Units
    1
    Shape
    Unused
    Error
    InvalidOperand
  • c

    Purpose
    Unused protocol operand
    Type
    empty
    Required
    No (0)
    Units
    1
    Shape
    Unused
    Error
    InvalidOperand
Recorded Result · filter.inspect

Download the example script (extract the ZIP first).

Example Operands Preview

[
  {
    "kind": "struct",
    "fields": {
      "numerator": {
        "kind": "array",
        "shape": [
          2,
          1
        ],
        "real": [
          0.5,
          0.5
        ]
      },
      "denominator": {
        "kind": "array",
        "shape": [
          1,
          1
        ],
        "real": [
          1
        ]
      }
    }
  },
  {
    "kind": "empty"
  },
  {
    "kind": "empty"
  }
]

Result Preview

{
  "poles_real": {
    "dtype": "float64",
    "shape": [
      0,
      1
    ],
    "values": []
  },
  "poles_imaginary": {
    "dtype": "float64",
    "shape": [
      0,
      1
    ],
    "values": []
  },
  "stable": true,
  "order": 1.0
}

filter.causal

Access
Registered in the Python Job
Arguments
Typed operands a, b, and c, with an optional typed options struct.
Shape
Struct and two vectors
Units
Keeps the signal unit
Result
Numeric and diagnostic fields.
Purpose
Applies a causal filter.
gxtxt_api_call("SIGNAL_API_v1", "filter.causal", args)
Fields and Options
  • a

    Purpose
    Filter model
    Type
    struct
    Required
    Yes (1)
    Units
    1
    Shape
    Numerator and optional denominator, or a six-column SOS matrix.
    Error
    InvalidModel
  • b

    Purpose
    Samples
    Type
    array
    Required
    Yes (1)
    Units
    Signal unit
    Shape
    Vector
    Error
    InvalidOperand
  • c

    Purpose
    Initial state
    Type
    array
    Required
    No (0)
    Units
    Signal unit
    Shape
    Order of the causal model. For SOS, a two-column matrix with one row per section. Not allowed for zero_phase.
    Error
    InvalidOperand
Recorded Result · filter.causal:continued-exact

Download the example script (extract the ZIP first).

Example Operands Preview

[
  {
    "kind": "struct",
    "fields": {
      "numerator": {
        "kind": "array",
        "shape": [
          2,
          1
        ],
        "real": [
          0.5,
          0.5
        ]
      },
      "denominator": {
        "kind": "array",
        "shape": [
          1,
          1
        ],
        "real": [
          1
        ]
      }
    }
  },
  {
    "kind": "array",
    "shape": [
      64,
      1
    ],
    "real": [
      -1.175660927181459e-15,
      0.45339411048374206,
      0.8071067811865474,
      0.9945902106299411,
      0.9999999999999999,
      0.8531688543926323,
      0.6071067811865489,
      0.31197275424643484,
      8.817456953860943e-16,
      -0.3119727542464331
    ]
  },
  {
    "kind": "array",
    "shape": [
      1,
      1
    ],
    "real": [
      -0.2266970552418721
    ]
  }
]

Result Preview

{
  "value_real": {
    "dtype": "float64",
    "shape": [
      64,
      1
    ],
    "values": [
      -0.22669705524187267,
      0.22669705524187045,
      0.6302504458351448,
      0.9008484959082443,
      0.9972951053149706,
      0.9265844271963162,
      0.7301378177895906,
      0.45953976771649185,
      0.15598637712321786,
      -0.1559863771232161,
      -0.45953976771649024,
      -0.7301378177895893
    ]
  },
  "value_imaginary": {
    "dtype": "float64",
    "shape": [
      64,
      1
    ],
    "values": [
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0
    ]
  },
  "state_real": -0.22669705524187259,
  "state_imaginary": 0.0
}

filter.zero_phase

Access
Registered in the Python Job
Arguments
Typed operands a, b, and c, with an optional typed options struct.
Shape
Struct and two vectors
Units
Keeps the signal unit
Result
Numeric and diagnostic fields.
Purpose
Applies a zero-phase filter.
gxtxt_api_call("SIGNAL_API_v1", "filter.zero_phase", args)
Fields and Options
  • a

    Purpose
    Filter model
    Type
    struct
    Required
    Yes (1)
    Units
    1
    Shape
    Numerator and optional denominator, or a six-column SOS matrix.
    Error
    InvalidModel
  • b

    Purpose
    Samples
    Type
    array
    Required
    Yes (1)
    Units
    Signal unit
    Shape
    Vector
    Error
    InvalidOperand
  • c

    Purpose
    Initial state
    Type
    array
    Required
    No (0)
    Units
    Signal unit
    Shape
    Order of the causal model. For SOS, a two-column matrix with one row per section. Not allowed for zero_phase.
    Error
    InvalidOperand
Recorded Result · filter.zero_phase

Download the example script (extract the ZIP first).

Example Operands Preview

[
  {
    "kind": "struct",
    "fields": {
      "numerator": {
        "kind": "array",
        "shape": [
          2,
          1
        ],
        "real": [
          0.5,
          0.5
        ]
      },
      "denominator": {
        "kind": "array",
        "shape": [
          1,
          1
        ],
        "real": [
          1
        ]
      }
    }
  },
  {
    "kind": "array",
    "shape": [
      128,
      1
    ],
    "real": [
      0.0,
      0.45339411048374456,
      0.8071067811865474,
      0.9945902106299415,
      1.0,
      0.853168854392632,
      0.6071067811865476,
      0.3119727542464351,
      9.797174393178826e-17,
      -0.31197275424643495
    ]
  },
  {
    "kind": "empty"
  }
]

Result Preview

{
  "value_real": {
    "dtype": "float64",
    "shape": [
      128,
      1
    ],
    "values": [
      0.0,
      0.4284737505385091,
      0.7655494708716952,
      0.9490718006116077,
      0.9619397662556434,
      0.8283611224929529,
      0.5948387927530406,
      0.30776307241985446,
      9.71445146547012e-17,
      -0.3077630724198543,
      -0.5948387927530404,
      -0.8283611224929528
    ]
  },
  "value_imaginary": {
    "dtype": "float64",
    "shape": [
      128,
      1
    ],
    "values": [
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0
    ]
  }
}
Negative Test or Attempt Result · filter.zero_phase:rejected-state

Download the example script (extract the ZIP first).

Example Operands Preview

[
  {
    "kind": "struct",
    "fields": {
      "numerator": {
        "kind": "array",
        "shape": [
          2,
          1
        ],
        "real": [
          0.5,
          0.5
        ]
      },
      "denominator": {
        "kind": "array",
        "shape": [
          1,
          1
        ],
        "real": [
          1
        ]
      }
    }
  },
  {
    "kind": "array",
    "shape": [
      128,
      1
    ],
    "real": [
      0.0,
      0.45339411048374456,
      0.8071067811865474,
      0.9945902106299415,
      1.0,
      0.853168854392632,
      0.6071067811865476,
      0.3119727542464351,
      9.797174393178826e-17,
      -0.31197275424643495
    ]
  },
  {
    "kind": "array",
    "shape": [
      1,
      1
    ],
    "real": [
      0.0
    ]
  }
]

Result Preview

"GXTXT:Signal:InvalidArguments: zero-phase filtering does not accept causal initial state"

filter.sos

Access
Registered in the Python Job
Arguments
Typed operands a, b, and c, with an optional typed options struct.
Shape
Struct and two vectors
Units
Keeps the signal unit
Result
Numeric and diagnostic fields.
Purpose
Applies the filter in second-order sections (SOS).
gxtxt_api_call("SIGNAL_API_v1", "filter.sos", args)
Fields and Options
  • a

    Purpose
    Filter model
    Type
    struct
    Required
    Yes (1)
    Units
    1
    Shape
    Numerator and optional denominator, or a six-column SOS matrix.
    Error
    InvalidModel
  • b

    Purpose
    Samples
    Type
    array
    Required
    Yes (1)
    Units
    Signal unit
    Shape
    Vector
    Error
    InvalidOperand
  • c

    Purpose
    Initial state
    Type
    array
    Required
    No (0)
    Units
    Signal unit
    Shape
    Order of the causal model. For SOS, a two-column matrix with one row per section. Not allowed for zero_phase.
    Error
    InvalidOperand
Recorded Result · filter.sos

Download the example script (extract the ZIP first).

Example Operands Preview

[
  {
    "kind": "struct",
    "fields": {
      "sos": {
        "kind": "array",
        "shape": [
          1,
          6
        ],
        "real": [
          0.5,
          0.5,
          0.0,
          1.0,
          0.0,
          0.0
        ]
      }
    }
  },
  {
    "kind": "array",
    "shape": [
      128,
      1
    ],
    "real": [
      0.0,
      0.45339411048374456,
      0.8071067811865474,
      0.9945902106299415,
      1.0,
      0.853168854392632,
      0.6071067811865476,
      0.3119727542464351,
      9.797174393178826e-17,
      -0.31197275424643495
    ]
  },
  {
    "kind": "empty"
  }
]

Result Preview

{
  "value_real": {
    "dtype": "float64",
    "shape": [
      128,
      1
    ],
    "values": [
      0.0,
      0.22669705524187228,
      0.630250445835146,
      0.9008484959082445,
      0.9972951053149708,
      0.926584427196316,
      0.7301378177895899,
      0.45953976771649135,
      0.1559863771232176,
      -0.15598637712321742,
      -0.4595397677164912,
      -0.7301378177895896
    ]
  },
  "value_imaginary": {
    "dtype": "float64",
    "shape": [
      128,
      1
    ],
    "values": [
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0
    ]
  },
  "state_real": {
    "dtype": "float64",
    "shape": [
      1,
      2
    ],
    "values": [
      -0.22669705524187259,
      0.0
    ]
  },
  "state_imaginary": {
    "dtype": "float64",
    "shape": [
      1,
      2
    ],
    "values": [
      0.0,
      0.0
    ]
  }
}

design.butterworth

Access
Registered in the Python Job
Arguments
Typed operands a, b, and c, with an optional typed options struct.
Shape
Scalar, scalar or pair, scalar
Units
Normalized cutoff frequency or rad/s
Result
Numeric and diagnostic fields.
Purpose
Designs a Butterworth filter.
gxtxt_api_call("SIGNAL_API_v1", "design.butterworth", args)
Fields and Options
  • a

    Purpose
    Filter order
    Type
    integer
    Required
    Yes (1)
    Units
    1
    Minimum
    1
    Error
    InvalidOrder
  • b

    Purpose
    Cutoff
    Type
    array
    Required
    Yes (1)
    Units
    Fraction of Nyquist in the discrete domain, rad/s in the analog domain.
    Minimum
    >0
    Shape
    One edge for low or high, two increasing edges for bandpass or stop. In the discrete domain every edge is below 1.
    Error
    InvalidCutoff
  • c

    Purpose
    Unused protocol operand
    Type
    empty
    Required
    No (0)
    Units
    1
    Shape
    Unused
    Error
    InvalidOperand
  • options.band

    Purpose
    Band
    Type
    choice
    Required
    No (0)
    Default
    low
    Units
    1
    Choices
    low;high;bandpass;stop
    Error
    InvalidBand
  • options.domain

    Purpose
    Domain
    Type
    choice
    Required
    No (0)
    Default
    discrete
    Units
    1
    Choices
    discrete;analog
    Error
    InvalidModel
Applicable Constraints
  • cutoff_length_by_band

    Type
    map
    Value
    low:1;high:1;bandpass:2;stop:2
  • cutoff_unit_by_domain

    Type
    map
    Value
    discrete as a fraction of Nyquist, analog in rad/s
  • cutoff_order

    Type
    scalar
    Value
    Strictly increasing
  • discrete_cutoff_range

    Type
    map
    Value
    Exclusive bounds (0 < value < 1)
Recorded Result · design.butterworth:stop

Download the example script (extract the ZIP first).

Example Operands Preview

[
  {
    "kind": "array",
    "shape": [
      1,
      1
    ],
    "real": [
      6
    ]
  },
  {
    "kind": "array",
    "shape": [
      2,
      1
    ],
    "real": [
      0.2,
      0.4
    ]
  },
  {
    "kind": "empty"
  },
  {
    "kind": "struct",
    "fields": {
      "band": {
        "kind": "text",
        "value": "stop"
      }
    }
  }
]

Result Preview

{
  "numerator_real": {
    "dtype": "float64",
    "shape": [
      1,
      13
    ],
    "values": [
      0.2894069170783345,
      -2.146359736004798,
      8.36905784714609,
      -21.662951574285074,
      41.00530517219207,
      -59.267450686094385,
      66.88350654644428,
      -59.267450686094385,
      41.00530517219205,
      -21.662951574285078,
      8.36905784714609,
      -2.146359736004798
    ]
  },
  "numerator_imaginary": {
    "dtype": "float64",
    "shape": [
      1,
      13
    ],
    "values": [
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0
    ]
  },
  "denominator_real": {
    "dtype": "float64",
    "shape": [
      1,
      13
    ],
    "values": [
      1.0,
      -5.920416298382173,
      18.306455655688325,
      -37.742313976224054,
      57.21880651311693,
      -66.67208277503056,
      61.03553543534085,
      -44.14511962931116,
      25.06820151300991,
      -10.927121832573686,
      3.4982908225025637,
      -0.7464694812468924
    ]
  },
  "denominator_imaginary": {
    "dtype": "float64",
    "shape": [
      1,
      13
    ],
    "values": [
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0
    ]
  },
  "poles_real": {
    "dtype": "float64",
    "shape": [
      12,
      1
    ],
    "values": [
      0.29167537549833017,
      0.29167537549833017,
      0.760337411051585,
      0.760337411051585,
      0.3172242208721118,
      0.3172242208721118,
      0.6540101674093046,
      0.6540101674093046,
      0.40569279359854515,
      0.40569279359854515,
      0.5312681807612094,
      0.5312681807612094
    ]
  },
  "poles_imaginary": {
    "dtype": "float64",
    "shape": [
      12,
      1
    ],
    "values": [
      0.8619350051190747,
      -0.8619350051190747,
      0.5573746773417063,
      -0.5573746773417063,
      0.7008531950812443,
      -0.7008531950812443,
      0.519398909807469,
      -0.519398909807469,
      0.578987084716455,
      -0.578987084716455,
      0.5190150837457009,
      -0.5190150837457009
    ]
  },
  "domain": "discrete",
  "stable": true,
  "sos_real": {
    "dtype": "float64",
    "shape": [
      6,
      6
    ],
    "values": [
      1.0,
      1.0,
      1.0,
      1.0,
      1.0,
      1.0,
      -1.2293907672660664,
      -1.2323853741331865,
      -1.233103962226898,
      -1.2390166292551452,
      -1.2397971574153837,
      -1.2427139747020535
    ]
  },
  "sos_imaginary": {
    "dtype": "float64",
    "shape": [
      6,
      6
    ],
    "values": [
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0
    ]
  },
  "sos_gain": 0.2894069170783345
}

design.chebyshev1

Access
Registered in the Python Job
Arguments
Typed operands a, b, and c, with an optional typed options struct.
Shape
Scalar, scalar or pair, scalar
Units
Normalized cutoff frequency or rad/s
Result
Numeric and diagnostic fields.
Purpose
Designs a Chebyshev type I filter.
gxtxt_api_call("SIGNAL_API_v1", "design.chebyshev1", args)
Fields and Options
  • a

    Purpose
    Filter order
    Type
    integer
    Required
    Yes (1)
    Units
    1
    Minimum
    1
    Error
    InvalidOrder
  • b

    Purpose
    Cutoff
    Type
    array
    Required
    Yes (1)
    Units
    Fraction of Nyquist in the discrete domain, rad/s in the analog domain.
    Minimum
    >0
    Shape
    One edge for low or high, two increasing edges for bandpass or stop. In the discrete domain every edge is below 1.
    Error
    InvalidCutoff
  • c

    Purpose
    Passband ripple
    Type
    number
    Required
    Yes (1)
    Units
    dB
    Error
    InvalidOperand
  • options.band

    Purpose
    Band
    Type
    choice
    Required
    No (0)
    Default
    low
    Units
    1
    Choices
    low;high;bandpass;stop
    Error
    InvalidBand
  • options.domain

    Purpose
    Domain
    Type
    choice
    Required
    No (0)
    Default
    discrete
    Units
    1
    Choices
    discrete;analog
    Error
    InvalidModel
Applicable Constraints
  • cutoff_length_by_band

    Type
    map
    Value
    low:1;high:1;bandpass:2;stop:2
  • cutoff_unit_by_domain

    Type
    map
    Value
    discrete as a fraction of Nyquist, analog in rad/s
  • cutoff_order

    Type
    scalar
    Value
    Strictly increasing
  • discrete_cutoff_range

    Type
    map
    Value
    Exclusive bounds (0 < value < 1)
Recorded Result · design.chebyshev1

Download the example script (extract the ZIP first).

Example Operands Preview

[
  {
    "kind": "array",
    "shape": [
      1,
      1
    ],
    "real": [
      6
    ]
  },
  {
    "kind": "array",
    "shape": [
      1,
      1
    ],
    "real": [
      0.3
    ]
  },
  {
    "kind": "array",
    "shape": [
      1,
      1
    ],
    "real": [
      1.0
    ]
  }
]

Result Preview

{
  "numerator_real": {
    "dtype": "float64",
    "shape": [
      1,
      7
    ],
    "values": [
      0.0004866255629694499,
      0.0029197533778166996,
      0.0072993834445417485,
      0.009732511259388997,
      0.0072993834445417485,
      0.0029197533778166996,
      0.0004866255629694499
    ]
  },
  "numerator_imaginary": {
    "dtype": "float64",
    "shape": [
      1,
      7
    ],
    "values": [
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0
    ]
  },
  "denominator_real": {
    "dtype": "float64",
    "shape": [
      1,
      7
    ],
    "values": [
      1.0,
      -3.947957281602361,
      7.423727809679882,
      -8.252425936408052,
      5.666282450986355,
      -2.27276339509163,
      0.41808053560296166
    ]
  },
  "denominator_imaginary": {
    "dtype": "float64",
    "shape": [
      1,
      7
    ],
    "values": [
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0
    ]
  },
  "poles_real": {
    "dtype": "float64",
    "shape": [
      6,
      1
    ],
    "values": [
      0.56247424876485,
      0.56247424876485,
      0.6489109437553118,
      0.6489109437553118,
      0.7625934482810212,
      0.7625934482810212
    ]
  },
  "poles_imaginary": {
    "dtype": "float64",
    "shape": [
      6,
      1
    ],
    "values": [
      0.7665872757039678,
      -0.7665872757039678,
      0.562315457297658,
      -0.562315457297658,
      0.21377838296784996,
      -0.21377838296784996
    ]
  },
  "domain": "discrete",
  "stable": true,
  "sos_real": {
    "dtype": "float64",
    "shape": [
      3,
      6
    ],
    "values": [
      1.0,
      1.0,
      1.0,
      2.0043128968038415,
      1.9956665544858267,
      2.000020548710341,
      1.0043316313386481,
      0.9956852001842296,
      1.0000018586026858,
      1.0,
      1.0,
      1.0
    ]
  },
  "sos_imaginary": {
    "dtype": "float64",
    "shape": [
      3,
      6
    ],
    "values": [
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0
    ]
  },
  "sos_gain": 0.0004866255629694499
}

design.chebyshev2

Access
Registered in the Python Job
Arguments
Typed operands a, b, and c, with an optional typed options struct.
Shape
Scalar, scalar or pair, scalar
Units
Normalized cutoff frequency or rad/s
Result
Numeric and diagnostic fields.
Purpose
Designs a Chebyshev type II filter.
gxtxt_api_call("SIGNAL_API_v1", "design.chebyshev2", args)
Fields and Options
  • a

    Purpose
    Filter order
    Type
    integer
    Required
    Yes (1)
    Units
    1
    Minimum
    1
    Error
    InvalidOrder
  • b

    Purpose
    Cutoff
    Type
    array
    Required
    Yes (1)
    Units
    Fraction of Nyquist in the discrete domain, rad/s in the analog domain.
    Minimum
    >0
    Shape
    One edge for low or high, two increasing edges for bandpass or stop. In the discrete domain every edge is below 1.
    Error
    InvalidCutoff
  • c

    Purpose
    Stopband attenuation
    Type
    number
    Required
    Yes (1)
    Units
    dB
    Error
    InvalidOperand
  • options.band

    Purpose
    Band
    Type
    choice
    Required
    No (0)
    Default
    low
    Units
    1
    Choices
    low;high;bandpass;stop
    Error
    InvalidBand
  • options.domain

    Purpose
    Domain
    Type
    choice
    Required
    No (0)
    Default
    discrete
    Units
    1
    Choices
    discrete;analog
    Error
    InvalidModel
Applicable Constraints
  • cutoff_length_by_band

    Type
    map
    Value
    low:1;high:1;bandpass:2;stop:2
  • cutoff_unit_by_domain

    Type
    map
    Value
    discrete as a fraction of Nyquist, analog in rad/s
  • cutoff_order

    Type
    scalar
    Value
    Strictly increasing
  • discrete_cutoff_range

    Type
    map
    Value
    Exclusive bounds (0 < value < 1)
Recorded Result · design.chebyshev2

Download the example script (extract the ZIP first).

Example Operands Preview

[
  {
    "kind": "array",
    "shape": [
      1,
      1
    ],
    "real": [
      6
    ]
  },
  {
    "kind": "array",
    "shape": [
      1,
      1
    ],
    "real": [
      0.3
    ]
  },
  {
    "kind": "array",
    "shape": [
      1,
      1
    ],
    "real": [
      40.0
    ]
  }
]

Result Preview

{
  "numerator_real": {
    "dtype": "float64",
    "shape": [
      1,
      7
    ],
    "values": [
      0.020851941432827002,
      -0.01214800916099706,
      0.034115485217486814,
      -0.006716229859387189,
      0.03411548521748684,
      -0.01214800916099706,
      0.020851941432827002
    ]
  },
  "numerator_imaginary": {
    "dtype": "float64",
    "shape": [
      1,
      7
    ],
    "values": [
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0
    ]
  },
  "denominator_real": {
    "dtype": "float64",
    "shape": [
      1,
      7
    ],
    "values": [
      1.0,
      -3.0655285310852,
      4.375376109789933,
      -3.5099024024991934,
      1.662509128429046,
      -0.4324628379564435,
      0.04893113844110346
    ]
  },
  "denominator_imaginary": {
    "dtype": "float64",
    "shape": [
      1,
      7
    ],
    "values": [
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0
    ]
  },
  "poles_real": {
    "dtype": "float64",
    "shape": [
      6,
      1
    ],
    "values": [
      0.6816869108472088,
      0.6816869108472088,
      0.5007262833522923,
      0.5007262833522923,
      0.35035107134309956,
      0.35035107134309956
    ]
  },
  "poles_imaginary": {
    "dtype": "float64",
    "shape": [
      6,
      1
    ],
    "values": [
      0.5661420070828757,
      -0.5661420070828757,
      0.41029498235866296,
      -0.41029498235866296,
      0.16110402248294844,
      -0.16110402248294844
    ]
  },
  "domain": "discrete",
  "stable": true,
  "sos_real": {
    "dtype": "float64",
    "shape": [
      3,
      6
    ],
    "values": [
      1.0,
      1.0,
      1.0,
      1.1795886836161222,
      -0.6329086227524976,
      -1.1292641430283925,
      1.000000000000003,
      0.9999999999999982,
      1.0,
      1.0,
      1.0,
      1.0
    ]
  },
  "sos_imaginary": {
    "dtype": "float64",
    "shape": [
      3,
      6
    ],
    "values": [
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0
    ]
  },
  "sos_gain": 0.020851941432827002
}

design.elliptic

Access
Registered in the Python Job
Arguments
Typed operands a, b, and c, with an optional typed options struct.
Shape
Scalar, scalar or pair, scalar
Units
Normalized cutoff frequency or rad/s
Result
Numeric and diagnostic fields.
Purpose
Designs an elliptic filter.
gxtxt_api_call("SIGNAL_API_v1", "design.elliptic", args)
Fields and Options
  • a

    Purpose
    Filter order
    Type
    integer
    Required
    Yes (1)
    Units
    1
    Minimum
    1
    Error
    InvalidOrder
  • b

    Purpose
    Cutoff
    Type
    array
    Required
    Yes (1)
    Units
    Fraction of Nyquist in the discrete domain, rad/s in the analog domain.
    Minimum
    >0
    Shape
    One edge for low or high, two increasing edges for bandpass or stop. In the discrete domain every edge is below 1.
    Error
    InvalidCutoff
  • c

    Purpose
    Passband ripple
    Type
    number
    Required
    Yes (1)
    Units
    dB
    Error
    InvalidOperand
  • options.band

    Purpose
    Band
    Type
    choice
    Required
    No (0)
    Default
    low
    Units
    1
    Choices
    low;high;bandpass;stop
    Error
    InvalidBand
  • options.domain

    Purpose
    Domain
    Type
    choice
    Required
    No (0)
    Default
    discrete
    Units
    1
    Choices
    discrete;analog
    Error
    InvalidModel
  • options.stopband_db

    Purpose
    Stopband attenuation
    Type
    number
    Required
    No (0)
    Default
    40
    Units
    dB
    Error
    InvalidArguments
Applicable Constraints
  • cutoff_length_by_band

    Type
    map
    Value
    low:1;high:1;bandpass:2;stop:2
  • cutoff_unit_by_domain

    Type
    map
    Value
    discrete as a fraction of Nyquist, analog in rad/s
  • cutoff_order

    Type
    scalar
    Value
    Strictly increasing
  • discrete_cutoff_range

    Type
    map
    Value
    Exclusive bounds (0 < value < 1)
Recorded Result · design.elliptic

Download the example script (extract the ZIP first).

Example Operands Preview

[
  {
    "kind": "array",
    "shape": [
      1,
      1
    ],
    "real": [
      6
    ]
  },
  {
    "kind": "array",
    "shape": [
      1,
      1
    ],
    "real": [
      0.3
    ]
  },
  {
    "kind": "array",
    "shape": [
      1,
      1
    ],
    "real": [
      1.0
    ]
  }
]

Result Preview

{
  "numerator_real": {
    "dtype": "float64",
    "shape": [
      1,
      7
    ],
    "values": [
      0.026485212145763246,
      -0.026926542020689444,
      0.06328290505337336,
      -0.037514532137014556,
      0.06328290505337336,
      -0.026926542020689434,
      0.026485212145763246
    ]
  },
  "numerator_imaginary": {
    "dtype": "float64",
    "shape": [
      1,
      7
    ],
    "values": [
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0
    ]
  },
  "denominator_real": {
    "dtype": "float64",
    "shape": [
      1,
      7
    ],
    "values": [
      1.0,
      -3.697035008051409,
      6.8645502087721395,
      -7.613551283399245,
      5.305354823297071,
      -2.1834169475697776,
      0.42302502368423056
    ]
  },
  "denominator_imaginary": {
    "dtype": "float64",
    "shape": [
      1,
      7
    ],
    "values": [
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0
    ]
  },
  "poles_real": {
    "dtype": "float64",
    "shape": [
      6,
      1
    ],
    "values": [
      0.5768706068634628,
      0.5768706068634628,
      0.6027417475206986,
      0.6027417475206986,
      0.6689051496415437,
      0.6689051496415437
    ]
  },
  "poles_imaginary": {
    "dtype": "float64",
    "shape": [
      6,
      1
    ],
    "values": [
      0.793383085030591,
      -0.793383085030591,
      0.6740164099392387,
      -0.6740164099392387,
      0.30045441151290714,
      -0.30045441151290714
    ]
  },
  "domain": "discrete",
  "stable": true,
  "sos_real": {
    "dtype": "float64",
    "shape": [
      3,
      6
    ],
    "values": [
      1.0,
      1.0,
      1.0,
      0.780034563807849,
      -0.7711605978908911,
      -1.0255372220954353,
      1.0000000000000004,
      1.0000000000000009,
      0.9999999999999996,
      1.0,
      1.0,
      1.0
    ]
  },
  "sos_imaginary": {
    "dtype": "float64",
    "shape": [
      3,
      6
    ],
    "values": [
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0
    ]
  },
  "sos_gain": 0.026485212145763246
}

design.fir_window

Access
Registered in the Python Job
Arguments
Typed operands a, b, and c, with an optional typed options struct.
Shape
Scalar, scalar or pair, scalar
Units
Normalized cutoff frequency or rad/s
Result
Numeric and diagnostic fields.
Purpose
Designs a window-method FIR filter.
gxtxt_api_call("SIGNAL_API_v1", "design.fir_window", args)
Fields and Options
  • a

    Purpose
    Filter order
    Type
    integer
    Required
    Yes (1)
    Units
    1
    Minimum
    1
    Error
    InvalidOrder
  • b

    Purpose
    Cutoff
    Type
    array
    Required
    Yes (1)
    Units
    Fraction of Nyquist in the discrete domain, rad/s in the analog domain.
    Minimum
    >0
    Shape
    One edge for low or high, two increasing edges for bandpass or stop. In the discrete domain every edge is below 1.
    Error
    InvalidCutoff
  • c

    Purpose
    Unused protocol operand
    Type
    empty
    Required
    No (0)
    Units
    1
    Shape
    Unused
    Error
    InvalidOperand
  • options.band

    Purpose
    Band
    Type
    choice
    Required
    No (0)
    Default
    low
    Units
    1
    Choices
    low;high;bandpass;stop
    Error
    InvalidBand
  • options.domain

    Purpose
    Domain
    Type
    choice
    Required
    No (0)
    Default
    discrete
    Units
    1
    Choices
    discrete;analog
    Error
    InvalidModel
  • options.window

    Purpose
    Window
    Type
    choice
    Required
    No (0)
    Default
    hamming
    Units
    1
    Choices
    hamming;hann;blackman
    Shape
    Discrete domain only. The high and stop modes require an even order.
    Error
    InvalidWindow
Applicable Constraints
  • cutoff_length_by_band

    Type
    map
    Value
    low:1;high:1;bandpass:2;stop:2
  • cutoff_unit_by_domain

    Type
    map
    Value
    discrete as a fraction of Nyquist, analog in rad/s
  • cutoff_order

    Type
    scalar
    Value
    Strictly increasing
  • discrete_cutoff_range

    Type
    map
    Value
    Exclusive bounds (0 < value < 1)
  • supported_domain

    Type
    scalar
    Value
    discrete
  • even_order_bands

    Type
    list
    Value
    high;stop
Recorded Result · design.fir_window:stop

Download the example script (extract the ZIP first).

Example Operands Preview

[
  {
    "kind": "array",
    "shape": [
      1,
      1
    ],
    "real": [
      6
    ]
  },
  {
    "kind": "array",
    "shape": [
      2,
      1
    ],
    "real": [
      0.2,
      0.4
    ]
  },
  {
    "kind": "empty"
  },
  {
    "kind": "struct",
    "fields": {
      "band": {
        "kind": "text",
        "value": "stop"
      }
    }
  }
]

Result Preview

{
  "numerator_real": {
    "dtype": "float64",
    "shape": [
      1,
      7
    ],
    "values": [
      0.019083326074342617,
      0.025768252777516865,
      -0.13102976999375215,
      1.1723563822837852,
      -0.13102976999375218,
      0.025768252777516865,
      0.019083326074342617
    ]
  },
  "numerator_imaginary": {
    "dtype": "float64",
    "shape": [
      1,
      7
    ],
    "values": [
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0
    ]
  },
  "denominator_real": 1.0,
  "denominator_imaginary": 0.0,
  "poles_real": {
    "dtype": "float64",
    "shape": [
      0,
      1
    ],
    "values": []
  },
  "poles_imaginary": {
    "dtype": "float64",
    "shape": [
      0,
      1
    ],
    "values": []
  },
  "domain": "discrete",
  "stable": true
}

multirate.decimate

Access
Registered in the Python Job
Arguments
Typed operands a, b, and c, with an optional typed options struct.
Shape
Vector and integers
Units
Keeps the signal unit
Result
Numeric and diagnostic fields.
Purpose
Reduces the sample rate by decimation.
gxtxt_api_call("SIGNAL_API_v1", "multirate.decimate", args)
Fields and Options
  • a

    Purpose
    Signal
    Type
    array
    Required
    Yes (1)
    Units
    Signal unit
    Shape
    Vector
    Error
    InvalidOperand
  • b

    Purpose
    Resampling factor
    Type
    integer
    Required
    Yes (1)
    Units
    1
    Minimum
    1
    Error
    InvalidFactor
  • c

    Purpose
    Unused protocol operand
    Type
    empty
    Required
    No (0)
    Units
    1
    Shape
    Unused
    Error
    InvalidFactor
  • options.sample_rate

    Purpose
    Input sample rate
    Type
    number
    Required
    No (0)
    Units
    Hz
    Minimum
    >0
    Error
    InvalidSampleRate
  • options.start_time

    Purpose
    Start time
    Type
    number
    Required
    No (0)
    Default
    0
    Units
    s
    Error
    InvalidArguments
  • options.input_time

    Purpose
    Input time
    Type
    array
    Required
    No (0)
    Units
    s
    Shape
    Uniformly spaced increasing vector, same length as a
    Error
    InvalidGrid
Recorded Result · multirate.decimate

Download the example script (extract the ZIP first).

Example Operands Preview

[
  {
    "kind": "array",
    "shape": [
      128,
      1
    ],
    "real": [
      0.0,
      0.45339411048374456,
      0.8071067811865474,
      0.9945902106299415,
      1.0,
      0.853168854392632,
      0.6071067811865476,
      0.3119727542464351,
      9.797174393178826e-17,
      -0.31197275424643495
    ]
  },
  {
    "kind": "array",
    "shape": [
      1,
      1
    ],
    "real": [
      2
    ]
  },
  {
    "kind": "empty"
  },
  {
    "kind": "struct",
    "fields": {
      "sample_rate": {
        "kind": "array",
        "shape": [
          1,
          1
        ],
        "real": [
          128.0
        ]
      }
    }
  }
]

Result Preview

{
  "value_real": {
    "dtype": "float64",
    "shape": [
      64,
      1
    ],
    "values": [
      0.0004299477974819101,
      0.8046100002159344,
      0.9946923157606633,
      0.6054654229601653,
      -0.0011112496784827352,
      -0.6034968678633149,
      -0.9959418257279957,
      -0.8044160722685761,
      0.0005592009753621699,
      0.8035068011069176,
      0.996286125795206,
      0.6039003058406893
    ]
  },
  "value_imaginary": {
    "dtype": "float64",
    "shape": [
      64,
      1
    ],
    "values": [
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0
    ]
  },
  "up_factor": 1.0,
  "down_factor": 2.0,
  "output_sample_rate": 64.0,
  "time": {
    "dtype": "float64",
    "shape": [
      64,
      1
    ],
    "values": [
      0.0,
      0.015625,
      0.03125,
      0.046875,
      0.0625,
      0.078125,
      0.09375,
      0.109375,
      0.125,
      0.140625,
      0.15625,
      0.171875
    ]
  }
}

multirate.interpolate

Access
Registered in the Python Job
Arguments
Typed operands a, b, and c, with an optional typed options struct.
Shape
Vector and integers
Units
Keeps the signal unit
Result
Numeric and diagnostic fields.
Purpose
Increases the sample rate by interpolation.
gxtxt_api_call("SIGNAL_API_v1", "multirate.interpolate", args)
Fields and Options
  • a

    Purpose
    Signal
    Type
    array
    Required
    Yes (1)
    Units
    Signal unit
    Shape
    Vector
    Error
    InvalidOperand
  • b

    Purpose
    Resampling factor
    Type
    integer
    Required
    Yes (1)
    Units
    1
    Minimum
    1
    Error
    InvalidFactor
  • c

    Purpose
    Unused protocol operand
    Type
    empty
    Required
    No (0)
    Units
    1
    Shape
    Unused
    Error
    InvalidFactor
  • options.sample_rate

    Purpose
    Input sample rate
    Type
    number
    Required
    No (0)
    Units
    Hz
    Minimum
    >0
    Error
    InvalidSampleRate
  • options.start_time

    Purpose
    Start time
    Type
    number
    Required
    No (0)
    Default
    0
    Units
    s
    Error
    InvalidArguments
  • options.input_time

    Purpose
    Input time
    Type
    array
    Required
    No (0)
    Units
    s
    Shape
    Uniformly spaced increasing vector, same length as a
    Error
    InvalidGrid
Recorded Result · multirate.interpolate

Download the example script (extract the ZIP first).

Example Operands Preview

[
  {
    "kind": "array",
    "shape": [
      128,
      1
    ],
    "real": [
      0.0,
      0.45339411048374456,
      0.8071067811865474,
      0.9945902106299415,
      1.0,
      0.853168854392632,
      0.6071067811865476,
      0.3119727542464351,
      9.797174393178826e-17,
      -0.31197275424643495
    ]
  },
  {
    "kind": "array",
    "shape": [
      1,
      1
    ],
    "real": [
      2
    ]
  },
  {
    "kind": "empty"
  },
  {
    "kind": "struct",
    "fields": {
      "sample_rate": {
        "kind": "array",
        "shape": [
          1,
          1
        ],
        "real": [
          128.0
        ]
      }
    }
  }
]

Result Preview

{
  "value_real": {
    "dtype": "float64",
    "shape": [
      256,
      1
    ],
    "values": [
      0.16360190122081908,
      0.3300945227258939,
      0.5183946676384976,
      0.7020034373071373,
      0.8493020364401305,
      0.9502492777658289,
      1.0001360910623627,
      1.0044021450230547,
      0.9680558902188998,
      0.8960472224881635,
      0.7974459632661762,
      0.6736307824483625
    ]
  },
  "value_imaginary": {
    "dtype": "float64",
    "shape": [
      256,
      1
    ],
    "values": [
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0
    ]
  },
  "up_factor": 2.0,
  "down_factor": 1.0,
  "output_sample_rate": 256.0,
  "time": {
    "dtype": "float64",
    "shape": [
      256,
      1
    ],
    "values": [
      0.0,
      0.00390625,
      0.0078125,
      0.01171875,
      0.015625,
      0.01953125,
      0.0234375,
      0.02734375,
      0.03125,
      0.03515625,
      0.0390625,
      0.04296875
    ]
  }
}

multirate.rational

Access
Registered in the Python Job
Arguments
Typed operands a, b, and c, with an optional typed options struct.
Shape
Vector and integers
Units
Keeps the signal unit
Result
Numeric and diagnostic fields.
Purpose
Resamples by a rational factor.
gxtxt_api_call("SIGNAL_API_v1", "multirate.rational", args)
Fields and Options
  • a

    Purpose
    Signal
    Type
    array
    Required
    Yes (1)
    Units
    Signal unit
    Shape
    Vector
    Error
    InvalidOperand
  • b

    Purpose
    Resampling factor
    Type
    integer
    Required
    Yes (1)
    Units
    1
    Minimum
    1
    Error
    InvalidFactor
  • c

    Purpose
    Denominator factor
    Type
    integer
    Required
    Yes (1)
    Units
    1
    Minimum
    1
    Error
    InvalidFactor
  • options.sample_rate

    Purpose
    Input sample rate
    Type
    number
    Required
    No (0)
    Units
    Hz
    Minimum
    >0
    Error
    InvalidSampleRate
  • options.start_time

    Purpose
    Start time
    Type
    number
    Required
    No (0)
    Default
    0
    Units
    s
    Error
    InvalidArguments
  • options.input_time

    Purpose
    Input time
    Type
    array
    Required
    No (0)
    Units
    s
    Shape
    Uniformly spaced increasing vector, same length as a
    Error
    InvalidGrid
Recorded Result · multirate.rational:uniform

Download the example script (extract the ZIP first).

Example Operands Preview

[
  {
    "kind": "array",
    "shape": [
      128,
      1
    ],
    "real": [
      0.0,
      0.45339411048374456,
      0.8071067811865474,
      0.9945902106299415,
      1.0,
      0.853168854392632,
      0.6071067811865476,
      0.3119727542464351,
      9.797174393178826e-17,
      -0.31197275424643495
    ]
  },
  {
    "kind": "array",
    "shape": [
      1,
      1
    ],
    "real": [
      2
    ]
  },
  {
    "kind": "array",
    "shape": [
      1,
      1
    ],
    "real": [
      3
    ]
  },
  {
    "kind": "struct",
    "fields": {
      "input_time": {
        "kind": "array",
        "shape": [
          128,
          1
        ],
        "real": [
          0.0,
          0.0078125,
          0.015625,
          0.0234375,
          0.03125,
          0.0390625,
          0.046875,
          0.0546875,
          0.0625,
          0.0703125
        ]
      },
      "start_time": {
        "kind": "array",
        "shape": [
          1,
          1
        ],
        "real": [
          0.0
        ]
      }
    }
  }
]

Result Preview

{
  "value_real": {
    "dtype": "float64",
    "shape": [
      86,
      1
    ],
    "values": [
      0.04448608512578861,
      0.640353283775821,
      0.9974284679791469,
      0.9410581339577857,
      0.6080104013521767,
      0.15623742150414294,
      -0.3115436545686443,
      -0.7393718880575164,
      -0.9997904662368831,
      -0.924036983841184,
      -0.45326199659056154,
      0.23321744142502163
    ]
  },
  "value_imaginary": {
    "dtype": "float64",
    "shape": [
      86,
      1
    ],
    "values": [
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0
    ]
  },
  "up_factor": 2.0,
  "down_factor": 3.0,
  "output_sample_rate": 85.33333333333333,
  "time": {
    "dtype": "float64",
    "shape": [
      86,
      1
    ],
    "values": [
      0.0,
      0.01171875,
      0.0234375,
      0.03515625,
      0.046875,
      0.05859375,
      0.0703125,
      0.08203125,
      0.09375,
      0.10546875,
      0.1171875,
      0.12890625
    ]
  }
}
Negative Test or Attempt Result · multirate.rational:irregular

Download the example script (extract the ZIP first).

Example Operands Preview

[
  {
    "kind": "array",
    "shape": [
      128,
      1
    ],
    "real": [
      0.0,
      0.45339411048374456,
      0.8071067811865474,
      0.9945902106299415,
      1.0,
      0.853168854392632,
      0.6071067811865476,
      0.3119727542464351,
      9.797174393178826e-17,
      -0.31197275424643495
    ]
  },
  {
    "kind": "array",
    "shape": [
      1,
      1
    ],
    "real": [
      2
    ]
  },
  {
    "kind": "array",
    "shape": [
      1,
      1
    ],
    "real": [
      3
    ]
  },
  {
    "kind": "struct",
    "fields": {
      "input_time": {
        "kind": "array",
        "shape": [
          128,
          1
        ],
        "real": [
          0.0,
          0.0078125,
          0.015625,
          0.0234375,
          0.03125,
          0.0390625,
          0.046875,
          0.0546875,
          0.0625,
          0.0703125
        ]
      }
    }
  }
]

Result Preview

"GXTXT:Signal:InvalidGrid: multirate input time must be uniform"

design.bessel

Access
Registered in the Python Job
Arguments
Typed operands a, b, and c, with an optional typed options struct.
Shape
Scalar, scalar or pair, scalar
Units
Normalized cutoff frequency or rad/s
Result
Numeric and diagnostic fields.
Purpose
Designs a Bessel filter.
gxtxt_api_call("SIGNAL_API_v1", "design.bessel", args)
Fields and Options
  • a

    Purpose
    Filter order
    Type
    integer
    Required
    Yes (1)
    Units
    1
    Minimum
    1
    Error
    InvalidOrder
  • b

    Purpose
    Cutoff
    Type
    array
    Required
    Yes (1)
    Units
    Fraction of Nyquist in the discrete domain, rad/s in the analog domain.
    Minimum
    >0
    Shape
    One edge for low or high, two increasing edges for bandpass or stop. In the discrete domain every edge is below 1.
    Error
    InvalidCutoff
  • c

    Purpose
    Unused protocol operand
    Type
    empty
    Required
    No (0)
    Units
    1
    Shape
    Unused
    Error
    InvalidOperand
  • options.band

    Purpose
    Band
    Type
    choice
    Required
    No (0)
    Default
    low
    Units
    1
    Choices
    low;high;bandpass;stop
    Error
    InvalidBand
  • options.domain

    Purpose
    Domain
    Type
    choice
    Required
    No (0)
    Default
    discrete
    Units
    1
    Choices
    discrete;analog
    Error
    InvalidModel
Applicable Constraints
  • cutoff_length_by_band

    Type
    map
    Value
    low:1;high:1;bandpass:2;stop:2
  • cutoff_unit_by_domain

    Type
    map
    Value
    discrete as a fraction of Nyquist, analog in rad/s
  • cutoff_order

    Type
    scalar
    Value
    Strictly increasing
  • discrete_cutoff_range

    Type
    map
    Value
    Exclusive bounds (0 < value < 1)
Recorded Result · design.bessel

Download the example script (extract the ZIP first).

Example Operands Preview

[
  {
    "kind": "array",
    "shape": [
      1,
      1
    ],
    "real": [
      6
    ]
  },
  {
    "kind": "array",
    "shape": [
      1,
      1
    ],
    "real": [
      10.0
    ]
  },
  {
    "kind": "empty"
  },
  {
    "kind": "struct",
    "fields": {
      "domain": {
        "kind": "text",
        "value": "analog"
      }
    }
  }
]

Result Preview

{
  "numerator_real": 999999.9999999997,
  "numerator_imaginary": 0.0,
  "denominator_real": {
    "dtype": "float64",
    "shape": [
      1,
      7
    ],
    "values": [
      1.0,
      44.95195101098728,
      962.227571282953,
      12358.287613066472,
      99201.63202897414,
      467165.4850946743,
      999999.9999999959
    ]
  },
  "denominator_imaginary": {
    "dtype": "float64",
    "shape": [
      1,
      7
    ],
    "values": [
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0
    ]
  },
  "poles_real": {
    "dtype": "float64",
    "shape": [
      6,
      1
    ],
    "values": [
      -5.385526816693191,
      -5.385526816693191,
      -7.996541858327946,
      -7.996541858327946,
      -9.093906830472523,
      -9.093906830472523
    ]
  },
  "poles_imaginary": {
    "dtype": "float64",
    "shape": [
      6,
      1
    ],
    "values": [
      9.616876881954337,
      -9.616876881954337,
      5.621717346937335,
      -5.621717346937335,
      1.8569643967926734,
      -1.8569643967926734
    ]
  },
  "domain": "analog",
  "stable": true
}

design.estimate_order

Access
Registered in the Python Job
Arguments
Typed operands a, b, and c, with an optional typed options struct.
Shape
Scalar, scalar or pair, scalar
Units
Normalized cutoff frequency or rad/s
Result
Numeric and diagnostic fields.
Purpose
Estimates the order and cutoff frequency from the passband and stopband specifications.
gxtxt_api_call("SIGNAL_API_v1", "design.estimate_order", args)
Fields and Options
  • a

    Purpose
    Passband edge
    Type
    array
    Required
    Yes (1)
    Units
    Nyquist fraction
    Shape
    Scalar or ordered pair
    Error
    InvalidOperand
  • b

    Purpose
    Stopband edge
    Type
    array
    Required
    Yes (1)
    Units
    Nyquist fraction
    Shape
    Scalar or ordered pair
    Error
    InvalidOperand
  • c

    Purpose
    Passband ripple
    Type
    number
    Required
    Yes (1)
    Units
    dB
    Minimum
    >0
    Error
    InvalidTolerance
  • options.stopband_db

    Purpose
    Stopband attenuation
    Type
    number
    Required
    No (0)
    Default
    40
    Units
    dB
    Minimum
    >0
    Shape
    Greater than c
    Error
    InvalidTolerance
  • options.prototype

    Purpose
    Filter prototype
    Type
    choice
    Required
    No (0)
    Default
    butterworth
    Units
    1
    Choices
    butterworth;chebyshev1;chebyshev2;elliptic
    Error
    InvalidModel
Recorded Result · design.estimate_order:elliptic

Download the example script (extract the ZIP first).

Example Operands Preview

[
  {
    "kind": "array",
    "shape": [
      1,
      1
    ],
    "real": [
      0.25
    ]
  },
  {
    "kind": "array",
    "shape": [
      1,
      1
    ],
    "real": [
      0.4
    ]
  },
  {
    "kind": "array",
    "shape": [
      1,
      1
    ],
    "real": [
      1.0
    ]
  },
  {
    "kind": "struct",
    "fields": {
      "prototype": {
        "kind": "text",
        "value": "elliptic"
      },
      "stopband_db": {
        "kind": "array",
        "shape": [
          1,
          1
        ],
        "real": [
          40.0
        ]
      }
    }
  }
]

Result Preview

{
  "order": 4.0,
  "cutoff": 0.25
}