From b7b0844ddefface71822d7be966b8328f810c4b4 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Thu, 5 Jul 2007 01:44:40 +0200 Subject: [PATCH] Added td2m and removed old calibration.octave. --- calibration.octave | 17 ----------------- octave/td2m | 29 +++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 17 deletions(-) delete mode 100644 calibration.octave create mode 100755 octave/td2m diff --git a/calibration.octave b/calibration.octave deleted file mode 100644 index 626b53b..0000000 --- a/calibration.octave +++ /dev/null @@ -1,17 +0,0 @@ -# Created by Octave 2.1.73, Thu Jun 21 20:32:14 2007 CEST -# name: __nargin__ -# type: scalar -0 -# name: caltemp -# type: matrix -# rows: 1 -# columns: 15 - 100 95 90 85 80 75 69 66 61 60 55 50 45 32 21 -# name: t2r -# type: scalar -1442695.04088896 -# name: caldel -# type: matrix -# rows: 1 -# columns: 15 - 0.0047 0.0056 0.0065 0.0074 0.0091 0.0108 0.013 0.0144 0.0172 0.0178 0.021 0.026 0.031 0.052 0.08 diff --git a/octave/td2m b/octave/td2m new file mode 100755 index 0000000..f7b949c --- /dev/null +++ b/octave/td2m @@ -0,0 +1,29 @@ +#!/usr/bin/perl -w + +while(<>) { + if(/^(\d+)\s+([\d.]+)(-([\d.]+))?$/) { + if(defined($4)) { + $temp{$1} = ($2 + $4) / 2; + } else { + $temp{$1} = $2; + } + } +} + +print "#name: ct\n"; +print "#type: matrix\n"; +print "#rows: 1\n"; +print ("#columns: " . scalar(keys %temp) . "\n"); +for $k (sort keys %temp) { + print " $k"; +} +print "\n"; + +print "#name: cd\n"; +print "#type: matrix\n"; +print "#rows: 1\n"; +print ("#columns: " . scalar(keys %temp) . "\n"); +for $k (sort keys %temp) { + print " $temp{$k}"; +} +print "\n"; -- 2.11.0