Skip to content

Commit

Permalink
tutorial nb
Browse files Browse the repository at this point in the history
  • Loading branch information
tathey1 committed Aug 1, 2023
1 parent 00f525f commit df8185a
Show file tree
Hide file tree
Showing 27 changed files with 248 additions and 44,142 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
name: Docker Image CI
# name: Docker Image CI

on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
# on:
# push:
# branches: [ "develop" ]
# pull_request:
# branches: [ "develop" ]

jobs:
# jobs:

build:
# build:

runs-on: ubuntu-latest
# runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: docker login
env:
DOCKER_USER: ${{secrets.DOCKER_USER}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
run: |
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- name: Build the Docker image
run: docker build . --file Dockerfile --tag neurodata/brainlit:latest
- name: Docker Push
run: docker push neurodata/brainlit
# steps:
# - uses: actions/checkout@v3
# - name: docker login
# env:
# DOCKER_USER: ${{secrets.DOCKER_USER}}
# DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
# run: |
# docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
# - name: Build the Docker image
# run: docker build . --file Dockerfile --tag neurodata/brainlit:latest
# - name: Docker Push
# run: docker push neurodata/brainlit
8 changes: 4 additions & 4 deletions brainlit/map_neurons/diffeo_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,14 @@ def diffeo_gen_ara(sigma):
"""Return random diffeomorphism generated by sampling Gaussian noise then passing through Riemannian exponential.
Args:
sigma (float): standard deviation of noise.
sigma (float): standard deviation of noise in microns.
Returns:
List: list of sampled points in spatial domain.
np.array: range of diffeomorphism at sampled points.
"""
# a domain for sampling your velocity and deformatoin
dv = np.array([5.0, 5.0, 5.0])
dv = np.array([100.0, 100.0, 100.0]) # units are every 100 microns
nv = np.array([132, 80, 114])
xv = [np.arange(n) * d - (n - 1) * d / 2 for n, d in zip(nv, dv)]

Expand All @@ -169,7 +169,7 @@ def diffeo_gen_ara(sigma):
# a frequency domain
fv = [np.arange(n) / n / d for n, d in zip(nv, dv)]
FV = np.stack(np.meshgrid(*fv, indexing="ij"), -1)
a = 5.0
a = 100.0
p = 2.0
LL = (
1.0 - 2.0 * a**2 * np.sum(((np.cos(2.0 * np.pi * FV * dv) - 1)) / dv**2, -1)
Expand All @@ -189,4 +189,4 @@ def diffeo_gen_ara(sigma):
phii = expR([torch.tensor(x) for x in xv], torch.tensor(v), K, n=10)
phii = phii.detach().cpu().numpy()

return xv, phii
return xv, phii, K
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[2008.3863216266175, 1994.6025878003697, 1840.358595194085]
[2062.8153241650293, 1949.3064833005894, 1822.9626719056973]
[2068.915071770335, 1930.4234449760766, 1856.846889952153]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions experiments/map_neurons/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Neuron Mapping

* The notebook that best demonstrates the code in this project is: ``brainlit/experiments/map_neurons/tutorial.ipynb``.

* As a general rule, figures were made in the notebooks in ``brainlit/experiments/map_neurons/`` and, when necessary, heavy computations were done using scripts in ``brainlit/experiments/map_neurons/other``. Many of the notebooks rely on data generated by scripts and therefore will not run as-is.
* Figures in tha paper were made in the notebooks in ``brainlit/experiments/map_neurons/`` and, when necessary, heavy computations were done using scripts in ``brainlit/experiments/map_neurons/other``. Many of the notebooks rely on data generated by scripts and therefore will not run as-is.

* The notebooks that made the specific figures in the current version of the manuscript are:
* Nonetheless, the notebooks can serve as a reference to the interested reader. The notebooks that made the specific figures in the current version of the manuscript are:

* ``map_neurons.ipynb``: Fig. 1a-b, 2.

Expand Down
Loading

0 comments on commit df8185a

Please sign in to comment.