class_docstr: Add a random partial sinusoidal signal to the input signal
class_docstr_tok: ["Add","a","random","partial","sinusoidal","signal","to","the","input","signal"]
docstr: Args:
      signal: input 1 dimension signal to which a partial sinusoidal signal
      will be added
docstr_tok: ["Args",":","signal",":","input","1","dimension","signal","to","which","a","partial","sinusoidal","signal","will","be","added"]
code: def __call__(self, signal: NdarrayOrTensor) -> NdarrayOrTensor:
      """
      Args:
          signal: input 1 dimension signal to which a partial sinusoidal signal
          will be added
      """
      self.randomize(None)
      self.magnitude = self.R.uniform(
          low=self.boundaries[0], high=self.boundaries[1]
      )
      self.fracs = self.R.uniform(
          low=self.fraction[0], high=self.fraction[1]
      )
      self.freqs = self.R.uniform(
          low=self.frequencies[0], high=self.frequencies[1]
      )
  
      length = signal.shape[-1]
  
      time_partial = np.arange(0, round(self.fracs * length), 1)
      data = convert_to_tensor(self.freqs * time_partial)
      sine_partial = self.magnitude * torch.sin(data)
  
      loc = np.random.choice(range(length))
      signal = paste(signal, sine_partial, (loc,))
  
      return signal
  
imports: from __future__ import annotations
  import warnings
  from collections.abc import Sequence
  from typing import Any
  import numpy
  import torch
  from monai.config.type_definitions import NdarrayOrTensor
  from monai.transforms.transform import RandomizableTransform, Transform
  from monai.transforms.utils import check_boundaries, paste, squarepulse
  from monai.utils import optional_import
  from monai.utils.enums import TransformBackends
  from monai.utils.type_conversion import convert_data_type, convert_to_tensor
label_desc: Use image node_id 2 for calling the SignalRandAddSinePartial obj's underlying member method code with example usage: obj.__call__(signal) and returns: signal