original_docstring: 
          Create an FTB file for use in QtFTM based on the remaining ulines. This is used to provide cavity
          frequencies.
          
          If a filepath is not specified, a -uline.ftb file will be created in the
          ftb folder.
          
          The user has the ability to control parameters of the batch by setting
          a global shot count, dipole moment, and minimum intensity value for
          creation.
  
          Parameters
          ----------
          filepath : str or None, optional
              Path to save the .ftb file to. If None, defaults to the session ID.
          shots : int, optional
              Number of shots to integrate on each frequency
          dipole : float, optional
              Dipole moment in Debye attenuation target for each frequency
          threshold : float, optional
              Minimum value for the line intensity to be considered. For example,
              if the spectrum is analyzed in units of SNR, this would be the minimum
              value of SNR to consider in the FTB file.
          sort_int : bool, optional
              If True, sorts the FTB entries in descending intensity order.
          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 file for use in QtFTM based on the remaining ulines. This is used to provide cavity
  frequencies.
  
  If a filepath is not specified, a -uline.ftb file will be created in the
  ftb folder.
  
  The user has the ability to control parameters of the batch by setting
  a global shot count, dipole moment, and minimum intensity value for
  creation.
  
  Parameters
  
  filepath : str or None, optional
  Path to save the .ftb file to. If None, defaults to the session ID.
  shots : int, optional
  Number of shots to integrate on each frequency
  dipole : float, optional
  Dipole moment in Debye attenuation target for each frequency
  threshold : float, optional
  Minimum value for the line intensity to be considered. For example,
  if the spectrum is analyzed in units of SNR, this would be the minimum
  value of SNR to consider in the FTB file.
  sort_int : bool, optional
  If True, sorts the FTB entries in descending intensity order.
  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 file for use in QtFTM based on the remaining ulines . This is used to provide cavity frequencies . If a filepath is not specified a - uline . ftb file will be created in the ftb folder . The user has the ability to control parameters of the batch by setting a global shot count dipole moment and minimum intensity value for creation . Parameters filepath : str or None optional Path to save the . ftb file to . If None defaults to the session ID . shots : int optional Number of shots to integrate on each frequency dipole : float optional Dipole moment in Debye attenuation target for each frequency threshold : float optional Minimum value for the line intensity to be considered . For example if the spectrum is analyzed in units of SNR this would be the minimum value of SNR to consider in the FTB file . sort_int : bool optional If True sorts the FTB entries in descending intensity order . 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_ftb_batch(
          self,
          filepath=None,
          shots=500,
          dipole=1.0,
          threshold=0.0,
          sort_int=False,
          atten=None,
      ):
          """
          Create an FTB file for use in QtFTM based on the remaining ulines. This is used to provide cavity
          frequencies.
          
          If a filepath is not specified, a -uline.ftb file will be created in the
          ftb folder.
          
          The user has the ability to control parameters of the batch by setting
          a global shot count, dipole moment, and minimum intensity value for
          creation.
  
          Parameters
          ----------
          filepath : str or None, optional
              Path to save the .ftb file to. If None, defaults to the session ID.
          shots : int, optional
              Number of shots to integrate on each frequency
          dipole : float, optional
              Dipole moment in Debye attenuation target for each frequency
          threshold : float, optional
              Minimum value for the line intensity to be considered. For example,
              if the spectrum is analyzed in units of SNR, this would be the minimum
              value of SNR to consider in the FTB file.
          sort_int : bool, optional
              If True, sorts the FTB entries in descending intensity order.
          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.
          """
          if filepath is None:
              filepath = f"./ftb/{self.session.experiment}-ulines.ftb"
          lines = ""
          transitions = self.line_lists["Peaks"].get_ulines()
          transitions = [
              transition
              for transition in transitions
              if transition.intensity >= threshold
          ]
          if atten is not None:
              assert type(atten) == int
              ftb_settings = {"atten": atten}
          else:
              ftb_settings = {"dipole": dipole}
          # Sort the intensities such that the strongest ones are scanned first.
          if sort_int is True:
              transitions = sorted(transitions, key=lambda line: line.intensity)[::-1]
          for index, uline in enumerate(transitions):
              if uline.intensity >= threshold:
                  lines += fa.generate_ftb_line(uline.frequency, shots, **ftb_settings)
          with open(filepath, "w+") as write_file:
              write_file.write(lines)
code_tokens: def create_uline_ftb_batch ( self , filepath = None , shots = 500 , dipole = 1.0 , threshold = 0.0 , sort_int = False , atten = None , ) : if filepath is None : filepath = f"./ftb/{self.session.experiment}-ulines.ftb" lines = "" transitions = self . line_lists [ "Peaks" ] . get_ulines ( ) transitions = [ transition for transition in transitions if transition . intensity >= threshold ] if atten is not None : assert type ( atten ) == int ftb_settings = { "atten" : atten } else : ftb_settings = { "dipole" : dipole } if sort_int is True : transitions = sorted ( transitions , key = lambda line : line . intensity ) [ : : - 1 ] for index , uline in enumerate ( transitions ) : if uline . intensity >= threshold : lines += fa . generate_ftb_line ( uline . frequency , shots , ** ftb_settings ) with open ( filepath , "w+" ) as write_file : write_file . write ( lines )
short_docstring: Create an FTB file for use in QtFTM based on the remaining ulines.
short_docstring_tokens: Create an FTB file for use in QtFTM based on the remaining ulines .
comment: """
          Create an FTB file for use in QtFTM based on the remaining ulines. This is used to provide cavity
          frequencies.
          
          If a filepath is not specified, a -uline.ftb file will be created in the
          ftb folder.
          
          The user has the ability to control parameters of the batch by setting
          a global shot count, dipole moment, and minimum intensity value for
          creation.
  
          Parameters
          ----------
          filepath : str or None, optional
              Path to save the .ftb file to. If None, defaults to the session ID.
          shots : int, optional
              Number of shots to integrate on each frequency
          dipole : float, optional
              Dipole moment in Debye attenuation target for each frequency
          threshold : float, optional
              Minimum value for the line intensity to be considered. For example,
              if the spectrum is analyzed in units of SNR, this would be the minimum
              value of SNR to consider in the FTB file.
          sort_int : bool, optional
              If True, sorts the FTB entries in descending intensity order.
          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.
          """$SEP$# Sort the intensities such that the strongest ones are scanned first.