Skip navigation links
xal.tools.dsp

Class LtiDigitalFilter

    • Constructor Detail

      • LtiDigitalFilter

        public LtiDigitalFilter(int intOrder)
        Create a new filter object for processing discrete signal trains.
        Parameters:
        intOrder - filter order
    • Method Detail

      • getInputCoefficient

        public double getInputCoefficient(int iTime,
                                          int iDelay)
        Return the indicated input coefficient determined by the call to setInputCoefficient(int, double). Note that this value is time-independent, that is, the argument iTime is ignored.
        Specified by:
        getInputCoefficient in class AbstractDigitalFilter
        Parameters:
        iTime - current time index (ignored)
        iDelay - delay index of the filter coefficient
        Returns:
        the input coefficient for the given delay index
        See Also:
        gov.sns.tools.dsp.LtiDigitalFilter#setInputCoefficient(int, double), gov.sns.tools.dsp.AbstractDigitalFilter#getInputCoefficient(int, int)
      • getOutputCoefficient

        public double getOutputCoefficient(int iTime,
                                           int iDelay)
        Return the indicated output coefficient determined by the call to setOutputCoefficient(int, double). Note that this value is time-independent, that is, the argument iTime is ignored.
        Specified by:
        getOutputCoefficient in class AbstractDigitalFilter
        Parameters:
        iTime - current time index (ignored)
        iDelay - delay index of the filter coefficient
        Returns:
        the output coefficient for the given delay index
        See Also:
        gov.sns.tools.dsp.LtiDigitalFilter#setOutputCoefficient(int, double), gov.sns.tools.dsp.AbstractDigitalFilter#getOutputCoefficient(int, int)
      • setInputCoefficient

        public void setInputCoefficient(int iDelay,
                                        double dblVal)
                                 throws java.lang.IllegalArgumentException
        Sets an input signal coefficient.
        Parameters:
        iDelay - delay index of the coefficient
        dblVal - coefficient value
        Throws:
        java.lang.IllegalArgumentException - index outside interval [0,Order]
      • setInputCoefficients

        public void setInputCoefficients(double[] arrCoeffs)
                                  throws java.lang.IllegalArgumentException
        Sets all the input signal coefficients. The elements of the argument array should be indexed by delay; that is, the 0th element corresponds to no delay, the 1st element to the unit delay, etc.
        Parameters:
        arrCoeffs - array of input coefficients
        Throws:
        java.lang.IllegalArgumentException - argument has wrong array size
      • setOutputCoefficient

        public void setOutputCoefficient(int iDelay,
                                         double dblVal)
                                  throws java.lang.IndexOutOfBoundsException
        Sets an output signal coefficient. Note that since an index of zero represents the current output it is an inverse scaling value.
        Parameters:
        iDelay - delay index of the coefficient
        dblVal - coefficient value
        Throws:
        java.lang.IndexOutOfBoundsException - index outside interval [0,Order]
      • setOutputCoefficients

        public void setOutputCoefficients(double[] arrCoeffs)
                                   throws java.lang.IllegalArgumentException
        Sets all the output signal coefficients. The elements of the argument array should be indexed by delay; that is, the 0th element corresponds to no delay, the 1st element to the unit delay, etc.
        Parameters:
        arrCoeffs - array of output coefficients
        Throws:
        java.lang.IllegalArgumentException - argument has wrong array size
      • getInputCoefficient

        public double getInputCoefficient(int iDelay)
                                   throws java.lang.IndexOutOfBoundsException
        Return the input coefficient at the given delay index.
        Parameters:
        iDelay - delay index of coefficient
        Returns:
        input coefficient at delay given delay index.
        Throws:
        java.lang.IndexOutOfBoundsException - delay index larger than filter order
        See Also:
        setInputCoefficient(int, double)
      • getOutputCoefficient

        public double getOutputCoefficient(int iDelay)
                                    throws java.lang.IndexOutOfBoundsException
        Return the output coefficient at the given delay index.
        Parameters:
        iDelay - delay index of coefficient
        Returns:
        output coefficient at delay given delay index.
        Throws:
        java.lang.IndexOutOfBoundsException - delay index larger than filter order
        See Also:
        setOutputCoefficient(int, double)
      • transferFunction

        public JSci.maths.Complex transferFunction(JSci.maths.Complex z)
        Compute and return the value of the discrete transfer function for the given value of z, the Z-transform variable.
        Parameters:
        z - Z-transform variable (lies on the unit circle)
        Returns:
        value of this filter's transfer function at z
      • toString

        public java.lang.String toString()
        Write out the configuration and state of this filter as a string for inspection.
        Overrides:
        toString in class AbstractDigitalFilter
        Returns:
        configuration and state of this filter in text form
        See Also:
        Object.toString()