From 06bcf6a86ce98dacd20f482c01d558a1a61e1b10 Mon Sep 17 00:00:00 2001 From: bepinat Date: Thu, 13 Sep 2018 16:56:59 +0200 Subject: [PATCH] correction for nm scale and addition of cm scale --- camel.py | 4 +++- samel.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/camel.py b/camel.py index b697bd0..3ad10f0 100755 --- a/camel.py +++ b/camel.py @@ -524,7 +524,9 @@ def waveindgen(hdr): if cunit.strip().lower() in {'angstroms', 'angstrom'}: lconvfac = 1 if cunit.strip().lower() in {'nanometers', 'nm'}: - lconvfac = 1e3 + lconvfac = 1e1 + if cunit.strip().lower() in {'centimeters', 'cm'}: + lconvfac = 1e8 if 'CD3_3' in hdr.keys(): sclp = hdr['CD3_3'] elif 'CDELT3' in hdr.keys(): diff --git a/samel.py b/samel.py index bfae8bd..01a5006 100755 --- a/samel.py +++ b/samel.py @@ -369,7 +369,9 @@ def waveindgen(hdr): if cunit.strip().lower() in {'angstroms', 'angstrom'}: lconvfac = 1 if cunit.strip().lower() in {'nanometers', 'nm'}: - lconvfac = 1e3 + lconvfac = 1e1 + if cunit.strip().lower() in {'centimeters', 'cm'}: + lconvfac = 1e8 if 'CD1_1' in hdr.keys(): sclp = hdr['CD1_1'] elif 'CDELT1' in hdr.keys(): -- GitLab