
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "auto_examples/02-multisite-data/04-run_load_on_harmony.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

    .. note::
        :class: sphx-glr-download-link-note

        :ref:`Go to the end <sphx_glr_download_auto_examples_02-multisite-data_04-run_load_on_harmony.py>`
        to download the full example code.

.. rst-class:: sphx-glr-example-title

.. _sphx_glr_auto_examples_02-multisite-data_04-run_load_on_harmony.py:


Load ON-Harmony dataset
=======================

.. GENERATED FROM PYTHON SOURCE LINES 7-9

Imports
-------

.. GENERATED FROM PYTHON SOURCE LINES 9-17

.. code-block:: Python


    from uniharmony import verbosity
    from uniharmony.datasets import clean_tmp, load_ONharmony


    verbosity("debug")









.. GENERATED FROM PYTHON SOURCE LINES 18-20

Load dataset
------------

.. GENERATED FROM PYTHON SOURCE LINES 20-30

.. code-block:: Python


    load_ONharmony(
        subjects="16981",
        sessions="NOT4GEP001",
        modalities="anat",
        suffixes="T1w",
        extensions=".json",
    )






.. rst-class:: sphx-glr-script-out

 .. code-block:: none

    2026-05-18 13:04:33 [debug    ] Validating arguments
    2026-05-18 13:04:33 [info     ] Visible dataset directory ready at /home/runner/work/UniHarmony/UniHarmony/examples/02-multisite-data/ON-Harmony
    2026-05-18 13:04:33 [debug    ] Hidden dataset path prepared: /tmp/datalad_cache
    2026-05-18 13:04:33 [debug    ] Using hidden folder at /tmp/datalad_cache
    2026-05-18 13:04:33 [debug    ] Source URL: https://github.com/OpenNeuroDatasets/ds004712.git
    2026-05-18 13:04:33 [info     ] Cloning DataLad dataset...
    [INFO] Attempting a clone into /tmp/datalad_cache 
    [INFO] Attempting to clone from https://github.com/OpenNeuroDatasets/ds004712.git to /tmp/datalad_cache 
    [INFO] Start enumerating objects 
    [INFO] Start counting objects 
    [INFO] Start compressing objects 
    [INFO] Start receiving objects 
    [INFO] Start resolving deltas 
    [INFO] Completed clone attempts for Dataset(/tmp/datalad_cache) 
    [INFO] Remote origin not usable by git-annex; setting annex-ignore 
    [INFO] https://github.com/OpenNeuroDatasets/ds004712.git/config download failed: Not Found 
    2026-05-18 13:04:38 [info     ] DataLad dataset cloned successfully
    2026-05-18 13:04:38 [info     ] Getting: sub-16981/ses-NOT4GEP001/anat/sub-16981_ses-NOT4GEP001_T1w.json
    2026-05-18 13:04:38 [info     ] Copied derivative files to target directory.
    2026-05-18 13:04:38 [info     ] Getting: participants.tsv
    2026-05-18 13:04:38 [info     ] Copied root files to target directory.




.. GENERATED FROM PYTHON SOURCE LINES 31-33

Clean up
--------

.. GENERATED FROM PYTHON SOURCE LINES 33-36

.. code-block:: Python


    # Later, clean up the temporary cache
    clean_tmp("datalad_cache")




.. rst-class:: sphx-glr-script-out

 .. code-block:: none

    2026-05-18 13:04:38 [info     ] Removing temporary files: /tmp/datalad_cache
    2026-05-18 13:04:39 [info     ] Temporary cache removed successfully.





.. rst-class:: sphx-glr-timing

   **Total running time of the script:** (0 minutes 6.593 seconds)


.. _sphx_glr_download_auto_examples_02-multisite-data_04-run_load_on_harmony.py:

.. only:: html

  .. container:: sphx-glr-footer sphx-glr-footer-example

    .. container:: sphx-glr-download sphx-glr-download-jupyter

      :download:`Download Jupyter notebook: 04-run_load_on_harmony.ipynb <04-run_load_on_harmony.ipynb>`

    .. container:: sphx-glr-download sphx-glr-download-python

      :download:`Download Python source code: 04-run_load_on_harmony.py <04-run_load_on_harmony.py>`

    .. container:: sphx-glr-download sphx-glr-download-zip

      :download:`Download zipped: 04-run_load_on_harmony.zip <04-run_load_on_harmony.zip>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
