从偏振分辨图像中重建双折射、慢轴、亮场和偏振度。
ReconstructOrder的Python项目详细描述
重建顺序
重建偏振分辨图像中的双折射、慢轴、亮场和偏振度。核心算法采用stokes表示进行重建和背景校正。存储库还为使用micro manager(https://micro-manager.org/)和openpolscope acquisition plugin(https://openpolscope.org/)获取的多维数据集的批处理分析提供实用程序。
安装
创建新的conda环境(可选,但建议)
Install conda package management system by installing anaconda or miniconda (https://conda.io/). Creating a conda environment dedicated to ReconstructOrder will avoid version conflicts among packages required by ReconstructOrder and packages required by other python software.
conda create -n <your-environment-name> python=3.7 conda activate <your-environment-name>
下面的所有代码块都假定您处于上述环境中
选项1:通过pip
安装发布的版本ReconstructOrder is available on pip. Running pip install will also install dependencies. From your environment created above, type:
pip install ReconstructOrder
选项2:通过git安装开发人员版本
Install the git version control system git : https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
Use git to clone this repository to your current directory:
git clone https://github.com/czbiohub/ReconstructOrder.git
install dependencies
You have two options to install dependencies: via pip (python index package) or via docker
install dependencies via pip
If you are running ReconstructOrder on your own machine, navigate to the cloned repository and install python library dependencies:
pip install -r requirements.txt
install dependencies via docker
If you are running ReconstructOrder on a compute node (e.g., fry2@czbiohub), it is recommended to run it in a Docker container. Docker is the virtual environment with all the required libraries pre-installed so you can run your copy of ReconstructOrder without recreating the environment. The docker image for ReconstructOrder has been built on fry2@czbiohub. If you are running ReconstructOrder on other servers, you can build the docker image after cloning the repository by doing :
docker build -t reconstruct_order:py37 -f Dockerfile.ReconstructOrder .
Now, to start a docker container, do
docker run -it -v /data/<your data dir>/:<data dir name inside docker>/ -v ~/ReconstructOrder:/ReconstructOrder reconstruct_order:py37 bash
用法
To run reconstruction, you will need to create a configuration file. The configuration file is a .yml file and specifies parameters for:
- 'dataset'
- 'processing'
- 'plotting'
Examples can be found https://github.com/czbiohub/ReconstructOrder under "examples/example_configs" folder
See /ReconstructOrder/config/config_example.yml for an example config file with detailed explanation of parameters.
Before running, you should modify the dataset:data_dir and dataset:processed_dir paths to point to source data path and output path, respectively. Example data is located at examples/example_data
There are two ways to run reconstruction:
from command line
If you pip installed the library, from any folder, simply type:
runReconstruction --config path-and-name-to-your-config.ymlIf you cloned the developer repo, navigate to the repo and call the script:
(C:\ReconstructOrder\) python runReconstruction.py --config path-and-name-to-your-config.yml
from IPython
If you are writing your own code and want to use the ReconstructOrder library, you can reconstruct as follows:import ReconstructOrder.workflow as wf wf.reconstructBatch('path-and-name-to-your-config.yml')
许可证
Chan Zuckerberg BioHub软件许可证
本软件许可证为2条BSD许可证加上第3条 禁止再分配和用于商业目的 许可。
版权所有©2019。陈扎克伯格生物中心。 保留所有权利。
以源和二进制形式重新分配和使用,有无 如果满足以下条件,则允许修改:
重新发布源代码必须保留上述版权声明, 此条件列表和以下免责声明。
二进制形式的再分配必须复制上述版权声明, 文件中的条件列表和以下免责声明 和/或分发时提供的其他材料。
未经许可,不得为商业目的进行再分配和使用 陈扎克伯格生物中心的书面许可。就本许可而言, 商业目的是将Chan Zuckerberg Biohub的 任何你将收取费用或其他补偿的软件 使用软件为第三方执行商业服务。 联系ip@czbiohub.org获取商业许可机会。
本软件由版权所有者和贡献者“按原样”提供。 以及任何明示或默示保证,包括但不限于 默示保证适销性和特定用途的保证 否认。在任何情况下,版权持有人或贡献者均不承担责任 对于任何直接的、间接的、偶然的、特殊的、惩戒性的或间接的 损害赔偿(包括但不限于购买替代货物或 但是 根据任何责任理论,无论是在合同中,严格责任, 或因使用而引起的侵权行为(包括疏忽或其他) 即使被告知有可能造成这种损害。