class_docstr: Compute the Pan Matrix Profile
  
  This is based on the SKIMP algorithm.
  
  Parameters
  ----------
  T : numpy.ndarray
      The time series or sequence for which to compute the pan matrix profile
  
  m_start : int, default 3
      The starting (or minimum) subsequence window size for which a matrix profile
      may be computed
  
  m_stop : int, default None
      The stopping (or maximum) subsequence window size for which a matrix profile
      may be computed. When `m_stop = Non`, this is set to the maximum allowable
      subsequence window size
  
  m_step : int, default 1
      The step between subsequence window sizes
  
  percentage : float, default 0.01
      The percentage of the full matrix profile to compute for each subsequence
      window size. When `percentage < 1.0`, then the `scraamp` algorithm is used.
      Otherwise, the `stump` algorithm is used when the exact matrix profile is
      requested.
  
  pre_scraamp : bool, default True
      A flag for whether or not to perform the PreSCRIMP calculation prior to
      computing SCRIMP. If set to `True`, this is equivalent to computing
      SCRIMP++. This parameter is ignored when `percentage = 1.0`.
  
  client : client, default None
      A Dask or Ray Distributed client. Setting up a distributed cluster is beyond
      the scope of this library. Please refer to the Dask or Ray Distributed
      documentation.
  
  device_id : int or list, default None
      The (GPU) device number to use. The default value is `0`. A list of
      valid device ids (int) may also be provided for parallel GPU-STUMP
      computation. A list of all valid device ids can be obtained by
      executing `[device.id for device in numba.cuda.list_devices()]`.
  
  mp_func : function, default stump
      The matrix profile function to use when `percentage = 1.0`
  
  p : float, default 2.0
      The p-norm to apply for computing the Minkowski distance. Minkowski distance is
      typically used with `p` being 1 or 2, which correspond to the Manhattan distance
      and the Euclidean distance, respectively.
  
  Attributes
  ----------
  PAN_ : numpy.ndarray
      The transformed (i.e., normalized, contrasted, binarized, and repeated)
      pan matrix profile
  
  M_ : numpy.ndarray
      The full list of (breadth first search (level) ordered) subsequence window
      sizes
  
  Methods
  -------
  update():
      Compute the next matrix profile using the next available (breadth-first-search
      (level) ordered) subsequence window size and update the pan matrix profile
  
  Notes
  -----
  `DOI: 10.1109/ICBK.2019.00031     <https://www.cs.ucr.edu/~eamonn/PAN_SKIMP%20%28Matrix%20Profile%20XX%29.pdf>`__
  
  See Table 2
