Loading .gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ _build demo .venv/ venv/ doc/ notebooks/ overleaf/ Loading etc/config_egg.ini +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ verbose: 1 out: data/catalog/test/egg.fits # area in deg2 area: 0.10 area: 0.01 # right ascension of center ra0: +150.11916667 Loading install.sh +1 −1 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ install_imsim () { ## conda dependencies: # mamba install -y --file imSim/etc/standalone_conda_requirements.txt # mamba install rubin-sim # ## Install imSim: # pip install --no-deps imSim/ # pip install --no-deps skyCatalogs/ Loading pyproject.toml +12 −7 Original line number Diff line number Diff line Loading @@ -15,16 +15,23 @@ classifiers = [ "Programming Language :: Python", ] dynamic = ["version"] requires-python = ">=3.9" #requires-python = ">=3.9" requires-python = "==3.12.*" dependencies = [ "astropy", "batman-package@git+https://github.com/PriyadarshiAkshay/batman.git@py13", # fixes python3.12 issue "fitsio", "ipywidgets", "matplotlib", "numpy", "mypy", "numpy", "pandas", "pytest", "pytest-cov", "pyvo", "pre_commit", "scipy", "setuptools", "sphinx", "sphinx_rtd_theme", "sphinx-autoapi", Loading @@ -40,7 +47,6 @@ dependencies = [ dev = [ "asv==0.6.4", # Used to compute performance benchmarks "jupyter", # Clears output from Jupyter notebooks "mypy", # Used for static type checking of files "pre-commit", # Used to run checks before finalizing a git commit "pytest", "pytest-cov", # Used to report total code coverage Loading @@ -66,11 +72,13 @@ testpaths = [ "docs", ] addopts = "--doctest-modules --doctest-glob=*.rst" pythonpath = ['.', 'src'] [tool.ruff] line-length = 110 target-version = "py39" target-version = "py312" exclude = ["etc/"] [tool.ruff.lint] select = [ # pycodestyle Loading Loading @@ -117,6 +125,3 @@ lsst_inaf_agile = ["py.typed"] [tool.coverage.run] omit=["src/lsst_inaf_agile/_version.py"] [tool.mypy] exclude = "src/scripts/butler/create_truth_summary.py" src/lsst_inaf_agile/catalog_agn.py +11 −15 Original line number Diff line number Diff line Loading @@ -14,19 +14,15 @@ from itertools import product import astropy.units as u import fitsio import lightcurve import lusso2010 import numpy as np import pandas as pd import sed import ueda2014 import util import zou2024 from catalog_galaxy import CatalogGalaxy from mbh import get_log_mbh_continuity_new2 from merloni2014 import Merloni2014 from mock_catalog_SED.qsogen_4_catalog import qsosed from util import ROOT from lsst_inaf_agile import lightcurve, lusso2010, sed, ueda2014, util, zou2024 from lsst_inaf_agile.catalog_galaxy import CatalogGalaxy from lsst_inaf_agile.mbh import get_log_mbh_continuity_new2 from lsst_inaf_agile.merloni2014 import Merloni2014 from lsst_inaf_agile.util import ROOT logger = logging.getLogger(__name__) Loading Loading @@ -330,7 +326,7 @@ class CatalogAGN: Uses Lusso+10 Eq. 5 (inverted) assuming Lx = alpha L_opt - beta """ return lusso2010.get_log_l_2500(self["log_L_2_keV"], alpha, beta, scatter) return lusso2010.get_log_luminosity_2500(self["log_L_2_keV"], alpha, beta, scatter) def get_is_optical_type2(self, func_get_f_obs=None, use_f_obs_for_ctk_agn=False): """ Loading Loading @@ -372,8 +368,8 @@ class CatalogAGN: CTK AGN are assumed to be all type2. """ type_1_ebv = (np.linspace(0, 1, 101),) type_2_ebv = (np.linspace(0, 3, 301),) type_1_ebv = np.linspace(0, 1, 101) type_2_ebv = np.linspace(0, 3, 301) def sample_ebv(N_AGN, probability_distribution, ebv_range, *args): cumulative = np.cumsum(probability_distribution(ebv_range, *args)) Loading Loading @@ -530,7 +526,7 @@ class CatalogAGN: add_NL=self["is_optical_type2"][i], NL_normalization="lamastra", Av_lines=self.catalog_galaxy["AVLINES_BULGE"][i] + self.catalog_galaxy["AVLINES_DISK"][i], **dict(zip(PARAMETER_NAMES, *POSTERIOR_DISTRIBUTION.sample().values)), **dict(zip(PARAMETER_NAMES, *POSTERIOR_DISTRIBUTION.sample().values, strict=False)), ) # Check for type2 AGN flux NOT exceeding the host galaxy flux by Loading Loading @@ -734,7 +730,7 @@ class CatalogAGN: The black hole occupation fraction applied here is based on Zou+2025 (accepted). """ from mbh import get_occupation_fraction from lsst_inaf_agile.mbh import get_occupation_fraction return get_occupation_fraction(self["M"]) Loading Loading
.gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ _build demo .venv/ venv/ doc/ notebooks/ overleaf/ Loading
etc/config_egg.ini +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ verbose: 1 out: data/catalog/test/egg.fits # area in deg2 area: 0.10 area: 0.01 # right ascension of center ra0: +150.11916667 Loading
install.sh +1 −1 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ install_imsim () { ## conda dependencies: # mamba install -y --file imSim/etc/standalone_conda_requirements.txt # mamba install rubin-sim # ## Install imSim: # pip install --no-deps imSim/ # pip install --no-deps skyCatalogs/ Loading
pyproject.toml +12 −7 Original line number Diff line number Diff line Loading @@ -15,16 +15,23 @@ classifiers = [ "Programming Language :: Python", ] dynamic = ["version"] requires-python = ">=3.9" #requires-python = ">=3.9" requires-python = "==3.12.*" dependencies = [ "astropy", "batman-package@git+https://github.com/PriyadarshiAkshay/batman.git@py13", # fixes python3.12 issue "fitsio", "ipywidgets", "matplotlib", "numpy", "mypy", "numpy", "pandas", "pytest", "pytest-cov", "pyvo", "pre_commit", "scipy", "setuptools", "sphinx", "sphinx_rtd_theme", "sphinx-autoapi", Loading @@ -40,7 +47,6 @@ dependencies = [ dev = [ "asv==0.6.4", # Used to compute performance benchmarks "jupyter", # Clears output from Jupyter notebooks "mypy", # Used for static type checking of files "pre-commit", # Used to run checks before finalizing a git commit "pytest", "pytest-cov", # Used to report total code coverage Loading @@ -66,11 +72,13 @@ testpaths = [ "docs", ] addopts = "--doctest-modules --doctest-glob=*.rst" pythonpath = ['.', 'src'] [tool.ruff] line-length = 110 target-version = "py39" target-version = "py312" exclude = ["etc/"] [tool.ruff.lint] select = [ # pycodestyle Loading Loading @@ -117,6 +125,3 @@ lsst_inaf_agile = ["py.typed"] [tool.coverage.run] omit=["src/lsst_inaf_agile/_version.py"] [tool.mypy] exclude = "src/scripts/butler/create_truth_summary.py"
src/lsst_inaf_agile/catalog_agn.py +11 −15 Original line number Diff line number Diff line Loading @@ -14,19 +14,15 @@ from itertools import product import astropy.units as u import fitsio import lightcurve import lusso2010 import numpy as np import pandas as pd import sed import ueda2014 import util import zou2024 from catalog_galaxy import CatalogGalaxy from mbh import get_log_mbh_continuity_new2 from merloni2014 import Merloni2014 from mock_catalog_SED.qsogen_4_catalog import qsosed from util import ROOT from lsst_inaf_agile import lightcurve, lusso2010, sed, ueda2014, util, zou2024 from lsst_inaf_agile.catalog_galaxy import CatalogGalaxy from lsst_inaf_agile.mbh import get_log_mbh_continuity_new2 from lsst_inaf_agile.merloni2014 import Merloni2014 from lsst_inaf_agile.util import ROOT logger = logging.getLogger(__name__) Loading Loading @@ -330,7 +326,7 @@ class CatalogAGN: Uses Lusso+10 Eq. 5 (inverted) assuming Lx = alpha L_opt - beta """ return lusso2010.get_log_l_2500(self["log_L_2_keV"], alpha, beta, scatter) return lusso2010.get_log_luminosity_2500(self["log_L_2_keV"], alpha, beta, scatter) def get_is_optical_type2(self, func_get_f_obs=None, use_f_obs_for_ctk_agn=False): """ Loading Loading @@ -372,8 +368,8 @@ class CatalogAGN: CTK AGN are assumed to be all type2. """ type_1_ebv = (np.linspace(0, 1, 101),) type_2_ebv = (np.linspace(0, 3, 301),) type_1_ebv = np.linspace(0, 1, 101) type_2_ebv = np.linspace(0, 3, 301) def sample_ebv(N_AGN, probability_distribution, ebv_range, *args): cumulative = np.cumsum(probability_distribution(ebv_range, *args)) Loading Loading @@ -530,7 +526,7 @@ class CatalogAGN: add_NL=self["is_optical_type2"][i], NL_normalization="lamastra", Av_lines=self.catalog_galaxy["AVLINES_BULGE"][i] + self.catalog_galaxy["AVLINES_DISK"][i], **dict(zip(PARAMETER_NAMES, *POSTERIOR_DISTRIBUTION.sample().values)), **dict(zip(PARAMETER_NAMES, *POSTERIOR_DISTRIBUTION.sample().values, strict=False)), ) # Check for type2 AGN flux NOT exceeding the host galaxy flux by Loading Loading @@ -734,7 +730,7 @@ class CatalogAGN: The black hole occupation fraction applied here is based on Zou+2025 (accepted). """ from mbh import get_occupation_fraction from lsst_inaf_agile.mbh import get_occupation_fraction return get_occupation_fraction(self["M"]) Loading