Skip to content

Commit

Permalink
Merge branch 'LSST-strong-lensing:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
padma18-vb authored Oct 8, 2024
2 parents e748a15 + 5c535f3 commit 7416295
Show file tree
Hide file tree
Showing 130 changed files with 23,819 additions and 2,184 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ ci:
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.4.7
rev: v0.5.6
hooks:
- id: ruff
exclude: docs/.*
args: ["--line-length=88"]
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.8.5
rev: 1.8.7
hooks:
- id: nbqa-ruff
args: ["--line-length=120"]
- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black
# It is recommended to specify the latest version of Python
Expand All @@ -33,7 +33,7 @@ repos:
# https://pre-commit.com/#top_level-default_language_version
language_version: python3
- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black-jupyter
language_version: python3
Expand Down
3 changes: 2 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ sphinx:
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: requirements.txt
- requirements: requirements.txt
- requirements: requirements_dev.txt
13 changes: 13 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@ install the slsim package in development mode with
python setup.py develop --user


.. note::

Development mode installation uses the file path to the repository you work on.
If you do the regular installation, a copy of all the python files will be made in the path of the python version
and the path to call the routines will be to these files.

.. warning::

Make sure you uninstalled all SLSim versions first before installing the version in development mode. Otherwise,
due to path hierarchy, there is still a good chance your copied files will be imported instead of the files in your
development repository.


