Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tberlok committed Nov 3, 2023
1 parent c328830 commit f6c15df
Show file tree
Hide file tree
Showing 5 changed files with 413 additions and 11 deletions.
11 changes: 6 additions & 5 deletions docs/source/examples.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Running the examples
# Running the examples and notebooks

We provide a number of examples in the subdirectories `examples/` and `ipython-notebooks`.
These all require some example data which can be downloaded as follows:

## Downloading the example data files
## Downloading sample data

Open a terminal at the root directory of the repo, then run
This requires some example data which can be downloaded as follows. Open a terminal at
the root directory of the Paicos repo, then run
```
wget -O data/fof_subhalo_tab_247.hdf5 https://sid.erda.dk/share_redirect/BmILDaDPPz
wget -O data/snap_247.hdf5 https://sid.erda.dk/share_redirect/G4pUGFJUpq
```
```

29 changes: 24 additions & 5 deletions docs/source/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ conda activate paicos

Below we provide three differens ways of getting Paicos up and running,

You will need an openmp-enabled compiler. On MacOs, you can install gcc via homebrew.

## Option 1: Compile the code and add its path to your PYTHONPATH
```
git clone git@github.com:tberlok/paicos.git
Expand All @@ -29,9 +27,30 @@ export PYTHONPATH=$PYTHONPATH:/Users/berlok/projects/paicos
```
in my `.bash_profile`.

#### Compiling on MacOs

You will need an openmp-enabled compiler. On MacOs, you can install gcc via homebrew.
The `setup.py` in the Paicos directory currently has the following hardcoded
compiler option.
```
if sys.platform == 'darwin':
os.environ['CC'] = 'gcc-13'
os.environ['CXX'] = 'g++-13'
```
If you have installed gcc via homebrew, then you can get your compiler version by running
`brew info gcc` and update `setup.py` accordingly if that does not agree with what is hardcoded.

This method can also be useful for compiling Paicos inside a Jupyter notebook, i.e.,
by running a cell with the following content:

#### Compiling Paicos inside a notebook
It can sometimes also be useful to compile Paicos inside a Jupyter notebook, i.e.,
by running a notebook cell with the following content:
```
%%bash
cd /path/to/paicos/
make clean
make
```

## Option 2: Installing the development version using pip
```
Expand All @@ -51,7 +70,7 @@ pip install paicos

```
# Check if installation worked and that you can import Paicos
python -c import paicos
python -c "import paicos"
```

## Using openmp parallel execution of code
Expand Down
288 changes: 288 additions & 0 deletions docs/source/notebooks/histogram2d.ipynb

Large diffs are not rendered by default.

94 changes: 94 additions & 0 deletions docs/source/notebooks/histogram2d_plotting.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion notebook-tutorials/paicos_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.8"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down

0 comments on commit f6c15df

Please sign in to comment.