How

2019-02-01 cpo
O'Grady, Paul Christopher <cpo@slac.stanford.edu> 
2019-02-01, 11:39 AM             
      
Hi Mikhail and Chuck,
For developing the area detector det xface I created a jungfrau xtc2 file using Eliseo’s translation scripts:
~cpo/git/lcls2/psana/psana/dgramPort/jungfrau.xtc2

Instructions for running his translator are on this page:
https://github.com/slac-lcls/lcls2/tree/master/psana/psana/dgramPort
slac-lcls/lcls2
github.com
Contribute to slac-lcls/lcls2 development by creating an account on GitHub.
The python script below dumps configuration information and event data.  I think the two goals should be:
- have the script below be able to call a psalg C++ det.calib (via cython?)
- the drp be able to use the psalg C++ as well

chris

from psana import DataSource
ds = DataSource('jungfrau.xtc2')
run = next(ds.runs())
dg_cfg = run.configs[0]
print('Found cfg version',dg_cfg.software.myjungfrau.cfg.version)
print('Found raw version',dg_cfg.software.myjungfrau.raw.version)
print('Config number of pixels:',dg_cfg.myjungfrau.cfg.numPixels)
for evt in ds.events():
    dg = evt._dgrams[0]
    print(dg.myjungfrau.raw.frame.shape)

====
- the drp be able
to use the psalg C++ as well

Thinking about it, I think the way to start might be for me to give
 you some C++ code that “simulates” what the drp will give you: a 
configure datagram and event data.  I think Chuck and I did this with 
the HSD.
After this “drp” version works,  we think about the python wrapping, I guess.
chris
2019-02-04 cpo
O'Grady, Paul Christopher <cpo@slac.stanford.edu> 
2019-02-04, 7:32 PMChun Hong Yoon <yoon82@stanford.edu>;Dubrovin, Mikhail             
                   
Mikhail, Chuck,

I committed some c++ code to read the jungfrau xtc2 file and dump out 
information from configure and events.  I suspect this will be useful 
for area detector development because this detector is different from 
HSD: it doesn’t have “opaque” data, just fundamental types (int, float, 
array...).  That means the c++ drp code has to loop over those 
fundamental types (which this code does).

Mostly you need to look at the 20 lines following the command “// get 
data out of the configure transition”, as well as the 15-line “dump()” 
routine, since other stuff will be hidden from you in the DRP.  Might be
 most efficient if we discuss in-person.

It is in xtcdata/xtcdata/app/jungfrau.cc.  I didn’t officially “install”
 the binary, since it’s just crude example code, so it’s not in the 
PATH, so you’ll have to run it from the xtcdata/build directory like 
this:

xtcdata/app/jungfrau -f ~cpo/git/lcls2/psana/psana/dgramPort/jungfrau.xtc2 -n 3

It will take some patience to figure out the best patterns to handle the
 area detectors (since it is different than the opaque HSD data).  But I
 believe the ideas are solid, as best I can tell.
chris
Access xtc examples C++
/reg/neh/home/cpo/git/lcls2/psana/psana/dgramPort/jungfrau.xtc2
lcls2/xtcdata/xtcdata/app/jungfrau.cc - cpo
lcls2/psalg/psalg/tests/test_hsd.cc  - cpo + chuck
lcls2/psalg/psalg/tests/test_xtc_data.cc - my

XTC2 production

2019-07-24 two xtc2 files were generated in similar conditions for cspad and jungfrau, using examples

in lcls1 environmant:

~/LCLS/con-lcls2/ex-conv-xtc-00-parse_lcls1_data.py

similar to: https://github.com/slac-lcls/lcls2/blob/master/psana/psana/dgramPort/parse_lcls1_data.py

in lcls2 environmant:

~/LCLS/con-lcls2/ex-conv-xtc-01-translate_xtc_json.py

similar to: https://github.com/slac-lcls/lcls2/blob/master/psana/psana/dgramPort/translate_xtc_json.py

converted *.xtc2 files are moved to /reg/g/psdm/detector/data2_test/xtc/

XTC2 processing issue

2019-07-24 Now command like

  • xtcreader -f /reg/g/psdm/detector/data2_test/xtc/data-xpptut15-r0430-e000010-jungfrau.xtc2 - works,
  • xtcreader -f /reg/g/psdm/detector/data2_test/xtc/data-cxid9114-r0089-e000010-cspad.xtc2 - does not work for presumably corrupted data.

The same issue is seen in

psalg/tests/test_xtc_data.c, running as

test_xtc_data 11

Q to cpo: how to treat any problem with xtc corrupted data within current definition of all xtc objects?

References

 

  • 2019-01-29 cpo: Detector Interface Proposalxtcreader -f /reg/g/psdm/detector/data2_test/xtc/data-cxid9114-r0089-e000010-cspad.xtc2xtcreader -f /reg/g/psdm/detector/data2_test/xtc/data-xpptut15-r0430-e000010-jungfrau.xtc2in lcls1 environmant:n lcls1 environmant:ex-conv-xtc-01-translate_xtc_json.py
  • No labels