@@ -30,12 +30,12 @@ class TrailedSourceFilterConfig(pexConfig.Config):
3030 """Config class for TrailedSourceFilterTask.
3131 """
3232
33- maxTrailLength = pexConfig .Field (
33+ max_trail_length = pexConfig .Field (
3434 dtype = float ,
3535 doc = "Length of long trailed sources to remove from the input catalog, "
3636 "in arcseconds per second. Default comes from DMTN-199, which "
3737 "requires removal of sources with trails longer than 10 "
38- "degrees/day, which is 36000/3600/24arcsec /second, or roughly"
38+ "degrees/day, which is 36000/3600/24 arcsec /second, or roughly"
3939 "0.416 arcseconds per second." ,
4040 default = 36000 / 3600.0 / 24.0 ,
4141 )
@@ -46,9 +46,9 @@ class TrailedSourceFilterTask(pipeBase.Task):
4646 guidelines.
4747
4848 This task checks the length of trailLength in the DIASource catalog using
49- a given arcsecond/second rate from maxTrailLength and the exposure time.
49+ a given arcsecond/second rate from max_trail_length and the exposure time.
5050 The two values are used to calculate the maximum allowed trail length and
51- filters out any trail longer than the maximum. The maxTrailLength is
51+ filters out any trail longer than the maximum. The max_trail_length is
5252 outlined in DMTN-199 and determines the default value.
5353 """
5454
@@ -57,7 +57,7 @@ class TrailedSourceFilterTask(pipeBase.Task):
5757
5858 @timeMethod
5959 def run (self , dia_sources , exposure_time ):
60- """Remove trailed sources longer than ``config.maxTrailLength `` from
60+ """Remove trailed sources longer than ``config.max_trail_length `` from
6161 the input catalog.
6262
6363 Parameters
@@ -76,10 +76,9 @@ def run(self, dia_sources, exposure_time):
7676 trailed sources. (`pandas.DataFrame`)
7777
7878 - ``trailed_dia_sources`` : DIASources that have trails which
79- exceed maxTrailLength /second*exposure_time.
79+ exceed max_trail_length /second*exposure_time.
8080 (`pandas.DataFrame`)
8181 """
82-
8382 trail_mask = self ._check_dia_source_trail (dia_sources , exposure_time )
8483
8584 return pipeBase .Struct (
@@ -89,8 +88,8 @@ def run(self, dia_sources, exposure_time):
8988 def _check_dia_source_trail (self , dia_sources , exposure_time ):
9089 """Find DiaSources that have long trails.
9190
92- Creates a mask for sources with lengths greater than 0.416
93- arcseconds/second multiplied by the exposure time.
91+ Return a mask of sources with lengths greater than
92+ ``config.max_trail_length`` multiplied by the exposure time.
9493
9594 Parameters
9695 ----------
@@ -105,8 +104,7 @@ def _check_dia_source_trail(self, dia_sources, exposure_time):
105104 Boolean mask for DIASources which are greater than the
106105 cutoff length.
107106 """
108-
109107 trail_mask = (dia_sources .loc [:, "trailLength" ].values [:]
110- >= (self .config .maxTrailLength * exposure_time ))
108+ >= (self .config .max_trail_length * exposure_time ))
111109
112110 return trail_mask
0 commit comments