Zapit Optostim
  • Zapit Optostim: Introduction
    • Feature List
    • FAQ
  • Installation and Setup
    • Hardware setup
    • Software setup
    • Configuring Zapit
      • General settings
      • NI DAQ settings
      • Experiment settings
      • Scanner & Camera settings
      • Laser Power Calibration
      • Blanking settings
    • Staying up to date
  • Using the GUI
    • Introduction: Using the GUI
    • Scanner Calibration
    • Sample Calibration
    • StimConfig Editor
    • Generating stimulus patterns at the CLI
    • Advanced Usage
  • Running Experiments
    • Introduction: Running Experiments
    • MATLAB
      • Basic API Usage in MATLAB
      • Running an Experiment in MATLAB
    • Python
      • Connecting Python to Zapit
      • Basic Zapit API Use in Python
    • Remote Control and Other Programming Languages
  • Developer Notes
    • Project Structure
    • Conventions
    • Hints and Tips
Powered by GitBook
On this page
  • Overall Layout
  • Concepts
  1. Developer Notes

Project Structure

PreviousRemote Control and Other Programming LanguagesNextConventions

Last updated 1 year ago

This page describes how the code is laid out and also provides links to concepts as needed.

Overall Layout

  • Code is laid out in (the directories starting with a + denote a package in MATLAB).

  • The bulk of the code is in : it is .

  • is used to neatly start up the GUI in a user-friendly way.

  • The main gui is structured in a similar way to a layout:

    • The "model", , handles the underlying logic and is independent of the GUI as possible. This class is sometimes referred to at the in the documentation, is it is the interface used to integrate the photostimulation into custom behavior code.

    • The "view", , builds the UI elements of the GUI itself and contains no logic. It was built using and must never be edited by hand.

    • The "controller", , is a class that zapit.gui.main.view and so when it is instantiated (i.e. created at the command line or in start_zapit) the GUI appears. The controller class is what provides the logic to make the GUI run: it defines , , etc. The controller is a composite class, since it has a model that contains an instance of zapit.pointer this enables the controller to interact with the model. For example, to initiate the galvo calibration routine or to present stimuli.

  • The class implements the bulk of the logic and does the heavy lifting.

Concepts

  • In most classes contain some, meaning that changes to the values of those properties will drive a to run via a . For example, the experimentPath property in is observable. The method in creates a listener that watches for changes the experiment path property. These can be made via the GUI or at the command line (hZP.experimentPath='\some\path'). When changes are made, the updateExperimentPathTextArea method of zapit.gui.main.controller is run to update the text of the path in a text area box found in the GUI Calibrate Scanners tab.

packages
classes
object-oriented
start_zapit
model/view/controller
zapit.pointer
API
zapit.gui.main.view
AppDesigner
zapit.gui.main.controller
inherits
callback functions
listeners
property
zapit.pointer
observable properties
callback function
listener
zapit.pointer
buildListeners
zapit.gui.main.controller