diff --git a/.github/workflows/test_python.yml b/.github/workflows/test_python.yml index 8c45dd32..db669dc2 100644 --- a/.github/workflows/test_python.yml +++ b/.github/workflows/test_python.yml @@ -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: @@ -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: diff --git a/Documentation/components/mayavi/mayavi_usage.tex b/Documentation/components/mayavi/mayavi_usage.tex index 752aafbf..a155c9a8 100644 --- a/Documentation/components/mayavi/mayavi_usage.tex +++ b/Documentation/components/mayavi/mayavi_usage.tex @@ -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} diff --git a/Documentation/examples/example1.py b/Documentation/examples/example1.py index fda1cbe0..560ed638 100644 --- a/Documentation/examples/example1.py +++ b/Documentation/examples/example1.py @@ -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') diff --git a/Documentation/installation/installation.tex b/Documentation/installation/installation.tex index c3435b64..7462e285 100644 --- a/Documentation/installation/installation.tex +++ b/Documentation/installation/installation.tex @@ -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 @@ -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]: diff --git a/Documentation/particle_pusher/particlepusher.tex b/Documentation/particle_pusher/particlepusher.tex index 23d2b841..57b4d284 100644 --- a/Documentation/particle_pusher/particlepusher.tex +++ b/Documentation/particle_pusher/particlepusher.tex @@ -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') diff --git a/Documentation/presentations/analysator.tex b/Documentation/presentations/analysator.tex index 2eafac38..3821edbf 100644 --- a/Documentation/presentations/analysator.tex +++ b/Documentation/presentations/analysator.tex @@ -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') @@ -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? @@ -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} @@ -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} @@ -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} @@ -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') @@ -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') @@ -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') diff --git a/Documentation/sphinx/calculations.rst b/Documentation/sphinx/calculations.rst index a9ac10db..2930461b 100644 --- a/Documentation/sphinx/calculations.rst +++ b/Documentation/sphinx/calculations.rst @@ -1,6 +1,6 @@ calculations ================================= -.. automodule:: pytools.calculations +.. automodule:: analysator.calculations :members: :imported-members: diff --git a/Documentation/sphinx/conf.py b/Documentation/sphinx/conf.py index 6a496bc6..24bc54bf 100644 --- a/Documentation/sphinx/conf.py +++ b/Documentation/sphinx/conf.py @@ -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' @@ -32,7 +32,7 @@ pass -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'pytools'] diff --git a/Documentation/sphinx/fetchscripts.py b/Documentation/sphinx/fetchscripts.py index 9c01e444..96fde55b 100644 --- a/Documentation/sphinx/fetchscripts.py +++ b/Documentation/sphinx/fetchscripts.py @@ -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] diff --git a/Documentation/sphinx/index.rst b/Documentation/sphinx/index.rst index 66d760c7..657210fb 100644 --- a/Documentation/sphinx/index.rst +++ b/Documentation/sphinx/index.rst @@ -33,7 +33,7 @@ documentation for details. scripts about -.. automodule:: pytools +.. automodule:: analysator :members: :imported-members: :undoc-members: diff --git a/Documentation/sphinx/miscellaneous.rst b/Documentation/sphinx/miscellaneous.rst index 7a7e9bf8..c114a198 100644 --- a/Documentation/sphinx/miscellaneous.rst +++ b/Documentation/sphinx/miscellaneous.rst @@ -1,6 +1,6 @@ miscellaneous ================================== -.. automodule:: pytools.miscellaneous +.. automodule:: miscellaneous :members: :imported-members: diff --git a/Documentation/sphinx/plot.rst b/Documentation/sphinx/plot.rst index f0b19c91..15ace118 100644 --- a/Documentation/sphinx/plot.rst +++ b/Documentation/sphinx/plot.rst @@ -1,7 +1,7 @@ plot ============================ -.. automodule:: pytools.plot +.. automodule:: analysator.plot :members: :exclude-members: Version :imported-members: diff --git a/Documentation/sphinx/vlsvfile.rst b/Documentation/sphinx/vlsvfile.rst index 6fcf3ea2..3c0f080a 100644 --- a/Documentation/sphinx/vlsvfile.rst +++ b/Documentation/sphinx/vlsvfile.rst @@ -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: diff --git a/README b/README deleted file mode 100644 index 6931f9fe..00000000 --- a/README +++ /dev/null @@ -1,76 +0,0 @@ -# Installation: -################################################# -################################################# - -# Install dependencies: -sudo apt-get install python-matplotlib python-numpy python-scipy ipython - -# Set pythonpath environment variable: -echo "export PYTHONPATH=$PYTHONPATH:$HOME/analysator" >> $HOME/.bashrc - -# Using Analysator: -################################################# -ipython # Start ipython -import pytools 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] - - -# 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 - -#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: -`export ANALYSATOR_LOG_LEVEL='WARNING'` - -# MayaVi2 support (deprecated) -################################################# -Some old plotting tools requiring the MayaVi2 visualization library can be activated -by setting the environment variable: -export PTMAYAVI2=1 - -This naturally depends on mayavi, so: -sudo apt-get install mayavi2 - -# 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 - -# For more information visit the link: -################################################# -https://github.com/fmihpc/analysator/wiki - -# Analysator documentation on the link: -################################################# -https://fmihpc.github.io/analysator/ - -# For citations, use the DOI or the ready-made button the the right in GitHub! -################################################# -https://doi.org/10.5281/zenodo.4462514 - diff --git a/README.md b/README.md new file mode 100644 index 00000000..52ec020d --- /dev/null +++ b/README.md @@ -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! diff --git a/pytools.py b/analysator/__init__.py similarity index 59% rename from pytools.py rename to analysator/__init__.py index 8244b2b1..b3874933 100644 --- a/pytools.py +++ b/analysator/__init__.py @@ -1,46 +1,18 @@ -# -# This file is part of Analysator. -# Copyright 2013-2016 Finnish Meteorological Institute -# Copyright 2017-2018 University of Helsinki -# -# For details of usage, see the COPYING file and read the "Rules of the Road" -# at http://www.physics.helsinki.fi/vlasiator/ -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# - -import filemanagement -import socket, re, os, tempfile, atexit, shutil + +import socket, re, os, tempfile, atexit, shutil, sys import warnings import logging logging.basicConfig(format='%(levelname)s:%(message)s', level=os.environ.get('ANALYSATOR_LOG_LEVEL', 'INFO').upper()) -warnings.filterwarnings("once", category=DeprecationWarning) -warnings.filterwarnings("once", category=PendingDeprecationWarning) -warnings.filterwarnings("once", category=FutureWarning) # Input current folder's path -filemanagement.sys.path.insert(0, filemanagement.os.path.dirname(filemanagement.os.path.abspath(__file__))) +sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) # Input folder paths -filemanagement.sys.path.insert(0, filemanagement.os.path.dirname(filemanagement.os.path.abspath(__file__)) + "/" + "miscellaneous") -filemanagement.sys.path.insert(0, filemanagement.os.path.dirname(filemanagement.os.path.abspath(__file__)) + "/" + "pyCalculations") -filemanagement.sys.path.insert(0, filemanagement.os.path.dirname(filemanagement.os.path.abspath(__file__)) + "/" + "pyCellDataReduction") -filemanagement.sys.path.insert(0, filemanagement.os.path.dirname(filemanagement.os.path.abspath(__file__)) + "/" + "pyPlots") -filemanagement.sys.path.insert(0, filemanagement.os.path.dirname(filemanagement.os.path.abspath(__file__)) + "/" + "pyVisit") -filemanagement.sys.path.insert(0, filemanagement.os.path.dirname(filemanagement.os.path.abspath(__file__)) + "/" + "pyVlsv") +sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)) + "/" + "miscellaneous") +sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)) + "/" + "pyCalculations") +sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)) + "/" + "pyPlots") +sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)) + "/" + "pyVlsv") if os.getenv('PTMAYAVI2') != None: - filemanagement.sys.path.insert(0, filemanagement.os.path.dirname(filemanagement.os.path.abspath(__file__)) + "/" + "pyMayaVi") + sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)) + "/" + "pyMayaVi") # Make sure matplotlib has a unique temp directory @@ -125,3 +97,21 @@ except ImportError as e: logging.info("Note: Did not import miscellaneous: " + str(e)) + + +# from analysator.pytools import * +# import warnings +# warnings.filterwarnings("once", category=DeprecationWarning) +# warnings.filterwarnings("once", category=PendingDeprecationWarning) +# warnings.filterwarnings("once", category=FutureWarning) + + +# # from pytools import vslvfile + +# from os import path as __path +# root = __path.dirname(__file__) +# with open(__path.join(root,'pytools.py'),'r') as f: +# source = f.read() +# exec(source) +# f.close() +# del f diff --git a/filemanagement.py b/analysator/filemanagement.py similarity index 98% rename from filemanagement.py rename to analysator/filemanagement.py index c3d3cc7c..94d23eec 100644 --- a/filemanagement.py +++ b/analysator/filemanagement.py @@ -25,7 +25,6 @@ ''' -import os, sys def sorted_filenames(name="*.vlsv"): '''Gets the file names in the current directory and sorts them. diff --git a/miscellaneous/filenames.py b/analysator/miscellaneous/filenames.py similarity index 100% rename from miscellaneous/filenames.py rename to analysator/miscellaneous/filenames.py diff --git a/miscellaneous/miscellaneous.py b/analysator/miscellaneous/miscellaneous.py similarity index 97% rename from miscellaneous/miscellaneous.py rename to analysator/miscellaneous/miscellaneous.py index e3cf1208..55801a80 100644 --- a/miscellaneous/miscellaneous.py +++ b/analysator/miscellaneous/miscellaneous.py @@ -28,7 +28,7 @@ .. code-block:: python - import pytools as pt + import analysator as pt pt.miscellaneous. #press tab -> get the functions diff --git a/miscellaneous/rankine.py b/analysator/miscellaneous/rankine.py similarity index 100% rename from miscellaneous/rankine.py rename to analysator/miscellaneous/rankine.py diff --git a/miscellaneous/slams.py b/analysator/miscellaneous/slams.py similarity index 99% rename from miscellaneous/slams.py rename to analysator/miscellaneous/slams.py index 0991a96d..2dfaeab3 100755 --- a/miscellaneous/slams.py +++ b/analysator/miscellaneous/slams.py @@ -22,7 +22,7 @@ # import numpy as np -import pytools as pt +import analysator as pt import os import copy import matplotlib.pyplot as plt diff --git a/miscellaneous/vtkwriter.py b/analysator/miscellaneous/vtkwriter.py similarity index 99% rename from miscellaneous/vtkwriter.py rename to analysator/miscellaneous/vtkwriter.py index 95caf39a..2cccafe4 100644 --- a/miscellaneous/vtkwriter.py +++ b/analysator/miscellaneous/vtkwriter.py @@ -33,7 +33,7 @@ def write_vtk_file( filename, point_data ): .. code-block:: python # Example usage: - import pytools as pt + import analysator as pt filename = "test.vtk" point_data = [[0.,0.,0.], [1.,1.,1.], [2.,2.,2.], [3.,3.,3.], [4.,4.,4.]] pt.miscellaneous.write_vtk_file( filename=filename, point_data=point_data ) diff --git a/pyCalculations/backstream.py b/analysator/pyCalculations/backstream.py similarity index 100% rename from pyCalculations/backstream.py rename to analysator/pyCalculations/backstream.py diff --git a/pyCalculations/calculations.py b/analysator/pyCalculations/calculations.py similarity index 99% rename from pyCalculations/calculations.py rename to analysator/pyCalculations/calculations.py index 76e4c7d7..8cb486db 100644 --- a/pyCalculations/calculations.py +++ b/analysator/pyCalculations/calculations.py @@ -24,7 +24,7 @@ ''' This is a module that includes most, if not all, calculations within the analysator. Please type "." and press tab to see which functions this module includes. Example: -import pytools as pt +import analysator as pt pt.calculations. #press tab diff --git a/pyCalculations/cut3d.py b/analysator/pyCalculations/cut3d.py similarity index 99% rename from pyCalculations/cut3d.py rename to analysator/pyCalculations/cut3d.py index 96ec9fff..ebd1bc3f 100644 --- a/pyCalculations/cut3d.py +++ b/analysator/pyCalculations/cut3d.py @@ -46,7 +46,7 @@ def cut3d( vlsvReader, xmin, xmax, ymin, ymax, zmin, zmax, variable, operator="p .. code-block:: python Example: - import pytools as pt + import analysator as pt f = pt.vlsvfile.VlsvReader('example.vlsv') three_cut = pt.calculations.cut3d( vlsvReader=f, xmin=1e6, xmax=4e6, ymin=1e6, xmax=4e6, zmin=0, zmax=0, variable="rho" ) import numpy as np diff --git a/pyCalculations/cutthrough.py b/analysator/pyCalculations/cutthrough.py similarity index 100% rename from pyCalculations/cutthrough.py rename to analysator/pyCalculations/cutthrough.py diff --git a/pyCalculations/fieldtracer.py b/analysator/pyCalculations/fieldtracer.py similarity index 99% rename from pyCalculations/fieldtracer.py rename to analysator/pyCalculations/fieldtracer.py index 9c7bd0fb..7825423e 100644 --- a/pyCalculations/fieldtracer.py +++ b/analysator/pyCalculations/fieldtracer.py @@ -23,7 +23,7 @@ import numpy as np import scipy as sp -import pytools as pt +import analysator as pt import warnings from scipy import interpolate import logging @@ -351,7 +351,7 @@ def static_field_tracer_3d( vlsvReader, seed_coords, max_iterations, dx, directi If keyword fg == 'fg_b', then centering = 'face' (overriding input) If keyword fg == 'fg_e', then centering = 'edge' (overriding input) - EXAMPLE: vlsvobj = pytools.vlsvfile.VlsvReader(vlsvfile) + EXAMPLE: vlsvobj = analysator.vlsvfile.VlsvReader(vlsvfile) fg_b = vlsvobj.read_variable('fg_b') traces = static_field_tracer_3d( vlsvobj, [[5e7,0,0], [0,0,5e7]], 10, 1e5, direction='+', fg = fg_b ) ''' diff --git a/pyCalculations/find_x_and_o.py b/analysator/pyCalculations/find_x_and_o.py similarity index 99% rename from pyCalculations/find_x_and_o.py rename to analysator/pyCalculations/find_x_and_o.py index cb7e3637..c0787e86 100755 --- a/pyCalculations/find_x_and_o.py +++ b/analysator/pyCalculations/find_x_and_o.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -import pytools as pt +import analysator as pt import numpy as np import matplotlib.pyplot as plt import sys diff --git a/pyCalculations/fit.py b/analysator/pyCalculations/fit.py similarity index 100% rename from pyCalculations/fit.py rename to analysator/pyCalculations/fit.py diff --git a/pyCalculations/fourier.py b/analysator/pyCalculations/fourier.py similarity index 100% rename from pyCalculations/fourier.py rename to analysator/pyCalculations/fourier.py diff --git a/pyCalculations/gyrophaseangle.py b/analysator/pyCalculations/gyrophaseangle.py similarity index 100% rename from pyCalculations/gyrophaseangle.py rename to analysator/pyCalculations/gyrophaseangle.py diff --git a/pyCalculations/ids3d.py b/analysator/pyCalculations/ids3d.py similarity index 100% rename from pyCalculations/ids3d.py rename to analysator/pyCalculations/ids3d.py diff --git a/pyCalculations/interpolator_amr.py b/analysator/pyCalculations/interpolator_amr.py similarity index 100% rename from pyCalculations/interpolator_amr.py rename to analysator/pyCalculations/interpolator_amr.py diff --git a/pyCalculations/intpol_file.py b/analysator/pyCalculations/intpol_file.py similarity index 97% rename from pyCalculations/intpol_file.py rename to analysator/pyCalculations/intpol_file.py index 56d8ffc2..b29ef6e7 100644 --- a/pyCalculations/intpol_file.py +++ b/analysator/pyCalculations/intpol_file.py @@ -21,7 +21,7 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # -import pytools as pt +import analysator as pt import numpy as np import logging @@ -36,7 +36,7 @@ def vlsv_intpol_file(file_vlsv,file_orbit,varlist,file_output): .. code-block:: python # Example: - import pytools as pt + import analysator as pt pt.calculations.vlsv_intpol_file("state00040000.vlsv","orbit.dat",["cellB","n_H+sw_ave"],"output.dat") ''' f=pt.vlsvfile.VlsvReader(file_name=file_vlsv) diff --git a/pyCalculations/intpol_points.py b/analysator/pyCalculations/intpol_points.py similarity index 99% rename from pyCalculations/intpol_points.py rename to analysator/pyCalculations/intpol_points.py index 4a6fdc19..56f68c6c 100644 --- a/pyCalculations/intpol_points.py +++ b/analysator/pyCalculations/intpol_points.py @@ -38,7 +38,7 @@ def vlsv_intpol_points(vlsvReader,points,varlist,operator="pass",interpolation_o .. code-block:: python # Example: - import pytools as pt + import analysator as pt import numpy as np f=pt.vlsvfile.VlsvReader(file_name="state00040000.vlsv") mesh_limits = f.get_spatial_mesh_extent() diff --git a/pyCalculations/lineout.py b/analysator/pyCalculations/lineout.py similarity index 98% rename from pyCalculations/lineout.py rename to analysator/pyCalculations/lineout.py index b2d1ef03..f6ea38de 100644 --- a/pyCalculations/lineout.py +++ b/analysator/pyCalculations/lineout.py @@ -44,7 +44,7 @@ def lineout( vlsvReader, point1, point2, variable, operator="pass",interpolation .. code-block:: python # Example: - import pytools as pt # import analysator + import analysator as pt # import analysator vlsvReader = pt.vlsvfile.VlsvReader(\"testfile.vlsv\") # Open a vlsv file lineout_rho = pt.calculations.lineout( vlsvReader=vlsvReader, point1=[1.0e5, 1.0e6, 0], point2=[2.0e5, 2.0e6, 0], variable="rho", interpolation_order=1, points=100 ) diff --git a/pyCalculations/non_maxwellianity.py b/analysator/pyCalculations/non_maxwellianity.py similarity index 99% rename from pyCalculations/non_maxwellianity.py rename to analysator/pyCalculations/non_maxwellianity.py index 0802bb74..43f67bb4 100644 --- a/pyCalculations/non_maxwellianity.py +++ b/analysator/pyCalculations/non_maxwellianity.py @@ -1,6 +1,6 @@ import numpy as np from scipy.constants import k, m_e, m_p -import pytools as pt +import analysator as pt import warnings import logging diff --git a/pyCalculations/null_lines.py b/analysator/pyCalculations/null_lines.py similarity index 100% rename from pyCalculations/null_lines.py rename to analysator/pyCalculations/null_lines.py diff --git a/pyCalculations/output.py b/analysator/pyCalculations/output.py similarity index 100% rename from pyCalculations/output.py rename to analysator/pyCalculations/output.py diff --git a/pyCalculations/pitchangle.py b/analysator/pyCalculations/pitchangle.py similarity index 99% rename from pyCalculations/pitchangle.py rename to analysator/pyCalculations/pitchangle.py index d8296c98..19286777 100644 --- a/pyCalculations/pitchangle.py +++ b/analysator/pyCalculations/pitchangle.py @@ -21,7 +21,7 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # -import pytools as pt +import analysator as pt import numpy as np import sys, os from output import output_1d diff --git a/pyCalculations/rotation.py b/analysator/pyCalculations/rotation.py similarity index 100% rename from pyCalculations/rotation.py rename to analysator/pyCalculations/rotation.py diff --git a/pyCalculations/spectra.py b/analysator/pyCalculations/spectra.py similarity index 97% rename from pyCalculations/spectra.py rename to analysator/pyCalculations/spectra.py index d73215a0..0a6c0c7f 100644 --- a/pyCalculations/spectra.py +++ b/analysator/pyCalculations/spectra.py @@ -21,7 +21,7 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # import numpy as np -import pytools +import analysator import logging # Function to reduce the velocity space in a spatial cell to an omnidirectional energy spectrum # Weighted by particle flux/none @@ -40,7 +40,7 @@ def get_spectrum_energy(vlsvReader, EkinBinEdges = np.logspace(np.log10(EMin),np.log10(EMax),nBins+1, endpoint=True) dE = EkinBinEdges[1:] - EkinBinEdges[:-1] - vlsvReader = pytools.vlsvfile.VlsvReader(vlsvReader) + vlsvReader = analysator.vlsvfile.VlsvReader(vlsvReader) # check if velocity space exists in this cell if not vlsvReader.check_variable("moments"): # restart files have VDFs everywhere if vlsvReader.check_variable("fSaved"): @@ -128,7 +128,7 @@ def get_spectrum_energy(vlsvReader, if (bindifferential): # finish differential flux per d(eV) nhist = np.divide(nhist,dE) - vari = pytools.calculations.VariableInfo(nhist, + vari = analysator.calculations.VariableInfo(nhist, name="Omnidirectional differential energy spectrum "+population+' ('+weight+')', units=units, latex=latex, @@ -150,7 +150,7 @@ def get_spectrum_alongaxis_vel(vlsvReader, bindifferential=False, # weigh by d(velocity) restart=True): - vlsvReader = pytools.vlsvfile.VlsvReader(vlsvReader) + vlsvReader = analysator.vlsvfile.VlsvReader(vlsvReader) if vectorVar is not None and vector is None: if vlsvReader.check_variable(vectorVar): @@ -238,7 +238,7 @@ def get_spectrum_alongaxis_vel(vlsvReader, elif (bindifferential): # differential flux per d[m/s] nhist = np.divide(nhist,dv) - vari = pytools.calculations.VariableInfo(nhist, + vari = analysator.calculations.VariableInfo(nhist, name="Parallel distribution of "+population+' ('+weight+')', units=units, latex=latex, diff --git a/pyCalculations/themis_observation.py b/analysator/pyCalculations/themis_observation.py similarity index 100% rename from pyCalculations/themis_observation.py rename to analysator/pyCalculations/themis_observation.py diff --git a/pyCalculations/timeevolution.py b/analysator/pyCalculations/timeevolution.py similarity index 98% rename from pyCalculations/timeevolution.py rename to analysator/pyCalculations/timeevolution.py index 1fb9d905..a94fc801 100644 --- a/pyCalculations/timeevolution.py +++ b/analysator/pyCalculations/timeevolution.py @@ -38,7 +38,7 @@ def cell_time_evolution( vlsvReader_list, variables, cellids, units="" ): .. code-block:: python - import pytools as pt; import matplotlib.pyplot as pl + import analysator as pt; import matplotlib.pyplot as pl # Example of usage: time_data = pt.calculations.cell_time_evolution( vlsvReader_list=[VlsvReader("bulk.000.vlsv"), VlsvReader("bulk.001.vlsv"), VlsvReader("bulk.002.vlsv")], variables=["rho", "Pressure", "B"], cellids=[2,4], units=["N", "Pascal", "T"] ) diff --git a/pyCalculations/variable.py b/analysator/pyCalculations/variable.py similarity index 100% rename from pyCalculations/variable.py rename to analysator/pyCalculations/variable.py diff --git a/pyPlots/SCM8/+LICENCE.pdf b/analysator/pyPlots/SCM8/+LICENCE.pdf similarity index 100% rename from pyPlots/SCM8/+LICENCE.pdf rename to analysator/pyPlots/SCM8/+LICENCE.pdf diff --git a/pyPlots/SCM8/+README_ScientificColourMaps.pdf b/analysator/pyPlots/SCM8/+README_ScientificColourMaps.pdf similarity index 100% rename from pyPlots/SCM8/+README_ScientificColourMaps.pdf rename to analysator/pyPlots/SCM8/+README_ScientificColourMaps.pdf diff --git a/pyPlots/SCM8/acton.txt b/analysator/pyPlots/SCM8/acton.txt similarity index 100% rename from pyPlots/SCM8/acton.txt rename to analysator/pyPlots/SCM8/acton.txt diff --git a/pyPlots/SCM8/actonS.txt b/analysator/pyPlots/SCM8/actonS.txt similarity index 100% rename from pyPlots/SCM8/actonS.txt rename to analysator/pyPlots/SCM8/actonS.txt diff --git a/pyPlots/SCM8/bam.txt b/analysator/pyPlots/SCM8/bam.txt similarity index 100% rename from pyPlots/SCM8/bam.txt rename to analysator/pyPlots/SCM8/bam.txt diff --git a/pyPlots/SCM8/bamO.txt b/analysator/pyPlots/SCM8/bamO.txt similarity index 100% rename from pyPlots/SCM8/bamO.txt rename to analysator/pyPlots/SCM8/bamO.txt diff --git a/pyPlots/SCM8/bamako.txt b/analysator/pyPlots/SCM8/bamako.txt similarity index 100% rename from pyPlots/SCM8/bamako.txt rename to analysator/pyPlots/SCM8/bamako.txt diff --git a/pyPlots/SCM8/bamakoS.txt b/analysator/pyPlots/SCM8/bamakoS.txt similarity index 100% rename from pyPlots/SCM8/bamakoS.txt rename to analysator/pyPlots/SCM8/bamakoS.txt diff --git a/pyPlots/SCM8/batlow.txt b/analysator/pyPlots/SCM8/batlow.txt similarity index 100% rename from pyPlots/SCM8/batlow.txt rename to analysator/pyPlots/SCM8/batlow.txt diff --git a/pyPlots/SCM8/batlowK.txt b/analysator/pyPlots/SCM8/batlowK.txt similarity index 100% rename from pyPlots/SCM8/batlowK.txt rename to analysator/pyPlots/SCM8/batlowK.txt diff --git a/pyPlots/SCM8/batlowKS.txt b/analysator/pyPlots/SCM8/batlowKS.txt similarity index 100% rename from pyPlots/SCM8/batlowKS.txt rename to analysator/pyPlots/SCM8/batlowKS.txt diff --git a/pyPlots/SCM8/batlowS.txt b/analysator/pyPlots/SCM8/batlowS.txt similarity index 100% rename from pyPlots/SCM8/batlowS.txt rename to analysator/pyPlots/SCM8/batlowS.txt diff --git a/pyPlots/SCM8/batlowW.txt b/analysator/pyPlots/SCM8/batlowW.txt similarity index 100% rename from pyPlots/SCM8/batlowW.txt rename to analysator/pyPlots/SCM8/batlowW.txt diff --git a/pyPlots/SCM8/batlowWS.txt b/analysator/pyPlots/SCM8/batlowWS.txt similarity index 100% rename from pyPlots/SCM8/batlowWS.txt rename to analysator/pyPlots/SCM8/batlowWS.txt diff --git a/pyPlots/SCM8/berlin.txt b/analysator/pyPlots/SCM8/berlin.txt similarity index 100% rename from pyPlots/SCM8/berlin.txt rename to analysator/pyPlots/SCM8/berlin.txt diff --git a/pyPlots/SCM8/bilbao.txt b/analysator/pyPlots/SCM8/bilbao.txt similarity index 100% rename from pyPlots/SCM8/bilbao.txt rename to analysator/pyPlots/SCM8/bilbao.txt diff --git a/pyPlots/SCM8/bilbaoS.txt b/analysator/pyPlots/SCM8/bilbaoS.txt similarity index 100% rename from pyPlots/SCM8/bilbaoS.txt rename to analysator/pyPlots/SCM8/bilbaoS.txt diff --git a/pyPlots/SCM8/broc.txt b/analysator/pyPlots/SCM8/broc.txt similarity index 100% rename from pyPlots/SCM8/broc.txt rename to analysator/pyPlots/SCM8/broc.txt diff --git a/pyPlots/SCM8/brocO.txt b/analysator/pyPlots/SCM8/brocO.txt similarity index 100% rename from pyPlots/SCM8/brocO.txt rename to analysator/pyPlots/SCM8/brocO.txt diff --git a/pyPlots/SCM8/buda.txt b/analysator/pyPlots/SCM8/buda.txt similarity index 100% rename from pyPlots/SCM8/buda.txt rename to analysator/pyPlots/SCM8/buda.txt diff --git a/pyPlots/SCM8/budaS.txt b/analysator/pyPlots/SCM8/budaS.txt similarity index 100% rename from pyPlots/SCM8/budaS.txt rename to analysator/pyPlots/SCM8/budaS.txt diff --git a/pyPlots/SCM8/bukavu.txt b/analysator/pyPlots/SCM8/bukavu.txt similarity index 100% rename from pyPlots/SCM8/bukavu.txt rename to analysator/pyPlots/SCM8/bukavu.txt diff --git a/pyPlots/SCM8/cork.txt b/analysator/pyPlots/SCM8/cork.txt similarity index 100% rename from pyPlots/SCM8/cork.txt rename to analysator/pyPlots/SCM8/cork.txt diff --git a/pyPlots/SCM8/corkO.txt b/analysator/pyPlots/SCM8/corkO.txt similarity index 100% rename from pyPlots/SCM8/corkO.txt rename to analysator/pyPlots/SCM8/corkO.txt diff --git a/pyPlots/SCM8/davos.txt b/analysator/pyPlots/SCM8/davos.txt similarity index 100% rename from pyPlots/SCM8/davos.txt rename to analysator/pyPlots/SCM8/davos.txt diff --git a/pyPlots/SCM8/davosS.txt b/analysator/pyPlots/SCM8/davosS.txt similarity index 100% rename from pyPlots/SCM8/davosS.txt rename to analysator/pyPlots/SCM8/davosS.txt diff --git a/pyPlots/SCM8/devon.txt b/analysator/pyPlots/SCM8/devon.txt similarity index 100% rename from pyPlots/SCM8/devon.txt rename to analysator/pyPlots/SCM8/devon.txt diff --git a/pyPlots/SCM8/devonS.txt b/analysator/pyPlots/SCM8/devonS.txt similarity index 100% rename from pyPlots/SCM8/devonS.txt rename to analysator/pyPlots/SCM8/devonS.txt diff --git a/pyPlots/SCM8/fes.txt b/analysator/pyPlots/SCM8/fes.txt similarity index 100% rename from pyPlots/SCM8/fes.txt rename to analysator/pyPlots/SCM8/fes.txt diff --git a/pyPlots/SCM8/glasgow.txt b/analysator/pyPlots/SCM8/glasgow.txt similarity index 100% rename from pyPlots/SCM8/glasgow.txt rename to analysator/pyPlots/SCM8/glasgow.txt diff --git a/pyPlots/SCM8/glasgowS.txt b/analysator/pyPlots/SCM8/glasgowS.txt similarity index 100% rename from pyPlots/SCM8/glasgowS.txt rename to analysator/pyPlots/SCM8/glasgowS.txt diff --git a/pyPlots/SCM8/grayC.txt b/analysator/pyPlots/SCM8/grayC.txt similarity index 100% rename from pyPlots/SCM8/grayC.txt rename to analysator/pyPlots/SCM8/grayC.txt diff --git a/pyPlots/SCM8/grayCS.txt b/analysator/pyPlots/SCM8/grayCS.txt similarity index 100% rename from pyPlots/SCM8/grayCS.txt rename to analysator/pyPlots/SCM8/grayCS.txt diff --git a/pyPlots/SCM8/hawaii.txt b/analysator/pyPlots/SCM8/hawaii.txt similarity index 100% rename from pyPlots/SCM8/hawaii.txt rename to analysator/pyPlots/SCM8/hawaii.txt diff --git a/pyPlots/SCM8/hawaiiS.txt b/analysator/pyPlots/SCM8/hawaiiS.txt similarity index 100% rename from pyPlots/SCM8/hawaiiS.txt rename to analysator/pyPlots/SCM8/hawaiiS.txt diff --git a/pyPlots/SCM8/imola.txt b/analysator/pyPlots/SCM8/imola.txt similarity index 100% rename from pyPlots/SCM8/imola.txt rename to analysator/pyPlots/SCM8/imola.txt diff --git a/pyPlots/SCM8/imolaS.txt b/analysator/pyPlots/SCM8/imolaS.txt similarity index 100% rename from pyPlots/SCM8/imolaS.txt rename to analysator/pyPlots/SCM8/imolaS.txt diff --git a/pyPlots/SCM8/lajolla.txt b/analysator/pyPlots/SCM8/lajolla.txt similarity index 100% rename from pyPlots/SCM8/lajolla.txt rename to analysator/pyPlots/SCM8/lajolla.txt diff --git a/pyPlots/SCM8/lajollaS.txt b/analysator/pyPlots/SCM8/lajollaS.txt similarity index 100% rename from pyPlots/SCM8/lajollaS.txt rename to analysator/pyPlots/SCM8/lajollaS.txt diff --git a/pyPlots/SCM8/lapaz.txt b/analysator/pyPlots/SCM8/lapaz.txt similarity index 100% rename from pyPlots/SCM8/lapaz.txt rename to analysator/pyPlots/SCM8/lapaz.txt diff --git a/pyPlots/SCM8/lapazS.txt b/analysator/pyPlots/SCM8/lapazS.txt similarity index 100% rename from pyPlots/SCM8/lapazS.txt rename to analysator/pyPlots/SCM8/lapazS.txt diff --git a/pyPlots/SCM8/lipari.txt b/analysator/pyPlots/SCM8/lipari.txt similarity index 100% rename from pyPlots/SCM8/lipari.txt rename to analysator/pyPlots/SCM8/lipari.txt diff --git a/pyPlots/SCM8/lipariS.txt b/analysator/pyPlots/SCM8/lipariS.txt similarity index 100% rename from pyPlots/SCM8/lipariS.txt rename to analysator/pyPlots/SCM8/lipariS.txt diff --git a/pyPlots/SCM8/lisbon.txt b/analysator/pyPlots/SCM8/lisbon.txt similarity index 100% rename from pyPlots/SCM8/lisbon.txt rename to analysator/pyPlots/SCM8/lisbon.txt diff --git a/pyPlots/SCM8/managua.txt b/analysator/pyPlots/SCM8/managua.txt similarity index 100% rename from pyPlots/SCM8/managua.txt rename to analysator/pyPlots/SCM8/managua.txt diff --git a/pyPlots/SCM8/navia.txt b/analysator/pyPlots/SCM8/navia.txt similarity index 100% rename from pyPlots/SCM8/navia.txt rename to analysator/pyPlots/SCM8/navia.txt diff --git a/pyPlots/SCM8/naviaS.txt b/analysator/pyPlots/SCM8/naviaS.txt similarity index 100% rename from pyPlots/SCM8/naviaS.txt rename to analysator/pyPlots/SCM8/naviaS.txt diff --git a/pyPlots/SCM8/naviaW.txt b/analysator/pyPlots/SCM8/naviaW.txt similarity index 100% rename from pyPlots/SCM8/naviaW.txt rename to analysator/pyPlots/SCM8/naviaW.txt diff --git a/pyPlots/SCM8/naviaWS.txt b/analysator/pyPlots/SCM8/naviaWS.txt similarity index 100% rename from pyPlots/SCM8/naviaWS.txt rename to analysator/pyPlots/SCM8/naviaWS.txt diff --git a/pyPlots/SCM8/nuuk.txt b/analysator/pyPlots/SCM8/nuuk.txt similarity index 100% rename from pyPlots/SCM8/nuuk.txt rename to analysator/pyPlots/SCM8/nuuk.txt diff --git a/pyPlots/SCM8/nuukS.txt b/analysator/pyPlots/SCM8/nuukS.txt similarity index 100% rename from pyPlots/SCM8/nuukS.txt rename to analysator/pyPlots/SCM8/nuukS.txt diff --git a/pyPlots/SCM8/oleron.txt b/analysator/pyPlots/SCM8/oleron.txt similarity index 100% rename from pyPlots/SCM8/oleron.txt rename to analysator/pyPlots/SCM8/oleron.txt diff --git a/pyPlots/SCM8/oslo.txt b/analysator/pyPlots/SCM8/oslo.txt similarity index 100% rename from pyPlots/SCM8/oslo.txt rename to analysator/pyPlots/SCM8/oslo.txt diff --git a/pyPlots/SCM8/osloS.txt b/analysator/pyPlots/SCM8/osloS.txt similarity index 100% rename from pyPlots/SCM8/osloS.txt rename to analysator/pyPlots/SCM8/osloS.txt diff --git a/pyPlots/SCM8/roma.txt b/analysator/pyPlots/SCM8/roma.txt similarity index 100% rename from pyPlots/SCM8/roma.txt rename to analysator/pyPlots/SCM8/roma.txt diff --git a/pyPlots/SCM8/romaO.txt b/analysator/pyPlots/SCM8/romaO.txt similarity index 100% rename from pyPlots/SCM8/romaO.txt rename to analysator/pyPlots/SCM8/romaO.txt diff --git a/pyPlots/SCM8/source.md b/analysator/pyPlots/SCM8/source.md similarity index 100% rename from pyPlots/SCM8/source.md rename to analysator/pyPlots/SCM8/source.md diff --git a/pyPlots/SCM8/tofino.txt b/analysator/pyPlots/SCM8/tofino.txt similarity index 100% rename from pyPlots/SCM8/tofino.txt rename to analysator/pyPlots/SCM8/tofino.txt diff --git a/pyPlots/SCM8/tokyo.txt b/analysator/pyPlots/SCM8/tokyo.txt similarity index 100% rename from pyPlots/SCM8/tokyo.txt rename to analysator/pyPlots/SCM8/tokyo.txt diff --git a/pyPlots/SCM8/tokyoS.txt b/analysator/pyPlots/SCM8/tokyoS.txt similarity index 100% rename from pyPlots/SCM8/tokyoS.txt rename to analysator/pyPlots/SCM8/tokyoS.txt diff --git a/pyPlots/SCM8/turku.txt b/analysator/pyPlots/SCM8/turku.txt similarity index 100% rename from pyPlots/SCM8/turku.txt rename to analysator/pyPlots/SCM8/turku.txt diff --git a/pyPlots/SCM8/turkuS.txt b/analysator/pyPlots/SCM8/turkuS.txt similarity index 100% rename from pyPlots/SCM8/turkuS.txt rename to analysator/pyPlots/SCM8/turkuS.txt diff --git a/pyPlots/SCM8/vanimo.txt b/analysator/pyPlots/SCM8/vanimo.txt similarity index 100% rename from pyPlots/SCM8/vanimo.txt rename to analysator/pyPlots/SCM8/vanimo.txt diff --git a/pyPlots/SCM8/vik.txt b/analysator/pyPlots/SCM8/vik.txt similarity index 100% rename from pyPlots/SCM8/vik.txt rename to analysator/pyPlots/SCM8/vik.txt diff --git a/pyPlots/SCM8/vikO.txt b/analysator/pyPlots/SCM8/vikO.txt similarity index 100% rename from pyPlots/SCM8/vikO.txt rename to analysator/pyPlots/SCM8/vikO.txt diff --git a/pyPlots/colormaps.py b/analysator/pyPlots/colormaps.py similarity index 100% rename from pyPlots/colormaps.py rename to analysator/pyPlots/colormaps.py diff --git a/pyPlots/logo_black.png b/analysator/pyPlots/logo_black.png similarity index 100% rename from pyPlots/logo_black.png rename to analysator/pyPlots/logo_black.png diff --git a/pyPlots/logo_color.png b/analysator/pyPlots/logo_color.png similarity index 100% rename from pyPlots/logo_color.png rename to analysator/pyPlots/logo_color.png diff --git a/pyPlots/plot.py b/analysator/pyPlots/plot.py similarity index 99% rename from pyPlots/plot.py rename to analysator/pyPlots/plot.py index e56cc45b..7d77ecb4 100644 --- a/pyPlots/plot.py +++ b/analysator/pyPlots/plot.py @@ -26,7 +26,7 @@ .. code-block:: python # Example: - import pytools as pt + import analysator as pt pt.pt. #press [tab] -> get the functions diff --git a/pyPlots/plot_colormap.py b/analysator/pyPlots/plot_colormap.py similarity index 99% rename from pyPlots/plot_colormap.py rename to analysator/pyPlots/plot_colormap.py index 2717c046..4179f7b8 100644 --- a/pyPlots/plot_colormap.py +++ b/analysator/pyPlots/plot_colormap.py @@ -22,7 +22,7 @@ # import matplotlib -import pytools as pt +import analysator as pt import logging import numpy as np import matplotlib.pyplot as plt @@ -87,7 +87,7 @@ def plot_colormap(filename=None, :kword nooverwrite: Set to only perform actions if the target output file does not yet exist :kword var: variable to plot, e.g. rho, RhoBackstream, beta, Temperature, MA, Mms, va, vms, - E, B, v, V or others. Accepts any variable known by analysator/pytools. + E, B, v, V or others. Accepts any variable known by analysator. Per-population variables are simply given as "proton/rho" etc :kword operator: Operator to apply to variable: None, x, y, or z. Vector variables return either the queried component, or otherwise the magnitude. @@ -846,7 +846,7 @@ def exprMA_cust(exprmaps, requestvariables=False): if Version(matplotlib.__version__) < Version("3.3.0"): norm = SymLogNorm(linthresh=linthresh, linscale = 1.0, vmin=vminuse, vmax=vmaxuse, clip=True) logging.info("WARNING: colormap SymLogNorm uses base-e but ticks are calculated with base-10.") - #TODO: copy over matplotlib 3.3.0 implementation of SymLogNorm into pytools/analysator + #TODO: copy over matplotlib 3.3.0 implementation of SymLogNorm into analysator else: norm = SymLogNorm(base=10, linthresh=linthresh, linscale = 1.0, vmin=vminuse, vmax=vmaxuse, clip=True) maxlog=int(np.ceil(np.log10(vmaxuse))) diff --git a/pyPlots/plot_colormap3dslice.py b/analysator/pyPlots/plot_colormap3dslice.py similarity index 99% rename from pyPlots/plot_colormap3dslice.py rename to analysator/pyPlots/plot_colormap3dslice.py index 4cafd298..e3c62e9e 100644 --- a/pyPlots/plot_colormap3dslice.py +++ b/analysator/pyPlots/plot_colormap3dslice.py @@ -23,7 +23,7 @@ import logging import matplotlib -import pytools as pt +import analysator as pt import numpy as np import matplotlib.pyplot as plt import os, sys @@ -90,7 +90,7 @@ def plot_colormap3dslice(filename=None, :kword nooverwrite: Set to only perform actions if the target output file does not yet exist :kword var: variable to plot, e.g. rho, RhoBackstream, beta, Temperature, MA, Mms, va, vms, - E, B, v, V or others. Accepts any variable known by analysator/pytools. + E, B, v, V or others. Accepts any variable known by analysator. Per-population variables are simply given as "proton/rho" etc :kword operator: Operator to apply to variable: None, x, y, or z. Vector variables return either the queried component, or otherwise the magnitude. @@ -1076,7 +1076,7 @@ def exprMA_cust(exprmaps, requestvariables=False): if Version(matplotlib.__version__) < Version("3.2.0"): norm = SymLogNorm(linthresh=linthresh, linscale = 1.0, vmin=vminuse, vmax=vmaxuse, clip=True) logging.info("WARNING: colormap SymLogNorm uses base-e but ticks are calculated with base-10.") - #TODO: copy over matplotlib 3.3.0 implementation of SymLogNorm into pytools/analysator + #TODO: copy over matplotlib 3.3.0 implementation of SymLogNorm into analysator else: norm = SymLogNorm(base=10, linthresh=linthresh, linscale = 1.0, vmin=vminuse, vmax=vmaxuse, clip=True) maxlog=int(np.ceil(np.log10(vmaxuse))) diff --git a/pyPlots/plot_helpers.py b/analysator/pyPlots/plot_helpers.py similarity index 99% rename from pyPlots/plot_helpers.py rename to analysator/pyPlots/plot_helpers.py index 9def73cc..73d84e88 100644 --- a/pyPlots/plot_helpers.py +++ b/analysator/pyPlots/plot_helpers.py @@ -22,7 +22,7 @@ # import logging -import pytools as pt +import analysator as pt import numpy as np import sys from rotation import rotateTensorToVector diff --git a/pyPlots/plot_ionosphere.py b/analysator/pyPlots/plot_ionosphere.py similarity index 99% rename from pyPlots/plot_ionosphere.py rename to analysator/pyPlots/plot_ionosphere.py index b60593a9..ef342d62 100644 --- a/pyPlots/plot_ionosphere.py +++ b/analysator/pyPlots/plot_ionosphere.py @@ -1,6 +1,6 @@ import matplotlib import logging -import pytools as pt +import analysator as pt import numpy as np import matplotlib.pyplot as plt import glob @@ -51,7 +51,7 @@ def plot_ionosphere(filename=None, :kword outputfile: Singular output file name :kword nooverwrite: Set to only perform actions if the target output file does not yet exist :kword var: variable to plot, e.g. rho, RhoBackstream, beta, Temperature, MA, Mms, va, vms, - E, B, v, V or others. Accepts any variable known by analysator/pytools. + E, B, v, V or others. Accepts any variable known by analysator. Per-population variables are simply given as "proton/rho" etc :kword operator: Operator to apply to variable: None, x, y, or z. Vector variables return either the queried component, or otherwise the magnitude. @@ -374,7 +374,7 @@ def plot_ionosphere(filename=None, if Version(matplotlib.__version__) < Version("3.3.0"): norm = SymLogNorm(linthresh=linthresh, linscale = 1.0, vmin=vminuse, vmax=vmaxuse, clip=True) logging.info("WARNING: colormap SymLogNorm uses base-e but ticks are calculated with base-10.") - #TODO: copy over matplotlib 3.3.0 implementation of SymLogNorm into pytools/analysator + #TODO: copy over matplotlib 3.3.0 implementation of SymLogNorm into analysator else: norm = SymLogNorm(base=10, linthresh=linthresh, linscale = 1.0, vmin=vminuse, vmax=vmaxuse, clip=True) maxlog=int(np.ceil(np.log10(vmaxuse))) diff --git a/pyPlots/plot_isosurface.py b/analysator/pyPlots/plot_isosurface.py similarity index 99% rename from pyPlots/plot_isosurface.py rename to analysator/pyPlots/plot_isosurface.py index eaea3e32..30bbf5e3 100644 --- a/pyPlots/plot_isosurface.py +++ b/analysator/pyPlots/plot_isosurface.py @@ -23,7 +23,7 @@ import logging import matplotlib -import pytools as pt +import analysator as pt import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D @@ -556,7 +556,7 @@ def plot_isosurface(filename=None, if Version(matplotlib.__version__) < Version("3.2.0"): norm = SymLogNorm(linthresh=linthresh, linscale = 1.0, vmin=vminuse, vmax=vmaxuse, clip=True) logging.info("WARNING: colormap SymLogNorm uses base-e but ticks are calculated with base-10.") - #TODO: copy over matplotlib 3.3.0 implementation of SymLogNorm into pytools/analysator + #TODO: copy over matplotlib 3.3.0 implementation of SymLogNorm into analysator else: norm = SymLogNorm(base=10, linthresh=linthresh, linscale = 1.0, vmin=vminuse, vmax=vmaxuse, clip=True) maxlog=int(np.ceil(np.log10(vmaxuse))) @@ -837,7 +837,7 @@ def plot_neutral_sheet(filename=None, :kword nooverwrite: Set to only perform actions if the target output file does not yet exist :kword var: variable to plot, e.g. rho, RhoBackstream, beta, Temperature, MA, Mms, va, vms, - E, B, v, V or others. Accepts any variable known by analysator/pytools. + E, B, v, V or others. Accepts any variable known by analysator. Per-population variables are simply given as "proton/rho" etc :kword operator: Operator to apply to variable: None, x, y, or z. Vector variables return either the queried component, or otherwise the magnitude. @@ -1617,7 +1617,7 @@ def exprMA_cust(exprmaps, requestvariables=False): if Version(matplotlib.__version__) < Version("3.2.0"): norm = SymLogNorm(linthresh=linthresh, linscale = 1.0, vmin=vminuse, vmax=vmaxuse, clip=True) logging.info("WARNING: colormap SymLogNorm uses base-e but ticks are calculated with base-10.") - #TODO: copy over matplotlib 3.3.0 implementation of SymLogNorm into pytools/analysator + #TODO: copy over matplotlib 3.3.0 implementation of SymLogNorm into analysator else: norm = SymLogNorm(base=10, linthresh=linthresh, linscale = 1.0, vmin=vminuse, vmax=vmaxuse, clip=True) maxlog=int(np.ceil(np.log10(vmaxuse))) diff --git a/pyPlots/plot_threeslice.py b/analysator/pyPlots/plot_threeslice.py similarity index 99% rename from pyPlots/plot_threeslice.py rename to analysator/pyPlots/plot_threeslice.py index 6011da13..fc458486 100644 --- a/pyPlots/plot_threeslice.py +++ b/analysator/pyPlots/plot_threeslice.py @@ -1,6 +1,6 @@ import matplotlib import logging -import pytools as pt +import analysator as pt import numpy as np import matplotlib.pyplot as plt import os, sys @@ -609,7 +609,7 @@ def plot_threeslice(filename=None, :kword nooverwrite: Set to only perform actions if the target output file does not yet exist :kword var: variable to plot, e.g. rho, RhoBackstream, beta, Temperature, MA, Mms, va, vms, - E, B, v, V or others. Accepts any variable known by analysator/pytools. + E, B, v, V or others. Accepts any variable known by analysator. Per-population variables are simply given as "proton/rho" etc :kword operator: Operator to apply to variable: None, x, y, or z. Vector variables return either the queried component, or otherwise the magnitude. @@ -1256,7 +1256,7 @@ def plot_threeslice(filename=None, if Version(matplotlib.__version__) < Version("3.2.0"): norm = SymLogNorm(linthresh=linthresh, linscale = 1.0, vmin=vminuse, vmax=vmaxuse, clip=True) logging.info("WARNING: colormap SymLogNorm uses base-e but ticks are calculated with base-10.") - #TODO: copy over matplotlib 3.3.0 implementation of SymLogNorm into pytools/analysator + #TODO: copy over matplotlib 3.3.0 implementation of SymLogNorm into analysator else: norm = SymLogNorm(base=10, linthresh=linthresh, linscale = 1.0, vmin=vminuse, vmax=vmaxuse, clip=True) maxlog=int(np.ceil(np.log10(vmaxuse))) diff --git a/pyPlots/plot_variables.py b/analysator/pyPlots/plot_variables.py similarity index 100% rename from pyPlots/plot_variables.py rename to analysator/pyPlots/plot_variables.py diff --git a/pyPlots/plot_vdf.py b/analysator/pyPlots/plot_vdf.py similarity index 99% rename from pyPlots/plot_vdf.py rename to analysator/pyPlots/plot_vdf.py index 82d6079c..fba0432a 100644 --- a/pyPlots/plot_vdf.py +++ b/analysator/pyPlots/plot_vdf.py @@ -24,7 +24,7 @@ import logging import matplotlib import warnings -import pytools as pt +import analysator as pt import numpy as np import matplotlib.pyplot as plt import scipy diff --git a/pyPlots/plot_vdf_profiles.py b/analysator/pyPlots/plot_vdf_profiles.py similarity index 99% rename from pyPlots/plot_vdf_profiles.py rename to analysator/pyPlots/plot_vdf_profiles.py index 0c675e55..08c979db 100644 --- a/pyPlots/plot_vdf_profiles.py +++ b/analysator/pyPlots/plot_vdf_profiles.py @@ -23,7 +23,7 @@ import logging import matplotlib -import pytools as pt +import analysator as pt import numpy as np import matplotlib.pyplot as plt import scipy diff --git a/pyPlots/plot_vdfdiff.py b/analysator/pyPlots/plot_vdfdiff.py similarity index 99% rename from pyPlots/plot_vdfdiff.py rename to analysator/pyPlots/plot_vdfdiff.py index bd1ba058..b6ee11c5 100644 --- a/pyPlots/plot_vdfdiff.py +++ b/analysator/pyPlots/plot_vdfdiff.py @@ -24,7 +24,7 @@ import logging import matplotlib import warnings -import pytools as pt +import analysator as pt import numpy as np import matplotlib.pyplot as plt import scipy diff --git a/pyVlsv/reducer.py b/analysator/pyVlsv/reducer.py similarity index 100% rename from pyVlsv/reducer.py rename to analysator/pyVlsv/reducer.py diff --git a/pyVlsv/reduction.py b/analysator/pyVlsv/reduction.py similarity index 100% rename from pyVlsv/reduction.py rename to analysator/pyVlsv/reduction.py diff --git a/pyVlsv/reduction_sidecar.py b/analysator/pyVlsv/reduction_sidecar.py similarity index 100% rename from pyVlsv/reduction_sidecar.py rename to analysator/pyVlsv/reduction_sidecar.py diff --git a/pyVlsv/vlasiatorreader.py b/analysator/pyVlsv/vlasiatorreader.py similarity index 100% rename from pyVlsv/vlasiatorreader.py rename to analysator/pyVlsv/vlasiatorreader.py diff --git a/pyVlsv/vlsvfile.py b/analysator/pyVlsv/vlsvfile.py similarity index 98% rename from pyVlsv/vlsvfile.py rename to analysator/pyVlsv/vlsvfile.py index a78c6a1f..3f8a1f74 100644 --- a/pyVlsv/vlsvfile.py +++ b/analysator/pyVlsv/vlsvfile.py @@ -27,7 +27,7 @@ .. code-block:: python # Example: - import pytools as pt + import analysator as pt pt.vlsvfile. #press [tab] -> get the functions diff --git a/pyVlsv/vlsvparticles.py b/analysator/pyVlsv/vlsvparticles.py similarity index 100% rename from pyVlsv/vlsvparticles.py rename to analysator/pyVlsv/vlsvparticles.py diff --git a/pyVlsv/vlsvreader.py b/analysator/pyVlsv/vlsvreader.py similarity index 100% rename from pyVlsv/vlsvreader.py rename to analysator/pyVlsv/vlsvreader.py diff --git a/pyVlsv/vlsvvariables.py b/analysator/pyVlsv/vlsvvariables.py similarity index 100% rename from pyVlsv/vlsvvariables.py rename to analysator/pyVlsv/vlsvvariables.py diff --git a/pyVlsv/vlsvvtkinterface.py b/analysator/pyVlsv/vlsvvtkinterface.py similarity index 99% rename from pyVlsv/vlsvvtkinterface.py rename to analysator/pyVlsv/vlsvvtkinterface.py index e8dd4269..9f1b12c2 100644 --- a/pyVlsv/vlsvvtkinterface.py +++ b/analysator/pyVlsv/vlsvvtkinterface.py @@ -33,7 +33,7 @@ import vtkmodules.vtkCommonColor import vtkmodules.vtkCommonColor import vtkmodules.vtkCommonColor -import pytools as pt +import analysator as pt try: import vtk except Exception as e: @@ -925,7 +925,7 @@ def GetDataArraySelection(self): def __main__(): - import pytools as pt + import analysator as pt # This initializes a hypertreegrid from the given reader. reader = VlsvVtkReader() reader.SetFileName("/home/mjalho/Downloads/bulk.0002189.vlsv") diff --git a/pyVlsv/vlsvwriter.py b/analysator/pyVlsv/vlsvwriter.py similarity index 100% rename from pyVlsv/vlsvwriter.py rename to analysator/pyVlsv/vlsvwriter.py diff --git a/examples/generate_panel.py b/examples/generate_panel.py index 047a6dc0..b088daf0 100644 --- a/examples/generate_panel.py +++ b/examples/generate_panel.py @@ -31,7 +31,7 @@ # passed to a job submission system for generating a multitude of frames # via e.g. array jobs. -import pytools as pt +import analysator as pt import sys, os, socket import numpy as np diff --git a/examples/gridspec_plot.py b/examples/gridspec_plot.py index fcf98b1a..ebdbec7a 100644 --- a/examples/gridspec_plot.py +++ b/examples/gridspec_plot.py @@ -1,4 +1,4 @@ -import pytools as pt +import analysator as pt import sys, os, socket import numpy as np import matplotlib as mpl diff --git a/examples/multi_panel_plot.py b/examples/multi_panel_plot.py index 2305683b..ec026477 100644 --- a/examples/multi_panel_plot.py +++ b/examples/multi_panel_plot.py @@ -1,4 +1,4 @@ -import pytools as pt +import analysator as pt import numpy as np import matplotlib.pyplot as plt import colormaps as cmaps diff --git a/examples/neutral_lines.py b/examples/neutral_lines.py index ba4165e6..a25ed8f5 100644 --- a/examples/neutral_lines.py +++ b/examples/neutral_lines.py @@ -42,7 +42,7 @@ ''' -import pytools as pt +import analysator as pt import numpy as np import sys diff --git a/examples/plot_VSC.py b/examples/plot_VSC.py index 176cdee1..d7a6cc55 100644 --- a/examples/plot_VSC.py +++ b/examples/plot_VSC.py @@ -5,7 +5,7 @@ import matplotlib.pyplot as plt import numpy as np import sys -import pytools as pt +import analysator as pt from variable import get_data, get_name, get_units # initialize lists for gathering values diff --git a/examples/sidecar.py b/examples/sidecar.py index 28bfda18..bc2af274 100644 --- a/examples/sidecar.py +++ b/examples/sidecar.py @@ -42,7 +42,7 @@ via e.g. array jobs. ''' -import pytools as pt +import analysator as pt import numpy as np import sys import time diff --git a/projects/DiffusionScripts/getVariables.py b/projects/DiffusionScripts/getVariables.py index 8e8df382..0ed6ea26 100644 --- a/projects/DiffusionScripts/getVariables.py +++ b/projects/DiffusionScripts/getVariables.py @@ -1,4 +1,4 @@ -import pytools as pt +import analysator as pt import numpy as np import sys,os diff --git a/projects/DiffusionScripts/plot_Dmumu_Ivascenko.py b/projects/DiffusionScripts/plot_Dmumu_Ivascenko.py index a46acf4f..dfa116c7 100644 --- a/projects/DiffusionScripts/plot_Dmumu_Ivascenko.py +++ b/projects/DiffusionScripts/plot_Dmumu_Ivascenko.py @@ -1,4 +1,4 @@ -import pytools as pt +import analysator as pt import numpy as np import sys,os import matplotlib diff --git a/projects/DiffusionScripts/solverIvascenko.py b/projects/DiffusionScripts/solverIvascenko.py index 4c6b2454..995598a6 100644 --- a/projects/DiffusionScripts/solverIvascenko.py +++ b/projects/DiffusionScripts/solverIvascenko.py @@ -1,5 +1,5 @@ import numpy as np -import pytools as pt +import analysator as pt import matplotlib import matplotlib.pyplot as plt import sys,os diff --git a/pyMayaVi/grid.py b/pyMayaVi/grid.py index 73e52c86..3ad56168 100644 --- a/pyMayaVi/grid.py +++ b/pyMayaVi/grid.py @@ -27,7 +27,7 @@ .. code-block:: python # Example: - import pytools as pt + import analysator as pt pt.grid. #press [tab] -> get the functions diff --git a/pyMayaVi/velocityspace.py b/pyMayaVi/velocityspace.py index a3e8dd4e..964fcb1e 100644 --- a/pyMayaVi/velocityspace.py +++ b/pyMayaVi/velocityspace.py @@ -37,7 +37,7 @@ def generate_custom_velocity_grid( vlsvReader, blocks_and_values, iso_surface=Fa # Example usage: - import pytools as pt + import analysator as pt #vlsvReader = pt.vlsvfile.VlsvReader("example.vlsv") diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..fac51733 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,41 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "analysator" +version = "0.9.6" +authors = [ + { name = "Markku Alho", email = "markku.alho@helsinki.fi"}, + { name = "Et al"}, +] +maintainters = [ + { name = "Markku Alho", email = "markku.alho@helsinki.fi"}, +] +description = "Tools for reading and analysing Vlasiator .vlsv output files." +readme = "README.md" +requires-python = ">=3.7" +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", + "Operating System :: OS Independent", +] +dependencies = [ + "numpy", + "scipy", + "matplotlib", +] +[project.optional-dependencies] +isosurface = [ + "scikit-image", +] + +[project.urls] +Homepage = "https://github.com/fmihpc/analysator" +Issues = "https://github.com/fmihpc/analysator/issues" + +[tool.hatch.build.targets.wheel] +packages = ["./analysator","./pytools"] + +[tool.hatch.build.targets.sdist] +packages = ["./analysator","./pytools"] \ No newline at end of file diff --git a/pytools/__init__.py b/pytools/__init__.py new file mode 100644 index 00000000..a6c65898 --- /dev/null +++ b/pytools/__init__.py @@ -0,0 +1,44 @@ + +# +# This file is part of Analysator. +# Copyright 2013-2016 Finnish Meteorological Institute +# Copyright 2017-2018 University of Helsinki +# +# For details of usage, see the COPYING file and read the "Rules of the Road" +# at http://www.physics.helsinki.fi/vlasiator/ +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# + +from os import path as __path +import warnings +import sys +import logging +import traceback + +print("`import pytools` called - please use `import analysator` instead!\n Below, the stack to trace where this came from:\n") +traceback.print_stack() + +warnings.warn("Please update your import command to `import analysator`. `analysator.py` has been renamed as `analysator.py` for consistency and eventual package publication.\n\n`import pytools` and `import pytools as pt` will work via the dirty hack here in `pytools.py` until some time in the future (v.1 release/package publication?).\n") + +# Slurp and exec the analysator package here to get all functionalities under the pytools module if needed +if 'analysator' not in sys.modules.keys(): + logging.info("Importing analysator.py to pytools") + root = __path.dirname(__file__) + sys.path.append(__path.join(root,"src/")) + from analysator import * +else: + logging.info("Analysator imported already. Pointing pytools to analysator.") + sys.modules['pytools'] = sys.modules['analysator'] diff --git a/scripts/biot_savart.py b/scripts/biot_savart.py index e2f74150..7b50d556 100644 --- a/scripts/biot_savart.py +++ b/scripts/biot_savart.py @@ -30,7 +30,7 @@ ''' -import pytools as pt +import analysator as pt import numpy as np import matplotlib.pyplot as plt from numba import jit diff --git a/scripts/create_time_energy_spectrogram.py b/scripts/create_time_energy_spectrogram.py index 99de51b6..593094f2 100644 --- a/scripts/create_time_energy_spectrogram.py +++ b/scripts/create_time_energy_spectrogram.py @@ -73,7 +73,7 @@ matplotlib.use('Agg') import matplotlib.pyplot as plt import matplotlib.colors as colors -import pytools as pt +import analysator as pt import numpy as np import operator as oper import logging diff --git a/scripts/estimate_AMR6D_FRODO.py b/scripts/estimate_AMR6D_FRODO.py index 9d8245f9..3271964b 100644 --- a/scripts/estimate_AMR6D_FRODO.py +++ b/scripts/estimate_AMR6D_FRODO.py @@ -1,4 +1,4 @@ -import pytools as pt +import analysator as pt import sys, os, socket import numpy as np import math diff --git a/scripts/estimate_rerefine.py b/scripts/estimate_rerefine.py index 112cc922..dc18db05 100644 --- a/scripts/estimate_rerefine.py +++ b/scripts/estimate_rerefine.py @@ -1,4 +1,4 @@ -import pytools as pt +import analysator as pt import numpy as np import scipy import logging diff --git a/scripts/gics.py b/scripts/gics.py index 4376457a..995ffcac 100644 --- a/scripts/gics.py +++ b/scripts/gics.py @@ -20,7 +20,7 @@ ''' -import pytools as pt +import analysator as pt import os import matplotlib import matplotlib.pyplot as plt diff --git a/scripts/magnetopause2d.py b/scripts/magnetopause2d.py index 739125e5..5bf4e5df 100644 --- a/scripts/magnetopause2d.py +++ b/scripts/magnetopause2d.py @@ -3,7 +3,7 @@ ''' import numpy as np -import pytools as pt +import analysator as pt import plot_colormap import yt from yt.visualization.api import Streamlines diff --git a/scripts/magnetopause3d.py b/scripts/magnetopause3d.py index a949ae98..906880d7 100644 --- a/scripts/magnetopause3d.py +++ b/scripts/magnetopause3d.py @@ -4,7 +4,7 @@ from pyCalculations import ids3d import matplotlib.pyplot as plt import numpy as np -import pytools as pt +import analysator as pt import plot_colormap3dslice import yt import math diff --git a/scripts/papers/alho2024_inspect_neutral_lines.py b/scripts/papers/alho2024_inspect_neutral_lines.py index 587cf149..a53a00fd 100644 --- a/scripts/papers/alho2024_inspect_neutral_lines.py +++ b/scripts/papers/alho2024_inspect_neutral_lines.py @@ -33,7 +33,7 @@ """ -import pytools as pt +import analysator as pt import numpy as np import sys import matplotlib.pyplot as plt diff --git a/scripts/plot_jet_criteria.py b/scripts/plot_jet_criteria.py index 56840e33..21463fcf 100644 --- a/scripts/plot_jet_criteria.py +++ b/scripts/plot_jet_criteria.py @@ -21,7 +21,7 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # -import pytools as pt +import analysator as pt import sys, os, socket import numpy as np import logging diff --git a/scripts/plot_time_energy_spectrogram.py b/scripts/plot_time_energy_spectrogram.py index 21500b3a..34767f20 100644 --- a/scripts/plot_time_energy_spectrogram.py +++ b/scripts/plot_time_energy_spectrogram.py @@ -35,7 +35,7 @@ matplotlib.use('Agg') import matplotlib.pyplot as plt import matplotlib.colors as colors -import pytools as pt +import analysator as pt import numpy as np import logging diff --git a/scripts/ulf_waves_filter.py b/scripts/ulf_waves_filter.py index ccae22e2..e3f86f62 100644 --- a/scripts/ulf_waves_filter.py +++ b/scripts/ulf_waves_filter.py @@ -1,6 +1,6 @@ import os # nopep8 os.environ['PTNOLATEX'] = '1' # nopep8 -import pytools as pt # nopep8 +import analysator as pt # nopep8 import glob from scipy.signal import butter, filtfilt import numpy as np diff --git a/testpackage/testpackage_colormap.py b/testpackage/testpackage_colormap.py index 46033dde..2941b77f 100644 --- a/testpackage/testpackage_colormap.py +++ b/testpackage/testpackage_colormap.py @@ -1,4 +1,4 @@ -import pytools as pt +import analysator as pt import sys, os import numpy as np import traceback diff --git a/testpackage/testpackage_vdf.py b/testpackage/testpackage_vdf.py index c14305fd..dbb8a36b 100644 --- a/testpackage/testpackage_vdf.py +++ b/testpackage/testpackage_vdf.py @@ -1,4 +1,4 @@ -import pytools as pt +import analysator as pt import sys, os import numpy as np import traceback diff --git a/tools/vlsvintpol.py b/tools/vlsvintpol.py index d60f14d3..8b55a3c9 100755 --- a/tools/vlsvintpol.py +++ b/tools/vlsvintpol.py @@ -22,7 +22,7 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # -import pytools as pt +import analysator as pt import numpy as np import sys import argparse diff --git a/trash_can/plot2d.py b/trash_can/plot2d.py index 03ce5c6b..8b7b41c6 100644 --- a/trash_can/plot2d.py +++ b/trash_can/plot2d.py @@ -36,7 +36,7 @@ matplotlib.use('Agg') # this is needed for offline plotting import matplotlib.pyplot as plt import matplotlib.colors as colors -import pytools as pt +import analysator as pt import numpy as np import operator as oper import re diff --git a/trash_can/plot2d_rho_with_vspace_reduction.py b/trash_can/plot2d_rho_with_vspace_reduction.py index e67b31be..2dc64f99 100644 --- a/trash_can/plot2d_rho_with_vspace_reduction.py +++ b/trash_can/plot2d_rho_with_vspace_reduction.py @@ -41,7 +41,7 @@ matplotlib.use('Agg') import matplotlib.pyplot as plt import matplotlib.colors as colors -import pytools as pt +import analysator as pt import numpy as np import operator as oper from matplotlib.patches import Wedge diff --git a/trash_can/plot2d_with_vspace.py b/trash_can/plot2d_with_vspace.py index 2c835c6f..ab8bd60b 100644 --- a/trash_can/plot2d_with_vspace.py +++ b/trash_can/plot2d_with_vspace.py @@ -38,7 +38,7 @@ def vlsv_plot2d_with_vspace(vlsvReader,varName="rho",withDistr=0,Nstride=97,Nbin :returns: nothing .. code-block:: python # Example usage: - import pytools as pt + import analysator as pt fvlsv = pt.vlsvfile.VlsvReader("/path/to/run/bulk.0003000.vlsv") pt.plot.vlsv_plot2d_with_vspace(fvlsv,varName="rho",lengthUnit=6371e3) pt.plot.vlsv_plot2d_with_vspace(fvlsv,varName="rho",lengthUnit=6371e3,withDistr=1,Nstride=97,xFigSize=15,yFigSize=14) diff --git a/trash_can/plot_veldist.py b/trash_can/plot_veldist.py index 5359f7bc..5c867934 100644 --- a/trash_can/plot_veldist.py +++ b/trash_can/plot_veldist.py @@ -35,7 +35,7 @@ matplotlib.use('Agg') import matplotlib.pyplot as plt import matplotlib.colors as colors -import pytools as pt +import analysator as pt import numpy as np import operator as oper from rotation import *