Skip to content

Commit

Permalink
many more docs improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
sg-s committed Mar 8, 2020
1 parent a09b871 commit a05311e
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 13 deletions.
24 changes: 18 additions & 6 deletions @xolotl/plot.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

% _ _ _
%
% _ _ _
% __ _____ | | ___ | |_| |
% \ \/ / _ \| |/ _ \| __| |
% > < (_) | | (_) | |_| |
Expand All @@ -11,15 +11,19 @@
%
% ```matlab
% x.plot()
% x.plot('comp_name')
% x.plot({'comp1','comp2'...})
% ```
%
% ** Description**
%
% `x.plot` makes a plot of voltage and calcium time series of all
% - **`x.plot`** makes a plot of voltage and calcium time series of all
% compartments. The default option is to color the voltage
% traces by the dominant current at that point using
% `contributingCurrents` and to also show the Calcium
% concentration on the same plot.
% - **`x.plot('comp_name')`** Plots voltage traces from only that compartment.
% - **`x.plot({'comp1','comp2'...}))`** plots voltage traces from these compartments.
%
%
% If you want to turn off the coloring, or to hide the
Expand All @@ -38,9 +42,14 @@



function plot(self, ~)
function plot(self, comp_names)

if nargin == 1
comp_names = self.find('compartment');
elseif ~iscell(comp_names)
comp_names = {comp_names};
end

comp_names = self.find('compartment');
N = length(comp_names);
c = lines(100);

Expand All @@ -60,10 +69,12 @@ function plot(self, ~)
self.handles.ax(i).YLim = [-80 50];
end

warning('off')
try
linkaxes(self.handles.ax,'x');
catch
end
warning('on')

% make all dummy plots

Expand Down Expand Up @@ -132,10 +143,11 @@ function plot(self, ~)

time = 1e-3 * self.dt * (1:size(V,1));


a = 1;
for i = 1:N
cond_names = self.(comp_names{i}).find('conductance');
this_V = V(:,i);
this_V = V(:,find(strcmp(comp_names{i},self.Children)));
z = a + length(cond_names) - 1;
this_I = currents(:,a:z);
a = z + 1;
Expand Down
6 changes: 4 additions & 2 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
### Adding New Conductances/Synapses/Controllers

* Look at existing conductances/synapses/controllers and use them as a guideline
* If you're making a new conductance, put them in ``c++/conductances/<first_author_name>``
* Make sure you add a reference to the paper you're getting the conductance details from in a comment at the top of the file
* If you're making a new conductance, put them in ``c++/conductances/<first_author_name>YY`` where `YY` is the two digit year
* Make sure you add a reference to the paper you're getting the conductance details from in a comment at the top of the file.
* Run `xolotl.testConductances` to make sure your conductance file compiles correctly.
* Run `x.show` on your conductance file to inspect the activation curves to make sure that it matches what you want it to do
* Send us a pull request
4 changes: 2 additions & 2 deletions docs/meta/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ in that file.

If we have documentation for each method mixed up with the code,
then how do we put them all together in one place in the
documentation? Obviously the answer is to problematically build
documentation? Obviously the answer is to programatically build
the documentation from source (code), so that

* we don't deal with copies of the same documentation in different places that we need to keep in sync
Expand Down Expand Up @@ -59,7 +59,7 @@ We like using mkdocs because:
### Material theme for MKdocs

This is a very nice-looking theme that I like.
You're looking at it now.
You're looking at it now. [Link to project page](https://squidfunk.github.io/mkdocs-material/)

## Hosting

Expand Down
3 changes: 2 additions & 1 deletion docs/performance/speed.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,5 @@ We see that the two traces are slightly different, but the overall features are

## Run code in parallel

A common task in simulations is a parameter sweep -- the same model is run for many different parameter sets. xolotl supports all features of parallelization built into MATLAB, making it easy for you to run your code in parallel. Look at [this page](../how-to/run-simulations-in-parallel) for a primer on how to run your code in parallel.
A common task in simulations is a parameter sweep -- the same model is run for many different parameter sets. xolotl supports all features of parallelization built into MATLAB, making it easy for you to run your code in parallel. Look at [this page](https://xolotl.readthedocs.io/en/master/how-to/run-simulations-in-parallel/) for a primer on how to run your code in parallel.

6 changes: 5 additions & 1 deletion docs/reference/matlab/xolotl.md
Original file line number Diff line number Diff line change
Expand Up @@ -739,15 +739,19 @@ should not need to use this by itself.

```matlab
x.plot()
x.plot('comp_name')
x.plot({'comp1','comp2'...})
```

** Description**

`x.plot` makes a plot of voltage and calcium time series of all
- **`x.plot`** makes a plot of voltage and calcium time series of all
compartments. The default option is to color the voltage
traces by the dominant current at that point using
`contributingCurrents` and to also show the Calcium
concentration on the same plot.
- **`x.plot('comp_name')`** Plots voltage traces from only that compartment.
- **`x.plot({'comp1','comp2'...}))`** plots voltage traces from these compartments.


If you want to turn off the coloring, or to hide the
Expand Down
3 changes: 2 additions & 1 deletion docs/tutorials/first-xgrid.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ In this tutorial, we will walk through the process of creating a parallelized pa
We will set up a simple model,
and simulate it many times in parallel for many parameter values.

Code equivalent to this tutorial can be found in the xolotl examples folder.
!!! Note
In most cases, you don't need to use `xgrid`. If you want to run all your code in parallel on a single computer, you can use MATLAB's native parallel support to do this. Run the `demo_parallel` example to see how this works.

### A high-level view of xgrid

Expand Down

0 comments on commit a05311e

Please sign in to comment.