original_docstring: 
          Create a LineList object for an unidentified molecule. This uses the
          class method `umol_gen` to automatically generate names for U-molecules
          which can then be renamed once it has been identified.
  
          The session attribute `umol_names` also keeps track of filepaths to
          catalog names. If the filepath has been used previously, then it will
          raise an Exception noting that the filepath is already associated with
          another catalog.
  
          Parameters
          ----------
          filepath: str
              File path to the catalog or .lin file to use as a reference
          silly: bool, optional
              Flag whether to use boring numbered identifiers, or randomly
              generated `AdjectiveAdjectiveAnimal`.
  
          Returns
          -------
          LineList object
          
docstring: Create a LineList object for an unidentified molecule. This uses the
  class method `umol_gen` to automatically generate names for U-molecules
  which can then be renamed once it has been identified.
  
  The session attribute `umol_names` also keeps track of filepaths to
  catalog names. If the filepath has been used previously, then it will
  raise an Exception noting that the filepath is already associated with
  another catalog.
  
  Parameters
  
  str
  File path to the catalog or .lin file to use as a reference
  silly: bool, optional
  Flag whether to use boring numbered identifiers, or randomly
  generated `AdjectiveAdjectiveAnimal`.
  
  Returns
  
  
docstring_tokens: Create a LineList object for an unidentified molecule . This uses the class method ` umol_gen ` to automatically generate names for U - molecules which can then be renamed once it has been identified . The session attribute ` umol_names ` also keeps track of filepaths to catalog names . If the filepath has been used previously then it will raise an Exception noting that the filepath is already associated with another catalog . Parameters str File path to the catalog or . lin file to use as a reference silly : bool optional Flag whether to use boring numbered identifiers or randomly generated ` AdjectiveAdjectiveAnimal ` . Returns
code: def create_ulinelist(self, filepath: str, silly=True):
          """
          Create a LineList object for an unidentified molecule. This uses the
          class method `umol_gen` to automatically generate names for U-molecules
          which can then be renamed once it has been identified.
  
          The session attribute `umol_names` also keeps track of filepaths to
          catalog names. If the filepath has been used previously, then it will
          raise an Exception noting that the filepath is already associated with
          another catalog.
  
          Parameters
          ----------
          filepath: str
              File path to the catalog or .lin file to use as a reference
          silly: bool, optional
              Flag whether to use boring numbered identifiers, or randomly
              generated `AdjectiveAdjectiveAnimal`.
  
          Returns
          -------
          LineList object
          """
          if filepath not in self.umol_names:
              path = Path(filepath)
              ext = path.suffix
              name = next(self.umol_gen(silly=silly))
              parameters = {"name": name, "formula": name, "filepath": filepath}
              if ext == ".lin":
                  method = LineList.from_lin
              elif ext == ".cat":
                  method = LineList.from_catalog
              else:
                  raise Exception(f"File extension not recognized: {ext}.")
              linelist = method(**parameters)
              linelist = self.line_lists.get(name, None)
              # Give the first frequency just for book keeping
              frequency = linelist.transitions[0].catalog_frequency
              self.logger.info(
                  f"Created a U-molecule: {name}, with frequency {frequency:,.4f}."
              )
              # Create a symlink so we know which catalog this molecule refers to
              sym_path = Path(f"linelists/{name}{ext}")
              sym_path.symlink_to(filepath)
              # Also for internal record keeping
              self.umol_names[filepath] = name
              return linelist
          else:
              name = self.umol_names[filepath]
              raise Exception(f"U-molecule already exists with name: {name}!")
code_tokens: def create_ulinelist ( self , filepath : str , silly = True ) : if filepath not in self . umol_names : path = Path ( filepath ) ext = path . suffix name = next ( self . umol_gen ( silly = silly ) ) parameters = { "name" : name , "formula" : name , "filepath" : filepath } if ext == ".lin" : method = LineList . from_lin elif ext == ".cat" : method = LineList . from_catalog else : raise Exception ( f"File extension not recognized: {ext}." ) linelist = method ( ** parameters ) linelist = self . line_lists . get ( name , None ) frequency = linelist . transitions [ 0 ] . catalog_frequency self . logger . info ( f"Created a U-molecule: {name}, with frequency {frequency:,.4f}." ) sym_path = Path ( f"linelists/{name}{ext}" ) sym_path . symlink_to ( filepath ) self . umol_names [ filepath ] = name return linelist else : name = self . umol_names [ filepath ] raise Exception ( f"U-molecule already exists with name: {name}!" )
short_docstring: Create a LineList object for an unidentified molecule.
short_docstring_tokens: Create a LineList object for an unidentified molecule .
comment: """
          Create a LineList object for an unidentified molecule. This uses the
          class method `umol_gen` to automatically generate names for U-molecules
          which can then be renamed once it has been identified.
  
          The session attribute `umol_names` also keeps track of filepaths to
          catalog names. If the filepath has been used previously, then it will
          raise an Exception noting that the filepath is already associated with
          another catalog.
  
          Parameters
          ----------
          filepath: str
              File path to the catalog or .lin file to use as a reference
          silly: bool, optional
              Flag whether to use boring numbered identifiers, or randomly
              generated `AdjectiveAdjectiveAnimal`.
  
          Returns
          -------
          LineList object
          """$SEP$# Give the first frequency just for book keeping$SEP$# Create a symlink so we know which catalog this molecule refers to$SEP$# Also for internal record keeping