Skip to content

Commit

Permalink
Merge pull request #104 from LSSTDESC/issue/103/change-behavior-of-se…
Browse files Browse the repository at this point in the history
…ed-param

Change behavior of `seed` in `Noisifier` and `Selector`
  • Loading branch information
drewoldag authored Apr 24, 2024
2 parents 5bdb1e3 + cc443d6 commit eee62e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/rail/creation/noisifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from rail.core.stage import RailStage
from rail.core.data import PqHandle

from ceci.config import StageParameter as Param

class Noisifier(RailStage):
"""Base class Noisifier, which adds noise to the input catalog
Expand All @@ -18,7 +18,9 @@ class Noisifier(RailStage):

name = 'Noisifier'
config_options = RailStage.config_options.copy()
config_options.update(seed=1337)
config_options.update(
seed=Param(default=None, required=False, msg="Set to an `int` to force reproducible results."),
)
inputs = [('input', PqHandle)]
outputs = [('output', PqHandle)]

Expand Down
1 change: 1 addition & 0 deletions src/rail/creation/selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class Selector(RailStage):
config_options = RailStage.config_options.copy()
config_options.update(
drop_rows=Param(bool, True, msg="Drop selected rows from output table"),
seed=Param(default=None, required=False, msg="Set to an `int` to force reproducible results."),
)
inputs = [('input', PqHandle)]
outputs = [('output', PqHandle)]
Expand Down

0 comments on commit eee62e9

Please sign in to comment.