Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.9%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: scottprahl
  • License: mit
  • Language: Python
  • Default Branch: main
  • Size: 21.5 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created almost 2 years ago · Last pushed almost 2 years ago
Metadata Files
Readme Changelog License Citation

README.rst

.. |pypi| image:: https://img.shields.io/pypi/v/pygrin?color=68CA66
   :target: https://pypi.org/project/pygrin/
   :alt: pypi

.. |github| image:: https://img.shields.io/github/v/tag/scottprahl/pygrin?label=github&color=68CA66
   :target: https://github.com/scottprahl/pygrin
   :alt: github

.. |conda| image:: https://img.shields.io/conda/vn/conda-forge/pygrin?label=conda&color=68CA66
   :target: https://github.com/conda-forge/pygrin-feedstock
   :alt: conda

.. |doi| image:: https://zenodo.org/badge/116033943.svg
   :target: https://zenodo.org/badge/latestdoi/116033943
   :alt: doi  

.. |license| image:: https://img.shields.io/github/license/scottprahl/pygrin?color=68CA66
   :target: https://github.com/scottprahl/pygrin/blob/main/LICENSE.txt
   :alt: License

.. |test| image:: https://github.com/scottprahl/pygrin/actions/workflows/test.yaml/badge.svg
   :target: https://github.com/scottprahl/pygrin/actions/workflows/test.yaml
   :alt: Testing

.. |docs| image:: https://readthedocs.org/projects/pygrin/badge?color=68CA66
   :target: https://pygrin.readthedocs.io
   :alt: Docs

.. |downloads| image:: https://img.shields.io/pypi/dm/pygrin?color=68CA66
   :target: https://pypi.org/project/pygrin/
   :alt: Downloads

pygrin
======

by Scott Prahl

|pypi| |github| |conda| |doi|

|license| |test| |docs| |downloads|

A basic collection of routines to ray trace through graded index (GRIN) lenses with a
parabolic radial profile.

.. image:: https://raw.githubusercontent.com/scottprahl/pygrin/main/docs/pitch.png
   :alt: full pitch lens

Example
-------

Properties of a 0.25 pitch GRIN lens from an ancient Melles Griot Catalog::

    import pygrin
    n = 1.608 
    gradient = 0.339 
    length = 5.37
    diameter = 1.8
    
    pitch = pygrin.period(gradient, length)
    ffl = pygrin.FFL(n,pitch,length)
    efl = pygrin.EFL(n,pitch,length)
    na = pygrin.NA(n,pitch,length,diameter)

    angle = pygrin.max_angle(n,pitch,length,diameter)
    print('expected pitch = 0.29,            calculated %.2f' % pitch)
    print('expected FFL = 0.46 mm,           calculated %.2f' % ffl)
    print('expected NA = 0.46,               calculated %.2f' % na)
    print('expected full accept angle = 55°, calculated %.0f°' % (2*angle*180/np.pi))
    print('working distance = %.2f mm'%(efl-ffl))

Produces::

    expected pitch = 0.29,            calculated 0.29
    expected FFL = 0.46,              calculated 0.47
    expected NA = 0.46,               calculated 0.46
    expected full accept angle = 55°, calculated 55°
    working distance = 1.43 mm

But the real utility of this module is creating plots that show the path of rays through
a GRIN lens.   For examples, see 

Installation
------------

Use ``pip``::

    pip install pygrin

or ``conda``::

    conda install -c conda-forge pygrin

or use immediately by clicking the Google Colaboratory button below

.. image:: https://colab.research.google.com/assets/colab-badge.svg
  :target: https://colab.research.google.com/github/scottprahl/pygrin/blob/main
  :alt: Colab

License
-------
``pygrin`` is licensed under the terms of the MIT license.

Owner

  • Name: Scott Prahl
  • Login: scottprahl
  • Kind: user
  • Location: Portland, Oregon
  • Company: Oregon Institute of Technology

Citation (CITATION.cff)

authors:
- family-names: Prahl
  given-names: Scott
  orcid: https://orcid.org/0000-0003-1468-6851
cff-version: 1.2.0
date-released: '2023-09-22'
doi: 10.5281/zenodo.8370822
message: If you use this software, please cite it as below.
title: 'pygrin: a python module to ray trace through gradient index (GRIN) lenses'
url: https://zenodo.org/badge/latestdoi/116033943
version: 0.5.1

GitHub Events

Total
Last Year

Committers

Last synced: 12 months ago

All Time
  • Total Commits: 3
  • Total Committers: 1
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 3
  • Committers: 1
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Scott Prahl s****t@p****m 3
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 12 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Dependencies

docs/requirements.txt pypi
  • matplotlib *
  • nbsphinx *
  • numpy *
  • pythonnet *
  • sphinx-automodapi *
  • sphinx-rtd-theme ==1.3.0
  • vtspython *
pyproject.toml pypi
requirements.txt pypi
  • matplotlib *
  • numpy *
  • pytest *
  • pythonnet *
setup.py pypi
  • pythonnet *