Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bsmartradio committed Aug 21, 2023
1 parent 5894924 commit 6a90ea2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
9 changes: 5 additions & 4 deletions python/lsst/ap/association/trailedSourceFilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

"""A simple implementation of source association task for ap_verify.
"""A simple implementation of trailed source filtering for the association
task.
"""

__all__ = ["TrailedSourceFilterTask", "TrailedSourceFilterConfig"]
Expand Down Expand Up @@ -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)

Expand All @@ -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
----------
Expand Down
5 changes: 3 additions & 2 deletions tests/test_trailedSourceFilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 6a90ea2

Please sign in to comment.