Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install numpy scipy matplotlib scikit-image # add versions to matrix
- name: Trial imports
run: python -c 'import pytools as pt'
run: python -c 'import analysator as pt'

ubuntu_22_04_versions:

Expand All @@ -57,7 +57,7 @@ jobs:
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install numpy scipy matplotlib scikit-image # add versions to matrix
- name: Trial imports
run: python -c 'import pytools as pt'
run: python -c 'import analysator as pt'


lint:
Expand Down
2 changes: 1 addition & 1 deletion Documentation/components/mayavi/mayavi_usage.tex
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
\section{Plotting the grid}

\begin{python}
import pytools as pt
import analysator as pt
f = pt.vlsvfile.VlsvReader('bulk.0000872.vlsv')
grid = pt.grid.MayaviGrid(f, 'rho')
\end{python}
Expand Down
2 changes: 1 addition & 1 deletion Documentation/examples/example1.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#

import pytools as pt
import analysator as pt

f = pt.vlsvfile.VlasiatorReader('fullf.0000002.vlsv')
grid = pt.grid.Particlepusherinterface(f, 'rho')
Expand Down
4 changes: 2 additions & 2 deletions Documentation/installation/installation.tex
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ \section{Testing installation}
\begin{verbatim}
cd ~/analysator
ipython
import pytools as pt
import analysator as pt
\end{verbatim}

The full input/output should look like this (if the installation fails, the import command should
Expand All @@ -63,7 +63,7 @@ \section{Testing installation}
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.

In [1]: import pytools as pt
In [1]: import analysator as pt

In [2]:

Expand Down
2 changes: 1 addition & 1 deletion Documentation/particle_pusher/particlepusher.tex
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ \section{Using the particle pusher interface}
\begin{verbatim}
ipython

In [2]: import pytools as pt
In [2]: import analysator as pt

In [3]: f = pt.vlsvfile.VlasiatorReader('bulk.0001480.vlsv')

Expand Down
16 changes: 8 additions & 8 deletions Documentation/presentations/analysator.tex
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ \section{Introduction}
\begin{python}[basicstyle=\tiny]
# We are interested in reading data from the cell whose ID is 75

import pytools as pt # Import Analysator
import analysator as pt # Import Analysator

# Open a vlsv file for reading
vlsvReader = pt.vlsvfile.VlsvReader('bulk.0003710.vlsv')
Expand Down Expand Up @@ -163,7 +163,7 @@ \section{Concepts}

\begin{python}[basicstyle=\tiny]
# Import analysator
import pytools as pt
import analysator as pt

vlsvReader = pt.vlsvfile.VlsvReader('test.vlsv') #What?

Expand All @@ -189,7 +189,7 @@ \section{Concepts}
\frametitle{Navigation (the \emph{most} important part)}
\begin{python}[basicstyle=\tiny]
# Import analysator
import pytools as pt
import analysator as pt

pt.
\end{python}
Expand All @@ -205,7 +205,7 @@ \section{Concepts}
\frametitle{Navigation (the \emph{most} important part)}
\begin{python}[basicstyle=\tiny]
# Import analysator
import pytools as pt
import analysator as pt

pt.calculations.
\end{python}
Expand All @@ -227,7 +227,7 @@ \section{Concepts}
\frametitle{Navigation (the \emph{most} important part)}
\begin{python}[basicstyle=\tiny]
# Import analysator
import pytools as pt
import analysator as pt

pt.calculations.cut_through?
\end{python}
Expand Down Expand Up @@ -287,7 +287,7 @@ \section{Basics}
\frametitle{Basic usage}
\begin{python}[basicstyle=\tiny]
# Import analysator
import pytools as pt
import analysator as pt

# Open a vlsv file
vlsvReader = pt.vlsvfile.VlsvReader('test.vlsv')
Expand Down Expand Up @@ -384,7 +384,7 @@ \section{Plotting}
Plotting can be done simply by feeding a vlsv file to the grid class as follows:
\begin{python}[basicstyle=\tiny]
# Import Analysator
import pytools as pt
import analysator as pt

# Open a vlsv file
vlsvReader = pt.vlsvfile.VlsvReader('test.vlsv')
Expand Down Expand Up @@ -532,7 +532,7 @@ \section{Hands-on}
\frametitle{Example from \emph{calculations}}
\begin{python}[basicstyle=\tiny]
# Import analysator
import pytools as pt
import analysator as pt

# Open a vlsv file
vlsvReader = pt.vlsvfile.vlsvReader('testfile.vlsv')
Expand Down
2 changes: 1 addition & 1 deletion Documentation/sphinx/calculations.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
calculations
=================================

.. automodule:: pytools.calculations
.. automodule:: analysator.calculations
:members:
:imported-members:
4 changes: 2 additions & 2 deletions Documentation/sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

sys.path.insert(0, str(Path('..', '..').resolve()))
sys.path.insert(0, str(Path('..', '..', 'scripts').resolve()))
print(str(Path('..','..').resolve()))
print(str(Path('..','..','analysator').resolve()))
print(str(Path('..','..', 'scripts').resolve()))
project = 'analysator'
copyright = '2024, University of Helsinki'
Expand All @@ -32,7 +32,7 @@
pass


exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'pytools']



