Skip to content

Commit

Permalink
Updated docs; changed default database to public test db
Browse files Browse the repository at this point in the history
  • Loading branch information
k1o0 committed Oct 15, 2019
1 parent 02ddd3c commit b2081cb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion @Alyx/Alyx.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

properties
% URL to the Alyx database
BaseURL char = 'https://alyx.cortexlab.net'
BaseURL char = 'https://test.alyx.internationalbrainlab.org'
% Set the local directory for saving queued Alyx commands, create if needed
QueueDir char = 'C:\localAlyxQueue'
% Set whether input dialogs should appear, e.g. login window
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This repository contains a MATLAB class called Alyx, that facilitates RESTful PO

## Getting started

These instructions are for installing the package and interating with the database from MATLAB. See deployment for notes on how to deploy the project on a live system.
Extensive instructions for using this package can be found in `docs/AlyxMatlabPrimer.m`. See "deployment" for notes on how to deploy the project on a live system.

### Prerequisites
Alyx-MALTAB requires MATLAB 2016a or later. The code and instructions for installing the actual database can be found on the [cortex-lab/Alyx](https://github.com/cortex-lab/Alyx) repository.
Expand All @@ -20,6 +20,8 @@ cd alyx-matlab
savepath(pwd, fullfile(pwd, helpers));
```

To customise the database URL create a file called `+dat\paths.m`. This file should a function with that returns a structure with a field called `databaseURL`. The value of this field will be the default when a new Alyx object is instantiated. A template of this paths file can be found [here](https://github.com/cortex-lab/Rigbox/blob/master/docs/setup/paths_template.m).

Once the paths are added you can read the help pages:
```
doc Alyx
Expand Down
16 changes: 16 additions & 0 deletions docs/AlyxMatlabPrimer.m
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@
refs = ["2018-07-13_1_flowers" "2019-08-16_2_ZM_335"];
[~, eids] = ai.getSessions(refs)

% To convert the other way, use getExpRef:
refs = ai.getExpRef(eids);

% Sessions can be filtered based on subject, date, or associated dataset
% types:
sessions = ai.getSessions('cf264653-2deb-44cb-aa84-89b82507028a', ...
Expand Down Expand Up @@ -238,6 +241,19 @@
% Note: Inputs may be cellstr, char or string. The first output will be
% either a char or cellstr.

% File paths may also be retrieved using `Alyx.expFilePath`. This method
% allows one to get file paths for a given experiment reference and dataset
% type:
help Alyx.expFilePath

ref = '2019-04-11_1_KS005';
type = 'trials.itiDuration';
[fullpath, filename] = ai.expFilePath(ref, type);

% As with `dat.expFilePath` a specific repository location may be specified
% and the method also accepts subject, date and sequence number as separate
% inputs, instead of an expRef.

%% Saving files
% Saving files in a standard way can be easily achieved by using
% dat.expFilePath to return the path and file name for your data. The main
Expand Down

0 comments on commit b2081cb

Please sign in to comment.