XPRESS/Sweep/SignalRecoveryPhase.pm

filter: Statementstmt 35.9% 14 / 39 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 36.3% 4 / 11 Podpod 14.2% 1 / 7 totaltotal 28.7% 19 / 66 SCAR 22.4
CC
4
Cov
30%
exit_loop
12.0
new
6.0
go_to_sweep_start
2.0
CRAP 9.4
« XPRESS/Sweep/SignalRecoveryOscOut.pm ↑ Summary XPRESS/Sweep/LogBlock.pm »
1 package Lab::XPRESS::Sweep::SignalRecoveryPhase;
2 1 $Lab::XPRESS::Sweep::SignalRecoveryPhase::VERSION = '3.881';
3 #ABSTRACT: Signal recovery lock in phase sweep
4  
5 1 ▶use v5.20;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use Lab::XPRESS::Sweep;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Time::HiRes qw/usleep/, qw/time/;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 our @ISA = ('Lab::XPRESS::Sweep');
12  
13 sub new {
14 0 ▶ my $proto = shift;
Subroutine new: not called CC=2 SCAR=17.9
Pod undocumented
15 0 my @args = @_;
16 0 ▶ my $class = ref($proto) || $proto;
Condition0%0/3
ref $proto || $proto
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
17 my $self->{default_config} = {
18 0 id => 'Power_Sweep',
19 filename_extension => 'POW=',
20 interval => 1,
21 points => [],
22 rate => [1],
23 mode => 'step',
24 allowed_instruments => ['Lab::Instrument::SignalRecovery726x'],
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 ▶ my $self = shift;
Subroutine go_to_sweep_start: not called CC=1 SCAR=6.9
Pod undocumented
37  
38 # go to start:
39 $self->{config}->{instrument}
40 0 ->set_refpha( { value => @{ $self->{config}->{points} }[0] } );
41 }
42  
43 sub start_continuous_sweep {
44 0 ▶ my $self = shift;
Subroutine start_continuous_sweep: not called CC=1 SCAR=6.9
Pod undocumented
45  
46 0 return;
47  
48 }
49  
50 sub go_to_next_step {
51 0 ▶ my $self = shift;
Subroutine go_to_next_step: not called CC=1 SCAR=6.9
Pod undocumented
52  
53 $self->{config}->{instrument}->set_refpha(
54 0 { value => @{ $self->{config}->{points} }[ $self->{iterator} ] } );
55  
56 }
57  
58 sub exit_loop {
59 0 ▶ my $self = shift;
Subroutine exit_loop: not called CC=3 SCAR=24.8
Pod undocumented
60  
61 0 ▶ if ( $self->{config}->{mode} =~ /step|list/ ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"config"}{"mode"} =~ /step|list/u) 0 0 0
62 0 ▶ if (
Branch: 1 branch
BranchTrueFalseTotal
if (not defined @{$$self{'config'}{'points'};}[$self->{'iterator'} + 1]) { } 0 0 0
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 ▶ my $self = shift;
Subroutine get_value: not called CC=1 SCAR=6.9
Pod documented
76 0 return $self->{config}->{instrument}->get_refpha();
77 }
78  
79 sub exit {
80 0 ▶ my $self = shift;
Subroutine exit: not called CC=1 SCAR=6.9
Pod undocumented
81 0 $self->{config}->{instrument}->abort();
82 }
83  
84 1 1;
85  
86 __END__
87  
88 =pod
89  
90 =encoding UTF-8
91  
92 =head1 NAME
93  
94 Lab::XPRESS::Sweep::SignalRecoveryPhase - Signal recovery lock in phase sweep
95  
96 =head1 VERSION
97  
98 version 3.881
99  
100 =head1 SYNOPSIS
101  
102 use Lab::XPRESS::hub;
103 my $hub = new Lab::XPRESS::hub();
104
105
106 my $lia = ...
107
108 my $sweep_voltage = $hub->Sweep('SignalRecoveryPhase',
109 {
110 instrument => $lia,
111 points => [0,10],
112 stepwidth => [1],
113 mode => 'step',
114 backsweep => 0
115 });
116  
117 .
118  
119 =head1 DESCRIPTION
120  
121 Parent: Lab::XPRESS::Sweep
122  
123 The Lab::XPRESS::Sweep::SignalRecoveryPhase
124  
125 =head1 CAVEATS/BUGS
126  
127 probably none
128  
129 =head1 SEE ALSO
130  
131 =over 4
132  
133 =item L<Lab::XPRESS::Sweep>
134  
135 =back
136  
137 =head1 COPYRIGHT AND LICENSE
138  
139 This software is copyright (c) 2023 by the Lab::Measurement team; in detail:
140  
141 Copyright 2021 Simon Reinhardt
142  
143  
144 This is free software; you can redistribute it and/or modify it under
145 the same terms as the Perl 5 programming language system itself.
146  
147 =cut
« XPRESS/Sweep/SignalRecoveryOscOut.pm ↑ Summary XPRESS/Sweep/LogBlock.pm »