From 7dfc0444f0f9bbb6ef41cea9253332402572a953 Mon Sep 17 00:00:00 2001 From: rasmusthog Date: Thu, 3 Nov 2022 20:35:51 +0100 Subject: [PATCH] Allow different multiplication factor for each scan --- nafuma/xrd/io.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nafuma/xrd/io.py b/nafuma/xrd/io.py index 2be187c..0d3f16f 100644 --- a/nafuma/xrd/io.py +++ b/nafuma/xrd/io.py @@ -759,7 +759,11 @@ def adjust_intensities(diffractogram, wavelength, index, options): if options['normalise']: diffractogram['I'] = diffractogram['I'] / diffractogram['I'].max() - diffractogram['I'] = diffractogram['I'] * options['multiply'] + + if not isinstance(options['multiply'], list): + options['multiply'] = [options['multiply']] + + diffractogram['I'] = diffractogram['I'] * options['multiply'][index] if options['drawdown']: diffractogram['I'] = diffractogram['I'] - diffractogram['I'].mean()