class_docstr_tok: ["Compute","the","Pan","Matrix","Profile","This","is","based","on","the","SKIMP","algorithm",".","Parameters","--","--","--","--","--","T",":","numpy.ndarray","The","time","series","or","sequence","for","which","to","compute","the","pan","matrix","profile","m_start",":","int",",","default","3","The","starting","(","or","minimum",")","subsequence","window","size","for","which","a","matrix","profile","may","be","computed","m_stop",":","int",",","default","None","The","stopping","(","or","maximum",")","subsequence","window","size","for","which","a","matrix","profile","may","be","computed",".","When","`","m_stop","=","Non","`",",","this","is","set","to","the","maximum","allowable","subsequence","window","size","m_step",":","int",",","default","1","The","step","between","subsequence","window","sizes","percentage",":","float",",","default","0.01","The","percentage","of","the","full","matrix","profile","to","compute","for","each","subsequence","window","size",".","When","`","percentage","<","1.0","`",",","then","the","`","scraamp","`","algorithm","is","used",".","Otherwise",",","the","`","stump","`","algorithm","is","used","when","the","exact","matrix","profile","is","requested",".","pre_scraamp",":","bool",",","default","True","A","flag","for","whether","or","not","to","perform","the","PreSCRIMP","calculation","prior","to","computing","SCRIMP",".","If","set","to","`","True","`",",","this","is","equivalent","to","computing","SCRIMP++",".","This","parameter","is","ignored","when","`","percentage","=","1.0","`",".","client",":","client",",","default","None","A","Dask","or","Ray","Distributed","client",".","Setting","up","a","distributed","cluster","is","beyond","the","scope","of","this","library",".","Please","refer","to","the","Dask","or","Ray","Distributed","documentation",".","device_id",":","int","or","list",",","default","None","The","(","GPU",")","device","number","to","use",".","The","default","value","is","`","0","`",".","A","list","of","valid","device","ids","(","int",")","may","also","be","provided","for","parallel","GPU-STUMP","computation",".","A","list","of","all","valid","device","ids","can","be","obtained","by","executing","`","[","device.id","for","device","in","numba.cuda.list_devices","(",")","]","`",".","mp_func",":","function",",","default","stump","The","matrix","profile","function","to","use","when","`","percentage","=","1.0","`","p",":","float",",","default","2.0","The","p-norm","to","apply","for","computing","the","Minkowski","distance",".","Minkowski","distance","is","typically","used","with","`","p","`","being","1","or","2",",","which","correspond","to","the","Manhattan","distance","and","the","Euclidean","distance",",","respectively",".","Attributes","--","--","--","--","--","PAN_",":","numpy.ndarray","The","transformed","(","i.e.",",","normalized",",","contrasted",",","binarized",",","and","repeated",")","pan","matrix","profile","M_",":","numpy.ndarray","The","full","list","of","(","breadth","first","search","(","level",")","ordered",")","subsequence","window","sizes","Methods","--","--","--","-","update","(",")",":","Compute","the","next","matrix","profile","using","the","next","available","(","breadth-first-search","(","level",")","ordered",")","subsequence","window","size","and","update","the","pan","matrix","profile","Notes","--","--","-","`","DOI",":","10.1109\/ICBK.2019.00031","<","https",":","\/\/www.cs.ucr.edu\/~eamonn\/PAN_SKIMP","%","20","%","28Matrix","%","20Profile","%","20XX","%","29.pdf",">","`","__","See","Table","2"]
docstr: Generate a transformed (i.e., normalized, contrasted, binarized, and repeated)
  pan matrix profile
  
  Parameters
  ----------
  threshold : float, default 0.2
      The distance `threshold` in which to center the pan matrix profile around
      for best contrast and this value is also used for binarizing the pan matrix
      profile
  
  normalize : bool, default True
      A flag for whether or not each individual matrix profile within the pan
      matrix profile is normalized by its corresponding subsequence window size.
      If set to `True`, normalization is performed.
  
  contrast : bool, default True
      A flag for whether or not the pan matrix profile is centered around the
      desired `threshold` in order to provide higher contrast. If set to `True`,
      centering is performed.
  
  binary : bool, default True
      A flag for whether or not the pan matrix profile is binarized. If set to
      `True`, all values less than or equal to `threshold` are set to `0.0` while
      all other values are set to `1.0`.
  
  clip : bool, default True
      A flag for whether or not the pan matrix profile is clipped. If set to
      `True`, all values are ensured to be clipped between `0.0` and `1.0`.
  
  Returns
  -------
  None
