Analysis code for v1 depth map project.
- Create an empty environment
conda create --name v1_depth_map "python==3.12" - Activate the environment by
conda activate v1_depth_map. - Install pip
conda install pip. - Install this package by
pip install .(add[figures]for plotting).
- Follow installation instructures for https://github.com/znamlab/flexiznam.git.
- Set up config for the
flexiznampackage byflexiznam config. The config file should be found at~/.flexiznam/config.yml. - Make sure that the path under project_paths points to the path you have downloaded the data. e.g.:
project_paths:
hey2_3d-vision_foodres_20220101:
processed: your_data_path
raw: your_data_path
- Turn on the offline mode by adding the following to your config:
offline_mode: true
offline_yaml: offline_database.json
- Run the notebooks under
./v1_depth_map/figuresto plot the corresponding figures. - When first running the figure notebooks, change
reloadtoTrueto reload data.
- Run the bash script in each folder under
./v1_depth_map/batch_analysisto conduct corresponding analysis for all sessions. - Remember to change the path in the bash script for
#SBATCH --output=andcdto your local path to this repo. - Remember to change the conda environment name to your own environment.
- To precompute data for plotting figures, run the corresponding bash script.
If the database has been updated or you need to download/sync the figures and revisions dataset to a new local directory (e.g., an external drive like /Volumes/BlackPasspo/v1_depth_map), follow these steps:
To update the offline registry (offline_database.json), you must be connected to the Crick VPN/network. Run:
python v1_depth_map/precompute_data/download_database.pyThis script connects to live flexilims server, downloads up-to-date snapshots for both the figures project (hey2_3d-vision_foodres_20220101) and the revisions project (colasa_3d-vision_revisions), merges them, and saves the file to <v1_depth_map_processed_root>/offline_database.json.
To sync or update the target raw and processed dataset directories (excluding massive raw video sequences and raw TIFF files to save time and space), use the automated sync utility:
python v1_depth_map/revisions/copy_v1_figures_data.py /path/to/destination --skip-existing- Arguments:
dest(positional): The target directory whererawandprocesseddata folders will be created (e.g.,/Volumes/BlackPasspo/v1_depth_map).--skip-existing: Skip copying files that already exist in the target directory to resume or accelerate a sync run.--dry-run: Display all source-to-destination paths that would be copied without making any modifications.