Metadata-Version: 2.4
Name: micat
Version: 0.1.0
Summary: Micat is for Microscopy Calibration and Testing using USAF resolution targets.
Project-URL: Homepage, https://gitlab.com/openflexure/micat
Project-URL: Bug Tracker, https://gitlab.com/openflexure/micat/-/issues
Author-email: Joe Knapper <joe.knapper@glasgow.ac.uk>, Richard Bowman <richard.bowman@glasgow.ac.uk>, Julian Stirling <julian@julianstirling.co.uk>
License-Expression: GPL-3.0-only
License-File: LICENSE
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Requires-Dist: matplotlib
Requires-Dist: numpy
Requires-Dist: opencv-python-headless
Requires-Dist: openflexure-metadata
Requires-Dist: pyyaml>=5.1
Requires-Dist: typst~=0.14.8
Provides-Extra: dev
Requires-Dist: build; extra == 'dev'
Requires-Dist: codespell; extra == 'dev'
Requires-Dist: coverage~=7.8.0; extra == 'dev'
Requires-Dist: deepdiff; extra == 'dev'
Requires-Dist: mypy; extra == 'dev'
Requires-Dist: pdoc; extra == 'dev'
Requires-Dist: pytest-cov~=6.1; extra == 'dev'
Requires-Dist: pytest-mock==3.14; extra == 'dev'
Requires-Dist: pytest~=8.3; extra == 'dev'
Requires-Dist: ruff~=0.15; extra == 'dev'
Requires-Dist: twine; extra == 'dev'
Requires-Dist: types-pyyaml; extra == 'dev'
Description-Content-Type: text/markdown

# micat

Micat is for Microscopy Calibration and Testing using USAF resolution targets.

> *micat* - The third-person singular present active indicative of *micō*  
> *micō* - Twinkle (Latin)

## Install

You can install micat using

```
pip install micat
```


## Using micat

Micat will eventually port all the functionality from [Richard's USAF analysis repository](https://github.com/rwb27/usaf_analysis). So far we have completed:

`usafcal` - This takes an image of a USAF resolution target and calculates the effective size of one pixel in the image, and also the field of view. These are output in a PDF. Unless told otherwise, the script assumes that the smallest element it can find is group 7 element 6. **You should check the pdf output to check if it has labelled the groups correctly**. If not you can run the analysis again using the `-g` and `-e` flags to set the group correct smallest group. As standard, the PDF and associated YAML file will begin with the image name, and be in the same directory as the input image.

To use, run the following command from a terminal

    micat usafcal filename.jpg

To specify that the smallest element analysed is element 2 in group 4:

    micat usafcal filename.jpg -g 4 -e 2

To run on multiple files, input multiple file names:

    micat usafcal filename1.jpg filename2.jpg

or if your terminal supports it, use wild cards:

    micat usafcal */*.jpg

For more information on the progress while running, use the verbose flag -v:

    micat usafcal filename.jpg -v

For a complete list of options you can run:

    micat help usafcal


