Skip to content

๐Ÿ•ฎ Python script to integrate arrays, functions numerically using different methods. It was build for educational purposes. Original Fortran 2003+ legacy routines date back to 2003-2004. Read the LICENSE.txt file.

License

Notifications You must be signed in to change notification settings

neutrinomuon/PyIntegral

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

PyIntegral

PyIntegral

A Fortran legacy package to easy integrate numerically

email: antineutrinomuon@gmail.com, jean@astro.up.pt

ยฉ Copyright ยฎ

J.G. - Jean Gomes

last stable version: 0.0.13

DOI


My Skills
python3 badgetlicense



RESUME

Integrate arrays, functions numerically using different methods. Original Fortran 2003+ routines date back to 2003-2004. Read the LICENSE.txt file. Definite integrals are mathematical calculations that allow us to find the area under a curve between two defined points on the x-axis. In other words, they give us the total accumulated value of a function over an interval. Definite integrals are used in various fields, such as physics, engineering, and finance, to solve real-world problems, such as calculating the total distance travelled by a moving object or the total profit of a company over a certain period.

There are various techniques for computing definite integrals, including analytical methods (e.g., antiderivatives) and numerical methods (e.g., using quadrature or Monte Carlo). The choice of method depends on the type of function being integrated, the desired accuracy, and the computational resources available. Some commonly used numerical integration techniques include the trapezoidal rule, Simpson's rule, and Gaussian quadrature.

In computer programming, definite integrals can be calculated using specialized libraries and routines that provide numerical integration algorithms. These routines typically take as input the function to be integrated, the interval over which to integrate, and the desired level of accuracy. The output of the routine is an approximation of the definite integral.

โ“˜ Note

This project was also created with a focus on educational purposes.

Now, PyIntegral has all its scripts in accordance with PEP 8 guidelines.

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)


INSTALLATION

You can easily install PyIntegral by using pip - PyPI - The Python Package Index:


pip install PyIntegral

or by using a generated conda repository https://anaconda.org/neutrinomuon/PyIntegral:

badgetanaconda badgetreleasedate badgetplatforms


conda install -c neutrinomuon PyIntegral

OBS.: Linux, OS-X ad Windows pre-compilations available in conda.

You can also clone the repository and install by yourself in your machine:


git clone https://github.com/neutrinomuon/PyIntegral
python setup.py install


METHODS

The methods are given by Int_Type and may be summarized bellow:

Int_TypeTypeDescription
0RRight rectangle Integral
1LLeft rectangle Integral
2TTrapezoidal rule
3SSimple Integral
4MMedian rectangle Integral
5ISimpsonregel's rule
6GGauss-Legendre Quadrature

REFERENCES

    William H. Press, Saul A. Teukolsky, William T. Vetterling, and Brian P. Flannery. Numerical Recipes: The Art of Scientific Computing. William ISBN: 978-0521880688. Link: https://www.nr.com/

STRUCTURE

The main structure of the directories and files are:


