This package aims to provide a comprehensive framework for assessing dynamic functional connectivity (dFC) using multiple methods and comparing results across methods.
Project description
pydfc
An implementation of several well-known dynamic Functional Connectivity (dFC) assessment methods.
Installation
Simply install pydfc using the following steps:
conda create --name pydfc_env python=3.11 conda activate pydfc_env pip install pydfc
Examples
The following example scripts illustrate how to use the toolbox:
examples/dFC_methods_demo.py Demonstrates how to load data and apply each of the implemented dFC methods individually.
examples/multi_analysis_demo.py Demonstrates how to apply multiple dFC methods on a dataset and compare their results.
For more details about the implemented methods and the comparison analysis, see our paper:
On the variability of dynamic functional connectivity assessment methods
Mohammad Torabi, Georgios D Mitsis, Jean-Baptiste Poline, GigaScience, Volume 13, 2024, giae009.
AI-Assisted Tutorial Experience (Optional)
In addition to the example scripts and documentation, pydfc provides optional AI-assisted learning workflows that can help you explore the toolbox, understand dynamic functional connectivity methods, and generate minimal working examples.
If you are unsure which dFC method fits your analysis, or you are not sure how to start your journey with dFC assessment, we highly encourage trying the AI-assisted tutorial experience. It is designed to combine guidance from both the codebase and our paper, so you can move from first steps to informed method choices with more confidence.
These options are entirely optional and do not affect the core functionality of the toolbox.
Using GitHub Copilot Prompts
If you use GitHub Copilot in VS Code or Visual Studio, you can access guided prompts that walk you through installing pydfc, loading demo data, and running key dFC methods.
The prompt set now includes a paper-grounded deep mode for method questions, so users can ask about assumptions, implementation details, expected behavior, and pros/cons with answers grounded in:
docs/DFC_METHODS_CONTEXT.md
docs/PAPER_KNOWLEDGE_BASE.md
How to use:
Open the repository in VS Code.
Open Copilot Chat.
Type / and run one of the available prompts:
/00_prompts_index /01_install /02_choose_method /03_state_free_quickstart /04_state_based_quickstart /05_paper_method_qa /06_troubleshoot
Start with /00_prompts_index if you want a fast routing guide to choose the best prompt for your goal.
What is new in this prompt experience:
/02_choose_method now appears right after install, so users can pick a method path early.
/05_paper_method_qa is dedicated to paper-based method Q&A.
/06_troubleshoot is now the final step in the sequence.
Method answers are configured for deeper, assumption-first explanations and include citation guidance for Torabi et al., 2024 when relevant.
These prompts provide a structured, step-by-step tutorial experience and generate copy-paste code tailored to common workflows.
If you have Copilot access, we strongly recommend this interactive path for a friendly and practical onboarding experience.
Using Codex, Claude, or Other AI Coding Assistants
If you use Codex, Claude, or another AI coding assistant, the repository includes guidance files designed for AI-assisted workflows:
docs/SKILL.md — comprehensive usage guidance and tutorial flow
agents.md — concise agent instructions (if present)
docs/DFC_METHODS_CONTEXT.md — assumptions, interpretation, and method comparison principles
docs/PAPER_KNOWLEDGE_BASE.md — paper-grounded implementation notes, expected behavior, and pros/cons
You can point your AI assistant to these files or ask it to follow them when guiding you through pydfc.
Example prompt:
Use the instructions in docs/SKILL.md to guide me through a minimal PydFC workflow.
Using Any LLM Chat (Copy-Paste Method)
If you do not use Copilot, Codex, or Claude, you can still benefit from AI guidance.
Steps:
Open docs/SKILL.md.
Copy its contents.
Paste it into your preferred LLM chat (e.g., ChatGPT, Claude, Gemini).
Ask questions such as:
“Guide me through the state-free quickstart.”
“Which dFC method should I use for my dataset?”
“Generate a minimal Sliding Window example.”
This provides a portable, copy-paste tutorial experience.
Notes on Privacy and Offline Use
The AI-assisted workflows described above operate within your chosen AI environment.
No data is sent by pydfc itself.
Users working with sensitive data should follow their institutional policies when using external AI services.
Recommended First Step
If you are new to pydfc, we recommend starting with:
examples/dFC_methods_demo.py
The Copilot prompt /00_prompts_index to pick your path quickly
The Copilot prompt /02_choose_method followed by /03_state_free_quickstart (if available)
Or the copy-paste method using docs/SKILL.md
This optional AI-assisted workflow is designed to complement — not replace — the documentation and example scripts.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pydfc-1.0.8.tar.gz.
File metadata
- Download URL: pydfc-1.0.8.tar.gz
- Upload date:
- Size: 240.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c25e2e2daac847ff6040ff131911c3b122f70e48c319550b5e5a7b29847bd73
|
|
| MD5 |
a2b63831b955f6ec1d95ff9afa030a59
|
|
| BLAKE2b-256 |
d91d91313c2f92c0d75bc3e6e3af810be66d8c3565d48a8d9815044d36e01447
|
Provenance
The following attestation bundles were made for pydfc-1.0.8.tar.gz:
Publisher:
test.yml on neurodatascience/dFC
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydfc-1.0.8.tar.gz -
Subject digest:
8c25e2e2daac847ff6040ff131911c3b122f70e48c319550b5e5a7b29847bd73 - Sigstore transparency entry: 1181104068
- Sigstore integration time:
-
Permalink:
neurodatascience/dFC@a11168a3e310e2057aca089f7dffa752072de393 -
Branch / Tag:
refs/tags/v1.0.8 - Owner: https://github.com/neurodatascience
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test.yml@a11168a3e310e2057aca089f7dffa752072de393 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pydfc-1.0.8-py3-none-any.whl.
File metadata
- Download URL: pydfc-1.0.8-py3-none-any.whl
- Upload date:
- Size: 65.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac208a2438dffff09b092e27368f7cb8d9c0c56adda91f86df3f7961b387702a
|
|
| MD5 |
0bd5b75cee55ca669356195fef3da927
|
|
| BLAKE2b-256 |
53be57a92dc399184ae271b1f0d4d5a7ffcb5723130cfeb2712d8361b6e0ea7a
|
Provenance
The following attestation bundles were made for pydfc-1.0.8-py3-none-any.whl:
Publisher:
test.yml on neurodatascience/dFC
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydfc-1.0.8-py3-none-any.whl -
Subject digest:
ac208a2438dffff09b092e27368f7cb8d9c0c56adda91f86df3f7961b387702a - Sigstore transparency entry: 1181104080
- Sigstore integration time:
-
Permalink:
neurodatascience/dFC@a11168a3e310e2057aca089f7dffa752072de393 -
Branch / Tag:
refs/tags/v1.0.8 - Owner: https://github.com/neurodatascience
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test.yml@a11168a3e310e2057aca089f7dffa752072de393 -
Trigger Event:
push
-
Statement type: