Page History
...
Code Block |
---|
[cpo@psana1602 ~/examplePython]$ ipython Python 2.7.10 (default, May 27 2015, 10:33:01) Type "copyright", "credits" or "license" for more information. IPython 2.3.1 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details. In [1]: from psana import * In [2]: ds = DataSource('exp=amotut13:run=206') In [3]: det = Detector('AmoETOF.0:Acqiris.0') In [4]: det. (NOTE: user hits <TAB> after typing the "." to get list of available methods) det.dettype det.runnum det.env det.set_calib_imp det.instrument det.set_correct_acqiris_time det.iscpp det.set_env det.ispyt det.set_print_bits det.pbits det.set_source det.print_attributes det.source det.print_config det.waveform det.pyda det.wftime det.raw In [4]: det.waveform? (NOTE: "?" operator returns help for specified method, including how to call it) Type: instancemethod String form: <bound method WFDetector.waveform of <Detector.WFDetector.WFDetector instance at 0x7f07a5b96b90>> File: /reg/g/psdm/sw/releases/ana-0.17.14/arch/x86_64-rhel7-gcc48-opt/python/Detector/WFDetector.py Definition: det.waveform(self, evt) Docstring: Returns np.array with waveforms In [5]: evt = ds.events().next() In [6]: print det.waveform(evt) [[-0.03222656 -0.03027344 -0.01757812 ..., -0.03222656 -0.01757812 -0.03027344] [-0.07275391 -0.07275391 -0.07080078 ..., -0.07275391 -0.07080078 -0.07080078] [ 0.04296875 0.04492188 0.04492188 ..., 0.04492188 0.04492188 0.04296875] ..., [-0.10351562 -0.09570312 -0.09179688 (NOTE: getting an event, since the above "Definition" line requires it) In [6]: print det.waveform(evt) (NOTE: calling the "waveform" method as required by the above "Definition" line) [[-0.03222656 -0.03027344 -0.01757812 ..., -0.1035156203222656 -0.0844726601757812 -0.0957031203027344] [ 0.05615234 0.06982422 0.06982422 ..., 0.06591797 0.06787109 0.06982422] [-0.15673828 -0.14453125 -0.16259766 ..., -0.15673828 -0.14892578 -0.15478516]] In [7]: |
Overview
Content Tools