https://github.com/primozgodec/fish-tracing
Scripts fro plotting fish traces
https://github.com/primozgodec/fish-tracing
Last synced: about 1 year ago
JSON representation
Scripts fro plotting fish traces
- Host: GitHub
- URL: https://github.com/primozgodec/fish-tracing
- Owner: PrimozGodec
- Created: 2018-06-05T11:38:58.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-11-04T20:08:23.000Z (over 6 years ago)
- Last Synced: 2025-02-04T15:48:47.034Z (over 1 year ago)
- Language: Python
- Size: 26.2 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fish tracing
Scripts fro plotting fish traces
## Instalation
This step need to be done only first time using this script on the machine.
1. Open the `Terminal` app
2. Install Python
#### MacOS
Check if `Homebrew` is installed with typing in the Terminal:
brew help
If you get `command not found` output then install brew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
If not then install `Python`:
brew install python3
### Windows
Go to https://www.python.org/downloads/ and download and install the latest
version of `Python`.
3. If Terminal (MacOS or Linux) or Command prompt (Windows) is not open yet
open it:
4. Install `virtualenv`:
sudo pip install virtualenv
While installing you will be asked for a password. Type your user account
password.
Create the virtual environment:
virtualenv -p python3 ~/venv/fish_tracing
`~/venv/fish_tracing` can be replaced with a custom path.
5. Activate the virtual environment:
source ~/venv/fish_tracing/bin/activate
6. Move to the package directory:
cd
7. Install requirements
pip install -r requirements.txt
## Usage
1. Mac or Linux: open the Terminal app. At MacOS: cmd+space, then type Terminal
Windows: open the command prompt.
2. Activate the virtual environment:
source ~/venv/fish_tracking/bin/activate
3. Move to the package directory:
cd
e.g.
cd fish-tracking
5. Run the tracing script:
python trace_fish_new.py --source
e.g.
python trace_fish_new.py --source "data/input/12 Areana Trial 1.xlsx"
`` is the path to the directory with the excel files.
There are two additional arguments that can be used.
`--start` defines the second when we start to plot traces (default 0).
E.g. value 0 means that we start to plot traces 0 seconds after the start
of the recording
`--end` defines the second when we end to plot traces (default 1000).
E.g. value 10000 means that we end to plot traces 10000 seconds
after the start of the recording.
6. Results are now available in `data/output` directory.
## Usage of old script `trace_fish.py`
1. Mac or Linux: open the Terminal app: cmd+space, then type Terminal
Windows: open the command prompt.
2. Activate the virtual environment:
source ~/venv/fish_tracking/bin/activate
3. Move to the package directory:
cd
e.g.
cd Downloads/Tracking\ Instructions\ and\ Script/fish-tracking
4. Copy excel files with traces to the package subdirectory (``).
5. Run the tracing script:
python trace_fish.py --source --destination
e.g.
python trace_fish.py --source 3-08-15\ Nicotine\ Experiment/Export\ Files/ --destination 3-08-15\ Nicotine\ Experiment/Orange_Generated_Tracings
`` is the path to the directory with the excel files.
`` is the path to the directory where results files will be saved
There are two additional arguments that can be used when default settings
are sufficient.
`--start` defines the second when we start to plot traces (default 10).
E.g. value 10 means that we start to plot traces 10 seconds after the start
of the recording
`--end` defines the second when we end to plot traces (default 600).
E.g. value 600 means that we end to plot traces 600 seconds (10 minutes)
after the start of the recording.
6. Results are now available at ``.