Skip to content

Downloading Analysis Outputs Using the Flywheel UI and SDK

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.

Downloading Analysis Outputs Using the Flywheel Dashboard

Analyses are available on Projects, Subjects, Sessions and Acquisitions.

  1. Sign in to Flywheel,
  2. Click Projects,
  3. Select a project,
  4. Select the Analyses tab,

    Screen_Shot_2020-01-29_at_12.28.58_PM.png

  5. Select the options menu (), and

  6. Choose Download Files.

Single Analysis File

  1. Sign in to Flywheel,
  2. Click Projects,
  3. Select a project,
  4. Select the Analyses tab,
  5. Click on an Analyses,
  6. Select the options menu () next to the file, and
  7. Choose Download Files.

Screen_Shot_2020-01-29_at_12.29.25_PM.png

Downloading Analysis Outputs Using the SDK

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.

SDK Example 1

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:

  1. Sign in to Flywheel as a Site Admin,
  2. Select Jobs Log in the left menu,
  3. Select the job for which you want the analysis output,
  4. Select the Log tab,
  5. Note the Job ID,

    JobIDExample.png

  6. Replace the placeholder text with the information from your environment:

1
2
3
4
import flywheel
fw = flywheel.Client('<YourAPIKey>')
analysis = fw.get_analysis(fw.get_job_detail('<job id>').destination.id)
analysis.download_tar('<NameOfFile>')

SDK Example 2

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 always required to be unique, so make sure you are downloading the correct analysis.

1
2
3
4
import flywheel
fw = flywheel.Client('<YourAPIKey>')
analysis = fw.lookup('<group-id>/<project-label>/<subject-label>/<session-label>/analyses/<analysis-label>')
analysis.download_tar('<NameOfFile>')