original_docstring: 
          Method to create a LaTeX table summarizing the measurements in this experiment.
          
          Without any additional inputs, the table will be printed into a .tex file
          in the reports folder. The table will be created with the minimum amount
          of information required for a paper, including the frequency and intensity
          information, assignments, and the source of the information.
          
          The user can override the default settings by supplying `header` and `col`
          arguments, and any other kwargs are passed into the `to_latex` pandas
          DataFrame method. The header and col lengths must match.
          
          Parameters
          ----------
          filepath : str, optional
              Filepath to save the LaTeX table to; by default None
          header : iterable of str, optional
              An iterable of strings specifying the header to be printed. By default None
          cols : iterable of str, optional
              An iterable of strings specifying which columns to include. If this is
              changed, the header must also be changed to reflect the new columns.
          
docstring: Method to create a LaTeX table summarizing the measurements in this experiment.
  Without any additional inputs, the table will be printed into a .tex file
  in the reports folder. The table will be created with the minimum amount
  of information required for a paper, including the frequency and intensity
  information, assignments, and the source of the information.
  
  
  
  Parameters
  
  filepath : str, optional
  Filepath to save the LaTeX table to; by default None
  header : iterable of str, optional
  An iterable of strings specifying the header to be printed. By default None
  cols : iterable of str, optional
  An iterable of strings specifying which columns to include. If this is
  changed, the header must also be changed to reflect the new columns.
docstring_tokens: Method to create a LaTeX table summarizing the measurements in this experiment . Without any additional inputs the table will be printed into a . tex file in the reports folder . The table will be created with the minimum amount of information required for a paper including the frequency and intensity information assignments and the source of the information . Parameters filepath : str optional Filepath to save the LaTeX table to ; by default None header : iterable of str optional An iterable of strings specifying the header to be printed . By default None cols : iterable of str optional An iterable of strings specifying which columns to include . If this is changed the header must also be changed to reflect the new columns .
code: def create_latex_table(self, filepath=None, header=None, cols=None, **kwargs):
          """
          Method to create a LaTeX table summarizing the measurements in this experiment.
          
          Without any additional inputs, the table will be printed into a .tex file
          in the reports folder. The table will be created with the minimum amount
          of information required for a paper, including the frequency and intensity
          information, assignments, and the source of the information.
          
          The user can override the default settings by supplying `header` and `col`
          arguments, and any other kwargs are passed into the `to_latex` pandas
          DataFrame method. The header and col lengths must match.
          
          Parameters
          ----------
          filepath : str, optional
              Filepath to save the LaTeX table to; by default None
          header : iterable of str, optional
              An iterable of strings specifying the header to be printed. By default None
          cols : iterable of str, optional
              An iterable of strings specifying which columns to include. If this is
              changed, the header must also be changed to reflect the new columns.
          """
          table = self.line_lists["Peaks"].to_dataframe()
          # Numerical formatting
          formatters = {
              "frequency": "{:,.4f}".format,
              "intensity": "{:.2f}".format,
              "catalog_frequency": "{:,.4f}".format,
              "deviation": "{:,.4f}".format,
          }
  
          def ref_formatter(x):
              noform = ["CDMS/JPL", "Artifact", "U"]
              if x not in noform:
                  return f"\cite{x}"
              else:
                  return x
  
          # Replace the source information to designate u-line if it is a u-line
          table.loc[table["uline"] == True, "source"] = "U"
          if header is None:
              header = [
                  "Frequency",
                  "Intensity",
                  "Catalog frequency",
                  "Deviation",
                  "Name",
                  "Formula",
                  "Quantum numbers",
                  "Source",
              ]
          if cols is None:
              cols = [
                  "frequency",
                  "intensity",
                  "catalog_frequency",
                  "deviation",
                  "name",
                  "formula",
                  "r_qnos",
                  "source",
              ]
          assert len(header) == len(cols)
          if "source" in cols:
              table["source"].apply(ref_formatter)
          if "formula" in cols:
              table["formula"].apply(lambda x: f"\ce{x}")
          if filepath is None:
              filepath = f"reports/{self.session.experiment}-table.tex"
          # Settings to be passed into the latex table creation
          table_settings = {
              "formatters": formatters,
              "index": False,
              "longtable": True,
              "header": header,
              "escape": False,
          }
          table_settings.update(**kwargs)
          # Write the table to file
          with open(filepath, "w+") as write_file:
              table[cols].to_latex(buf=write_file, **table_settings)
code_tokens: def create_latex_table ( self , filepath = None , header = None , cols = None , ** kwargs ) : table = self . line_lists [ "Peaks" ] . to_dataframe ( ) formatters = { "frequency" : "{:,.4f}" . format , "intensity" : "{:.2f}" . format , "catalog_frequency" : "{:,.4f}" . format , "deviation" : "{:,.4f}" . format , } def ref_formatter ( x ) : noform = [ "CDMS/JPL" , "Artifact" , "U" ] if x not in noform : return f"\cite{x}" else : return x table . loc [ table [ "uline" ] == True , "source" ] = "U" if header is None : header = [ "Frequency" , "Intensity" , "Catalog frequency" , "Deviation" , "Name" , "Formula" , "Quantum numbers" , "Source" , ] if cols is None : cols = [ "frequency" , "intensity" , "catalog_frequency" , "deviation" , "name" , "formula" , "r_qnos" , "source" , ] assert len ( header ) == len ( cols ) if "source" in cols : table [ "source" ] . apply ( ref_formatter ) if "formula" in cols : table [ "formula" ] . apply ( lambda x : f"\ce{x}" ) if filepath is None : filepath = f"reports/{self.session.experiment}-table.tex" table_settings = { "formatters" : formatters , "index" : False , "longtable" : True , "header" : header , "escape" : False , } table_settings . update ( ** kwargs ) with open ( filepath , "w+" ) as write_file : table [ cols ] . to_latex ( buf = write_file , ** table_settings )
short_docstring: Method to create a LaTeX table summarizing the measurements in this experiment.
short_docstring_tokens: Method to create a LaTeX table summarizing the measurements in this experiment .
comment: """
          Method to create a LaTeX table summarizing the measurements in this experiment.
          
          Without any additional inputs, the table will be printed into a .tex file
          in the reports folder. The table will be created with the minimum amount
          of information required for a paper, including the frequency and intensity
          information, assignments, and the source of the information.
          
          The user can override the default settings by supplying `header` and `col`
          arguments, and any other kwargs are passed into the `to_latex` pandas
          DataFrame method. The header and col lengths must match.
          
          Parameters
          ----------
          filepath : str, optional
              Filepath to save the LaTeX table to; by default None
          header : iterable of str, optional
              An iterable of strings specifying the header to be printed. By default None
          cols : iterable of str, optional
              An iterable of strings specifying which columns to include. If this is
              changed, the header must also be changed to reflect the new columns.
          """$SEP$# Numerical formatting$SEP$# Replace the source information to designate u-line if it is a u-line$SEP$# Settings to be passed into the latex table creation$SEP$# Write the table to file