This article explains how to download an analysis in the Flywheel UI or using the SDK.
Note: At this time, you cannot download analyses with the Flywheel CLI.
Analyses are available on Projects, Subjects, Sessions and Acquisitions.
Sign in to Flywheel.
Click Projects, and select a project.
Select the Analyses tab
-
Select the options menu (
), and choose Download Files.
You can download analysis outputs using the Flywheel SDK. The examples below use the Python SDK. See our Python and MATLAB SDK documentation for more information on getting started with the SDK.
This method uses the job ID from a gear to designate which analysis to download. This method is recommended if you have the Site Admin role.
To find the job ID:
Sign in to Flywheel as a Site Admin.
Select Jobs Log in the left menu.
Select the job for which you want the analysis output.
Select the Log tab, and note the Job ID.
-
Replace the placeholder text with the information from your environment:
import flywheel fw = flywheel.Client('<YourAPIKey>') analysis = fw.get_analysis(fw.get_job_detail('<job id>').destination.id) analysis.download_tar('<NameOfFile>')
In this example, we use fw.lookup
to designate the path to the analyses you want to download. The example below downloads an analysis attached at the session.
Note
Subject, session, and analysis labels are not required to be unique, so make sure you are downloading the correct analysis.import flywheel fw = flywheel.Client('<YourAPIKey>') analysis = fw.lookup('<group-id>/<project-label>/<subject-label>/<session-label>/analyses/<analysis-label>') analysis.download_tar('<NameOfFile>')