From b74c863f52a874eb38bd24d4fef11602996e9d87 Mon Sep 17 00:00:00 2001 From: Brianna Major Date: Thu, 9 Jan 2025 16:52:35 -0500 Subject: [PATCH] The calc_transmission may also have no coating information Signed-off-by: Brianna Major --- hexrd/instrument/hedm_instrument.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hexrd/instrument/hedm_instrument.py b/hexrd/instrument/hedm_instrument.py index 69b3271b..71ffbece 100644 --- a/hexrd/instrument/hedm_instrument.py +++ b/hexrd/instrument/hedm_instrument.py @@ -2193,9 +2193,13 @@ def calc_transmission(self, rMat_s: np.ndarray = None) -> dict[str, np.ndarray]: energy = self.beam_energy transmissions = {} for det_name, det in self.detectors.items(): + transmission = 1 transmission_filter, transmission_phosphor = ( det.calc_filter_coating_transmission(energy)) - transmission = transmission_filter * transmission_phosphor + if det.filter.thickness > 0: + transmission *= transmission_filter + if det.phosphor.thickness > 0: + transmission *= transmission_phosphor if self.physics_package is not None: transmission_physics_package = ( det.calc_physics_package_transmission(