original_docstring: 
          Create a Line List object from an SPCAT catalog.
          Parameters
          ----------
          name: str
              Name of the molecule the catalog belongs to
          formula: str
              Chemical formula of the molecule
          filepath: str
              Path to the catalog file.
          min_freq: float, optional
              Minimum frequency in MHz for the frequency cutoff
          max_freq: float, optional
              Maximum frequency in MHz for the frequency cutoff
          max_lstate: float, optional
              Maximum lower state energy to filter out absurd lines
          kwargs: optional
              Additional attributes that are passed into the Transition objects.
  
          Returns
          -------
          linelist_obj
              Instance of LineList with the digested catalog.
          
docstring: Create a Line List object from an SPCAT catalog.
  Parameters
  
  str
  Name of the molecule the catalog belongs to
  formula: str
  Chemical formula of the molecule
  filepath: str
  Path to the catalog file.
  min_freq: float, optional
  Minimum frequency in MHz for the frequency cutoff
  max_freq: float, optional
  Maximum frequency in MHz for the frequency cutoff
  max_lstate: float, optional
  Maximum lower state energy to filter out absurd lines
  kwargs: optional
  Additional attributes that are passed into the Transition objects.
  
  Returns
  
  linelist_obj
  Instance of LineList with the digested catalog.
docstring_tokens: Create a Line List object from an SPCAT catalog . Parameters str Name of the molecule the catalog belongs to formula : str Chemical formula of the molecule filepath : str Path to the catalog file . min_freq : float optional Minimum frequency in MHz for the frequency cutoff max_freq : float optional Maximum frequency in MHz for the frequency cutoff max_lstate : float optional Maximum lower state energy to filter out absurd lines kwargs : optional Additional attributes that are passed into the Transition objects . Returns linelist_obj Instance of LineList with the digested catalog .
code: def from_catalog(
          cls,
          name: str,
          formula: str,
          filepath: str,
          min_freq=0.0,
          max_freq=1e12,
          max_lstate=9000.0,
          **kwargs,
      ):
          """
          Create a Line List object from an SPCAT catalog.
          Parameters
          ----------
          name: str
              Name of the molecule the catalog belongs to
          formula: str
              Chemical formula of the molecule
          filepath: str
              Path to the catalog file.
          min_freq: float, optional
              Minimum frequency in MHz for the frequency cutoff
          max_freq: float, optional
              Maximum frequency in MHz for the frequency cutoff
          max_lstate: float, optional
              Maximum lower state energy to filter out absurd lines
          kwargs: optional
              Additional attributes that are passed into the Transition objects.
  
          Returns
          -------
          linelist_obj
              Instance of LineList with the digested catalog.
          """
          catalog_df = parsers.parse_cat(filepath, low_freq=min_freq, high_freq=max_freq)
          try:
              columns = ["N'", "J'", "N''", "J''"]
              catalog_df["qno"] = catalog_df[columns].apply(
                  lambda x: "N'={}, J'={} - N''={}, J''={}".format(*x), axis=1
              )
              # Create a formatted quantum number string
              # catalog_df["qno"] = "N'={}, J'={} - N''={}, J''={}".format(
              #    *catalog_df[["N'", "J'", "N''", "J''"]].values
              # )
              # Calculate E upper to have a complete set of data
              catalog_df["Upper state energy"] = units.calc_E_upper(
                  catalog_df["Frequency"], catalog_df["Lower state energy"]
              )
              # Filter out the lower states
              catalog_df = catalog_df.loc[catalog_df["Lower state energy"] <= max_lstate]
              vfunc = np.vectorize(Transition)
              # Vectorized generation of all the Transition objects
              transitions = vfunc(
                  catalog_frequency=catalog_df["Frequency"],
                  catalog_intensity=catalog_df["Intensity"],
                  uncertainty=catalog_df["Uncertainty"],
                  lstate_energy=catalog_df["Lower state energy"],
                  ustate_energy=catalog_df["Upper state energy"],
                  r_qnos=catalog_df["qno"],
                  source="Catalog",
                  name=name,
                  formula=formula,
                  uline=False,
                  **kwargs,
              )
              linelist_obj = cls(
                  name,
                  formula,
                  filepath=filepath,
                  transitions=list(transitions),
                  source="Catalog",
              )
              return linelist_obj
          except IndexError:
              return None
code_tokens: def from_catalog ( cls , name : str , formula : str , filepath : str , min_freq = 0.0 , max_freq = 1e12 , max_lstate = 9000.0 , ** kwargs , ) : catalog_df = parsers . parse_cat ( filepath , low_freq = min_freq , high_freq = max_freq ) try : columns = [ "N'" , "J'" , "N''" , "J''" ] catalog_df [ "qno" ] = catalog_df [ columns ] . apply ( lambda x : "N'={}, J'={} - N''={}, J''={}" . format ( * x ) , axis = 1 ) catalog_df [ "Upper state energy" ] = units . calc_E_upper ( catalog_df [ "Frequency" ] , catalog_df [ "Lower state energy" ] ) catalog_df = catalog_df . loc [ catalog_df [ "Lower state energy" ] <= max_lstate ] vfunc = np . vectorize ( Transition ) transitions = vfunc ( catalog_frequency = catalog_df [ "Frequency" ] , catalog_intensity = catalog_df [ "Intensity" ] , uncertainty = catalog_df [ "Uncertainty" ] , lstate_energy = catalog_df [ "Lower state energy" ] , ustate_energy = catalog_df [ "Upper state energy" ] , r_qnos = catalog_df [ "qno" ] , source = "Catalog" , name = name , formula = formula , uline = False , ** kwargs , ) linelist_obj = cls ( name , formula , filepath = filepath , transitions = list ( transitions ) , source = "Catalog" , ) return linelist_obj except IndexError : return None
short_docstring: Create a Line List object from an SPCAT catalog.
short_docstring_tokens: Create a Line List object from an SPCAT catalog .
comment: """
          Create a Line List object from an SPCAT catalog.
          Parameters
          ----------
          name: str
              Name of the molecule the catalog belongs to
          formula: str
              Chemical formula of the molecule
          filepath: str
              Path to the catalog file.
          min_freq: float, optional
              Minimum frequency in MHz for the frequency cutoff
          max_freq: float, optional
              Maximum frequency in MHz for the frequency cutoff
          max_lstate: float, optional
              Maximum lower state energy to filter out absurd lines
          kwargs: optional
              Additional attributes that are passed into the Transition objects.
  
          Returns
          -------
          linelist_obj
              Instance of LineList with the digested catalog.
          """$SEP$# Create a formatted quantum number string$SEP$# catalog_df["qno"] = "N'={}, J'={} - N''={}, J''={}".format($SEP$#    *catalog_df[["N'", "J'", "N''", "J''"]].values$SEP$# )$SEP$# Calculate E upper to have a complete set of data$SEP$# Filter out the lower states$SEP$# Vectorized generation of all the Transition objects