Skip to content

Commit

Permalink
Added PSF sizes for Euclid and Roman. (#20)
Browse files Browse the repository at this point in the history
* Added PSF sizes for Euclid and Roman.
  • Loading branch information
jfcrenshaw committed Apr 22, 2024
1 parent c598f7b commit ec0bf66
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
# (requires CODECOV_TOKEN in repository secrets)
#----------------------------------------------
- name: Upload coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # Only required for private repositories
file: ./coverage.xml
Expand Down
3 changes: 3 additions & 0 deletions photerr/euclid.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class EuclidErrorParams(ErrorParams):

__doc__ += param_docstring
__doc__ += " Graham 2020 - https://arxiv.org/abs/2004.07885"
__doc__ += "\n Scaramella 2021 - https://arxiv.org/abs/2108.01201"

nYrObs: float = 1.0
nVisYr: dict[str, float] | float = 1.0
Expand All @@ -29,6 +30,8 @@ class EuclidErrorParams(ErrorParams):
"H": 23.9,
}
)
theta: dict[str, float] | float = 0.18
airmass: float = 0


class EuclidErrorModel(ErrorModel):
Expand Down
8 changes: 6 additions & 2 deletions photerr/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ def _get_area_ratio_auto(
# get the psf size for each band
psf_size = np.array([self.params.theta[band] for band in bands])
airmass = np.array([self.params.airmass[band] for band in bands])
psf_size *= airmass**0.6
for i in range(len(airmass)):
if airmass[i] > 0:
psf_size[i] *= airmass[i] ** 0.6

# convert PSF FWHM to Gaussian sigma
psf_sig = psf_size / 2.355
Expand Down Expand Up @@ -164,7 +166,9 @@ def _get_area_ratio_gaap(
# get the psf size for each band
psf_size = np.array([self.params.theta[band] for band in bands])
airmass = np.array([self.params.airmass[band] for band in bands])
psf_size *= airmass**0.6
for i in range(len(airmass)):
if airmass[i] > 0:
psf_size[i] *= airmass[i] ** 0.6

# convert PSF FWHM to Gaussian sigma
psf_sig = psf_size / 2.355
Expand Down
10 changes: 10 additions & 0 deletions photerr/roman.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class RomanErrorParams(ErrorParams):

__doc__ += param_docstring
__doc__ += " Graham 2020 - https://arxiv.org/abs/2004.07885"
__doc__ += "\n Rubin 2021 - https://arxiv.org/abs/2102.05069"

nYrObs: float = 1.0
nVisYr: dict[str, float] | float = 1.0
Expand All @@ -30,6 +31,15 @@ class RomanErrorParams(ErrorParams):
"F": 26.25,
}
)
theta: dict[str, float] | float = field(
default_factory=lambda: {
"Y": 0.130,
"J": 0.136,
"H": 0.150,
"F": 0.166,
}
)
airmass: float = 0


class RomanErrorModel(ErrorModel):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "photerr"
version = "1.2.4"
version = "1.3.0"
description = "Photometric error model for astronomical imaging surveys"
authors = ["John Franklin Crenshaw <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit ec0bf66

Please sign in to comment.