Metadata-Version: 2.4
Name: em-database
Version: 0.5.0
Summary: A database for electron microscopy data using pooch to download and manage files.
Author-email: Carter Francis <cartsfrancis@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://electronmicroscopy.github.io/emdatabase/
Project-URL: Documentation, https://electronmicroscopy.github.io/emdatabase/datasets.html
Project-URL: Repository, https://github.com/electronmicroscopy/emdatabase
Project-URL: Issues, https://github.com/electronmicroscopy/emdatabase/issues
Keywords: electron microscopy,database,materials science
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Scientific/Engineering :: Image Processing
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pooch
Requires-Dist: py7zr
Requires-Dist: pyyaml
Requires-Dist: tqdm>=4.67.1
Provides-Extra: widget
Requires-Dist: anywidget>=0.9; extra == "widget"
Provides-Extra: tests
Requires-Dist: pytest; extra == "tests"
Requires-Dist: pytest-cov; extra == "tests"
Requires-Dist: hyperspy; extra == "tests"
Requires-Dist: quantem; extra == "tests"
Requires-Dist: anywidget>=0.9; extra == "tests"
Requires-Dist: jsonschema; extra == "tests"
Provides-Extra: doc
Requires-Dist: sphinx; extra == "doc"
Requires-Dist: sphinx-gallery; extra == "doc"
Requires-Dist: quantem; extra == "doc"
Requires-Dist: hyperspy; extra == "doc"
Requires-Dist: pydata_sphinx_theme; extra == "doc"
Requires-Dist: sphinx_design; extra == "doc"
Provides-Extra: dev
Requires-Dist: ruff; extra == "dev"
Requires-Dist: basedpyright; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: jsonschema; extra == "dev"
Requires-Dist: anywidget>=0.9; extra == "dev"
Dynamic: license-file

emdatabase
----------

This is a project for aggregating different Electron Microscopy files which are hosted over different sources. It is intended to simplify downloading example datasets and trained machine learning model weights for tutorials and method validation.

A list of all datasets and model weights can be found in our [docs](https://electronmicroscopy.github.io/emdatabase/datasets.html).

## Installation

```bash
pip install em-database
```
You can install `em-database` via pip or as a local install in the usual way. The distribution is named `em-database` on PyPI; the import name is `emdatabase`. 

## Usage

Examples of how to download data and configure storage locations can be found in our [docs](https://electronmicroscopy.github.io/emdatabase/examples/index.html), as well as in the [quantem-tutorials](https://github.com/electronmicroscopy/quantem-tutorials/tree/main/tutorials/core) repository. 

## Adding a dataset

We welcome contributions of new or existing data! 

Datasets are described by a YAML file in `emdatabase/index/`, one entry per file,
validated against `emdatabase/index/json-schema.json`.  The class name is generated
from the top-level key:

```yaml
MyDataset:
  description: What the data is, how it was acquired and how it is calibrated.
  source: https://zenodo.org/records/<record>/files
  file: MyDataset.zspy
  checksum: md5:<hash>
  size_bytes: 1200000000
  technique:
    - 4D-STEM
  license: CC-BY-4.0
```

A dataset may list more than one technique - in-situ 4D-STEM, cryo EELS - and is
then listed under each of them. `emdatabase/index/techniques.yaml` is the
vocabulary they come from: `acquisition` (how the data was taken) and `ml_task`
(what a model does). A dataset declares acquisition techniques only; a
`kind: weights` entry declares one of those plus the ML tasks it performs.

Submissions go through an issue.  Fill in the
[new dataset issue form](https://github.com/electronmicroscopy/emdatabase/issues/new?template=new_dataset.yaml)
and an action writes the file and opens the pull request. For very large datasets it might be easier to use the CLI
as described on the [Add Dataset page](https://electronmicroscopy.github.io/emdatabase/add_dataset.html).
See [CONTRIBUTING.md](CONTRIBUTING.md).

