stytra.examples package

Submodules

stytra.examples.camera_record_exp module

class stytra.examples.camera_record_exp.PauseProtocol[source]

Bases: stytra.stimulation.Protocol

name = 'camera_recording_protocol'
get_stim_sequence()[source]

To be specified in each child class to return the proper list of stimuli.

stytra.examples.closed_loop_exp module

class stytra.examples.closed_loop_exp.ClosedLoop1DProt[source]

Bases: stytra.stimulation.Protocol

name = 'closed_loop1D_gratings'
stytra_config = {'camera': {'min_framerate': 60, 'video_file': 'c:\\users\\vilim\\experimental\\stytra\\stytra\\examples\\assets\\fish_compressed.h5'}, 'display': {'min_framerate': 50}, 'tracking': {'embedded': True, 'estimator': 'vigor', 'method': 'tail'}}
get_stim_sequence()[source]

To be specified in each child class to return the proper list of stimuli.

stytra.examples.combined_conditional_exp module

class stytra.examples.combined_conditional_exp.ConditionalCombiner(*args, **kwargs)[source]

Bases: stytra.stimulation.stimuli.visual.StimulusCombiner

update()[source]

Function called by the ProtocolRunner every timestep until the Stimulus is over.

class stytra.examples.combined_conditional_exp.CombinedProtocol[source]

Bases: stytra.stimulation.Protocol

name = 'combined_custom_protocol'
stytra_config = {'camera': {'video_file': 'c:\\users\\vilim\\experimental\\stytra\\stytra\\examples\\assets\\fish_compressed.h5'}, 'tracking': {'estimator': 'vigor', 'method': 'tail'}}
get_stim_sequence()[source]

To be specified in each child class to return the proper list of stimuli.

stytra.examples.combined_exp module

class stytra.examples.combined_exp.CombinedProtocol[source]

Bases: stytra.stimulation.Protocol

name = 'combined_protocol'
get_stim_sequence()[source]

To be specified in each child class to return the proper list of stimuli.

stytra.examples.custom_exp module

class stytra.examples.custom_exp.FlashProtocol[source]

Bases: stytra.stimulation.Protocol

name = 'empty_protocol'
get_stim_sequence()[source]

To be specified in each child class to return the proper list of stimuli.

class stytra.examples.custom_exp.CustomExperiment(*args, **kwargs)[source]

Bases: stytra.experiments.Experiment

start_protocol()[source]

Start the protocol from the ProtocolRunner. Before that, send a a notification and if required communicate with the microscope to synchronize and read configuration.

stytra.examples.custom_trigger_exp module

class stytra.examples.custom_trigger_exp.NewFileTrigger(pathname)[source]

Bases: stytra.triggering.Trigger

check_trigger()[source]

Check condition required for triggering to happen. Implemented in subclasses.

Returns

True if triggering condition is satisfied (e.g., message received); False otherwise.

Return type

bool

class stytra.examples.custom_trigger_exp.FlashProtocol[source]

Bases: stytra.stimulation.Protocol

name = 'flash protocol'
get_stim_sequence()[source]

To be specified in each child class to return the proper list of stimuli.

stytra.examples.custom_visual_exp module

class stytra.examples.custom_visual_exp.NewStimulus(*args, **kwargs)[source]

Bases: stytra.stimulation.stimuli.visual.VisualStimulus

paint(p, w, h)[source]

Paint function. Called by the StimulusDisplayWindow update method.

Parameters
  • p – QPainter object for drawing

  • w – width of the display window

  • h – height of the display window

update()[source]

Function called by the ProtocolRunner every timestep until the Stimulus is over.

class stytra.examples.custom_visual_exp.CustomProtocol[source]

Bases: stytra.stimulation.Protocol

name = 'custom protocol'
stytra_config = {'camera': {'video_file': 'c:\\users\\vilim\\experimental\\stytra\\stytra\\examples\\assets\\fish_compressed.h5'}, 'tracking': {'estimator': 'vigor', 'method': 'tail'}}
get_stim_sequence()[source]

To be specified in each child class to return the proper list of stimuli.

stytra.examples.display_camera_exp module

class stytra.examples.display_camera_exp.Nostim[source]

Bases: stytra.stimulation.Protocol

name = 'empty_protocol'
stytra_config = {'camera': {'type': 'spinnaker'}}
get_stim_sequence()[source]

To be specified in each child class to return the proper list of stimuli.

stytra.examples.display_opencv_cam module

class stytra.examples.display_opencv_cam.Nostim[source]

Bases: stytra.stimulation.Protocol

name = 'empty_protocol'
stytra_config = {'camera': {'type': 'opencv'}}
get_stim_sequence()[source]

To be specified in each child class to return the proper list of stimuli.

stytra.examples.eye_tracking_exp module

class stytra.examples.eye_tracking_exp.TrackingWindmillProtocol[source]

Bases: stytra.examples.windmill_exp.WindmillProtocol

name = 'windmill'
stytra_config = {'camera': {'video_file': 'c:\\users\\vilim\\experimental\\stytra\\stytra\\examples\\assets\\fish_compressed.h5'}, 'tracking': {'embedded': True, 'method': 'eyes'}}

