From cf15a0b584a999c1432c5c2980cb70cc99739467 Mon Sep 17 00:00:00 2001 From: Louis Desdoigts Date: Thu, 10 Nov 2022 16:01:01 +1100 Subject: [PATCH] Small fix to Insturment.model with optional optics input --- dLux/core.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dLux/core.py b/dLux/core.py index 95a62993..274da550 100644 --- a/dLux/core.py +++ b/dLux/core.py @@ -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 \