-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
799 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import numpy as np | ||
|
||
|
||
def phot_eff_function(snr): | ||
""" | ||
Photometric detection efficiency as a simple step function of snr. | ||
Parameters | ||
---------- | ||
snr: `list` or `numpy.ndarray` | ||
Signal to noise ratio of a list of observations. | ||
Returns | ||
------- | ||
eff: `list` or `numpy.ndarray` | ||
The photometric detection efficiency given snr. | ||
""" | ||
|
||
snr = np.array(snr) | ||
eff = np.where(snr > 5, 1.0, 0.0) | ||
|
||
return eff | ||
|
||
|
||
def spec_eff_function(peak_imag): | ||
""" | ||
Spectroscopic follow-up efficiency as a function of peak i band magnitude. | ||
Parameters | ||
---------- | ||
peak_imag: `list` or `numpy.ndarray` | ||
Peak magnitude in i band. | ||
Returns | ||
------- | ||
eff: `list` or `numpy.ndarray` | ||
The spectroscopic efficiency given peak i band magnitude. | ||
Based on Equation (17) in Kessler et al. 2019 | ||
s0, s1, s2 are fitted using data from Figure 4 in Kessler et al. 2019 | ||
""" | ||
|
||
s0 = 1.0 | ||
s1 = 2.36 | ||
s2 = 51.9 | ||
|
||
peak_imag = np.array(peak_imag) | ||
eff = s0 * np.power((1.0 + np.exp(s1 * peak_imag - s2)), -1) | ||
|
||
return eff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.