Skip to main content

A Python client for accessing NEMAR datasets.

Project description

nemar-py

A Python client for accessing public NEMAR datasets through the NEMAR data endpoint.

Usage

nemar-py download --dataset nm000132 --target-dir data/nm000132

The downloader starts from:

https://data.nemar.org/{dataset}/

It uses the advertised dataset index, metadata URL, and version manifest. It does not use authentication and does not fall back to S3.

To inspect the versions already advertised by NEMAR:

nemar-py versions --dataset nm000132

--tag latest resolves through the endpoint's latest field, and explicit tags are validated against the endpoint's advertised versions.

By default, nemar-py uses aria2c when it is available on PATH; otherwise it uses a built-in HTTP downloader.

nemar-py download --dataset nm000132 \
                  --tag v1.1.1 \
                  --subject 001 \
                  --task MMN \
                  --datatype eeg \
                  --suffix eeg \
                  --extension .set

Semantic BIDS filters can be repeated. They accept either BIDS-prefixed labels (sub-001, task-MMN, run-01) or plain labels (001, MMN, 01). Less common BIDS entities can be selected with --entity key=value, for example --entity desc=clean.

Dataset-level BIDS folders are selected with --scope:

# Download stimuli for one task
nemar-py download --dataset nm000132 --scope stimuli --task MMN

# Download derivatives from one pipeline
nemar-py download --dataset nm000132 \
                  --scope derivatives \
                  --pipeline eeglab \
                  --subject 001

--include and --exclude remain available as path-level refinements. When combined with semantic BIDS filters, --include narrows the semantic result and --exclude removes paths from it.

Essential BIDS root files such as dataset_description.json, participants.tsv, participants.json, README, README.md, CHANGES, and LICENSE are kept when present, even when include or exclude patterns are used.

Python

import nemar

index = nemar.fetch_dataset_index(dataset="nm000132")
versions = nemar.list_dataset_versions(dataset="nm000132")

nemar.download(
    dataset="nm000132",
    target_dir="data/nm000132",
    subject=["001", "002"],
    task="MMN",
    datatype="eeg",
    suffix="eeg",
    extension=".set",
)

nemar.download(
    dataset="nm000132",
    scope="stimuli",
    task="MMN",
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nemar_py-0.1.0.tar.gz (65.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nemar_py-0.1.0-py3-none-any.whl (35.1 kB view details)

Uploaded Python 3

File details

Details for the file nemar_py-0.1.0.tar.gz.

File metadata

  • Download URL: nemar_py-0.1.0.tar.gz
  • Upload date:
  • Size: 65.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nemar_py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d4146126343ada7cb583b569d1b92aa78e24003cb45cefc15db295997fc074a9
MD5 eec28d5769781c0cd97ff736f901a535
BLAKE2b-256 db5ca72f43d45f79b96ea377992cf95723ba369ffdf44b5b4c24c421273a7a54

See more details on using hashes here.

Provenance

The following attestation bundles were made for nemar_py-0.1.0.tar.gz:

Publisher: publish.yml on nemarOrg/nemar-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nemar_py-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nemar_py-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 35.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nemar_py-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce47c1a1085cdafc5a981b68aa128c88eedb5227fa894641e2b3d711ebf3fdc0
MD5 39a88a483ceec2d1b26e7f560c8948d2
BLAKE2b-256 5bb9a8de6ea72875bfab961d8d7b56e4c34e604089de4bb68e169ea76ee6c45b

See more details on using hashes here.

Provenance

The following attestation bundles were made for nemar_py-0.1.0-py3-none-any.whl:

Publisher: publish.yml on nemarOrg/nemar-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page