Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
h1. Content
{toc}

h1. Introduction

Offline analysis software for LCLS data historically pass a few stages; 
* {PCDS:myana} -- the first C-based package, 
* {PCDS:pyana} -- python-based framework,
* {PCDS:psana} -- C\+\+-based framework.
Currently, features of both frameworks are combined together under the unified
* {PCDS:psana} -- framework, which works both with C\+\+ and python modules. 
This new framework allows data processing using advantage of both C\+\+ and python modules. However, there is no full backward compatibility between new {{psana}} framework and {PCDS:pyana} modules. Original {PCDS:pyana} modules would not work directly in {{psana}}, they need to be changed. In this note we discuss the difference between {PCDS:pyana} and python-{PCDS:psana} modules and present the references to documentation, which help to migrate from {PCDS:pyana} to python-{PCDS:psana}.



h1. Data types and access methods

LCLS data types have different implementation in pyana and python-psana. Auto-generated from source code documentation is available in 
* [https://pswww.slac.stanford.edu/swdoc/releases/ana-current/pyana-ref/html/] for pyana and 
* [https://pswww.slac.stanford.edu/swdoc/releases/ana-current/psana-ref/html/] for python-psana. 
From this documentation it is clear that there is no full backward compatibility between these libraries; data types and access methods are different. Below we present a list of references with code examples for both frameworks.




h1. Access to data in pyana and psana


h2. Acqiris
|| pyana || psana ||
| [pdsdata.acqiris|https://pswww.slac.stanford.edu/swdoc/releases/ana-current/pyana-ref/html/_pdsdata/#module-_pdsdata.acqiris] | [Psana.Acqiris|https://pswww.slac.stanford.edu/swdoc/releases/ana-current/psddl_psana/pkg.Psana.Acqiris.html] |
| {{config = 

Content

Table of Contents

Release

Available beginning from release ana-0.9.0

Interactive psana

Code Block

% ipython
from psana import *
help(psana.CsPad)

Access to data in pyana and psana

Acqiris

...

pyana

...

psana

...

env.getConfig(xtc.TypeId.Type.Id_AcqConfig, self.m_src)

...

}} | {{config = env.configStore().get("Psana::Acqiris::Config", self.m_src)

...

}} | 
| {{acqData = evt.get(xtc.TypeId.Type.Id_AcqWaveform, self.m_src)

...

}} | {{acqData = evt.get("Psana::Acqiris::DataDesc", self.m_src).data_list()

...

}} | 
| access to data also differs...

...

 

Bld

...

pyana

...

psana

...

 | | 

h2. Bld
|| pyana || psana ||
| {{data = evt.get(xtc.TypeId.Type.Id_FEEGasDetEnergy, self.m_src)

...

}} | {{}}

...

 | 
| {{data = evt.get(xtc.TypeId.Type.Id_EBeam, self.m_src)

...

}} | {{}}

...

 | 
| {{data = evt.get(xtc.TypeId.Type.Id_PhaseCavity, self.m_src)

...

}} | {{}}

...

 | 
| {{data = evt.get(xtc.TypeId.Type.Id_GMD, self.m_src)

...

}} | {{}}

...

 | 
| {{}}

...

 | {{}}

...

 | 
| {{}}

...

 | {{}}

...

CSPad

...

pyana

...

psana

 | 

h2. CSPad
|| pyana || psana ||
| {{}}

...

 | {{}}

...

CSPad2x2

...

pyana

...

psana

 | 

h2. CSPad2x2
|| pyana || psana ||
| {{}}

...

 | {{}}

...

Epics

...

pyana

...

psana

 | 

h2. Epics
|| pyana || psana ||
| {{}}

...

 | {{}}

...

Evr

...

pyana

...

psana

 | 

h2. Evr
|| pyana || psana ||
| {{}}

...

 | {{}}

...

Pnccd

...

pyana

...

psana

 | 

h2. Pnccd
|| pyana || psana ||
| {{}}

...

 | {{}}

...

Princeton

...

pyana

...

psana

 | 


h2. Princeton
|| pyana || psana ||
| {{}}

...

 | {{}}

...

Ipimb

...

pyana

...

psana

 | 


h2. Ipimb
|| pyana || psana ||
| {{}}

...

 | {{}}

...

Timepix

...

pyana

...

psana

 | 


h2. Timepix
|| pyana || psana ||
| {{}}

...

 | {{}}

...

pyana

...

psana

 | 



h2. 
|| pyana || psana ||
| {{}}

...

 | {{}}

...

References

...

 | 


h1. Interactive psana
Interactive psana is available beginning from [release|https://pswww.slac.stanford.edu/trac/psdm/browser/psdm/_releases] ana-0.9.0.
Example of how to start interactive python-psana:
{code}
% ipython
from psana import *
help(psana.CsPad)
{code}




h1. References
* Auto-generated documentation for pyana modules: [https://pswww.slac.stanford.edu/swdoc/releases/ana-current/pyana-ref/html/]
* Auto-generated documentation for python modules in psana: [https://pswww.slac.stanford.edu/swdoc/releases/ana-current/psana-ref/html/]