Skip to content

Sharepoint

queue_listerner instance-attribute

queue_listerner = setup_logging()

logger instance-attribute

logger = getLogger()

external_logger_flag instance-attribute

external_logger_flag = True

atm instance-attribute

atm = atm

atm_per_dir instance-attribute

atm_per_dir = atm_per_dir

dm instance-attribute

dm = dm

dm_per_dir instance-attribute

dm_per_dir = dm_per_dir

slopes instance-attribute

slopes = slopes

wfs instance-attribute

wfs = wfs

wfs_frame instance-attribute

wfs_frame = wfs_frame

sci instance-attribute

sci = sci

sci_frame instance-attribute

sci_frame = sci_frame

context instance-attribute

context = Context()

socket instance-attribute

socket = socket(PUB)

__init__

__init__(
    logger=None,
    port=5555,
    ip="localhost",
    protocol="tcp",
    atm=0,
    atm_per_dir=0,
    dm=0,
    dm_per_dir=0,
    slopes=0,
    wfs=0,
    wfs_frame=0,
    sci=0,
    sci_frame=0,
)

Initialize the Sharepoint publisher for sharing light path data.

Parameters:

Name Type Description Default
logger Logger

External logger to use. If None, initializes internal logging.

None
port int

Port number for ZeroMQ publisher. Default is 5555.

5555
ip str

IP address to bind the publisher. Default is localhost.

'localhost'
protocol str

Communication protocol (e.g., 'tcp').

'tcp'
atm int

Flag to share atmosphere phase, per layer. If 0, the atmosphere phase will not be shared. Larger than 0, it will be shared with the specified decimation factor.

0
atm_per_dir int

Flag to share the atmosphere phase projection per direction. If 0, it will not be shared. Larger than 0, it will be shared with the specified decimation factor.

0
dm int

Flag to share deformable mirror phase. If 0, the DM phase will not be shared. Larger than 0, it will be shared with the specified decimation factor.

0
dm_per_dir int

Flag to share the DM phase projection per direction. If 0, it will not be shared. Larger than 0, it will be shared with the specified decimation factor.

0
slopes int

Flag to share slopes data. If 0, the slopes data will not be shared. Larger than 0, it will be shared with the specified decimation factor.

0
wfs int

Flag to share wavefront sensor phase. If 0, the WFS data will not be shared. Larger than 0, it will be shared with the specified decimation factor.

0
wfs_frame int

Flag to share WFS frame. If 0, the WFS frame will not be shared. Larger than 0, it will be shared with the specified decimation factor.

0
sci int

Flag to share science phase. If 0, the science phase will not be shared. Larger than 0, it will be shared with the specified decimation factor.

0
sci_frame int

Flag to share science frame. If 0, the science frame will not be shared. Larger than 0, it will be shared with the specified decimation factor.

0

shareData

shareData(light_path, iteration, atm_list=[], dm_list=[])

Publish all configured attributes of the light path over ZeroMQ.

Parameters:

Name Type Description Default
light_path list

List of LightPath objects containing simulation results.

required
dm_list list

List of Deformable Mirror objects to share data from. Default is an empty list.

[]
atm_list list

List of Atmosphere objects to share data from. Default is an empty list.

[]

Returns:

Type Description
bool

True if data was sent successfully.

setup_logging

setup_logging(logging_level=logging.WARNING)

__del__

__del__()