2020import numpy as np
2121
2222
23- def DEScalcDetectionProbability (mag , limmag , c , k , c_sharp = 0.9555 ):
23+ def DEScalcDetectionProbability (mag , limmag , c , k , c_sharp ):
2424 """
2525 Find the probability of a detection given a visual magnitude,
2626 limiting magnitude, a scaling factor c, transition sharpness k and a transient efficiency. Equation from
@@ -45,7 +45,7 @@ def DEScalcDetectionProbability(mag, limmag, c, k, c_sharp=0.9555):
4545 Returns
4646 ----------
4747 P : float or array of floats
48- Probability of detection.
48+ Probability of detection
4949 """
5050
5151 P = c_sharp * (c / (1 + np .exp (k * (mag - limmag ))))
@@ -55,6 +55,7 @@ def DEScalcDetectionProbability(mag, limmag, c, k, c_sharp=0.9555):
5555
5656def DESDetectionProbability (
5757 eph_df ,
58+ transient_efficiency ,
5859 magnitude_name = "PSFMag" ,
5960 limiting_magnitude_name = "fiveSigmaDepth_mag" ,
6061 scaling_factor_name = "c" ,
@@ -90,6 +91,9 @@ def DESDetectionProbability(
9091 eph_df column name for transition_sharpness
9192 DEfault: k
9293
94+ transient_efficiency: float
95+ overall transient efficiency for moving object detection
96+
9397 Returns
9498 ----------
9599 : float or array of floats
@@ -102,4 +106,5 @@ def DESDetectionProbability(
102106 eph_df [limiting_magnitude_name ],
103107 eph_df [scaling_factor_name ],
104108 eph_df [transition_sharpness_name ],
109+ transient_efficiency ,
105110 )
0 commit comments