Create a branch for your new feature
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
14 changes: 7 additions & 7 deletions data/SkyPy/lsst-like.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# See the ReadMe file for parameter definitions
mag_lim: 30
fsky: 0.1 deg2
z_range: !numpy.arange [0, 5.01, 0.1]
M_star_blue: !astropy.modeling.models.Linear1D [-0.9408582, -20.40492365]
phi_star_blue: !astropy.modeling.models.Exponential1D [0.00370253, -9.73858]
alpha_blue: -1.3
M_star_red: !astropy.modeling.models.Linear1D [-0.70798041, -20.37196157]
phi_star_red: !astropy.modeling.models.Exponential1D [0.0035097, -1.41649]
alpha_red: -0.5
z_range: !numpy.arange [0.0, 5.01, 0.01]
M_star_blue: !astropy.modeling.models.Linear1D [-1.03, -20.485]
phi_star_blue: !astropy.modeling.models.Exponential1D [0.00312608, -43.42936]
alpha_blue: -1.29
M_star_red: !astropy.modeling.models.Linear1D [-0.80, -20.46]
phi_star_red: !astropy.modeling.models.Exponential1D [0.00278612, -1.05925]
alpha_red: -0.53
cosmology: !astropy.cosmology.default_cosmology.get []
filters: ['lsst2016-g', 'lsst2016-r', 'lsst2016-i', 'lsst2016-z', 'lsst2016-y']
tables:
Expand Down
107 changes: 107 additions & 0 deletions data/SkyPy/lsst-like_triple_SF.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# These are the luminosity function parameters according to M = a_m * z + b_m
# and Phi = b_phi * exp(a_phi * z). As in Lopez-Sanjuan the model is given as
# M = M0 + Q * (z - 0.5) and log10(Phi) = Phi0 + P * (z - 0.5) we have to convert
# the given parameters as a_m = Q, b_m = M0 - 0.5*Q, a_phi = ln(10) * P and
# b_phi = 10**(Phi0 - 0.5*P)
cosmology: !astropy.cosmology.default_cosmology.get []
z_range: !numpy.arange [0.0, 5.01, 0.01]
M_star_blue: !astropy.modeling.models.Linear1D [-1.03, -20.485]
phi_star_blue: !astropy.modeling.models.Exponential1D [0.00312608, -43.42936]
M_star_red: !astropy.modeling.models.Linear1D [-0.80, -20.46]
phi_star_red: !astropy.modeling.models.Exponential1D [0.00278612, -1.05925]
magnitude_limit: 30
fsky: 0.1 deg2
filters: ['lsst2016-g', 'lsst2016-r', 'lsst2016-i', 'lsst2016-z', 'lsst2016-y']
tables:
blue:
z, M: !skypy.galaxies.schechter_lf
redshift: $z_range
M_star: $M_star_blue
phi_star: $phi_star_blue
alpha: -1.29
m_lim: $magnitude_limit
sky_area: $fsky
coeff: !skypy.galaxies.spectrum.dirichlet_coefficients
alpha0: [2.079, 3.524, 1.917, 1.992, 2.536]
alpha1: [2.265, 3.862, 1.921, 1.685, 2.480]
weight: [3.47e+09, 3.31e+06, 2.13e+09, 1.64e+10, 1.01e+09]
redshift: $blue.z
stellar_mass: !skypy.galaxies.spectrum.kcorrect.stellar_mass
coefficients: $blue.coeff
magnitudes: $blue.M
filter: bessell-B
mag_g, mag_r, mag_i, mag_z, mag_Y: !skypy.galaxies.spectrum.kcorrect.apparent_magnitudes
coefficients: $blue.coeff
redshift: $blue.z
filters: $filters
stellar_mass: $blue.stellar_mass
cosmology: $cosmology
physical_size: !skypy.galaxies.morphology.late_type_lognormal_size
magnitude: $blue.M
alpha: 0.21
beta: 0.53
gamma: -1.31
M0: -20.52
sigma1: 0.48
sigma2: 0.25
angular_size: !skypy.galaxies.morphology.angular_size
physical_size: $blue.physical_size
redshift: $blue.z
cosmology: $cosmology
ellipticity: !skypy.galaxies.morphology.beta_ellipticity
e_ratio: 0.45
e_sum: 3.5
size: !len [$blue.z]
red1:
z1, M1: !skypy.galaxies.schechter_lf
redshift: $z_range
M_star: $M_star_red
phi_star: $phi_star_red
alpha: -0.53
m_lim: $magnitude_limit
sky_area: $fsky
cosmology: $cosmology
red2:
z2, M2: !skypy.galaxies.schechter_lf
redshift: $z_range
M_star: -17.00
phi_star: $phi_star_red
alpha: -1.31
m_lim: $magnitude_limit
sky_area: $fsky
cosmology: $cosmology
red:
z: !numpy.concatenate
- [$red1.z1, $red2.z2]
M: !numpy.concatenate
- [$red1.M1, $red2.M2]
coeff: !skypy.galaxies.spectrum.dirichlet_coefficients
alpha0: [2.461, 2.358, 2.568, 2.268, 2.402]
alpha1: [2.410, 2.340, 2.200, 2.540, 2.464]
weight: [3.84e+09, 1.57e+06, 3.91e+08, 4.66e+10, 3.03e+07]
redshift: $red.z
stellar_mass: !skypy.galaxies.spectrum.kcorrect.stellar_mass
coefficients: $red.coeff
magnitudes: $red.M
filter: bessell-B
mag_g, mag_r, mag_i, mag_z, mag_Y: !skypy.galaxies.spectrum.kcorrect.apparent_magnitudes
coefficients: $red.coeff
redshift: $red.z
filters: $filters
stellar_mass: $red.stellar_mass
cosmology: $cosmology
physical_size: !skypy.galaxies.morphology.early_type_lognormal_size
magnitude: $red.M
a: 0.60
b: -4.63
M0: -20.52
sigma1: 0.48
sigma2: 0.25
angular_size: !skypy.galaxies.morphology.angular_size
physical_size: $red.physical_size
redshift: $red.z
cosmology: $cosmology
ellipticity: !skypy.galaxies.morphology.beta_ellipticity
e_ratio: 0.2
e_sum: 7
size: !len [$red.z]
16 changes: 7 additions & 9 deletions data/redMaPPer/clusters_example.fits

Large diffs are not rendered by default.

Loading

0 comments on commit 7416295

Please sign in to comment.