Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

...

You can either download your files using the XNAT desktop client (Option 1 below) or by submitting a job to the data transfer que in Artemis (Option 2 below). If you would like to download straight into scratch, you will need to do this through Artemis (Option 2). Using the desktop client may be simpler or more intuitive, however, using Artemis has many upsides. Firstly, it can be incredibly slow. Using Artemis is recommended as you don’t need to be using use your computers own resources to download. Secondly, XNAT downloads the scans with an impractical folder structure + naming convention (see below).

...

Using Artemis will result in a better naming convention and folder structure (as below).

...

Option 1: XNAT Desktop Client (only to RDS).

...

Next, select “Download files” from the main menu, select your XML file and set the destination as the path to your RDS folder. The XML file is the file that is downloaded after selecting option 3 on the XNAT download page (you can follow the filtering in. Once you press download the files specified in the XML will be downloaded into the RDS folder you have selected.

...

You can track the progress of the download in “Transfer History”.

Option 2: Submit a job through Artemis (recommended).

1. Move the XML file from your local downloads to an Artemis accessible location

...

To get Artemis to download scans from XNAT, we can use a tool called xnat-get from a collection of command line tools: XNAT-Utils (Command line client XNAT-Utils (Artemis)). To do so we will need to submit it as a job request with a pbs script. To create the pbs script copy and paste the below into a text editor:

...

  1. Replace “Project” with the name of the project in Artemis.

  2. Replace “Job Name” with a name for your job.

  3. Adjust the wall time to reflect the size of the job. This will depend on the number, type, and file type of the scans you are downloading. You may want to try downloading whatever you are after from only one session first, see how long it took and then multiply that time by the number of sessions you are after + a little extra.

You can use the data transfer queue (dtq) for this job so your project’s fair share will not be affected.

...

  1. The first argument is the location and file name of the XML file.

  2. The second argument (after --target) is the location you would like the XNAT files downloaded to.

  3. Apply any options you would like, outlined in the comments of the script. **Please note the --convert_to options are not currently working.

Now your script is ready to go. Make sure to save it with the extension as pbs and that it’s Unix compatible.

...

First, navigate to your login node (the directory you are in when you first log in to Artemis). If you haven’t used xnatutils before, you will need to first create an xnatutils environment for it by doing the following. Please enter each line one at a time:

...

Each session will be downloaded into its own folder in the directory you specified as the target. If you specified – subject dirs, the session folders will be in subject folders.

*If your job will take longer than 2 days, you should break it up into multiple jobs, and re-enter your XNAT credentials.