docstr_tok: ["Generate","a","transformed","(","i.e.",",","normalized",",","contrasted",",","binarized",",","and","repeated",")","pan","matrix","profile","Parameters","--","--","--","--","--","threshold",":","float",",","default","0.2","The","distance","`","threshold","`","in","which","to","center","the","pan","matrix","profile","around","for","best","contrast","and","this","value","is","also","used","for","binarizing","the","pan","matrix","profile","normalize",":","bool",",","default","True","A","flag","for","whether","or","not","each","individual","matrix","profile","within","the","pan","matrix","profile","is","normalized","by","its","corresponding","subsequence","window","size",".","If","set","to","`","True","`",",","normalization","is","performed",".","contrast",":","bool",",","default","True","A","flag","for","whether","or","not","the","pan","matrix","profile","is","centered","around","the","desired","`","threshold","`","in","order","to","provide","higher","contrast",".","If","set","to","`","True","`",",","centering","is","performed",".","binary",":","bool",",","default","True","A","flag","for","whether","or","not","the","pan","matrix","profile","is","binarized",".","If","set","to","`","True","`",",","all","values","less","than","or","equal","to","`","threshold","`","are","set","to","`","0.0","`","while","all","other","values","are","set","to","`","1.0","`",".","clip",":","bool",",","default","True","A","flag","for","whether","or","not","the","pan","matrix","profile","is","clipped",".","If","set","to","`","True","`",",","all","values","are","ensured","to","be","clipped","between","`","0.0","`","and","`","1.0","`",".","Returns","--","--","--","-","None"]
code: def pan(
      self,
      threshold=0.2,
      normalize=True,
      contrast=True,
      binary=True,
      clip=True,
  ):
      """
      Generate a transformed (i.e., normalized, contrasted, binarized, and repeated)
      pan matrix profile
  
      Parameters
      ----------
      threshold : float, default 0.2
          The distance `threshold` in which to center the pan matrix profile around
          for best contrast and this value is also used for binarizing the pan matrix
          profile
  
      normalize : bool, default True
          A flag for whether or not each individual matrix profile within the pan
          matrix profile is normalized by its corresponding subsequence window size.
          If set to `True`, normalization is performed.
  
      contrast : bool, default True
          A flag for whether or not the pan matrix profile is centered around the
          desired `threshold` in order to provide higher contrast. If set to `True`,
          centering is performed.
  
      binary : bool, default True
          A flag for whether or not the pan matrix profile is binarized. If set to
          `True`, all values less than or equal to `threshold` are set to `0.0` while
          all other values are set to `1.0`.
  
      clip : bool, default True
          A flag for whether or not the pan matrix profile is clipped. If set to
          `True`, all values are ensured to be clipped between `0.0` and `1.0`.
  
      Returns
      -------
      None
      """
      PAN = self._PAN.copy()
      # Retrieve the row indices where the matrix profile was actually computed
      idx = self._bfs_indices[: self._n_processed]
      sorted_idx = np.sort(idx)
      PAN[PAN == np.inf] = np.nan
  
      if normalize:
          _normalize_pan(
              PAN,
              self._M,
              self._bfs_indices,
              self._n_processed,
              self._T_min,
              self._T_max,
              self._p,
          )
      if contrast:
          core._contrast_pan(
              PAN, threshold, self._bfs_indices, self._n_processed
          )
      if binary:
          core._binarize_pan(
              PAN, threshold, self._bfs_indices, self._n_processed
          )
      if clip:
          PAN[idx] = np.clip(PAN[idx], 0.0, 1.0)
  
      # Below, for each matrix profile that was computed, we take that matrix profile
      # and copy/repeat it downwards to replace other rows in the `PAN` where the
      # matrix profile has yet to be computed. Instead of only having lines/values in
      # the rows where matrix profiles were computed, this gives us the "blocky" look
      nrepeat = np.diff(np.append(-1, sorted_idx))
      PAN[: np.sum(nrepeat)] = np.repeat(
          PAN[sorted_idx], nrepeat, axis=0
      )
      PAN[np.isnan(PAN)] = np.nanmax(PAN)
  
      return PAN
  
file_path: stumpy/stumpy/aamp_stimp.py
imports: import numpy
  from .None import core
  from .aamp import aamp
  from .aamped import aamped
  from .scraamp import scraamp
label_desc: Use image node_id 3 for calling the _aamp_stimp obj's underlying member method code with example usage: obj.pan(threshold, normalize, contrast, binary, clip) and returns: PAN