line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lab::Instrument::TemperatureDiode::SI420; |
2
|
|
|
|
|
|
|
#ABSTRACT: SI420 (???) |
3
|
|
|
|
|
|
|
$Lab::Instrument::TemperatureDiode::SI420::VERSION = '3.881'; |
4
|
1
|
|
|
1
|
|
1659
|
use v5.20; |
|
1
|
|
|
|
|
4
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
7
|
1
|
|
|
1
|
|
6
|
use Math::Complex; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
193
|
|
8
|
1
|
|
|
1
|
|
8
|
use Lab::Instrument::TemperatureDiode; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
526
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our @ISA = ("Lab::Instrument::TemperatureDiode"); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new { |
13
|
0
|
|
|
0
|
0
|
|
my $proto = shift; |
14
|
0
|
|
0
|
|
|
|
my $class = ref($proto) || $proto; |
15
|
0
|
|
|
|
|
|
my $self = $class->SUPER::new(@_); |
16
|
0
|
|
|
|
|
|
$self->${ \( __PACKAGE__ . '::_construct' ) }(__PACKAGE__); |
|
0
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
|
return $self; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub convert2Kelvin { |
22
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
my $value = shift; |
25
|
0
|
|
|
|
|
|
my $y; |
26
|
|
|
|
|
|
|
my $x1; |
27
|
0
|
|
|
|
|
|
my $x2; |
28
|
|
|
|
|
|
|
|
29
|
0
|
0
|
|
|
|
|
if ( $value <= 1.1014 ) { # approximieren durch polynom |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
$value |
31
|
|
|
|
|
|
|
= ( -234.66 * $value**5.0 ) |
32
|
|
|
|
|
|
|
+ ( 548.92 * $value**4.0 ) |
33
|
|
|
|
|
|
|
- ( 509.23 * $value**3.0 ) |
34
|
|
|
|
|
|
|
+ ( 201.73 * $value**2.0 ) |
35
|
|
|
|
|
|
|
- ( 453.87 * $value**1.0 ) |
36
|
|
|
|
|
|
|
+ 537.83; |
37
|
0
|
|
|
|
|
|
return $value; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
elsif ( $value > 1.7191 ) { |
40
|
0
|
|
|
|
|
|
$value = 0; |
41
|
0
|
|
|
|
|
|
return 0; |
42
|
|
|
|
|
|
|
} # keine Aussage möglich |
43
|
0
|
|
|
|
|
|
elsif ( $value > 1.7086 ) { $y = 1; $x1 = 1.7086; $x2 = 1.7191; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
44
|
0
|
|
|
|
|
|
elsif ( $value > 1.6852 ) { $y = 2; $x1 = 1.6852; $x2 = 1.7086; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
45
|
0
|
|
|
|
|
|
elsif ( $value > 1.6530 ) { $y = 3; $x1 = 1.6530; $x2 = 1.6852; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
elsif ( $value > 1.6124 ) { $y = 4; $x1 = 1.6124; $x2 = 1.6530; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
elsif ( $value > 1.5659 ) { $y = 5; $x1 = 1.5659; $x2 = 1.6124; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
elsif ( $value > 1.5179 ) { $y = 6; $x1 = 1.5179; $x2 = 1.5659; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
49
|
0
|
|
|
|
|
|
elsif ( $value > 1.4723 ) { $y = 7; $x1 = 1.4723; $x2 = 1.5179; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
elsif ( $value > 1.4309 ) { $y = 8; $x1 = 1.4309; $x2 = 1.4723; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
51
|
0
|
|
|
|
|
|
elsif ( $value > 1.3956 ) { $y = 9; $x1 = 1.3956; $x2 = 1.4309; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
elsif ( $value > 1.3656 ) { $y = 10; $x1 = 1.3656; $x2 = 1.3956; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
53
|
0
|
|
|
|
|
|
elsif ( $value > 1.3385 ) { $y = 11; $x1 = 1.3385; $x2 = 1.3656; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
54
|
0
|
|
|
|
|
|
elsif ( $value > 1.3142 ) { $y = 12; $x1 = 1.3142; $x2 = 1.3385; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
elsif ( $value > 1.2918 ) { $y = 13; $x1 = 1.2918; $x2 = 1.3142; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
56
|
0
|
|
|
|
|
|
elsif ( $value > 1.2712 ) { $y = 14; $x1 = 1.2712; $x2 = 1.2918; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
57
|
0
|
|
|
|
|
|
elsif ( $value > 1.2517 ) { $y = 15; $x1 = 1.2517; $x2 = 1.2712; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
elsif ( $value > 1.2333 ) { $y = 16; $x1 = 1.2333; $x2 = 1.2517; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
59
|
0
|
|
|
|
|
|
elsif ( $value > 1.2151 ) { $y = 17; $x1 = 1.2151; $x2 = 1.2333; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
60
|
0
|
|
|
|
|
|
elsif ( $value > 1.1963 ) { $y = 18; $x1 = 1.1963; $x2 = 1.2151; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
61
|
0
|
|
|
|
|
|
elsif ( $value > 1.1759 ) { $y = 19; $x1 = 1.1759; $x2 = 1.1963; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
62
|
0
|
|
|
|
|
|
elsif ( $value > 1.1524 ) { $y = 20; $x1 = 1.1524; $x2 = 1.1759; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
63
|
0
|
|
|
|
|
|
elsif ( $value > 1.1293 ) { $y = 21; $x1 = 1.1293; $x2 = 1.1524; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
64
|
0
|
|
|
|
|
|
elsif ( $value > 1.1192 ) { $y = 22; $x1 = 1.1192; $x2 = 1.1293; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
65
|
0
|
|
|
|
|
|
elsif ( $value > 1.1146 ) { $y = 23; $x1 = 1.1146; $x2 = 1.1192; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
66
|
0
|
|
|
|
|
|
elsif ( $value > 1.1114 ) { $y = 24; $x1 = 1.1114; $x2 = 1.1146; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
67
|
0
|
|
|
|
|
|
elsif ( $value > 1.1090 ) { $y = 25; $x1 = 1.1090; $x2 = 1.1114; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
68
|
0
|
|
|
|
|
|
elsif ( $value > 1.1069 ) { $y = 26; $x1 = 1.1069; $x2 = 1.1090; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
69
|
0
|
|
|
|
|
|
elsif ( $value > 1.1049 ) { $y = 27; $x1 = 1.1049; $x2 = 1.1069; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
70
|
0
|
|
|
|
|
|
elsif ( $value > 1.1031 ) { $y = 28; $x1 = 1.1031; $x2 = 1.1049; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
71
|
0
|
|
|
|
|
|
elsif ( $value > 1.1014 ) { $y = 29; $x1 = 1.1014; $x2 = 1.1031; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
|
73
|
0
|
|
|
|
|
|
$value = $y + ( $x2 - $value ) / ( $x2 - $x1 ); |
74
|
|
|
|
|
|
|
|
75
|
0
|
|
|
|
|
|
return $value; |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
1; |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
__END__ |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=pod |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=encoding UTF-8 |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 NAME |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Lab::Instrument::TemperatureDiode::SI420 - SI420 (???) |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head1 VERSION |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
version 3.881 |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
This software is copyright (c) 2023 by the Lab::Measurement team; in detail: |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Copyright 2013 Andreas K. Huettel, Christian Butschkow |
99
|
|
|
|
|
|
|
2016 Simon Reinhardt |
100
|
|
|
|
|
|
|
2017 Andreas K. Huettel |
101
|
|
|
|
|
|
|
2020 Andreas K. Huettel |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
105
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=cut |