original_docstring: 
          Simulates a stick spectrum with intensities in flux units (Jy) for
          a given catalog file, the column density, and the rotational partition
          function at temperature T.
  
          Parameters
          ----------
           catalogpath : str
              path to SPCAT catalog file
           N : float
              column density in cm^-2
           Q : float
              partition function at temperature T
           T : float
              temperature in Kelvin
           doppler : float, optional
              doppler width in km/s; defaults to session wide value
           gaussian : bool, optional
                     if True, simulates Gaussian profiles instead of sticks
           Returns
           -------
          :return: if gaussian is False, returns a dataframe with sticks; if True,
                   returns a simulated Gaussian line profile spectrum
          
docstring: Simulates a stick spectrum with intensities in flux units (Jy) for
  a given catalog file, the column density, and the rotational partition
  function at temperature T.
  
  Parameters
  
  
docstring_tokens: Simulates a stick spectrum with intensities in flux units ( Jy ) for a given catalog file the column density and the rotational partition function at temperature T . Parameters
code: def simulate_sticks(
          self,
          catalogpath: str,
          N: float,
          Q: float,
          T: float,
          doppler=None,
          gaussian=False,
      ):
          """
          Simulates a stick spectrum with intensities in flux units (Jy) for
          a given catalog file, the column density, and the rotational partition
          function at temperature T.
  
          Parameters
          ----------
           catalogpath : str
              path to SPCAT catalog file
           N : float
              column density in cm^-2
           Q : float
              partition function at temperature T
           T : float
              temperature in Kelvin
           doppler : float, optional
              doppler width in km/s; defaults to session wide value
           gaussian : bool, optional
                     if True, simulates Gaussian profiles instead of sticks
           Returns
           -------
          :return: if gaussian is False, returns a dataframe with sticks; if True,
                   returns a simulated Gaussian line profile spectrum
          """
          # If no Doppler width provided, use the session wide value
          if doppler is None:
              doppler = self.session.doppler
          catalog_df = aa.simulate_catalog(catalogpath, N, Q, T, doppler)
          # Take only the values within band
          catalog_df = catalog_df[
              (catalog_df["Frequency"] >= self.data[self.freq_col].min())
              & (catalog_df["Frequency"] <= self.data[self.freq_col].max())
          ]
          if gaussian is False:
              return catalog_df[["Frequency", "Flux (Jy)"]]
          else:
              # Convert Doppler width to frequency widths
              widths = units.dop2freq(doppler, catalog_df["Frequency"].values)
              # Calculate the Gaussian amplitude
              amplitudes = catalog_df["Flux (Jy)"] / np.sqrt(2.0 * np.pi ** 2.0 * widths)
              sim_y = self.simulate_spectrum(
                  self.data[self.freq_col],
                  catalog_df["Frequency"].values,
                  widths,
                  amplitudes,
              )
              simulated_df = pd.DataFrame(
                  data=list(zip(self.data[self.freq_col], sim_y)),
                  columns=["Frequency", "Flux (Jy)"],
              )
              return simulated_df
code_tokens: def simulate_sticks ( self , catalogpath : str , N : float , Q : float , T : float , doppler = None , gaussian = False , ) : if doppler is None : doppler = self . session . doppler catalog_df = aa . simulate_catalog ( catalogpath , N , Q , T , doppler ) catalog_df = catalog_df [ ( catalog_df [ "Frequency" ] >= self . data [ self . freq_col ] . min ( ) ) & ( catalog_df [ "Frequency" ] <= self . data [ self . freq_col ] . max ( ) ) ] if gaussian is False : return catalog_df [ [ "Frequency" , "Flux (Jy)" ] ] else : widths = units . dop2freq ( doppler , catalog_df [ "Frequency" ] . values ) amplitudes = catalog_df [ "Flux (Jy)" ] / np . sqrt ( 2.0 * np . pi ** 2.0 * widths ) sim_y = self . simulate_spectrum ( self . data [ self . freq_col ] , catalog_df [ "Frequency" ] . values , widths , amplitudes , ) simulated_df = pd . DataFrame ( data = list ( zip ( self . data [ self . freq_col ] , sim_y ) ) , columns = [ "Frequency" , "Flux (Jy)" ] , ) return simulated_df
short_docstring: Simulates a stick spectrum with intensities in flux units (Jy) for
  a given catalog file, the column density, and the rotational partition
  function at temperature T.
short_docstring_tokens: Simulates a stick spectrum with intensities in flux units ( Jy ) for a given catalog file the column density and the rotational partition function at temperature T .
comment: """
          Simulates a stick spectrum with intensities in flux units (Jy) for
          a given catalog file, the column density, and the rotational partition
          function at temperature T.
  
          Parameters
          ----------
           catalogpath : str
              path to SPCAT catalog file
           N : float
              column density in cm^-2
           Q : float
              partition function at temperature T
           T : float
              temperature in Kelvin
           doppler : float, optional
              doppler width in km/s; defaults to session wide value
           gaussian : bool, optional
                     if True, simulates Gaussian profiles instead of sticks
           Returns
           -------
          :return: if gaussian is False, returns a dataframe with sticks; if True,
                   returns a simulated Gaussian line profile spectrum
          """$SEP$# If no Doppler width provided, use the session wide value$SEP$# Take only the values within band$SEP$# Convert Doppler width to frequency widths$SEP$# Calculate the Gaussian amplitude