Unverified Commit 7373bd2b authored by Akke Viitanen's avatar Akke Viitanen
Browse files

add cosmos2020 mstar completeness

parent cb17f851
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
*.pye
*.pyc
*.egg-info
_version.py


# large data files
+6 −6
Original line number Diff line number Diff line
@@ -114,9 +114,9 @@ repos:
        pass_filenames: false
        always_run: true

  # pydocstyle
  - repo: https://github.com/PyCQA/pydocstyle
    rev: 6.3.0
    hooks:
    - id: pydocstyle
      args: ["--ignore=D100,D104,D203,D212"]
          ## pydocstyle
          #- repo: https://github.com/PyCQA/pydocstyle
          #  rev: 6.3.0
          #  hooks:
          #  - id: pydocstyle
          #    args: ["--ignore=D100,D104,D203,D212"]

src/lsst_inaf_agile/_version.py

deleted100644 → 0
+0 −33
Original line number Diff line number Diff line
# file generated by setuptools-scm
# don't change, don't track in version control

__all__ = [
    "__version__",
    "__version_tuple__",
    "version",
    "version_tuple",
    "__commit_id__",
    "commit_id",
]

TYPE_CHECKING = False
if TYPE_CHECKING:
    from typing import Union

    VERSION_TUPLE = tuple[Union[int, str], ...]
    COMMIT_ID = Union[str, None]
else:
    VERSION_TUPLE = object
    COMMIT_ID = object

version: str
__version__: str
__version_tuple__: VERSION_TUPLE
version_tuple: VERSION_TUPLE
commit_id: COMMIT_ID
__commit_id__: COMMIT_ID

__version__ = version = "0.1.dev43+g046e4437a.d20250930"
__version_tuple__ = version_tuple = (0, 1, "dev43", "g046e4437a.d20250930")

__commit_id__ = commit_id = "g046e4437a"
+19 −0
Original line number Diff line number Diff line
@@ -342,3 +342,22 @@ def create_directory(filename):

def get_mjd_vec():
    return np.arange(0, 3653, 1)


def get_stellar_mass_completeness_cosmos2020(type: str, redshift: float):
    """Return the 70% mass completeness limit according to COSMOS2020 SMF.

    See https://arxiv.org/pdf/2212.02512 Eqs. 3, 4 and 5.

    Returns
    -------
    stellar_mass_completeness: float or array_like
        70% stellar mass completeness limit in Msun
    """
    factors = {
        "Total": (-3.23e7, 7.83e7),
        "Star-forming": (-5.77e7, 8.66e7),
        "Quiescent": (-3.79e7, 2.98e8),
    }
    f1, f2 = factors[type]
    return f1 * (1 + redshift) + f2 * (1 + redshift) ** 2