GithubHelp home page GithubHelp logo

caro's Introduction

Caro

A Program to run 'THE CAROUSSEL' - A Raspberry/GPIO-based machine built by Dr. Wolf Hütteroth and Dr. Tilman Triphan from the University of Leipzig/Konstanz to test the behavior of Drosophila in the presence of a turning disc. This Script regulates the light, the turning of the discs and the camera. Input = Experiment-File (s. 3.), Output = Video-files for downstream analysis of Drosophila movement-patterns

Dependencies:

  • see Point 1.3 and use the caro.yml-file to create a fitting environment!

1. Getting started:

(I assume, that you have a Raspberry prepared)

  1. Clone this repository onto your Raspberry by typing:
git clone https://github.com/MerlinSzymanski/Carousel
  1. Change your working-directory:
cd path/to/Carousel/
  1. Create and activate the Environment
conda env create -f caro.yml
conda activate caro 
  1. Set up a Shortcut in the Terminal by running
python3 main.py -s
  1. Run a functionality-Test
python3 main.py -t

If something is not working, check the pin-numbering in the Caroussel.py-module

2. Running the experiment:

You can now access the program by opening the terminal and typing

caro

which start the Userunterface.

If you want to go directly over the python-file, change to the Carousel/ directory and type:

python3 main.py

Available flags are:

  • i: The program starts without a GUI and reads the data from a file. Default file = files/template.json to use the same data as in the previous experiment, you can use -i save_files/temp/exp_settings.json
  • g: The program starts with a GUI
  • t: The Functionality test
  • c: A cleanup-programm, if the Caroussel runs after the programm crashed

3. Data to provide:

You can see in the GUI what should be provided...

Necessary for the Script:

  • circRythm: e.g. "6:22LD" = from 06:00 - 22:00 white light, from 22:00 - 06:00 Red Light. Please specify your regimes in files/circrythm.json
  • motor_switchtime: e.g. "5" = After 5 minutes one disc stops turning and the other one starts
  • motor1_direction: "cw" or "ccw" = clockwise or counterclockwise
  • motor2_direction: "same" or "different" = relative to motor 1
  • video_length: e.g. "9000" = Lenght in frames. Should be switched back to seconds to avoid confusion!
  • FPS: e.g. "5" = Frames per second

Everything else is just piped into the archive, but can be specified using the files/*.json files

4. Additional functions

If some of the functions dont work - check the pin-numbers in the "caroussel.py" module. To shutdown a running caroussel after a crash,use

python3 main.py -c

caro's People

Contributors

merszym avatar

Watchers

 avatar  avatar

Forkers

triphant

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.