Skip to content

Commit

Permalink
Small fix to Insturment.model with optional optics input
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisDesdoigts committed Nov 10, 2022
1 parent 38b90ce commit cf15a0b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dLux/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,11 @@ def model(self : Instrument, **kwargs):
single array (if return_tree is false), or a pytree like object
with matching tree strucutre as the input scene/sources/source.
"""
optics = optics if 'optics' in kwargs else self.optics
if 'optics' in kwargs:
optics = kwargs['optics']
kwargs.pop('optics')
else:
optics = self.optics
kwargs['detector'] = self.detector if 'detector' not in kwargs \
else kwargs['detector']
kwargs['filter'] = self.filter if 'filter' not in kwargs \
Expand Down

0 comments on commit cf15a0b

Please sign in to comment.