Skip to content

Mosca

mosca.control.mosca.Mosca

Mosca(
    controller,
    data_mgr=None,
    spectrum_size=4096,
    use_gevent=True,
    **kwargs
)

Main class of the Mosca module.

Parameters:

  • controller

    instance of mosca.control.controller.Controller

  • data_mgr

    instance of mosca.control.datahandler.DataHandler. If not provided, a new one will be instanciated.

  • spectrum_size (int, default: 4096 ) –

    deprecated

  • use_gevent

    deprecated

spectrum_size is there for those controllers that can't read back anything...

acq_nb_points property writable

acq_nb_points

Number of points to acquire.
See your specific controller documentation to see how/where the parameter is used.

acq_nb_triggers property writable

acq_nb_triggers

Sets the duration of a point to a certain number of triggers.
See your specific controller documentation to see how/where the parameter is used.

acq_realtime property writable

acq_realtime

Acquisition time, usualy used when run mode is set to REALTIME.
See your specific controller documentation to see how/where the parameter is used.

info

Property can be set as an int, str or enum value.

channels class-attribute instance-attribute

channels = property(lambda self: detetector_channels())

controller class-attribute instance-attribute

controller = property(lambda self: _controller)

data class-attribute instance-attribute

data = property(lambda self: _data_mgr)

gate_mode property writable

gate_mode

gate mode

n_channels class-attribute instance-attribute

n_channels = property(lambda self: len(channels))

start_trigger property writable

start_trigger

start trigger.

stats_names class-attribute instance-attribute

stats_names = property(lambda self: get_stats_names())

status property

status

Returns the acquisition status.

stop_trigger property writable

stop_trigger

stop trigger

supported_gate_modes property

supported_gate_modes

Supported gate modes

supported_run_modes property

supported_run_modes

Supported run modes

supported_spectrum_sizes property

supported_spectrum_sizes

Supported spectra sizes

supported_start_triggers property

supported_start_triggers

Supported start triggers

supported_stop_triggers property

supported_stop_triggers

Supported stop triggers

use_gevent class-attribute instance-attribute

use_gevent = property(lambda self: _use_gevent)

apply_mosca

apply_mosca(resume=False)

Applies MOSCA parameters.

discard_first_point

discard_first_point(discard)

is_polling

is_polling()

Returns True if the polling task is running.

is_running

is_running()

Returns True if an acquisition is in progress (polling, acquisition and data tasks).

poll_interval

poll_interval(poll_interval)

prepare

prepare(resume=False)

" Prepares acquisition using the current hardware configuration.

applying mosca parameters

apply_mosca should be called before if you want to pass the MOSCA parameters onto the Controller.

start_acq

start_acq(resume=False, wait=False)

Starts an acquisition.

prerequisite

apply_mosca (optional) and prepare should have been called before.

start_mosca

start_mosca(wait=False)

Applies the MOSCA parameters then startw an acquisition.

stop_acq

stop_acq()

Tells the controller to stop a running acquisition and waits for it to finish.

wait_read

wait_read()

Wait for the polling task to finish.