xpdan.startup package¶
Submodules¶
xpdan.startup.analysis_server module¶
xpdan.startup.db_server module¶
-
xpdan.startup.db_server.
run_server
(data_dir, outbound_proxy_address='127.0.0.1:5568', prefix=b'an')[source]¶ Start up the databroker server for analyzed data.
- Parameters
data_dir (str) – The directory to save the array data into.
outbound_proxy_address (str, optional) – The address and port of the zmq proxy. Defaults to
glbl_dict["outbound_proxy_address"]
prefix (bytes or list of bytes, optional) – The Publisher channels to listen to. Defaults to
b"an"
xpdan.startup.portable_db_server module¶
-
xpdan.startup.portable_db_server.
run_server
(folder, outbound_proxy_address='127.0.0.1:5568', prefix=None, handlers=None)[source]¶ Start up the portable databroker server
- Parameters
folder (str) – The location where to save the portable databrokers
outbound_proxy_address (str, optional) – The address and port of the zmq proxy. Defaults to
glbl_dict["outbound_proxy_address"]
prefix (bytes or list of bytes, optional) – The Publisher channels to listen to. Defaults to
[b"an", b"raw"]
handlers (dict) – The map between handler specs and handler classes, defaults to the map used by the experimental databroker if possible
xpdan.startup.save_server module¶
Module for setting up and running a file saving server
-
xpdan.startup.save_server.
run_server
(base_folders=None, template='{base_folder}/{folder_prefix}/{start[analysis_stage]}/{start[sample_name]}_{human_timestamp}_{__independent_vars__}{start[original_start_uid]:.6}_{event[seq_num]:04d}{ext}', outbound_proxy_address='127.0.0.1:5568', db_names=('exp_db', 'an_db'), prefix=None)[source]¶ Run file saving server
- Parameters
base_folders (list or str or str, optional) – Either a list of strings for base folders to save data into or a single str for a base folder to save data into.
Defaults to the value of
glbl_dict["tiff_base"]
.template (str, optional) – The string used as a template for the file names. Please see the xpdan.callbacks module module docs for mor information on the
templating.
Defaults to:
"{base_folder}/{folder_prefix}/" "{start[analysis_stage]}/{start[sample_name]}_{human_timestamp}" "_{__independent_vars__}{start[uid]:.6}_{event[seq_num]:04d}{ext}"
outbound_proxy_address (str) – The address of the ZMQ proxy
db_names (iterable of str) – The names of the databases in the
glbl_dict
which to use for data loading handlersprefix (binary strings) – Which topics to listen on for zmq
-
xpdan.startup.save_server.
setup_saver
(doc, **kwargs)[source]¶ Function to setup the correct savers, if the correct
analysis_stage
is set in the start doc then a saver will be created appropriate for the data- Parameters
doc (dict) – The start document
- Returns
cb – The callback or nothing
- Return type
CallbackBase or None
xpdan.startup.viz_server module¶
-
xpdan.startup.viz_server.
run_server
(handlers=None, prefix=None, outbound_proxy_address='127.0.0.1:5568', save_folder=None)[source]¶ Start up the visualization server
- Parameters
handlers (dict) – The map between handler specs and handler classes, defaults to the map used by the experimental databroker if possible
prefix (bytes or list of bytes, optional) – The Publisher channels to listen to. Defaults to
[b"an", b"raw"]
outbound_proxy_address (str, optional) – The address and port of the zmq proxy. Defaults to
glbl_dict["outbound_proxy_address"]
xpdan.startup.tomo_server module¶
xpdan.startup.qoi_server module¶
-
xpdan.startup.qoi_server.
run_server
(prefix=None, outbound_proxy_address='127.0.0.1:5568', inbound_proxy_address='127.0.0.1:5567', _publisher=None, **kwargs)[source]¶ Start up the QOI server
- Parameters
prefix (bytes or list of bytes, optional) – The Publisher channels to listen to. Defaults to
[b"an", b"raw"]
outbound_proxy_address (str, optional) – The address and port of the zmq proxy. Defaults to
glbl_dict["outbound_proxy_address"]
inbound_proxy_address (str, optional) – The inbound ip address for the ZMQ server. Defaults to the value from the global dict
xpdan.startup.intensity_server module¶
-
xpdan.startup.intensity_server.
run_server
(prefix=None, outbound_proxy_address='127.0.0.1:5568', inbound_proxy_address='127.0.0.1:5567', _publisher=None, positions=(), stage='integration', x_name='q', y_name='mean', plot_graph=None)[source]¶ Start up server for extracting single intensities
- Parameters
prefix (bytes or list of bytes, optional) – The Publisher channels to listen to. Defaults to
[b"an", b"raw"]
outbound_proxy_address (str, optional) – The address and port of the zmq proxy. Defaults to
glbl_dict["outbound_proxy_address"]
inbound_proxy_address (str, optional) – The inbound ip address for the ZMQ server. Defaults to the value from the global dict
positions (list of float) – The positions to track
stage (str) – The analysis stage to use for the data
x_name (str) – The name of the pattern independent variable (
q
orr
for example)y_name (str) – The name of the pattern dependent variable (
mean
orgr
for example)plot_graph (None or str, optional) – If a string save a plot of the graph to that file, if None don’t. Defaults to None