-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed typos etc #2339
Merged
Merged
fixed typos etc #2339
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5872c50
fixed typos etc
ErbB4 fa234c0
Update doc/python/simulation.rst
ErbB4 4b6fb4e
fixed units :-)
ErbB4 176afe0
Update simulation.rst
ErbB4 0b31737
Update doc/python/simulation.rst
ErbB4 7a1b1c7
Update doc/python/simulation.rst
ErbB4 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,14 +6,14 @@ Simulations | |
From recipe to simulation | ||
------------------------- | ||
|
||
To build a simulation the following concepts are needed: | ||
To build a simulation, the following concepts are needed: | ||
|
||
* an :py:class:`arbor.recipe` that describes the cells and connections in the model; | ||
* an :py:class:`arbor.context` used to execute the simulation. | ||
|
||
The workflow to build a simulation is to first generate an | ||
:class:`arbor.domain_decomposition` based on the :py:class:`arbor.recipe` and :py:class:`arbor.context` describing the distribution of the model | ||
over the local and distributed hardware resources (see :ref:`pydomdec`). Then, the simulation is build using this :py:class:`arbor.domain_decomposition`. | ||
over the local and distributed hardware resources (see :ref:`pydomdec`). Then, the simulation is built using this :py:class:`arbor.domain_decomposition`. | ||
|
||
.. container:: example-code | ||
|
||
|
@@ -24,7 +24,7 @@ over the local and distributed hardware resources (see :ref:`pydomdec`). Then, t | |
# Get a communication context (with 4 threads, no GPU) | ||
context = arbor.context(threads=4, gpu_id=None) | ||
|
||
# Initialise a recipe of user defined type my_recipe with 100 cells. | ||
# Initialise a recipe of user-defined type my_recipe with 100 cells. | ||
n_cells = 100 | ||
recipe = my_recipe(n_cells) | ||
|
||
|
@@ -34,7 +34,7 @@ over the local and distributed hardware resources (see :ref:`pydomdec`). Then, t | |
# Instantiate the simulation. | ||
sim = arbor.simulation(recipe, decomp, context) | ||
|
||
# Run the simulation for 2000 ms with time stepping of 0.025 ms | ||
# Run the simulation for 2000 ms with a time step of 0.025 ms | ||
tSim = 2000 | ||
dt = 0.025 | ||
sim.run(tSim, dt) | ||
|
@@ -53,7 +53,7 @@ over the local and distributed hardware resources (see :ref:`pydomdec`). Then, t | |
* an :py:class:`arbor.recipe` that describes the model; | ||
* an :py:class:`arbor.domain_decomposition` that describes how the cells in the model are assigned to hardware resources; | ||
* an :py:class:`arbor.context` which is used to execute the simulation. | ||
* a non-negative :py:class:`int` in order to seed the pseudo pandom number generator (optional) | ||
* a non-negative :py:class:`int` in order to seed the pseudo random number generator (optional) | ||
|
||
Simulations provide an interface for executing and interacting with the model: | ||
|
||
|
@@ -94,7 +94,7 @@ over the local and distributed hardware resources (see :ref:`pydomdec`). Then, t | |
|
||
.. function:: run(tfinal, dt) | ||
|
||
Run the simulation from current simulation time to ``tfinal``, | ||
Run the simulation from the current simulation time to ``tfinal``, | ||
with maximum time step size ``dt``. | ||
|
||
:param tfinal: The final simulation time [ms]. | ||
|
@@ -105,7 +105,7 @@ over the local and distributed hardware resources (see :ref:`pydomdec`). Then, t | |
|
||
.. function:: record(policy) | ||
|
||
Disable or enable recorder of rank-local or global spikes, as determined by the ``policy``. | ||
Disable or enable the recorder of rank-local or global spikes, as determined by the ``policy``. | ||
|
||
:param policy: Recording policy of type :py:class:`spike_recording`. | ||
|
||
|
@@ -230,16 +230,16 @@ Spikes recorded during a simulation are returned as a NumPy structured datatype | |
sim = arbor.simulation(recipe, decomp, context) | ||
|
||
# Direct the simulation to record all spikes, which will record all spikes | ||
# across multiple MPI ranks in distrubuted simulation. | ||
# across multiple MPI ranks in distributed simulation. | ||
# To only record spikes from the local MPI rank, use arbor.spike_recording.local | ||
sim.record(arbor.spike_recording.all) | ||
|
||
# Run the simulation for 2000 ms with time stepping of 0.025 ms | ||
# Run the simulation for 2000 ms with a time step of 0.025 ms | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, units missing. Again, not your fault, but let's do it right |
||
tSim = 2000 | ||
dt = 0.025 | ||
sim.run(tSim, dt) | ||
|
||
# Print the spikes and according spike time | ||
# Print the spikes and accordingly the spike time | ||
ErbB4 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
for s in sim.spikes(): | ||
print(s) | ||
|
||
|
@@ -288,10 +288,10 @@ There are three parts to the process of recording cell data over a simulation. | |
|
||
The contents of ``data`` will depend upon the specifics of the probe, but note: | ||
|
||
i. The object type and structure of ``data`` is fully determined by the metadata. | ||
i. The object type and structure of ``data`` are fully determined by the metadata. | ||
|
||
ii. All currently implemented probes return data that is a NumPy array, with one | ||
row per sample, first column being sample time, and the remaining columns containing | ||
row per sample, the first column being sample time, and the remaining columns containing | ||
the corresponding data. | ||
|
||
Example | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should have units ;)