GithubHelp home page GithubHelp logo

jiangxl / colormapping Goto Github PK

View Code? Open in Web Editor NEW
2.0 4.0 1.0 51.09 MB

利用投影仪实时定点照射显微镜视野

Home Page: http://2017.igem.org/Team:SUSTech_Shenzhen/Hardware/Light

License: GNU General Public License v3.0

Python 3.09% Shell 2.58% C++ 43.17% C 45.93% CMake 3.33% PHP 1.90%
elegans igem qhyccd

colormapping's Introduction

Introduction

Track C.elegans and light single C.elegans inside microscope by LCD projector. This project is code by PyQt5 and Python2 in anaconda, which is tested on Archlinux.

  ~~~~~~~~~~~~	      ~~~~~~~~~~      ~~~~~~~~~~~~~~~~~~~~      ~~~~~~~~~~~~~~
  |	     |	      |	       |      |  User Interface: |      |            |
  |          |	      |        |      | 1. Show Image    |	| Project    |
  |          |    \   |	       |   \  |	2. Select ROI    |   \	| image	     |
  | Camera:  |-----\  | Andor  |----\ |	3. Set Parameters|----\ | into 	     |
  |Andor Zyla|-----/  | SDK3   |----/ |	 --------------- |----/	| Microscope |
  |   (5.2)  |	  /   |	       |   /  |	 Calculation:	 |   /	|	     |
  |          |	      |        |      | Generate image   |	|	     |
  ~~~~~~~~~~~~	      ~~~~~~~~~~      ~~~~~~~~~~~~~~~~~~~~	~~~~~~~~~~~~~~

Prerequisite

  1. Install Andor SDK3 in ArchLinux or Deepin
# Andor sdk3 only run below linux kernel 4, so I install linux kernel 3.16
# Prepare tool for kenel compile from AUR in ArchLinux
sudo pacman -S linux-headers numactl
yaourt linux-lts316
# Mannual download kernel tar and compile with standard procedure
wget https://cdn.kernel.org/pub/linux/kernel/v3.x/linux-3.16.79.tar.xz
unxz -v linux-3.16.79.tar.xz
wget https://cdn.kernel.org/pub/linux/kernel/v3.x/linux-3.16.79.tar.sign
gpg --verify linux-3.16.79.tar.sign
gpg --recv-keys <public key>
tar xvf linux-3.16.79.tar
cd linux-3.16.79
cp -v /boot/config-$(uname -r) .config
sudo apt-get install build-essential libncurses-dev bison flex libssl-dev libelf-dev
make menuconfig
make -j 4
make modules_install
make install

# Update grub to boot kernel 3.16 as default(optinal)
vim /etc/default/grub
GRUB_DEFAULT="Advanced options for Deepin 15.11 GNU/Linux>Deepin 15.11 GNU/Linux, with Linux 3.16.79"

# Enter bitflow dir to install bitflow module
cd ./bitflow
./install # it will recompile bitflow.ko
vim .bashrc
export BITFLOW_INSTALL_DIRS=/home/qblab/Bin/Andor_Linux/bitflow
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/qblab/Bin/Andor_Linux/bitflow/64b/lib

# Enter the andor directory and run
sudo ./install_andor
# Then I add the follow configure to /etc/systemd/system
# andorcameralink.service                                            

[Unit]
Description= Andor Camera Link

[Service]
ExecStart=/home/igem/Bin/andor/andorsetting.sh

[Install]
WantedBy=multi-user.target

The andorsetting.sh is

#!/bin/sh
sudo modprobe v4l2_common
#sudo modprobe v4l1_compat
sudo modprobe videodev
sudo insmod /usr/local/mod/bitflow.ko fwDealy1=200 customFlags=1
sudo chmod a+rw /dev/video*

The andorcameralink.service is enable by

systemctl enable andorcameralink.service

Add the nopat kernel option to the bootloader by editing /etc/default/grub, adding nopat to the line GRUB_CMDLINE_LINUX_DEFAULT and running sudo update-grub. You can check that the option is active by printing out /proc/cmdline, if it is not not the case, reboot your computer.

The official examples can run.

All software run but show AT_ERR_NODATA during live, I switch PCI slot and close C-state in DELL bios. Finally work!

  1. Compilation and installatin of Lima
  • Dependents
sudo pacman -S python-sip
sudo pip install numpy  
  • Compilation
# generate config.inc
make
# Edit the configuration file config.inc
...
COMPILE_CORE=1
COMPILE_ANDOR3=1
COMPILE_TIFF_SAVING=1
COMPILE_HDF5_SAVING=1
...
# Configure all python modules
make config
# Finally compile all C++ libraries
make
# Compile all Python modules
make -C sip -j3
  • Installation
sudo make install
# Update environment for python and library paths
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<my-new-install-dir>/Lima/lib
export PYTHONPATH=$PYTHONPATH:<my-new-install-dir>
  1. Install Micro-manager In ArchLinux, following office document and commit from micromanager AUR

In deepin 15.11, hadim have coded a great mm build script. Only little modification are required.

Install

References

License

GNU General Public License v3.0

colormapping's People

Contributors

jiangxl avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

oeolartep

colormapping's Issues

Unable to compile working kernel modules anymore: "could not insert 'modulename': Exec format error" and "Unknown rela relocation: 4"

FYI. When I compile Bitlfow module, it occurs. Same issue also occurs when I install DaHua CCD.
I find final solution in google: Newest linux kernel and binutils change something together, but my working linux-lts316-57(latest in 2018.6 ) don't work with binutils. Here I update to linux-lts316-60.

Finally work after I recompile bitflow!!!

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.