original_docstring: 
          Create an FTB batch file for use in QtFTM to perform a DR experiment.
          A list of selected frequencies can be used as the cavity frequencies, which will
          subsequently be exhaustively DR'd against by all of the U-line frequencies
          remaining in this experiment.
  
          The file is then saved to "ftb/XXX-dr.ftb".
  
          Parameters
          ----------
          filepath: str, optional
              Path to save the ftb file to. Defaults to ftb/{}-dr.ftb
          select: list of floats, optional
              List of frequencies to use as cavity frequencies. Defaults to None, which
              will just DR every frequency against each other.
          shots: int, optional
              Number of integration shots
          dipole: float, optional
              Dipole moment used for attenuation setting
          gap: float, optional
              Minimum frequency difference between cavity and DR frequency to actually perform
              the experiment
          thres: None or float, optional
              Minimum value in absolute intensity units to consider in the DR
              batch. If None, this is ignored (default).
          atten: None or int, optional
              Value to use for the attenuation, overwriting the `dipole` argument. This is
              useful for forcing cavity power in the high band.
          
docstring: Create an FTB batch file for use in QtFTM to perform a DR experiment.
  A list of selected frequencies can be used as the cavity frequencies, which will
  subsequently be exhaustively DR'd against by all of the U-line frequencies
  remaining in this experiment.
  
  The file is then saved to "ftb/XXX-dr.ftb".
  
  Parameters
  
  str, optional
  Path to save the ftb file to. Defaults to ftb/{}-dr.ftb
  select: list of floats, optional
  List of frequencies to use as cavity frequencies. Defaults to None, which
  will just DR every frequency against each other.
  shots: int, optional
  Number of integration shots
  dipole: float, optional
  Dipole moment used for attenuation setting
  gap: float, optional
  Minimum frequency difference between cavity and DR frequency to actually perform
  the experiment
  thres: None or float, optional
  Minimum value in absolute intensity units to consider in the DR
  batch. If None, this is ignored (default).
  atten: None or int, optional
  Value to use for the attenuation, overwriting the `dipole` argument. This is
  useful for forcing cavity power in the high band.
docstring_tokens: Create an FTB batch file for use in QtFTM to perform a DR experiment . A list of selected frequencies can be used as the cavity frequencies which will subsequently be exhaustively DR ' d against by all of the U - line frequencies remaining in this experiment . The file is then saved to " ftb / XXX - dr . ftb " . Parameters str optional Path to save the ftb file to . Defaults to ftb / {} - dr . ftb select : list of floats optional List of frequencies to use as cavity frequencies . Defaults to None which will just DR every frequency against each other . shots : int optional Number of integration shots dipole : float optional Dipole moment used for attenuation setting gap : float optional Minimum frequency difference between cavity and DR frequency to actually perform the experiment thres : None or float optional Minimum value in absolute intensity units to consider in the DR batch . If None this is ignored ( default ) . atten : None or int optional Value to use for the attenuation overwriting the ` dipole ` argument . This is useful for forcing cavity power in the high band .
code: def create_uline_dr_batch(
          self,
          filepath=None,
          select=None,
          shots=25,
          dipole=1.0,
          min_dist=500.0,
          thres=None,
          atten=None,
          drpower=13,
      ):
          """
          Create an FTB batch file for use in QtFTM to perform a DR experiment.
          A list of selected frequencies can be used as the cavity frequencies, which will
          subsequently be exhaustively DR'd against by all of the U-line frequencies
          remaining in this experiment.
  
          The file is then saved to "ftb/XXX-dr.ftb".
  
          Parameters
          ----------
          filepath: str, optional
              Path to save the ftb file to. Defaults to ftb/{}-dr.ftb
          select: list of floats, optional
              List of frequencies to use as cavity frequencies. Defaults to None, which
              will just DR every frequency against each other.
          shots: int, optional
              Number of integration shots
          dipole: float, optional
              Dipole moment used for attenuation setting
          gap: float, optional
              Minimum frequency difference between cavity and DR frequency to actually perform
              the experiment
          thres: None or float, optional
              Minimum value in absolute intensity units to consider in the DR
              batch. If None, this is ignored (default).
          atten: None or int, optional
              Value to use for the attenuation, overwriting the `dipole` argument. This is
              useful for forcing cavity power in the high band.
          """
          ulines = self.line_lists["Peaks"].get_ulines()
          if select is None:
              cavity_freqs = [uline.frequency for uline in ulines]
              dr_freqs = [uline.frequency for uline in ulines]
          else:
              cavity_freqs = select
              dr_freqs = select
          if thres is not None:
              intensities = np.array([uline.intensity for uline in ulines])
              mask = np.where(intensities >= thres)
              dr_freqs = np.asarray(dr_freqs)[mask]
              cavity_freqs = np.asarray(cavity_freqs)
          ftb_settings = {"drpower": -20, "skiptune": False, "dipole": dipole}
          if atten is not None:
              assert type(atten) == int
              del ftb_settings["dipole"]
              ftb_settings["atten"] = int(atten)
          lines = ""
          for cindex, cavity in enumerate(cavity_freqs):
              for dindex, dr in enumerate(dr_freqs):
                  if dindex == 0:
                      ftb_settings.update(**{"drpower": -20, "skiptune": False})
                      lines += fa.generate_ftb_line(cavity, shots, **ftb_settings)
                  if np.abs(cavity - dr) >= min_dist:
                      ftb_settings.update(
                          **{"drpower": drpower, "skiptune": True, "drfreq": dr}
                      )
                      lines += fa.generate_ftb_line(cavity, shots, **ftb_settings)
          if filepath is None:
              filepath = f"ftb/{self.session.experiment}-dr.ftb"
          with open(filepath, "w+") as write_file:
              write_file.write(lines)
