Using Servers

One of the major features of xpdAn are servers which handle data processing, visualization, saving and database integration.

Currently there are 8 servers implemented: analysis, portable_db, db, save, qoi, viz, tomo, and intensity. Each server is started by the command <server_name>_server on the command line while inside the analysis conda environment. For example, to start the analysis (with a background scale of .75) one would run

conda activate analysis-2019-1.2-xpd
analysis_server --bg_scale=.75

Some of the servers take optional arguments and keyword arguments. All the servers are using Fire to create command line interfaces. The documentation for Fire can be found here.

Servers

analysis

The analysis server handles the majority of the number crunching, reducing data from images to 1D scattering patterns and PDFs.

See the run_server function in the xpdan.startup.analysis_server module for the keyword arguments.

portable_db

The portable db server saves raw and analyzed data in a portable databroker for users to walk away with. Users will need to specify which folder they would like the data to be placed in before running their experiments. Please see the databroker documentation for more on how to use a databroker.

See the run_server function in the xpdan.startup.portable_db_server module for the keyword arguments.

db

The db server stores analyzed data in a central database at 28-ID. This server should already be running, only beamline staff should need to start it.

See the run_server function in the xpdan.startup.db_server module for the keyword arguments.

save

The save server saves files with human readable filenames to various folders. Users will need to specify which folder(s) they would like the data to be placed in before running their experiments.

See the run_server function in the xpdan.startup.save_server module for the keyword arguments.

qoi

The QOI server performs additional data processing and analysis, extracting quantities of interest from raw and reduced data.

See the run_server function in the xpdan.startup.qoi_server module for the keyword arguments.

viz

The viz server visualizes raw and processed data as it becomes available. This server should already be running, only beamline staff should need to start it.

See the run_server function in the xpdan.startup.viz_server module for the keyword arguments.

tomo

The tomo server runs tomographic reconstructions on all scalar data (raw and analyzed). The reconstruction algorithm can be changed via the algorithm keyword.

See the run_server function in the xpdan.startup.tomo_server module for the keyword arguments.

intensity

The intensity server calculates the intensity at specified points from 1D patterns.

See the run_server function in the xpdan.startup.intensity_server module for the keyword arguments.

Running from ipython

All of these server commands can be run from ipython (and python) directly. This provides more control over the servers operation, especially for the analysis server. Each server can be imported via from xpdan.startup.<server_name> import run_server replacing <server_name> with the appropriate name, eg. from xpdan.startup.qoi_server import run_server to import the quantity of interest server.