Katsu

Katsu: A Python package for Mueller and Stokes simulation and polarimetry - Published in JOSS (2025)

https://github.com/jashcraf/katsu

Science Score: 95.0%

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

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
    5 of 7 committers (71.4%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software
Last synced: 6 months ago · JSON representation

Repository

Polarimetric Data Reduction and machine control for measuring the polarization of observatories

Basic Info
Statistics
  • Stars: 8
  • Watchers: 1
  • Forks: 2
  • Open Issues: 7
  • Releases: 3
Created almost 4 years ago · Last pushed 7 months ago
Metadata Files
Readme Contributing License

README.md

Katsu: Integrated polarimetry and polarization simulation

codecov Documentation Status status

drawing

Katsu is a Python 3.8+ library that contains an integrated library for modeling simple polarization effects (represented with Mueller calculus), simulating full stokes and mueller polarimetry, and integrating both of these as data reduction tools for conducting polarimetry in the laboratory. We also feature motion control routines for commercially available rotation stages for a more Pythonic interface to devices that would otherwise require serial communication.

Documentation

The documentation can be found at katsu.readthedocs.io.

Optional dependencies

Katsu has limited support for numpy-like backends, like cupy for accelerated computing and jax for automatic differentiation. These are not strict requirements, and must be installed by the user. To switch to them at runtime, either the set_backend_to_cupy or set_backend_to_jax method can be used from katsu.math at runtime.

Features

  • Mueller calculus
  • Mueller data reduction
  • Mueller polarimetry routines
  • Motion control for the Agilis piezoelectric rotation stages

Installation

Katsu can be installed using pip, just run the following in your terminal pip install katsu

Alternatively, Katsu is installable from source. Simply run the following in your terminal git clone https://github.com/Jashcraf/katsu/ cd katsu pip install .

Contributions / Questions

If you wish to contribute to Katsu, or have any questions about its use, please open an issue to start a discussion. Before a pull request is made, we prefer that an issue is made to discuss the contributions at a high level.

Acknowledgements

Thanks to Quinn Jarecki of UA's Polarization Lab for the starting theory on dual rotating retarder mueller polarimetry, and for overall helpful discussions. Thanks also to William Melby, Manxuan Zhang, and Max Millar-Blanchaer for being the first to test out the Mueller data reduction code.

Owner

  • Name: Jaren Ashcraft
  • Login: Jashcraf
  • Kind: user
  • Location: Tucson, AZ

Ph.D. Candidate in Optical Sciences, University of Arizona NASA Space Technology Graduate Research Opportunity Fellow

JOSS Publication

Katsu: A Python package for Mueller and Stokes simulation and polarimetry
Published
March 29, 2025
Volume 10, Issue 107, Page 7375
Authors
Jaren N. Ashcraft ORCID
Wyant College of Optical Sciences, University of Arizona, USA, Steward Observatory, University of Arizona, USA, Department of Physics, University of California, Santa Barbara, USA
Ewan S. Douglas ORCID
Steward Observatory, University of Arizona, USA
William Melby ORCID
Department of Physics, University of California, Santa Barbara, USA
Manxuan Zhang ORCID
Department of Physics, University of California, Santa Barbara, USA
Kenji Mulhall
Independent contributor
Ramya M. Anche ORCID
Steward Observatory, University of Arizona, USA
Emory Jenkins ORCID
Wyant College of Optical Sciences, University of Arizona, USA, Steward Observatory, University of Arizona, USA
Maxwell A. Millar-Blanchaer ORCID
Department of Physics, University of California, Santa Barbara, USA
Editor
Dan Foreman-Mackey ORCID
Tags
astronomy polarimetry laboratory Mueller Stokes

GitHub Events

Total
  • Create event: 3
  • Release event: 2
  • Issues event: 16
  • Watch event: 4
  • Issue comment event: 23
  • Push event: 59
  • Pull request event: 7
  • Pull request review event: 2
  • Fork event: 2
Last Year
  • Create event: 3
  • Release event: 2
  • Issues event: 16
  • Watch event: 4
  • Issue comment event: 23
  • Push event: 59
  • Pull request event: 7
  • Pull request review event: 2
  • Fork event: 2

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 176
  • Total Committers: 7
  • Avg Commits per committer: 25.143
  • Development Distribution Score (DDS): 0.483
Past Year
  • Commits: 78
  • Committers: 5
  • Avg Commits per committer: 15.6
  • Development Distribution Score (DDS): 0.526
Top Committers
Name Email Commits
Jaren Ashcraft j****t@e****u 91
Jashcraf j****t@a****u 51
kenjim21 k****8@g****m 17
Work w****k@d****u 7
Warrick Ball w****l@g****m 4
wcmelby w****y@u****u 3
Rebecca Zhang m****g@u****u 3
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 32
  • Total pull requests: 11
  • Average time to close issues: 10 months
  • Average time to close pull requests: 3 days
  • Total issue authors: 4
  • Total pull request authors: 4
  • Average comments per issue: 2.34
  • Average comments per pull request: 1.64
  • Merged pull requests: 10
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 10
  • Pull requests: 7
  • Average time to close issues: 27 days
  • Average time to close pull requests: 3 days
  • Issue authors: 2
  • Pull request authors: 2
  • Average comments per issue: 2.4
  • Average comments per pull request: 0.43
  • Merged pull requests: 7
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Jashcraf (22)
  • arendMoerman (8)
  • kenjim21 (1)
  • mileslucas (1)
Pull Request Authors
  • warrickball (6)
  • kenjim21 (4)
  • becca9808 (4)
  • wcmelby (2)
Top Labels
Issue Labels
enhancement (6) documentation (6) bug (3) hardware (3) help wanted (1) optical design (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 19 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
pypi.org: katsu

Mueller calculus, polarimetry, and motion control

  • Documentation: https://katsu.readthedocs.org
  • License: The MIT License (MIT) Copyright (c) 2024 Jaren N. Ashcraft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 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.
  • Latest release: 0.1.0
    published over 1 year ago
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 19 Last month
Rankings
Dependent packages count: 10.1%
Average: 33.5%
Dependent repos count: 56.9%
Maintainers (1)
Last synced: 6 months ago