Simulating structurally variable NPCs or other ring-like structures for Microscopy
Project description
Requirements
- python, pip, git https://pip.pypa.io/en/stable/installation/
Linux, macOS
Open a terminal where you want to install the project
Windows
Recommended Windows command line shells are Windows powershell or cmd.exe. Alternatively use Windows Subsystem for Linux (WSL).
Intallation
Open a terminal of choice
Clone this repository:
Tip: Copy/paste commands to avoid typos
git clone https://github.com/MariaTheiss/cir4mics.git
Change to the directory folder:
cd cir4mics
Install poetry
pip install poetry
or following: https://python-poetry.org/docs/
Usage
From the same directory as before
Open a poetry shell
Create or start a virtual environment. Packages installed here will be isolated from the rest of the system, avoiding unfavourable crosstalk.
poetry shell
The name of the virtual environment should now be indicated in round brackets to the left of the command line prompt.
Install dependencies
Dependencies are installed according to pyproject.toml and poetry.lock
poetry install
Run the tutorial
jupyter-lab cir4mics/NPC_testlab.ipynb
Everything is properly configured if the tutorial runs to the end.
The tutorial can be modified for any specific task.
Run minimal script
- Start an IDE of your choice
- Load cir4mics/cir4mics/call_functions.py
Run without IDE
If you are already aware of what's in call_functions.py, and if it doesn't require modification.
poetry run python cir4mics/call_functions.py
To exit poetry shell
exit
Troubleshoothing
Windows: Git Bash struggles to open poetry shell
Solution: Use Powershell, cmd.exe, or WSL
see: https://github.com/python-poetry/poetry/issues/6495
Windows: poetry install is unable to install debugpy
Solution: run poetry config installer.modern-installation false
see: https://github.com/microsoft/debugpy/issues/1246
Windows: powershell does not execute poetry shell and returns
<filepath> cannot be loaded because running scripts is disabled on this system error
Solution:
- Open the powershell as administrator
- Run
Set-ExecutionPolicy RemoteSigned
See: https://www.sharepointdiary.com/2014/03/fix-for-powershell-script-cannot-be-loaded-because-running-scripts-is-disabled-on-this-system.html
Windows: Issues with Microsoft C++ Build Tools (https://visualstudio.microsoft.com/visual-cpp-build-tools/):
Solution: Use at most version 3.10
Windows: Powershell upon running poetry shell returns Virtual environment already activated.
Solution: Restart the computer
See: https://visualstudio.microsoft.com/visual-cpp-build-tools/
Tutorials
Simulating NPCs:
jupyter-lab cir4mics/NPC_testlab.ipynb
Including new models into the simulator
jupyter-lab cir4mics/Include_models.ipynb
Dynamics
Dynamics do not reflect true NPC dynamics, but might be useful when hard to predict dynamics are of interest
jupyter-lab cir4mics/Dynamics.ipynb
Contact
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cir4mics-0.1.1.tar.gz.
File metadata
- Download URL: cir4mics-0.1.1.tar.gz
- Upload date:
- Size: 4.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.7.3 Linux/5.4.0-146-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
669067633dd9d29d828eed2575929ecb7f8def7028dd43e2dd3d2a81cb2e3ba7
|
|
| MD5 |
9df3225e80c84ad267edaed5f461292a
|
|
| BLAKE2b-256 |
48ce15495881025b452fcdec1225d8575fe5e5a8f6379e6789cd1ab9e7f23d6b
|
File details
Details for the file cir4mics-0.1.1-py3-none-any.whl.
File metadata
- Download URL: cir4mics-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.7.3 Linux/5.4.0-146-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a41478172aa8edd795f2ed3c552e64bc34e3ebfbe360f2479ef11b328ed2e870
|
|
| MD5 |
73dfade9e7fb13ecc23f01cce5afcd08
|
|
| BLAKE2b-256 |
538ef1238927c167be2a0d7491108721bfdd4acd9cb2773d7718b6a1e2a1c7bb
|