From 2c50dc76babd4eed46fb98339c6f7dde70559bfb Mon Sep 17 00:00:00 2001 From: David Sehnal <david.sehnal@gmail.com> Date: Wed, 13 Jun 2018 20:05:00 +0200 Subject: [PATCH] cif2bcif tweak --- src/apps/cif2bcif/field-classifier.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/apps/cif2bcif/field-classifier.ts b/src/apps/cif2bcif/field-classifier.ts index f7caac96a..5bf4de2b3 100644 --- a/src/apps/cif2bcif/field-classifier.ts +++ b/src/apps/cif2bcif/field-classifier.ts @@ -146,6 +146,9 @@ namespace FloatClassifier { } export function classify(data: number[], name: string) { + // if a vector/matrix, do not reduce precision + if (name.indexOf('[') > 0) return { encoder: E.by(E.byteArray), typedArray: Float64Array }; + let dc = 10; for (let i = 0, n = data.length; i < n; i++) dc = Math.max(dc, digitCount(data[i])); -- GitLab