Skip to content

Commit

Permalink
More cmds and kwargs stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
hugobuddel committed Feb 15, 2024
1 parent 050fc28 commit 4f5c9a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scopesim/effects/effects.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Effect(DataContainer):
"""

def __init__(self, **kwargs):
def __init__(self, cmds=None, **kwargs):
super().__init__(**kwargs)
self.meta["z_order"] = []
self.meta["include"] = True
Expand Down
6 changes: 4 additions & 2 deletions scopesim/effects/spectral_trace_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,8 @@ class SpectralTraceListWheel(Effect):
}
_current_str = "current_trace_list"

def __init__(self, **kwargs):
super().__init__(**kwargs)
def __init__(self, cmds=None, **kwargs):
super().__init__(cmds, **kwargs)
check_keys(kwargs, self.required_keys, action="error")

params = {
Expand All @@ -487,6 +487,8 @@ def __init__(self, **kwargs):

path = self._get_path()
self.trace_lists = {}
if "name" in kwargs:
kwargs.pop("name")

Check warning on line 491 in scopesim/effects/spectral_trace_list.py

View check run for this annotation

Codecov / codecov/patch

scopesim/effects/spectral_trace_list.py#L491

Added line #L491 was not covered by tests
for name in from_currsys(self.meta["trace_list_names"], self.cmds):
fname = str(path).format(name)
self.trace_lists[name] = SpectralTraceList(filename=fname,
Expand Down

0 comments on commit 4f5c9a9

Please sign in to comment.