Skip to content

Logo Logo

Downloading Analysis Outputs Using the Flywheel UI and SDK

Introduction

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.

Instruction Steps

Downloading Analysis Outputs Using the Flywheel Dashboard

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

  1. Sign in to Flywheel.
  2. Click Projects, and select a project.
  3. Select the Analyses tabScreen_Shot_2020-01-29_at_12.28.58_PM.png
  4. Select the options menu (

add_ons_options_menu.png ), and choose Download Files.

Single Analysis File

  1. Sign in to Flywheel.
  2. Click Projects, and select a project.
  3. Select the Analyses tab.
  4. Click on an Analyses.
  5. Select the options menu (

add_ons_options_menu.png ) next to the file, and 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.

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, and note the Job ID. JobIDExample.png
  5. 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>')

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 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>')