Skip to content

Commit

Permalink
updated docstrings + call to main library in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilfried (Mac) committed Dec 19, 2023
1 parent fdb4d84 commit ab64a83
Show file tree
Hide file tree
Showing 9 changed files with 137 additions and 100 deletions.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
r"""
.. codeauthor:: Hugo Plombat - LUPM <[email protected]> & Wilfried Mercier - IRAP <wilfried.mercier@irap.omp.eu> & Maxime Tarrasse - IRAP <[email protected]>
.. codeauthor:: Wilfried Mercier - IRAP/LAM <wilfried.mercier@lam.fr>
Init file for the SED fitting parser library.
"""
Expand Down
2 changes: 1 addition & 1 deletion catalogues.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
r"""
.. codeauthor:: Hugo Plombat - LUPM <[email protected]> & Wilfried Mercier - IRAP <wilfried.mercier@irap.omp.eu>
.. codeauthor:: Hugo Plombat - LUPM <[email protected]> & Wilfried Mercier - IRAP/LAM <wilfried.mercier@lam.fr>
Base classes used to generate catalogues for LePhare or Cigale SED fitting codes.
"""
Expand Down
7 changes: 3 additions & 4 deletions example/example1.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
"""

import os.path as opath
from astropy.io import fits
import SED

from matplotlib import rc
import pixSED as SED
import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib import rc
from astropy.io import fits

# Define data file names
galName = '1' # Galaxy number
Expand Down
2 changes: 1 addition & 1 deletion example/example2.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import os.path as opath
from astropy.io import fits
import SED as sed
import pixSED as sed

from matplotlib import rc
import matplotlib as mpl
Expand Down
2 changes: 1 addition & 1 deletion example/example3.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import os.path as opath
from astropy.io import fits
import SED
import pixSED as SED

from matplotlib import rc
import matplotlib as mpl
Expand Down
194 changes: 116 additions & 78 deletions filters.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion outputs.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
r"""
.. codeauthor:: Hugo Plombat - LUPM <[email protected]> & Wilfried Mercier - IRAP <wilfried.mercier@irap.omp.eu>
.. codeauthor:: Hugo Plombat - LUPM <[email protected]> & Wilfried Mercier - IRAP/LAM <wilfried.mercier@lam.fr>
Classes used by the sed objects to generate objects loading output tables and producing resolved maps.
"""
Expand Down
2 changes: 1 addition & 1 deletion photometry.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
r"""
.. codeauthor:: Hugo Plombat - LUPM <[email protected]> & Wilfried Mercier - IRAP <wilfried.mercier@irap.omp.eu> & Maxime Tarrasse - IRAP <[email protected]>
.. codeauthor:: Hugo Plombat - LUPM <[email protected]> & Wilfried Mercier - IRAP/LAM <wilfried.mercier@lam.fr> & Maxime Tarrasse - IRAP <[email protected]>
Photometry functions.
"""
Expand Down
24 changes: 12 additions & 12 deletions sed.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
r"""
.. codeauthor:: Hugo Plombat - LUPM <[email protected]> & Wilfried Mercier - IRAP <wilfried.mercier@irap.omp.eu>
.. codeauthor:: Hugo Plombat - LUPM <[email protected]> & Wilfried Mercier - IRAP/LAM <wilfried.mercier@lam.fr>
Utilties related to generating 2D mass and SFR maps using LePhare SED fitting codes.
Main SED objects used to perform pixel-per-pixel SED fitting.
"""

import subprocess
Expand Down Expand Up @@ -46,7 +46,7 @@ def __init__(self, *args, **kwargs) -> None:
@abstractmethod
def __call__(self, *args, **kwargs):
r'''
.. codeauthor:: Wilfried Mercier - IRAP <wilfried.mercier@irap.omp.eu>
.. codeauthor:: Wilfried Mercier - IRAP/LAM <wilfried.mercier@lam.fr>
Run the SED fitting code.
'''
Expand Down Expand Up @@ -174,23 +174,23 @@ class CigaleSED(SED):
:param uncertainties: list of bool to specify which uncertainties to use. If provided, it must be same length as **filters**.
:type uncertainties: :python:`list[bool]`
:param SFH: star formation history modules to use. **At least one module must be given.**
:type SFH: :python:`list` [:py:class:`~.cigmod.SFHmodule`]
:type SFH: :python:`list` [:py:class:`~SED.misc.cigaleModules.SFHmodule`]
:param SSP: single stellar population modules to use. **At least one module must be given.**
:type SSP: :python:`list` [:py:class:`~.cigmod.SSPmodule`]
:type SSP: :python:`list` [:py:class:`~SED.misc.cigaleModules.SSPmodule`]
:param nebular: nebular emission modules to use. Empty list means no module is used.
:type nebular: :python:`list` [:py:class:`~.cigmod.NEBULARmodule`]
:type nebular: :python:`list` [:py:class:`~SED.misc.cigaleModules.NEBULARmodule`]
:param attenuation: dust attenuation modules to use. Empty list means no module is used.
:type attenuation: :python:`list` [:py:class:`~.cigmod.ATTENUATIONmodule`]
:type attenuation: :python:`list` [:py:class:`~SED.misc.cigaleModules.ATTENUATIONmodule`]
:param dust: dust emission modules to use. Empty list means no module is used.
:type dust: :python:`list` [:py:class:`~.cigmod.DUSTmodule`]
:type dust: :python:`list` [:py:class:`~SED.misc.cigaleModules.DUSTmodule`]
:param agn: agn modules to use. Empty list means no module is used.
:type agn: :python:`list` [:py:class:`cigmod.AGNmodule`]
:type agn: :python:`list` [:py:class:`~SED.misc.cigaleModules.AGNmodule`]
:param radio: synchrotron radiation modules to use. Empty list means no module is used.
:type radio: :python:`list` [:py:class:`cidmog.AGNmodule`]
:type radio: :python:`list` [:py:class:`SED.misc.cigaleModules.RADIOmodule`]
:param restframe: restframe parameters modules to use. Empty list means no module is used.
:type restframe: :python:`list` [:py:class:`cigmod.RESTFRAMEmodule`]
:type restframe: :python:`list` [:py:class:`SED.misc.cigaleModules.RESTFRAMEmodule`]
:param redshifting: redshifitng+IGM modules to use. Empty list means no module is used.
:type redshifting: :python:`list` [:py:class:`cigmod.REDSHIFTINGmodule`]
:type redshifting: :python:`list` [:py:class:`SED.misc.cigaleModules.REDSHIFTINGmodule`]
:param flux_uncertainty: additional uncertainty to add to the flux, given as a fraction of the flux (i.e. 0.1 means 10% of flux added to the uncertainty in quadrature)
:type flux_uncertainty: :python:`int` or :python:`float`
Expand Down

0 comments on commit ab64a83

Please sign in to comment.