Skip to content

pietromandracci/pysica

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PYSICA: PYthon tools for SImulation and CAlculus

This package contains a collection of tools developed for some specific simulation and calculus tasks in some fields of physics, including nonthermal plasma discharges, as well as surface modification and analysis.

This package depends heavily on numpy and matplotlib, while some specific modules and packages depend on scipy also. Some packages make use of tkinter and of the gnuplot progam, but they should work also without it, although without some features.

Note

The package has been developed and tested to be used in a Linux-based operative system. Some subpackages could probably be used under other systems also, but they have not been tested on them and there is no guarantee that they would work.

Note

The modules compiled from Fortran are linux libraries ('.so' files): if you want to use them in another operating system you need to recompile them using the f2py program and a Fortran compiler. The directories named fortran contain the Fortran source files, the compiled modules and the scripts used for the compilation (the name of which always start with 'f2py'), but the options used in the scripts to call f2py are specific for linux and the gnu95 Fortran compiler.

pysica is distribuited as a Python wheel so, if you have the program pip installed on your system, you can simply type at the console:

$ pip install pysica

in this way the Python interpreter will be able to use the pysica package regardless of the location from where it is invoked.

Note

In some Linux distributions (e.g. Debian-related ones) the operative system doesn't allow pip to install software in the main file hierarchy and you will get an error message saying "externally managed environment" or something similar. In this situation, you can install the package in a local directory, as described in the How to install in a local directory section, or inside a Python virtual environment. You can find instructions on how to create a virtual environment in this page of the Python documentation.

You can also install pysica in any directory of your system by dowloading the most recent zip archive from the pysica GitHub page and unzipping it in a directory of your choice.

A new directory will be created, named pysica-x.y.z, where x.y.z identifies the version number. In order to use pysica you will have to open a terminal, navigate to this directory, and call the Python interpreter from there.

If you want to use the package from another directory, you can create in that directory a symbolic link to the directory named pysica, which is inside the pysica-x.y.z directory.

Once you have installed pysica, you can run the Python interpreter from the console:

$ python3

and then import pysica using the import directive as usual:

>>> import pysica

Or you can import a single mudule or package that you need, such as:

>>> from pysica.managers import gnuplot_manager

or

>>> from pysica.analysis import spectra

In the following, the main modules and subpackages are listed. Additional documentation is available in the docstrings of each module and subpackage.

Contains some physical constants used in various modules and packages.

Contains some parameters used in various modules and packages.

Contains some modules to manage distribution functions and data histograms.

univariate (module)
tools for the statistical analysis of univariate samples;
bivariate (module)
tools for the statistical analysis of bivariate samples;
spectra (module)
tools for the analysis of different types of spectra, whith a special focus on:
  • optical data (e.g. transmission spectra) of thin films;
  • surface morphology data (e.g. surface roughness analysis).

Contains some general purpose functions.

fortran (package)
some general purpose functions, compiled from Fortran using f2py. They are collected in the fmathematics module.
mathematics (module)
some general purpose mathematical funtions.
statistics (module)
some generic statistics functions.
pdf (module)
some probabilty distribution functions (pdf).
random_pdf (module)
functions useful to generate random numbers following specific pdfs.
physics (module)
some general purpose funcions used in generic physics applications.
optics (module)
some functions useful for optical applications.

Contains some modules and packages used to manage input/output of data from/to ascii files, to print physical quantities managing the unit prefixes, and to plot data by means of the gnuplot program.

io (package)
some modules used for generic input-output management.
data_manager (module)
tools to manage data reading and writing from files;
unit_manager (module)
tools to manage the output of numerical data with automatic managment of unit prefixies;
gnuplot_manager (package)
a package to facilitate the use of gnuplot inside Python [1].
[1]gnuplot_manager is also available as a standalone package (without the rest of pysica) on GitHub and PyPi.

A package containing tools for the simulation of plasma discharges.

ccpla (package)
a package containing scripts, modules, and subpackages used to simulate low pressure capacitively coupled discharges.

Documentation about the modules and packages is available in the docstrings. Additional documentation can be found in the doc directory of the GitHub repository.