diff --git a/python/lsst/ap/association/trailedSourceFilter.py b/python/lsst/ap/association/trailedSourceFilter.py index 2804eff2..15c2b36d 100644 --- a/python/lsst/ap/association/trailedSourceFilter.py +++ b/python/lsst/ap/association/trailedSourceFilter.py @@ -19,7 +19,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -"""A simple implementation of source association task for ap_verify. +"""A simple implementation of trailed source filtering for the association + task. """ __all__ = ["TrailedSourceFilterTask", "TrailedSourceFilterConfig"] @@ -78,8 +79,8 @@ def run(self, - ``"dia_sources"`` : DiaSource table that is free from unwanted trailed sources (`pandas.DataFrame`) - - ``"trailed_dia_sources"`` : DiaSources that have trailed more than - 0.416 arcseconds/second*exposure_time(`pandas.DataFrame`) + - ``"trailed_dia_sources"`` : DiaSources that have trailed more + than 0.416 arcseconds/second*exposure_time(`pandas.DataFrame`) """ trail_mask = self.check_dia_source_trail(dia_sources, exposure) @@ -91,7 +92,7 @@ def check_dia_source_trail(self, dia_sources, exposure): """Check that all DiaSources have trails. Creates a mask for sources with lengths greater than 0.416 - arcseconds/second*exposure time. + arcseconds/second times the exposure time. Parameters ---------- diff --git a/tests/test_trailedSourceFilter.py b/tests/test_trailedSourceFilter.py index 913928f4..b4ff3b45 100644 --- a/tests/test_trailedSourceFilter.py +++ b/tests/test_trailedSourceFilter.py @@ -47,7 +47,7 @@ def test_run(self): 3) def test_run_short_max_trail(self): - # Run with default trail length + # Run with an aggressive cuttoff to test config settings. config = TrailedSourceFilterTask.ConfigClass() config.maxTrailLength = 0.01 trailedSourceFilterTask = TrailedSourceFilterTask(config=config) @@ -58,7 +58,7 @@ def test_run_short_max_trail(self): 1) def test_run_no_trails(self): - # Run with long trail length + # Run with long trail length so that no sources are filtered. config = TrailedSourceFilterTask.ConfigClass() config.maxTrailLength = 10.00 trailedSourceFilterTask = TrailedSourceFilterTask(config=config) @@ -71,6 +71,7 @@ def test_run_no_trails(self): 0) def test_check_dia_source_trail(self): + # Check that the task outputs the correct masks. trailedSourceFilterTask = TrailedSourceFilterTask() mask = trailedSourceFilterTask.check_dia_source_trail(self.diaSources, self.exposure)