Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Would make my brain hurt the least if we made a tile a segment (that's been our previous approach).  Also allows us to change the fiber configuration as time goes on without defining a new segment type.

Perhaps we should mock-up the epixhr segment idea in advance using the kcuSim detector.?

The configuration is only done on one node.  But we can make sure that the configuration object is present on all the relevant nodes (and in the associated xtc file).

...

This code implies that we may be able to reduce this time significantly with a "single pass" calibration (I believe Mikhail currently does two passes through the data with numpy: one for pedestals and one for gains).  Hopefully don't need common mode in the DRP?

Code Block
(ps-4.5.24) drp-neh-cmp015:lcls2$ more junk.cc
#include <stdint.h>
#include <stdio.h>
#include <string.h>

#define RAW_SIZE 2000000
#define NIMG 100200
uint16_t raw[NIMG][RAW_SIZE];
float result[RAW_SIZE];
uint16_t peds[RAW_SIZE];
uint8_t mask[RAW_SIZE];
float gains[7][RAW_SIZE];

int main() {
    memset(mask,0,RAW_SIZE);

    for (unsigned count=0; count<NIMG; count++) {
        for (unsigned i=0; i<RAW_SIZE; i++) {
            unsigned val = raw[count][i];
            unsigned range = val&0x7000;
            result[i] = mask[i] ? 0 : ((val&0xfff)-peds[i])*gains[range][i];
        }
    }
}
(ps-4.5.24) drp-neh-cmp015:lcls2$ 

With these results (we see about 10ms 7ms per image):

Code Block
(psana-4.50.2448-py3) drp-nehsrcf-cmp015eb004:lcls2$ g++ -o junk junk.cc
(psana-4.50.2448-py3) drp-nehsrcf-cmp015eb004:lcls2$ time ./junk

real	0m00m1.955s432s
user	0m00m1.949s423s
sys	0m0.005s
(ps-4.5.24) drp-neh-cmp015:lcls2$ 006s

Fiber Connections

A slack conversation with Dionisio and Matt:

...