]> jspc29.x-matter.uni-frankfurt.de Git - coral.git/commitdiff
added counts_histogram functionality
authorMichael Wiebusch <m.wiebusch@gsi.de>
Thu, 23 Jul 2015 13:56:55 +0000 (15:56 +0200)
committerMichael Wiebusch <m.wiebusch@gsi.de>
Thu, 23 Jul 2015 13:56:55 +0000 (15:56 +0200)
user_interface/coral_scanner.pm
user_interface/pmt_ro.pl
user_interface/pmt_ro.pm

index 1b3b473f7955fabe3d7871188c18bbba354286a7..30d4b68c307ad7fcfc900c8618b86de9afec2cec 100644 (file)
@@ -140,6 +140,8 @@ sub main_html {
   print "<a href='coral_scanner.log' target='_blank' id='button_log'
   ><input type='button' value='view log'></a>";
   print "<input type='button' value='clear log' id='button_clearlog'>";
+  print "<a href='coral_scanner.pl?sub=scan_to_svg' target='_blank' id='button_svg'
+  ><input type='button' value='svg image'></a>";
   print br;
   print br;
   print "estimated scan duration: ".hms_string($self->scan_ETA());
index f8dd8ac53536080c1e241d0528895f0198d2f0ed..4ebee1ea40841a5ea9cc9a9721028e19b32e28cb 100755 (executable)
@@ -36,6 +36,7 @@ my $dispatch_table = {
   spectrum_csv  => 1,
   spectrum_delete  => 1,
   clear_spectrum => 1,
+  counts_histogram => 1,
   acquisition_time => 1
 };
 
index a06689c01de5e4b36a3c0af1e51a9d0e3c40f420..77e21de87bc64f99168536680857973388958ff5 100644 (file)
@@ -35,7 +35,8 @@ sub new {
     net_counter       => 23,
     reset_counter     => 24,
     dead_time         => 25,
-    acquisition_time  => 26
+    acquisition_time  => 26,
+    input_polarity    => 27
   };
   
   $self->{constants} = {
@@ -762,8 +763,22 @@ sub write_register {
 
 
 
+sub counts_histogram {
+  
+  my $self = shift;
+  my %options = @_;
+  
+  my @data = ();
+  
+  for my $i (1..32) {
+    $data[$i] = $self->read_register(addr => $i+100);
+    print "$i\t".$data[$i]."\n";
+  }
+  return " ";
 
 
+}
+
 
 sub help {
   my $self = shift;