#################################################
PyIntegral
โ”œโ”€โ”€ PyIntegral
โ”‚   โ”œโ”€โ”€ win-32
โ”‚   โ”œโ”€โ”€ linux-armv7l
โ”‚   โ”œโ”€โ”€ win-arm64
โ”‚   โ”œโ”€โ”€ linux-armv6l
โ”‚   โ”œโ”€โ”€ linux-s390x
โ”‚   โ”œโ”€โ”€ linux-ppc64
โ”‚   โ”œโ”€โ”€ linux-aarch64
โ”‚   โ”œโ”€โ”€ linux-32
โ”‚   โ”œโ”€โ”€ linux-64
โ”‚   โ”œโ”€โ”€ osx-64
โ”‚   โ”œโ”€โ”€ meta.yaml
โ”‚   โ”œโ”€โ”€ win-64
โ”‚   โ”œโ”€โ”€ README.txt
โ”‚   โ”œโ”€โ”€ linux-ppc64le
โ”‚   โ””โ”€โ”€ osx-arm64
โ”œโ”€โ”€ dist
โ”‚   โ””โ”€โ”€ pyintegral-0.0.12.2.tar.gz
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ showdown.min.js
โ”œโ”€โ”€ figures
โ”‚   โ”œโ”€โ”€ Definite_Integral.png
โ”‚   โ”œโ”€โ”€ Example_Integration.png
โ”‚   โ”œโ”€โ”€ PyIntegral.png
โ”‚   โ”œโ”€โ”€ PEP8-StyleGuide.jpg
โ”‚   โ””โ”€โ”€ Education,_Studying,_University,_Alumni_-_icon.png
โ”œโ”€โ”€ .github
โ”‚   โ””โ”€โ”€ workflows
โ”œโ”€โ”€ scripts
โ”‚   โ””โ”€โ”€ update_readme.py
โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ LICENSE.txt
โ”œโ”€โ”€ setup.py
โ”œโ”€โ”€ tutorials
โ”‚   โ”œโ”€โ”€ Definite_Integral.png
โ”‚   โ”œโ”€โ”€ Definite_Integral.py
โ”‚   โ”œโ”€โ”€ .ipynb_checkpoints
โ”‚   โ”œโ”€โ”€ example1_pyintegral.ipynb
โ”‚   โ”œโ”€โ”€ .virtual_documents
โ”‚   โ””โ”€โ”€ README.txt
โ”œโ”€โ”€ src
โ”‚   โ”œโ”€โ”€ python
โ”‚   โ””โ”€โ”€ fortran
โ”œโ”€โ”€ .DS_Store
โ”œโ”€โ”€ version.txt
โ”œโ”€โ”€ pyintegral.egg-info
โ”‚   โ”œโ”€โ”€ PKG-INFO
โ”‚   โ”œโ”€โ”€ dependency_links.txt
โ”‚   โ”œโ”€โ”€ SOURCES.txt
โ”‚   โ”œโ”€โ”€ top_level.txt
โ”‚   โ””โ”€โ”€ requires.txt
โ”œโ”€โ”€ README_setup.txt
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ build
โ”‚   โ”œโ”€โ”€ lib.linux-x86_64-cpython-39
โ”‚   โ”œโ”€โ”€ lib.macosx-11.1-arm64-cpython-39
โ”‚   โ”œโ”€โ”€ temp.macosx-11.1-arm64-cpython-39
โ”‚   โ”œโ”€โ”€ temp.linux-x86_64-cpython-39
โ”‚   โ”œโ”€โ”€ src.linux-x86_64-3.9
โ”‚   โ”œโ”€โ”€ temp.linux-x86_64-3.9
โ”‚   โ””โ”€โ”€ src.macosx-11.1-arm64-3.9
โ””โ”€โ”€ .git
    โ”œโ”€โ”€ branches
    โ”œโ”€โ”€ logs
    โ”œโ”€โ”€ info
    โ”œโ”€โ”€ index
    โ”œโ”€โ”€ description
    โ”œโ”€โ”€ FETCH_HEAD
    โ”œโ”€โ”€ HEAD
    โ”œโ”€โ”€ ORIG_HEAD
    โ”œโ”€โ”€ objects
    โ”œโ”€โ”€ packed-refs
    โ”œโ”€โ”€ hooks
    โ”œโ”€โ”€ COMMIT_EDITMSG
    โ”œโ”€โ”€ refs
    โ””โ”€โ”€ config

41 directories, 35 files
#################################################
Generated with tree_colored @ 2023 - ยฉ Jean Gomes
#################################################

PyIntegral.py is a python wrapper to the library in Fortran called pyintegral.flib. The Fortran directory can be compiled separately for each individual subroutine.


ISSUES AND CONTRIBUTIONS

If you encounter any issues with this project, please feel free to submit an issue on the GitHub repository. We appreciate your feedback and are committed to improving the quality of our codebase.

If you'd like to contribute to this project, we welcome pull requests from the community. Before submitting a pull request, please make sure to fork the repository and create a new branch for your changes. Once your changes are complete, submit a pull request and we'll review your code as soon as possible.

For any questions or concerns about contributing, please contact the project maintainer at antineutrinomuon@gmail.com. Thank you for your interest in contributing to our project!


LICENSE

This software is provided "AS IS" (see DISCLAIMER below). Permission to use, for non-commercial purposes is granted. Permission to modify for personal or internal use is granted, provided this copyright and disclaimer are included in ALL copies of the software. All other rights are reserved. In particular, redistribution of the code is not allowed without explicit permission by the author.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

๐Ÿ•ฎ Python script to integrate arrays, functions numerically using different methods. It was build for educational purposes. Original Fortran 2003+ legacy routines date back to 2003-2004. Read the LICENSE.txt file.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published