original_docstring: 
          Applies a filter to the spectral signal. If multiple window functions
          are to be used, a list of windows can be provided, which will then
          perform the convolution stepwise. With the exception of the gaussian
          window function, the others functions use the SciPy signal functions.
  
          A reference copy of the original signal is kept as the "Ref" column;
          this is used if a new window function is applied, rather than on the
          already convolved signal.
  
          Parameters
          ----------
          window: str, or iterable of str
              Name of the window function
          sigma: float, optional
              Specifies the magnitude of the gaussian blur. Only used when the
              window function asked for is "gaussian".
          int_col: None or str, optional
              Specifies which column to apply the window function to. If None,
              defaults to the session-wide intensity column
          
docstring: Applies a filter to the spectral signal. If multiple window functions
  are to be used, a list of windows can be provided, which will then
  perform the convolution stepwise. With the exception of the gaussian
  window function, the others functions use the SciPy signal functions.
  
  A reference copy of the original signal is kept as the "Ref" column;
  this is used if a new window function is applied, rather than on the
  already convolved signal.
  
  Parameters
  
  str, or iterable of str
  Name of the window function
  sigma: float, optional
  Specifies the magnitude of the gaussian blur. Only used when the
  window function asked for is "gaussian".
  int_col: None or str, optional
  Specifies which column to apply the window function to. If None,
  defaults to the session-wide intensity column
docstring_tokens: Applies a filter to the spectral signal . If multiple window functions are to be used a list of windows can be provided which will then perform the convolution stepwise . With the exception of the gaussian window function the others functions use the SciPy signal functions . A reference copy of the original signal is kept as the " Ref " column ; this is used if a new window function is applied rather than on the already convolved signal . Parameters str or iterable of str Name of the window function sigma : float optional Specifies the magnitude of the gaussian blur . Only used when the window function asked for is " gaussian " . int_col : None or str optional Specifies which column to apply the window function to . If None defaults to the session - wide intensity column
code: def apply_filter(self, window: Union[str, List[str], np.ndarray], sigma=0.5, int_col=None):
          """
          Applies a filter to the spectral signal. If multiple window functions
          are to be used, a list of windows can be provided, which will then
          perform the convolution stepwise. With the exception of the gaussian
          window function, the others functions use the SciPy signal functions.
  
          A reference copy of the original signal is kept as the "Ref" column;
          this is used if a new window function is applied, rather than on the
          already convolved signal.
  
          Parameters
          ----------
          window: str, or iterable of str
              Name of the window function
          sigma: float, optional
              Specifies the magnitude of the gaussian blur. Only used when the
              window function asked for is "gaussian".
          int_col: None or str, optional
              Specifies which column to apply the window function to. If None,
              defaults to the session-wide intensity column
          """
          if int_col is None:
              int_col = self.int_col
          # If the reference spectrum exists, we'll use that instead
          if "Ref" in self.data.columns:
              int_col = "Ref"
              self.logger.info("Using Ref signal for window function.")
          else:
              # Make a copy of the original signal
              self.data["Ref"] = self.data[self.int_col].copy()
              self.logger.info("Copied signal to Ref column.")
          intensity = self.data[int_col].values
          self.logger.info(f"Applying {window} to column {int_col}.")
          # If we have a lis
          if isinstance(window, List):
              for function in window:
                  intensity = analysis.filter_spectrum(intensity, function, sigma)
          else:
              intensity = analysis.filter_spectrum(intensity, window, sigma)
          self.data[int_col] = intensity
code_tokens: def apply_filter ( self , window : Union [ str , List [ str ] , np . ndarray ] , sigma = 0.5 , int_col = None ) : if int_col is None : int_col = self . int_col if "Ref" in self . data . columns : int_col = "Ref" self . logger . info ( "Using Ref signal for window function." ) else : self . data [ "Ref" ] = self . data [ self . int_col ] . copy ( ) self . logger . info ( "Copied signal to Ref column." ) intensity = self . data [ int_col ] . values self . logger . info ( f"Applying {window} to column {int_col}." ) if isinstance ( window , List ) : for function in window : intensity = analysis . filter_spectrum ( intensity , function , sigma ) else : intensity = analysis . filter_spectrum ( intensity , window , sigma ) self . data [ int_col ] = intensity
short_docstring: Applies a filter to the spectral signal.
short_docstring_tokens: Applies a filter to the spectral signal .
comment: """
          Applies a filter to the spectral signal. If multiple window functions
          are to be used, a list of windows can be provided, which will then
          perform the convolution stepwise. With the exception of the gaussian
          window function, the others functions use the SciPy signal functions.
  
          A reference copy of the original signal is kept as the "Ref" column;
          this is used if a new window function is applied, rather than on the
          already convolved signal.
  
          Parameters
          ----------
          window: str, or iterable of str
              Name of the window function
          sigma: float, optional
              Specifies the magnitude of the gaussian blur. Only used when the
              window function asked for is "gaussian".
          int_col: None or str, optional
              Specifies which column to apply the window function to. If None,
              defaults to the session-wide intensity column
          """$SEP$# If the reference spectrum exists, we'll use that instead$SEP$# Make a copy of the original signal$SEP$# If we have a lis