Unverified Commit 7f25857b authored by Akke Viitanen's avatar Akke Viitanen
Browse files

remove sf_inf division by sqrt(1 + z)

AGILE DR1 was created by dividing sf_inf by 1 / sqrt(1 + z). The correct
solution is to omit this division (i.e. observed sf_inf equals
rest-frame sf_inf). Added `divide_sf_inf_by_z1` option to control for
this (for future testing pruposes) with the default option set to
`False`.
parent 6a61afc6
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ def LC2(
    frame="observed",
    type2=False,
    meanmag=None,
    divide_sf_inf_by_z1=False,
):
    """
    Generate one artificial light curve using a stochastic model based on the
@@ -135,8 +136,12 @@ def LC2(
    if frame == "observed":
        # Convering to observed frame (Eq 17, 18 from Kelly et al. 2009)
        tau = np.power(10, logtau) * (1 + z)
        sf_inf = np.power(10, logsf_inf) / np.sqrt(1 + z)
        # sf_inf = np.power(10,logsf_inf)

        # NOTE: AGILE DR1 used the 1 / np.sqrt(1 + z)
        sf_inf = np.power(10, logsf_inf)
        if divide_sf_inf_by_z1:
            sf_inf /= np.sqrt(1 + z)

    elif frame == "rest":
        tau = np.power(10, logtau)
        sf_inf = np.power(10, logsf_inf)