Skip to content
Hlab edited this page Nov 14, 2012 · 30 revisions

Directory Structure

Each experiment uses two git repositories: Haeffner-Lab-LabRAD-Tools for common servers and clients and one containing code that is only useful for that experiment. To achieve this, we use the following directory structure

LabRAD\
       __init__.py
       \common\...
       \experiment_name\...

where common is the cloned Haeffner-Lab-LabRAD-Tools repository and experiment_name is the experiment-specific repository. Having __init__.py there indicates that this is a package. This allows for easy import of files from either directory using:

import common.folder.file

To achieve this, add the LabRAD directory to PYTHONPATH

LabRAD Registry

The Registry belongs in the /experiment_name/ folder. One can place it there and update the location in LabRAD Manager

Using the common files

We run any of the common code directly from the /common/ folder, without making additional copies. For example: the node server looks inside /common/ for available servers, and the central GUI imports widgets from /common/clients/ . With this method, we avoid unnecessary duplication and version-tracking. The common files can easily be updated by running

git pull

from the /common/ directory.