Getting started

The most important part of the manual is the chapter about the pyspMonitor 4.

If you are interested in understanding how to use PySpectra from you own Python code, the easiest way is to look at the examples in this manual 7 or try the examples that come with pyspMonitor/pyspViewer. Details about the API can be found here 6.

In addition that is the usual Python way to distribute information:

 
$ ipython3
Python 3.7.3 (default, Oct 31 2022, 14:04:00) 
Type "copyright", "credits" or "license" for more information.

IPython 5.8.0 -- 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]: import PySpectra

In [2]: PySpectra?

Here is the ouput generated on March 3rd, 2023:

 
Type:        module
String form: <module 'PySpectra' from '/usr/lib/python3/dist-packages/PySpectra/__init__.py'>
File:        /usr/lib/python3/dist-packages/PySpectra/__init__.py
Docstring:  

PySpectra displays 1D and 2D data
---------------------------------
*
* Applications based on PySpectra: 
* --------------------------------
*

$ pyspMonitor.py
  - listens to a Sardana Door and displays 0D and 1D data
  - receives data and commands sent by PySpectra.toPyspMonitor()
  - has the displayCounters feature, see the Sardana/Spock/Taurus at DESY manual
  - uses the SignalCounter to display a signal during mesh scans.

$ pyspViewer.py 
  displays 1D data from ASCII (.fio, .dat,. iint) and .nxs files

*
* toPyspMonitor() 
* sends data and commands to one or more pyspMonitor processes.
* Help can be found with:
*
  In [1]: import PySpectra
  In [2]: PySpectra.toPyspMonitor?
*
* toPyspLocal()
* Use the same syntax as in toPyspMonitor() but plot in the 
* local process
*
  In [3]: PySpectra.toPyspLocal?

*
* PySpectra Python interface in general
* -------------------------------------
*
Start by executing some examples using pyspViewer->Examples.
Afterwards you see how it was done by looking at the code
  pyspViewer->Examples->View Code

In addition, all PySpectra functions and modules are python-documented

  import PySpectra 
  In [1]: import PySpectra
  In [2]: PySpectra?
  In [3]: PySpectra.Scan?
  In [4]: PySpectra.Image?

*
* PySpectra magic commands in ipython:
* -----------------------------------
*  
In [1]: import PySpectra.ipython.startup
In [2]: PySpectra.ipython.startup?