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 frequencies in the
          experiment.
  
          The file is then saved to "ftb/XXX-full-dr.ftb".
          
          The ``atten`` parameter provides a more direct way to control RF power;
          if this value is used, it will overwrite the dipole moment setting.
  
          Parameters
          ----------
          cavity_freqs : iterable of floats
              Iterable of frequencies to tune to, in MHz.
          filepath : str, optional
              Path to save the ftb file to. Defaults to ftb/{}-dr.ftb
          shots : int, optional
              Number of integration shots
          dipole : float, optional
              Dipole moment used for attenuation setting
          min_dist : float, optional
              Minimum frequency difference between cavity and DR frequency to actually perform
              the experiment
          atten : None or int, optional
              Value to set the rf attenuation. By default, this is None, which will use the
              dipole moment instead to set the rf power. If a value is provided, it will
              overwrite whatever the dipole moment setting is.
          
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 frequencies in the
  experiment.
  
  The file is then saved to "ftb/XXX-full-dr.ftb".
  
  The ``atten`` parameter provides a more direct way to control RF power;
  if this value is used, it will overwrite the dipole moment setting.
  
  Parameters
  
  cavity_freqs : iterable of floats
  Iterable of frequencies to tune to, in MHz.
  filepath : str, optional
  Path to save the ftb file to. Defaults to ftb/{}-dr.ftb
  shots : int, optional
  Number of integration shots
  dipole : float, optional
  Dipole moment used for attenuation setting
  min_dist : float, optional
  Minimum frequency difference between cavity and DR frequency to actually perform
  the experiment
  atten : None or int, optional
  Value to set the rf attenuation. By default, this is None, which will use the
  dipole moment instead to set the rf power. If a value is provided, it will
  overwrite whatever the dipole moment setting is.
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 frequencies in the experiment . The file is then saved to " ftb / XXX - full - dr . ftb " . The ` ` atten ` ` parameter provides a more direct way to control RF power ; if this value is used it will overwrite the dipole moment setting . Parameters cavity_freqs : iterable of floats Iterable of frequencies to tune to in MHz . filepath : str optional Path to save the ftb file to . Defaults to ftb / {} - dr . ftb shots : int optional Number of integration shots dipole : float optional Dipole moment used for attenuation setting min_dist : float optional Minimum frequency difference between cavity and DR frequency to actually perform the experiment atten : None or int optional Value to set the rf attenuation . By default this is None which will use the dipole moment instead to set the rf power . If a value is provided it will overwrite whatever the dipole moment setting is .
code: def create_full_dr_batch(
          self,
          cavity_freqs: List[float],
          filepath=None,
          shots=25,
          dipole=1.0,
          min_dist=500.0,
          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 frequencies in the
          experiment.
  
          The file is then saved to "ftb/XXX-full-dr.ftb".
          
          The ``atten`` parameter provides a more direct way to control RF power;
          if this value is used, it will overwrite the dipole moment setting.
  
          Parameters
          ----------
          cavity_freqs : iterable of floats
              Iterable of frequencies to tune to, in MHz.
          filepath : str, optional
              Path to save the ftb file to. Defaults to ftb/{}-dr.ftb
          shots : int, optional
              Number of integration shots
          dipole : float, optional
              Dipole moment used for attenuation setting
          min_dist : float, optional
              Minimum frequency difference between cavity and DR frequency to actually perform
              the experiment
          atten : None or int, optional
              Value to set the rf attenuation. By default, this is None, which will use the
              dipole moment instead to set the rf power. If a value is provided, it will
              overwrite whatever the dipole moment setting is.
          """
          dr_freqs = np.array(self.line_lists["Peaks"].get_frequencies())
          lines = ""
          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)
          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}-full-dr.ftb"
          with open(filepath, "w+") as write_file:
              write_file.write(lines)
code_tokens: def create_full_dr_batch ( self , cavity_freqs : List [ float ] , filepath = None , shots = 25 , dipole = 1.0 , min_dist = 500.0 , atten = None , drpower = 13 , ) : dr_freqs = np . array ( self . line_lists [ "Peaks" ] . get_frequencies ( ) ) lines = "" 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 ) 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}-full-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 frequencies in the
          experiment.
  
          The file is then saved to "ftb/XXX-full-dr.ftb".
          
          The ``atten`` parameter provides a more direct way to control RF power;
          if this value is used, it will overwrite the dipole moment setting.
  
          Parameters
          ----------
          cavity_freqs : iterable of floats
              Iterable of frequencies to tune to, in MHz.
          filepath : str, optional
              Path to save the ftb file to. Defaults to ftb/{}-dr.ftb
          shots : int, optional
              Number of integration shots
          dipole : float, optional
              Dipole moment used for attenuation setting
          min_dist : float, optional
              Minimum frequency difference between cavity and DR frequency to actually perform
              the experiment
          atten : None or int, optional
              Value to set the rf attenuation. By default, this is None, which will use the
              dipole moment instead to set the rf power. If a value is provided, it will
              overwrite whatever the dipole moment setting is.
          """