Browse Source

Add a bit info about Desy camera and a pair of debugging scripts

Suren A. Chilingaryan 5 years ago
parent
commit
8dd39dc3a7
3 changed files with 45 additions and 0 deletions
  1. 23 0
      docs/desy20.txt
  2. 12 0
      scripts/extract.sh
  3. 10 0
      scripts/list.sh

+ 23 - 0
docs/desy20.txt

@@ -0,0 +1,23 @@
+Camera: 3840x5120
+======
+ - 5120 = 16 channels of 320 pixels each.
+    * In fact two lines returned simultaneously (in each payload). So, there is 8 channels per line and 640 payloads are transferred to complete 2 lines.
+    * Actually, 641. There is always 1 extra payload which is just skipped in libufodecode (starting with C0)
+    * Actually, 1 (last) payload is missing for the first two rows. So, total number of payloads is (3840/2) * (640 + 1) - 32
+    
+
+Triggering
+==========
+ There is 2 bits of control register responsible for external triggering
+    bit 16 (from 1): enables external triggering (should be 1)
+    bit 15 (from 1): sets edge type of triggering (should be 1)
+
+ - Start external triggering
+    pci -w control 0x8000C201
+ - Stop external triggering
+    pci -w control 0x80008201
+
+
+Repeating line bug
+==================
+ - Happening with manual triggering, but do not happen in external trigger mode

+ 12 - 0
scripts/extract.sh

@@ -0,0 +1,12 @@
+#! /bin/bash
+
+[ -n "$1" ] || exit
+frame=$1
+
+list=$(./list.sh $1 | sort -n -k 3)
+echo -n > "frame$frame.raw"
+IFS=$'\n' 
+for name in $list; do
+#    echo "$name"
+    cat "$name" >> "frame$frame.raw"
+done

+ 10 - 0
scripts/list.sh

@@ -0,0 +1,10 @@
+[ -n "$1" ] || exit
+frame=$1
+
+for name in frame*$frame/*; do
+    [[ $name =~ invalid$ ]] && continue;
+    [ -f "$name.invalid" ] && continue;
+    [ -f "$name.partial" ] && continue;
+
+    echo "$name"
+done