From 8dd39dc3a74012174a4869c969cc90ba9cf6ca4e Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Thu, 30 Aug 2018 15:55:03 +0200 Subject: Add a bit info about Desy camera and a pair of debugging scripts --- docs/desy20.txt | 23 +++++++++++++++++++++++ scripts/extract.sh | 12 ++++++++++++ scripts/list.sh | 10 ++++++++++ 3 files changed, 45 insertions(+) create mode 100644 docs/desy20.txt create mode 100755 scripts/extract.sh create mode 100755 scripts/list.sh diff --git a/docs/desy20.txt b/docs/desy20.txt new file mode 100644 index 0000000..2b4dafa --- /dev/null +++ b/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 diff --git a/scripts/extract.sh b/scripts/extract.sh new file mode 100755 index 0000000..3e5be57 --- /dev/null +++ b/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 diff --git a/scripts/list.sh b/scripts/list.sh new file mode 100755 index 0000000..eb4ebbe --- /dev/null +++ b/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 \ No newline at end of file -- cgit v1.2.1