From: c.wendisch Date: Fri, 2 Sep 2022 08:57:09 +0000 (+0200) Subject: Merge branch 'master' of jspc29.x-matter.uni-frankfurt.de:hades_mdc_settings X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=15b320c480521d6649788acc493daed07701c5c1;p=hades_mdc_settings.git Merge branch 'master' of jspc29.x-matter.uni-frankfurt.de:hades_mdc_settings --- 15b320c480521d6649788acc493daed07701c5c1 diff --cc pasttrec/pasttrec_baseline.db index f174846,4991e44..a507efb --- a/pasttrec/pasttrec_baseline.db +++ b/pasttrec/pasttrec_baseline.db @@@ -8,89 -8,62 +8,73 @@@ !Pasttrec Baseline table --# Serial # PT # C0 # C1 # C2 # C3 # C4 # C5 # C6 # C7 # --############################################################################################ - # - # 60111 0 30 20 23 28 26 27 27 24 - # 60111 1 27 22 30 27 21 29 27 19 - # 60111 2 28 62 62 30 62 62 22 62 - # 60111 3 22 23 19 23 62 62 24 62 - # 60121 0 23 25 16 25 24 29 19 28 - # 60121 1 31 25 21 24 24 25 26 28 - # 60121 2 24 20 19 24 23 21 30 22 - # 60121 3 18 24 26 18 19 25 21 21 - # 70121 0 29 26 26 31 29 31 28 62 - # 70121 1 25 28 17 16 27 28 22 15 - # 70121 2 19 18 28 24 27 25 27 22 - # 70121 3 23 22 25 31 12 24 28 24 - # 70111 0 20 25 62 62 20 62 62 62 - # 70111 1 24 62 25 62 26 24 62 18 - # 70111 2 62 24 22 62 28 62 24 28 - # 70111 3 62 20 23 62 21 62 19 16 ++# Serial # PT # C0 # C1 # C2 # C3 # C4 # C5 # C6 # C7 # ++###################################################################################### - - - # 60031 0 02 02 02 02 02 02 02 02 - # 60031 1 03 03 03 03 03 03 03 03 - # 60031 2 04 04 04 04 04 04 04 04 - # 60031 3 01 01 01 01 01 01 01 01 - # - # 70031 0 02 02 02 02 02 02 02 02 - # 70031 1 03 03 03 03 03 03 03 03 - # 70031 2 04 04 04 04 04 04 04 04 - # 70031 3 01 01 01 01 01 01 01 01 - # - # 60161 0 02 02 02 02 02 02 02 02 - # 60161 1 03 03 03 03 03 03 03 03 - # 60161 2 04 04 04 04 04 04 04 04 - # 60161 3 01 01 01 01 01 01 01 01 - # - # 70161 0 02 02 02 02 02 02 02 02 - # 70161 1 03 03 03 03 03 03 03 03 - # 70161 2 04 04 04 04 04 04 04 04 - # 70161 3 01 01 01 01 01 01 01 01 - # - 60111 0 30 20 23 28 26 27 27 24 - 60111 1 27 22 30 27 21 29 27 19 - 60111 2 28 62 62 30 62 62 22 62 - 60111 3 22 23 19 23 62 62 24 62 - 60121 0 23 25 16 25 24 29 19 28 - 60121 1 31 25 21 24 24 25 26 28 - 60121 2 24 20 19 24 23 21 30 22 - 60121 3 18 24 26 18 19 25 21 21 - 70121 0 29 26 26 31 29 31 28 62 - 70121 1 25 28 17 16 27 28 22 15 - 70121 2 19 18 28 24 27 25 27 22 - 70121 3 23 22 25 31 12 24 28 24 - 70111 0 20 25 62 62 20 62 62 62 - 70111 1 24 62 25 62 26 24 62 18 - 70111 2 62 24 22 62 28 62 24 28 - 70111 3 62 20 23 62 21 62 19 16 + 60011 0 21 16 16 18 19 23 16 21 + 60011 1 18 18 17 16 17 13 14 00 + 60011 2 20 22 21 15 15 18 19 23 + 60011 3 16 20 18 14 21 23 20 23 - 60021 0 25 23 28 00 21 00 24 24 ++ ++ 60021 0 25 23 28 99 21 99 24 24 + 60021 1 25 17 15 23 25 18 22 21 + 60021 2 16 13 15 13 20 23 24 20 + 60021 3 19 19 19 14 18 21 19 15 + 70021 0 19 28 17 28 20 29 15 20 + 70021 1 16 17 19 17 15 20 18 18 + 70021 2 20 18 24 16 18 18 17 14 + 70021 3 14 24 19 23 18 20 25 16 + + 60031 0 22 16 21 99 18 19 99 99 + 60031 1 20 99 19 18 99 18 99 15 + 60031 2 99 99 16 20 19 99 99 22 + 60031 3 99 99 99 16 20 19 15 99 + 70031 0 17 17 20 17 99 21 16 15 + 70031 1 19 99 99 99 20 99 16 17 + 70031 2 19 99 17 19 18 28 99 99 + 70031 3 22 25 21 22 20 17 99 21 ++ + 60091 0 21 21 14 18 20 21 20 18 + 60091 1 20 26 22 20 18 29 24 29 + 60091 2 27 19 19 18 16 24 20 16 + 60091 3 19 28 15 24 20 17 17 21 + 70091 0 22 23 14 21 21 17 23 13 + 70091 1 25 20 14 18 15 19 22 15 + 70091 2 18 21 18 23 24 20 22 25 + 70091 3 25 22 23 24 23 19 20 22 ++ + 60101 0 14 18 19 20 14 17 16 14 + 60101 1 26 22 25 20 20 23 27 20 + 60101 2 17 14 15 18 16 19 17 18 + 60101 3 21 24 21 22 18 19 26 19 + 70101 0 21 20 12 19 14 20 14 24 + 70101 1 17 25 18 20 18 22 19 18 + 70101 2 24 19 19 22 22 14 22 21 + 70101 3 24 26 22 19 18 20 21 21 ++ + 60111 0 28 18 21 27 24 25 28 22 + 60111 1 25 20 28 24 18 26 25 16 + 60111 2 26 27 24 28 23 19 20 22 + 60111 3 20 21 17 21 22 24 21 27 + 70111 0 18 23 21 27 18 30 25 23 + 70111 1 22 17 22 23 23 22 28 16 + 70111 2 17 22 20 17 26 25 22 26 + 70111 3 27 17 20 21 18 29 16 14 ++ + 60121 0 21 23 14 23 22 26 17 26 + 60121 1 31 23 19 22 22 22 24 26 + 60121 2 22 17 17 21 21 19 27 20 + 60121 3 16 22 24 16 17 22 18 19 - 70121 0 00 23 24 00 27 28 00 31 ++ 70121 0 99 23 24 99 27 28 99 31 + 70121 1 23 26 15 14 25 25 20 13 + 70121 2 17 16 26 22 25 23 24 20 + 70121 3 21 20 23 30 10 22 26 22 ++ + 60161 0 15 19 22 21 22 19 22 25 + 60161 1 24 26 19 22 26 21 19 19 + 60161 2 20 22 22 25 20 21 21 23 + 60161 3 21 20 20 24 24 23 20 22 + 70161 0 22 25 24 22 23 28 21 29 + 70161 1 23 24 21 16 23 24 19 18 + 70161 2 14 22 21 18 20 20 19 25 + 70161 3 24 19 13 22 19 23 23 31 - - - 60011 0 02 02 02 02 02 02 02 02 - 60011 1 03 03 03 03 03 03 03 03 - 60011 2 04 04 04 04 04 04 04 04 - 60011 3 01 01 01 01 01 01 01 01 - -# 60081 0 0x17 0x16 0x0a 0x1b 0x12 0x18 0x15 0x0e -# 60081 0 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e 0x1e -# 60081 1 0x14 0x18 0x10 0x16 0x15 0x15 0x16 0x18 -# 60081 2 0x18 0x19 0x15 0x0f 0x1b 0x18 0x19 0x1a -# 60081 3 0x13 0x14 0x15 0x18 0x18 0x17 0x1b 0x16 -# -# 70081 0 0x00 0x16 0x0a 0x1b 0x12 0x16 0x15 0x0e -# 70081 1 0x14 0x18 0x10 0x16 0x15 0x15 0x16 0x18 -# 70081 2 0x18 0x19 0x15 0x0f 0x1b 0x18 0x19 0x1a -# 70081 3 0x13 0x14 0x15 0x18 0x18 0x17 0x1b 0x16 -# -# -# 60121 0 0x00 0x16 0x0a 0x1b 0x12 0x16 0x15 0x0e -# 60121 1 0x14 0x18 0x10 0x16 0x15 0x15 0x16 0x18 -# 60121 2 0x18 0x19 0x15 0x0f 0x1b 0x18 0x19 0x1a -# 60121 3 0x13 0x14 0x15 0x18 0x18 0x17 0x1b 0x16 diff --cc scripts/pasttrec_baseline_finder.pl index 00935da,5339e83..49dab49 --- a/scripts/pasttrec_baseline_finder.pl +++ b/scripts/pasttrec_baseline_finder.pl @@@ -18,7 -18,11 +18,11 @@@ my @default_settings = (0x50010, #1: 0x50400,0x50500,0x50600,0x50700,0x50800,0x50900,0x50a00,0x50b00, 0,0,0,0); - + my $counters; + my $counters2; + my $rates; + my $baselines; - ++my $numOfFailures; my $serials; #uid -> serial my $addresses; #addr -> serial my $settings; #addr -> @registers(0xa040-0xa07F) @@@ -102,7 -120,9 +120,10 @@@ foreach my $i (0..31) } } + ############################################################################### + #Calculate means + ############################################################################### +$numOfFailures=0; foreach my $b (keys %{$rates}) { foreach my $c (0..31) { my $sum=0; my $tot=0; @@@ -111,12 -131,14 +132,14 @@@ $tot += $rates->{$b}[$c][$i]; } $baselines->{$b}[$c] = $sum/($tot||1); - if($tot==0) {$baselines->{$b}[$c]=0x00; $numOfFailures++; } - if($tot==0) {$baselines->{$b}[$c]=0x63;} ++ if($tot==0) {$baselines->{$b}[$c]=77; $numOfFailures++; } } } - print Dumper $baselines; + ############################################################################### + #Output Data + ############################################################################### foreach my $b (sort keys %{$rates}) { foreach my $p (0..3) { printf(" %i\t%i\t%02i\t%02i\t%02i\t%02i\t%02i\t%02i\t%02i\t%02i\n", @@@ -132,4 -154,46 +155,47 @@@ ); } } +printf(" No baseline found for %i channels. \n", $numOfFailures); + + + __END__ + + =head1 NAME + + pasttrec_baseline_finder.pl - Scans baselines for all available Pasttrec chips + + =head1 SYNOPSIS + + pasttrec_baseline_finder.pl [options] + + Options: + -h, --help brief help message + -t, --threshold N use threshold N + -d, --debug write debug messages + + =head1 OPTIONS + + =over 15 + + =item B<-h | --help> + + Print a brief help message and exit. + + =item B<-t N | --threshold N> + + Use defined threshold (0..127) instead of default (0) + + =item B<-d | --debug> + + Write debug messages + + =item B<-w F| --wait F> + + Time to wait between two steps in seconds + + =back + + =head1 DESCRIPTION + + + =cut