pysersic.galfit =============== .. py:module:: pysersic.galfit Functions --------- .. autoapisummary:: pysersic.galfit.search_start pysersic.galfit.load_fits_from_galfit_line pysersic.galfit.match_line_and_load_galfit pysersic.galfit.generate_fitter_from_galfit_config Module Contents --------------- .. py:function:: search_start(list_of_strings: Iterable, to_match: str) -> list Search a list of strings and match those which start with to_match :param list_of_strings: :type list_of_strings: Iterable :param to_match: pattern to match :type to_match: str :returns: List of results contianing the index and full string :rtype: list .. py:function:: load_fits_from_galfit_line(line: str) -> jax.numpy.array Load fits file from galfit config line :param line: :type line: str :returns: Image in first HDU :rtype: jnp.array .. py:function:: match_line_and_load_galfit(list_of_strings: Iterable, to_match: str, assert_message: str = '') -> jax.numpy.array Combine the above two functions to search and load fits files from a galfit config :param list_of_strings: :type list_of_strings: Iterable :param to_match: :type to_match: str :param assert_message: Message to raise if line file is not present :type assert_message: str, optional :returns: _description_ :rtype: jnp.array :raises UserWarning: _description_ .. py:function:: generate_fitter_from_galfit_config(config_loc: str, loss: callable = gaussian_loss) -> Union[pysersic.FitSingle, pysersic.FitMulti] Function to generate a Fitter instance from a galfit config file. This function is only meant to be a starting place to easily try PySersic on the many galfit config files we know you all have lying around. As such this does not follow all of the rules and constraints the galfit takes into account. For more fine grained control we recommend initializing a pysersic Fitter instance yourself, please see the `examples/` folder or the documentation for some help with this. :param config_loc: Config file locations :type config_loc: str :param loss: Loss function to use, see loss.py for more details, by default gaussian_loss :type loss: callable, optional :returns: Fitter based on config file. If there is only one source then returns a FitSingle object, otherwise returns a fit_multi :rtype: Union[FitSingle,FitMulti]