Giter VIP home page Giter VIP logo

zern's Introduction

ZERN - Zernike Polynomials in Python

Python package for the evaluation of Zernike polynomials $Z_{n,m} (\rho, \theta)$. This package implements several methods to calculate Zernike polynomials. One of the methods takes advantage of the relationship between Jacobi polynomials $J_{k}^{\alpha, \beta}$ and the Zernikes, and uses a recurrence to calculate arbitrary polynomials efficiently and robustly.

This is an installable package that can be used to simulate wavefront maps as a series of Zernike polynomials of arbitrary radial order. It supports any kind of aperture mask, making it flexible for evaluating Zernikes in any astronomical pupil.

Zernike

Installation

To install ZERN, you can follow these simple steps:

1. Download the files from GitHub

Download the repo directly from Github by running git clone:

git clone https://github.com/AlvaroMenduina/ZERN.git <your_local_dir>

2. Install the package with pip

Move to where you copied the repository files

cd <your_local_dir>

And run

python setup.py sdist

pip install .

3. Verifying it all worked

To test whether the installation was successful, you can try to import the module

import zern.zern_core as zern
_test = zern.Zernike(mask=None)

Tutorials

If you are interested in learning how to uze ZERN, you can find several Jupyter notebooks here

Testing coverage

This package has been thoroughly tested to ensure the results are consistent.

================================ test session starts ================================ 
platform win32 -- Python 3.11.5, pytest-7.4.2, pluggy-1.3.0
rootdir: C:\Users\alvaro\Documents\Python Scripts\ZERN
plugins: anyio-4.0.0
collected 68 items                                                                                                                                                                                                

tests\test_zern.py ......................................................     [100%] 

================================ 68 passed in 3.54s ===============================
PS C:\Users\alvaro\Documents\Python Scripts\ZERN> coverage report --show-missing
Name                 Stmts   Miss  Cover   Missing
--------------------------------------------------
tests\test_zern.py     120      0   100%
zern\__init__.py         0      0   100%
zern\zern_core.py      116      6    95%   67, 86-88, 117, 262
--------------------------------------------------
TOTAL                  236      6    97%

zern's People

Contributors

alvaromenduina avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.