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.

Experiment-specific settings

When a server or a client requires additional settings, these will be contained in a separate configuration file, i.e ''config.py''. When this is the case an example file for the configuration will be provided and names ''config.py'.example''. The experiment should then make a copy of this file and rename it to ''config.py''. In order to avoid pushing the experiment-specific file back to git, add it the list of files ignored by git ''.gitignore''.

Lab Development

Clone this wiki locally