ANY-maze Help > The ANY-maze reference > The File page > Exporting experiment data > Exporting test data

Exporting test data

Data can also be exported from ANY-maze in XML format.

Introduction

Most of the results that ANY-maze provides for a test are generated by processing the raw tracking data recorded while the test is running. For example, the distance the animal travels during a test is (more or less) the sum of the distances between each of its positions throughout the test. Clearly, these are the sorts of results you'll generally want, but there may be occasions when you'd like to access the raw data directly.

As you may know, this can easily be done using the Test data report, which presents the raw data in a spreadsheet format. You can easily save this report in a range of different formats, for example CSV, which can be read by programs such as Excel and Matlab. However, while this mechanism is great for saving the raw data for an individual test, it's not very satisfactory if you want to save the raw data for an entire experiment, which might include hundreds of tests. This is where the ability to Export test data comes in - this will automatically generate one file for each test in the experiment, with the file contents matching that of the Test data report spreadsheet.

Details

To export the data in this way is very simple:

 Switch to the File page 
 Select the Export option 
 Select the Export test data option 
 The right-hand side of the File page will allow you to specify the format to export the test data in, along with the location of the exported files and the Base file name for the export (described below) 
 Once you've done this, click the Start export button  

Choosing the format of the exported data

You can export the test data in one of the following formats:

SYLK formatSYLK stands for 'Symbolic link' and is a format developed by Microsoft for use with Spreadsheet programs. As you'd therefore expect, SYLK format files can be read in Excel but other programs support this format too. Using SYLK format (at least for transfer to Excel) has the advantage that formatting is retained.
CSV formatCSV stands for 'Comma-Separated Values', and in this format the spreadsheet is saved in a text format with one row per line and a comma between each item. This format is directly supported by Excel - indeed you'll find that Windows will describe such files as Microsoft Excel Comma-Separated Values Files.
dBase III/IVdBase format was originally developed for the once popular 'dBase' database program, but today it's supported by most database, spreadsheet and statistics programs.
Tab-separated textText format files are almost identical to CSV files except that a tab character is used to separate the items in each row.

Setting a location for the exported files

You can specify the location in which to save the exported test data files using the button on the right of this field. This will open a standard 'Save file' window which will allow you to select where the files should be saved.

By default, they'll be saved to the same folder as the experiment file.

Setting the base file name

As described above, exporting the test data will create one file for every test in the experiment. Clearly, this will generate multiple files. These files will all be saved to the same place and so the file for each test needs to be given a different name.

You can choose to include specific information about the animal and/or the test in the file name if you want to (see below); otherwise, the system will automatically append the test number to the end of the base file name that you enter.

Information you can include in the file name

ANY-maze lets you include test information in the file name using 'fields' in the name that you enter. You can either type in the text for the field that you want, or use the Fields... button to drop a list of the available fields.

You can include any of the following fields in the file name:

 [TestNum]The test number
 [TestDate]The date the test was performed
 [TestTime]The time the test was performed
 [AnimalNum]The animal number
 [AnimalID]The animal ID, if using your own animal IDs (if not, this will simply use the animal number)
 [Stage]The name of the stage that this test is part of
 [Trial]The trial number of this test within the stage
 [Apparatus]The name of the apparatus that this test was performed in
 [ExperimentFileName]The name of the experiment file (without the file extension) that this test is part of.

Fields which represent numbers will be replaced with ONLY the number - so for example, if you want your file name to include 'Test 1', you must use Test [TestNum] in the name, and not just [TestNum].

  

The [TestDate] and [TestTime] fields can have an additional format specified, to allow you to specify the order of the Day/Month/Year or Hours/Minutes/Seconds:

For [TestDate], you can use any of the following:

 YYYYThe year, as a four-digit number
 YYThe year, as a two-digit number
 MMThe month, as a two-digit number (e.g. 03 or 12)
 MThe month, using as many digits as necessary (e.g. 3 or 12)
 DDThe day, as a two-digit number (e.g. 05 or 31)
 DThe day, using as many digits as necessary (e.g. 5 or 31)

So you can use [TestDate MM-DD-YY] to generate a file name containing '07-29-21', or [TestDate YYYYMMDD] to generate a file name containing '20210729', for example.

For [TestTime], you can use any of the following:

 HHThe hour in 24-hour format, as a two-digit number (e.g. 07 or 18)
 HThe hour in 24-hour format, using as many digits as necessary (e.g. 7 or 18)
 MMThe minutes, as a two-digit number (e.g. 08 or 59)
 MThe minutes, using as many digits as necessary (e.g. 8 or 59)
 SSThe seconds, as a two-digit number (e.g. 05 or 45)
 SThe seconds, using as many digits as necessary (e.g. 5 or 45)

So you can use [TestTime HHMM] to generate a file name containing '1459', or [TestTime H.M] to generate a file name containing '3.25', for example.

The characters you choose must be valid filename characters - so you can't use '/' to separate DD/MM/YY, or ":" to separate HH:MM, for example.

  

By default, ANY-maze uses the experiment file name and test number as the base file name (without the .szd extension) - i.e. 'XXX - Test [TestNum]'. So if your experiment is called 'Wonder drug Plusmaze', then the export will, by default, generate files called 'Wonder drug Plusmaze - Test 1', etc. However, as described above, you can change this base file name to anything you like.

  

Some example file names are:

   'Water-maze experiment - [AnimalID] [Stage] Trial [Trial]' 

This will generate files called 'Water-maze experiment - D039 Training Trial 1', etc.

   'Animal [AnimalNum] - test performed on [TestDate DD-MM-YY] at [TestTime HH-MM] in [Apparatus]' 

This will generate files called 'Animal 1 - test performed on 03-11-20 at 10-25 in Open Field', etc.

Making sure that file names are unique

You should take care when selecting which fields to use in your file name, to ensure that every file will have a unique name. For example, if you have a water-maze experiment with two stages (a Training stage and a Treated stage), and you set up your base file name as 'Water-maze experiment - animal [AnimalNum]', then ANY-maze can only generate one file name for each animal - so when ANY-maze comes to create the file for anything after the first Training stage for each animal (Training trials 2, 3 etc. or the Treated trial), the file will already exist.

ANY-maze will warn you that this will happen before you start the Export, but if you continue the Export anyway, then ANY-maze will attempt to create a unique file name for a test by appending the test number - ' (Test 2)', for example - and will use that as a file name instead.

In the unlikely event that there is already a file with that name in the folder, ANY-maze will simply append ' (2)', ' (3)', etc. to the file name until it finds one that doesn't already exist.

© Copyright 2003-2026 Stoelting Co. All rights reserved

ANY-maze help topic T0069