code_tokens: def create_uline_dr_batch ( self , filepath = None , select = None , shots = 25 , dipole = 1.0 , min_dist = 500.0 , thres = None , atten = None , drpower = 13 , ) : ulines = self . line_lists [ "Peaks" ] . get_ulines ( ) if select is None : cavity_freqs = [ uline . frequency for uline in ulines ] dr_freqs = [ uline . frequency for uline in ulines ] else : cavity_freqs = select dr_freqs = select if thres is not None : intensities = np . array ( [ uline . intensity for uline in ulines ] ) mask = np . where ( intensities >= thres ) dr_freqs = np . asarray ( dr_freqs ) [ mask ] cavity_freqs = np . asarray ( cavity_freqs ) ftb_settings = { "drpower" : - 20 , "skiptune" : False , "dipole" : dipole } if atten is not None : assert type ( atten ) == int del ftb_settings [ "dipole" ] ftb_settings [ "atten" ] = int ( atten ) lines = "" for cindex , cavity in enumerate ( cavity_freqs ) : for dindex , dr in enumerate ( dr_freqs ) : if dindex == 0 : ftb_settings . update ( ** { "drpower" : - 20 , "skiptune" : False } ) lines += fa . generate_ftb_line ( cavity , shots , ** ftb_settings ) if np . abs ( cavity - dr ) >= min_dist : ftb_settings . update ( ** { "drpower" : drpower , "skiptune" : True , "drfreq" : dr } ) lines += fa . generate_ftb_line ( cavity , shots , ** ftb_settings ) if filepath is None : filepath = f"ftb/{self.session.experiment}-dr.ftb" with open ( filepath , "w+" ) as write_file : write_file . write ( lines )
short_docstring: Create an FTB batch file for use in QtFTM to perform a DR experiment.
short_docstring_tokens: Create an FTB batch file for use in QtFTM to perform a DR experiment .
comment: """
          Create an FTB batch file for use in QtFTM to perform a DR experiment.
          A list of selected frequencies can be used as the cavity frequencies, which will
          subsequently be exhaustively DR'd against by all of the U-line frequencies
          remaining in this experiment.
  
          The file is then saved to "ftb/XXX-dr.ftb".
  
          Parameters
          ----------
          filepath: str, optional
              Path to save the ftb file to. Defaults to ftb/{}-dr.ftb
          select: list of floats, optional
              List of frequencies to use as cavity frequencies. Defaults to None, which
              will just DR every frequency against each other.
          shots: int, optional
              Number of integration shots
          dipole: float, optional
              Dipole moment used for attenuation setting
          gap: float, optional
              Minimum frequency difference between cavity and DR frequency to actually perform
              the experiment
          thres: None or float, optional
              Minimum value in absolute intensity units to consider in the DR
              batch. If None, this is ignored (default).
          atten: None or int, optional
              Value to use for the attenuation, overwriting the `dipole` argument. This is
              useful for forcing cavity power in the high band.
          """