uclchem.utils ============= .. py:module:: uclchem.utils Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: uclchem.utils.check_error uclchem.utils.cshock_dissipation_time uclchem.utils.get_reaction_network uclchem.utils.get_reaction_table uclchem.utils.get_species uclchem.utils.get_species_table .. py:function:: check_error(error_code) Converts the UCLCHEM integer result flag to a simple messaging explaining what went wrong" :param error_code: Error code returned by UCLCHEM models, the first element of the results list. :type error_code: int :returns: Error message :rtype: str .. py:function:: cshock_dissipation_time(shock_vel, initial_dens) A simple function used to calculate the dissipation time of a C-type shock. Use to obtain a useful timescale for your C-shock model runs. Velocity of ions and neutrals equalizes at dissipation time and full cooling takes a few dissipation times. :param shock_vel: Velocity of the shock in km/s :type shock_vel: float :param initial_dens: Preshock density of the gas in cm$^{-3}$ :type initial_dens: float :returns: The dissipation time of the shock in years :rtype: float .. py:function:: get_reaction_network() .. py:function:: get_reaction_table() A function to load the reaction table from the UCLCHEM network into a pandas dataframe. :returns: A dataframe containing the reactions and their rates :rtype: pandas.DataFrame .. py:function:: get_species() -> list[str] A simple function to load the list of species present in the UCLCHEM network :returns: A list of species names :rtype: list[str] .. py:function:: get_species_table() A simple function to load the list of species in the UCLCHEM network into a pandas dataframe. :returns: A dataframe containing the species names and their details :rtype: pandas.DataFrame