diff --git a/docs/notebooks/activity/lsst_comet/simple_cometary_magnitude.ipynb b/docs/notebooks/activity/lsst_comet/simple_cometary_magnitude.ipynb index 8861339..64ebe8a 100644 --- a/docs/notebooks/activity/lsst_comet/simple_cometary_magnitude.ipynb +++ b/docs/notebooks/activity/lsst_comet/simple_cometary_magnitude.ipynb @@ -75,7 +75,7 @@ " 'k':[-2],\n", " 'optFilter':'r',\n", " 'seeingFwhmEff': [1],\n", - " 'TrailedSourceMag': 18}\n", + " 'trailedSourceMagTrue': 18}\n", "\n", "test_data = pd.DataFrame(test_dict)\n", "\n", @@ -154,7 +154,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.12" + "version": "3.10.14" } }, "nbformat": 4, diff --git a/src/sorcha_addons/activity/lsst_comet/lsst_comet_activity.py b/src/sorcha_addons/activity/lsst_comet/lsst_comet_activity.py index 901cd1c..022c6af 100644 --- a/src/sorcha_addons/activity/lsst_comet/lsst_comet_activity.py +++ b/src/sorcha_addons/activity/lsst_comet/lsst_comet_activity.py @@ -25,7 +25,7 @@ class LSSTCometActivity(AbstractCometaryActivity): """ def __init__( - self, required_column_names: List[str] = ["k", "afrho1", "optFilter", "TrailedSourceMag"] + self, required_column_names: List[str] = ["k", "afrho1", "optFilter", "trailedSourceMagTrue"] ) -> None: super().__init__(required_column_names) @@ -78,8 +78,8 @@ def compute( except KeyError as err: self._log_exception(err) - df["TrailedSourceMag"] = -2.5 * np.log10( - 10 ** (-0.4 * df["coma_magnitude"]) + 10 ** (-0.4 * df["TrailedSourceMag"]) + df["trailedSourceMagTrue"] = -2.5 * np.log10( + 10 ** (-0.4 * df["coma_magnitude"]) + 10 ** (-0.4 * df["trailedSourceMagTrue"]) ) return df diff --git a/tests/activity/lsst_comet/test_PPCalculateApparentMagnitude.py b/tests/activity/lsst_comet/test_PPCalculateApparentMagnitude.py index a0683db..13597cc 100644 --- a/tests/activity/lsst_comet/test_PPCalculateApparentMagnitude.py +++ b/tests/activity/lsst_comet/test_PPCalculateApparentMagnitude.py @@ -49,7 +49,7 @@ def test_PPCalculateSimpleCometaryMagnitude(): cometary_obs = pd.DataFrame( { "optFilter": ["r", "r"], - "TrailedSourceMag": [19.676259, 22.748274], + "trailedSourceMagTrue": [19.676259, 22.748274], "H_r": [15.35, 15.35], "afrho1": [1552, 1552], "k": [-3.35, -3.35], @@ -62,4 +62,4 @@ def test_PPCalculateSimpleCometaryMagnitude(): df_comet = PPCalculateSimpleCometaryMagnitude(cometary_obs, ["r"], rho, delta, alpha, "lsst_comet") - assert_almost_equal(df_comet["TrailedSourceMag"], [15.757, 22.461], decimal=3) + assert_almost_equal(df_comet["trailedSourceMagTrue"], [15.757, 22.461], decimal=3)