Expand Down
2 changes: 1 addition & 1 deletion Documentation/sphinx/fetchscripts.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob
import os

files = glob.glob('C:/Users/samel/OneDrive/Tiedostot/TET/analysator/scripts/*.py')
files = glob.glob('../scripts/*.py')

for file in files:
file = os.path.basename(file)[:-3]
Expand Down
2 changes: 1 addition & 1 deletion Documentation/sphinx/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ documentation for details.
scripts
about

.. automodule:: pytools
.. automodule:: analysator
:members:
:imported-members:
:undoc-members:
Expand Down
2 changes: 1 addition & 1 deletion Documentation/sphinx/miscellaneous.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
miscellaneous
==================================

.. automodule:: pytools.miscellaneous
.. automodule:: miscellaneous
:members:
:imported-members:
2 changes: 1 addition & 1 deletion Documentation/sphinx/plot.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plot
============================

.. automodule:: pytools.plot
.. automodule:: analysator.plot
:members:
:exclude-members: Version
:imported-members:
Expand Down
2 changes: 1 addition & 1 deletion Documentation/sphinx/vlsvfile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ vlsvfile

VlsvFile is responsibe for implementing read and write functionality for the vlsv format, as well as defining data reducers and reduction pipelines. Some of this will be likely moved around to be more modular in some indefinite point in the future.

.. automodule:: pytools.vlsvfile
.. automodule:: analysator.vlsvfile
:members:
:imported-members:
76 changes: 0 additions & 76 deletions README

This file was deleted.

71 changes: 71 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Installation:

Analysator is now a package! Clone the repository locally

```bash
git clone https://github.com/fmihpc/analysator.git
```
and install via `pip` from the cloned path. Dependency handling is via pip. Using the editable flag is recommended for getting updates via `git pull origin`:

```bash
pip install -e ./analysator
```

## Backward compatibility

The packaged analysator is (should be!) backwards-compatible with previous analysator versions: `import pytools` will import analysator onto the pytools name, and emits a deprecation warning. `$PYTHONPATH` installation is also supported.

# Using Analysator:
```python
import analysator as pt # Import Analysator

# Navigating functions:
pt.calculations.pitch_angles? #press [Enter]
pt.vlsvfile.VlsvReader? #press [Enter]
pt.plot.plot_colormap? #press [Enter]
pt.plot.plot_vdf? #press [Enter]
```

```bash
# For non-interactive mode (also when no X is available):
# set the environment variable PTNONINTERACTIVE to any value before launching
# python/ipython. If in interactive mode, experimental non-blocking
# windows via matplotlib.pyplot.ion() are in use.
#################################################
export PTNONINTERACTIVE=1

# For selecting a backend manually (if Agg or TkAgg is not available)
#################################################
export PTBACKEND=Qt5Agg

# For disabling full LaTeX formatted output (if texlive is not installed)
#################################################
export PTNOLATEX=1
```

# Outputs

For setting the default output directory (default: $HOME/Plots)
```
export PTOUTPUTDIR=/proj/USERNAME/Plots/
```
If using a jupyter notebook on the UH hub system, you can activate interactive plot windows with `%matplotlib ipympl` or `%matplotlib notebook` before importing pytools

Examples and instructions for batch scripting (on CSC's system) are found in
`examples/generate_panel.py` and `examples/generate_movie.sh`

Analysator is using logging. It is controlled by setting the enviroment variable ANALYSATOR_LOG_LEVEL
Supported: DEBUG, INFO (default), WARNING, ERROR, CRITICAL

For example, disable INFO prints via:
```bash
export ANALYSATOR_LOG_LEVEL='WARNING'
```

# About

For more information visit the wiki: https://github.com/fmihpc/analysator/wiki

Analysator reference: https://fmihpc.github.io/analysator/

For citations, use the DOI https://doi.org/10.5281/zenodo.4462514 or the ready-made button the the right in GitHub!
Loading