diff --git a/src/sorcha_community_utils/activity/lsst_comet/lsst_comet_activity.py b/src/sorcha_community_utils/activity/lsst_comet/lsst_comet_activity.py index b76f71f..68b896e 100644 --- a/src/sorcha_community_utils/activity/lsst_comet/lsst_comet_activity.py +++ b/src/sorcha_community_utils/activity/lsst_comet/lsst_comet_activity.py @@ -72,7 +72,9 @@ def compute( # this calculates the coma magnitude in each filter try: for filt in observing_filters: - df.loc[df["optFilter"] == filt, "coma_magnitude"] = com.mag(g, filt, rap=df["seeingFwhmEff"]) + # here rap is the aperture width, hardcoded here to 1.0 arcsec + # the code assumes an infinite coma so is thus only accurate for small apertures + df.loc[df["optFilter"] == filt, "coma_magnitude"] = com.mag(g, filt, rap=1.0) except KeyError as err: self._log_exception(err) diff --git a/tests/activity/lsst_comet/test_PPCalculateApparentMagnitude.py b/tests/activity/lsst_comet/test_PPCalculateApparentMagnitude.py index 5125e97..5d719e0 100644 --- a/tests/activity/lsst_comet/test_PPCalculateApparentMagnitude.py +++ b/tests/activity/lsst_comet/test_PPCalculateApparentMagnitude.py @@ -46,9 +46,6 @@ def test_PPCalculateSimpleCometaryMagnitude(): # Updates the dictionary of available subclasses of `AbstractCometaryActivity` update_activity_subclasses() - # data is for 67P, taken by Colin Snodgrass, and validated against same - # abnormally large seeing is to account for Colin's use of an aperture measured at comet distance - cometary_obs = pd.DataFrame( { "optFilter": ["r", "r"], @@ -56,7 +53,6 @@ def test_PPCalculateSimpleCometaryMagnitude(): "H_r": [15.35, 15.35], "afrho1": [1552, 1552], "k": [-3.35, -3.35], - "seeingFwhmEff": [8.064748, 3.206723], } ) @@ -66,4 +62,4 @@ def test_PPCalculateSimpleCometaryMagnitude(): df_comet = PPCalculateSimpleCometaryMagnitude(cometary_obs, ["r"], rho, delta, alpha, "lsst_comet") - assert_almost_equal(df_comet["TrailedSourceMag"], [13.516, 22.010], decimal=3) + assert_almost_equal(df_comet["TrailedSourceMag"], [15.757, 22.461], decimal=3)