stytra.examples.flash_exp module

class stytra.examples.flash_exp.FlashProtocol[source]

Bases: stytra.stimulation.Protocol

name = 'flash_protocol'
get_stim_sequence()[source]

To be specified in each child class to return the proper list of stimuli.

stytra.examples.gratings_exp module

class stytra.examples.gratings_exp.GratingsProtocol[source]

Bases: stytra.stimulation.Protocol

name = 'gratings_protocol'
get_stim_sequence()[source]

To be specified in each child class to return the proper list of stimuli.

stytra.examples.imaging_exp module

class stytra.examples.imaging_exp.ImagingCLProtocol[source]

Bases: stytra.stimulation.Protocol

name = 'imaging_closed_loop'
stytra_config = {'camera': {'video_file': 'assets\\fish_compressed.h5'}, 'tracking': {'estimator': 'vigor', 'method': 'tail'}, 'trigger': 'zmq'}
get_stim_sequence()[source]

To be specified in each child class to return the proper list of stimuli.

stytra.examples.looming_exp module

class stytra.examples.looming_exp.LoomingStimulus(*args, df_param, **kwargs)[source]

Bases: stytra.stimulation.stimuli.generic_stimuli.InterpolatedStimulus, stytra.stimulation.stimuli.visual.CircleStimulus

name = 'looming_stimulus'
class stytra.examples.looming_exp.LoomingProtocol[source]

Bases: stytra.stimulation.Protocol

name = 'looming_protocol'
get_stim_sequence()[source]

To be specified in each child class to return the proper list of stimuli.

stytra.examples.most_basic_exp module

class stytra.examples.most_basic_exp.FlashProtocol[source]

Bases: stytra.stimulation.Protocol

name = 'flash_protocol'
get_stim_sequence()[source]

To be specified in each child class to return the proper list of stimuli.

stytra.examples.no_stytra_exp module

class stytra.examples.no_stytra_exp.FlashProtocol[source]

Bases: stytra.stimulation.Protocol

name = 'empty_protocol'
get_stim_sequence()[source]

To be specified in each child class to return the proper list of stimuli.

stytra.examples.phototaxis module

class stytra.examples.phototaxis.PhototaxisProtocol[source]

Bases: stytra.stimulation.Protocol

name = 'phototaxis'
stytra_config = {'camera': {'min_framerate': 100, 'video_file': 'c:\\users\\vilim\\experimental\\stytra\\stytra\\examples\\assets\\fish_free_compressed.h5'}, 'display': {'min_framerate': 50}, 'tracking': {'embedded': False, 'estimator': 'position', 'method': 'fish'}}
get_stim_sequence()[source]

To be specified in each child class to return the proper list of stimuli.

stytra.examples.plot_dynamic_exp module

stytra.examples.portugues2011_exp module

class stytra.examples.portugues2011_exp.Portugues2011Protocol[source]

Bases: stytra.stimulation.Protocol

name = 'portugues_2011'
stytra_config = {'camera': {'video_file': 'assets\\fish_compressed.h5'}, 'tracking': {'estimator': 'vigor', 'method': 'tail'}}
get_stim_sequence()[source]

To be specified in each child class to return the proper list of stimuli.

stytra.examples.self_calib_cl_exp module

class stytra.examples.self_calib_cl_exp.ClosedLoop1DProt[source]

Bases: stytra.stimulation.Protocol

name = 'self_calib_cl1D_gratings'
stytra_config = {'camera': {'video_file': 'c:\\users\\vilim\\experimental\\stytra\\stytra\\examples\\assets\\fish_compressed.h5'}, 'log_format': 'csv', 'tracking': {'embedded': True, 'estimator': 'vigor', 'method': 'tail'}}
get_stim_sequence()[source]

To be specified in each child class to return the proper list of stimuli.

stytra.examples.stimulus_trigger_exp module

class stytra.examples.stimulus_trigger_exp.FlashProtocol[source]

Bases: stytra.stimulation.Protocol

name = 'flash protocol'
get_stim_sequence()[source]

To be specified in each child class to return the proper list of stimuli.

stytra.examples.tail_tracking_exp module

class stytra.examples.tail_tracking_exp.TrackingGratingsProtocol[source]

Bases: stytra.examples.gratings_exp.GratingsProtocol

name = 'gratings_tail_tracking'
stytra_config = {'camera': {'video_file': 'c:\\users\\vilim\\experimental\\stytra\\stytra\\examples\\assets\\fish_compressed.h5'}, 'tracking': {'embedded': True, 'method': 'tail'}}

stytra.examples.windmill_exp module

class stytra.examples.windmill_exp.WindmillProtocol[source]

Bases: stytra.stimulation.Protocol

name = 'windmill_protocol'
get_stim_sequence()[source]

To be specified in each child class to return the proper list of stimuli.

stytra.examples.zmq_trigger module

stytra.examples.zmq_trigger_exp module

class stytra.examples.zmq_trigger_exp.FlashProtocol[source]

Bases: stytra.stimulation.Protocol

name = 'flash protocol'
get_stim_sequence()[source]

To be specified in each child class to return the proper list of stimuli.

Module contents