line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lab::XPRESS::Sweep::PulsePeriod; |
2
|
|
|
|
|
|
|
#ABSTRACT: Pulse period sweep |
3
|
|
|
|
|
|
|
$Lab::XPRESS::Sweep::PulsePeriod::VERSION = '3.881'; |
4
|
1
|
|
|
1
|
|
1643
|
use v5.20; |
|
1
|
|
|
|
|
3
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
6
|
use Lab::XPRESS::Sweep; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
8
|
1
|
|
|
1
|
|
6
|
use Time::HiRes qw/usleep/, qw/time/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
9
|
1
|
|
|
1
|
|
97
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
501
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our @ISA = ('Lab::XPRESS::Sweep'); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new { |
14
|
0
|
|
|
0
|
0
|
|
my $proto = shift; |
15
|
0
|
|
|
|
|
|
my @args = @_; |
16
|
0
|
|
0
|
|
|
|
my $class = ref($proto) || $proto; |
17
|
|
|
|
|
|
|
my $self->{default_config} = { |
18
|
0
|
|
|
|
|
|
id => 'PulsePeriod_Sweep', |
19
|
|
|
|
|
|
|
filename_extension => 'PulsePeriod=', |
20
|
|
|
|
|
|
|
interval => 1, |
21
|
|
|
|
|
|
|
points => [], |
22
|
|
|
|
|
|
|
rate => [1], |
23
|
|
|
|
|
|
|
mode => 'step', |
24
|
|
|
|
|
|
|
allowed_instruments => ['Lab::Instrument::RSSMB100A'], |
25
|
|
|
|
|
|
|
allowed_sweep_modes => [ 'list', 'step' ], |
26
|
|
|
|
|
|
|
number_of_points => [undef] |
27
|
|
|
|
|
|
|
}; |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
$self = $class->SUPER::new( $self->{default_config}, @args ); |
30
|
0
|
|
|
|
|
|
bless( $self, $class ); |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
return $self; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub go_to_sweep_start { |
36
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# go to start: |
39
|
|
|
|
|
|
|
$self->{config}->{instrument} |
40
|
0
|
|
|
|
|
|
->set_pulseperiod( { value => @{ $self->{config}->{points} }[0] } ); |
|
0
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub start_continuous_sweep { |
44
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
45
|
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
return; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub go_to_next_step { |
51
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
$self->{config}->{instrument}->set_pulseperiod( |
54
|
0
|
|
|
|
|
|
{ value => @{ $self->{config}->{points} }[ $self->{iterator} ] } ); |
|
0
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub exit_loop { |
59
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
60
|
|
|
|
|
|
|
|
61
|
0
|
0
|
|
|
|
|
if ( $self->{config}->{mode} =~ /step|list/ ) { |
62
|
0
|
0
|
|
|
|
|
if ( |
63
|
|
|
|
|
|
|
not |
64
|
0
|
|
|
|
|
|
defined @{ $self->{config}->{points} }[ $self->{iterator} + 1 ] ) |
65
|
|
|
|
|
|
|
{ |
66
|
0
|
|
|
|
|
|
return 1; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
else { |
69
|
0
|
|
|
|
|
|
return 0; |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub get_value { |
75
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
76
|
0
|
|
|
|
|
|
return $self->{config}->{instrument}->get_pulseperiod(); |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
sub exit { |
80
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
81
|
0
|
|
|
|
|
|
$self->{config}->{instrument}->abort(); |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
1; |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
__END__ |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=pod |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=encoding UTF-8 |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 NAME |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Lab::XPRESS::Sweep::PulsePeriod - Pulse period sweep |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 VERSION |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
version 3.881 |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head1 CAVEATS/BUGS |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
probably none |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head1 SEE ALSO |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=over 4 |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=item L<Lab::XPRESS::Sweep> |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=back |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
This software is copyright (c) 2023 by the Lab::Measurement team; in detail: |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
Copyright 2013 Alois Dirnaichner, Andreas K. Huettel, Christian Butschkow, Stefan Geissler |
117
|
|
|
|
|
|
|
2014 Andreas K. Huettel |
118
|
|
|
|
|
|
|
2016 Simon Reinhardt |
119
|
|
|
|
|
|
|
2017 Andreas K. Huettel |
120
|
|
|
|
|
|
|
2020 Andreas K. Huettel |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
124
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=cut |