%% Getting help
% There are several resources to get help using CANlab object-oriented tools.
% Table of Contents
% Walkthroughs and tutorials
%     How-to Walkthroughs
%     Didactic tutorials
%     Batch scripts: Modular example code
%     Additional CANlab examples and tutorials
% Interactive help within Matlab
% Other resources
%     CANlab Core readthedocs
%     CANlab Repos Guide
%     CANlab Toolbox-specific help
%     Study-specific repositories
%     Resources for CANlab members: Data, templates, devices, more!
% Help with Matlab in general
%% Walkthroughs and tutorials
% The “first stop” is https://canlab.github.io/
%   This includes pages on the object types and philosophy.
%
% There are two sets of Matlab tutorials:
%
%% How-to Walkthroughs
% “Walkthroughs” is designed as a set of “how-to” documents for the tools, with examples and code.
% https://canlab.github.io/walkthroughs/
%
%% Didactic tutorials
% “Tutorials” are more didactic and include more conceptual description, along with data and code. This also has a section on the SPM GUI and running statistical models with SPM.
% https://canlab.github.io/tutorials/
%
%% Batch scripts: Modular example code
% The "second-level batch scripts" run flexible pipelines for doing many things with CANlab object-oriented tools once you have a set of image files to work with (typically one image per task condition per participant). They also produce published reports.
% These scripts illustrate commands and processes that can be used with image data at other levels of analysis, too. If you find output (figures, tables, etc.) that you want to know how to create, you can read the code to see how it's done.
% https://canlab.github.io/batch/
%
%% Additional CANlab examples and tutorials
% The code that generates the walkthroughs and tutorials on canlab.github.io, and the "second-level batch" code, is in a Github repository, here:
% https://github.com/canlab/CANlab_help_examples
% It contains some "in progress" walkthroughs as well. We hope that people will be interested in contributing to and improving these!
%
%
%% Interactive help within Matlab
% Much of the help available is embedded in the Matlab functions and object class definition files.
% The info here is available by typing commands in Matlab:
% doc <object class name>
% And:
% help <function>
% Try these:
% doc fmri_data
% doc atlas
% And this:

help fmri_data

%
% There are a few object types (or "classes") that organize most of the things you can do with image data.  Each class has methods associated with it, which are things you can run. You can list these methods using doc (see above) or using the "methods" command:

methods(fmri_data)

% Then you can get help on any method by typing help <object class>.<method name>. For example:

help fmri_data.apply_mask

% Or, if there are not multiple "apply_mask" functions on your path, just:
% help apply_mask
%
%
%% Other resources
%
% Some older resources may also be helpful, and are here:
%
%% CANlab Core readthedocs
% A "read" of the help included with Canlab Matlab functions. This describes the basic object types and methods, but has not been updated in several years.
%
% https://canlabcore.readthedocs.io/en/latest/
% Or, for a PDF version:
% https://canlabcore.readthedocs.io/_/downloads/en/latest/pdf/
%
% The info here is available by typing commands in Matlab (see above):
% doc <object class name>
% help <function>
%% CANlab Repos Guide
% https://docs.google.com/document/d/15H0UheBqOxrNG1rjIF1XWx1I-XHphKw2WApF-kq-vaI/edit#
% This is a quite detailed document with information on:
% research computing (platform-specific but may be generally useful)
% data checking and visualization
% preprocessing
% first-level models
% second-level models
% thresholding
% predictive models
% data acquisition considerations
% integrating physiology
%% CANlab Toolbox-specific help
%
% Toolboxes like the Mediation toolbox, Robust regression toolbox, and meta-analysis toolbox have their own help files as well. Increasingly, help is integrated into the Walkthroughs and Tutorials discussed above, but check out the Readme files in these Github repositories and documentation in the toolbox folders as well.
%
%% Study-specific repositories
% The CANlab Github site contains many study-specific repositories, and many these are publicly available. Generally, they contain code and data that can be reused to generate new scripts and pipelines. You can search them here:
% https://github.com/canlab
%
%% Resources for CANlab members: Data, templates, devices, more!
%
% For those with access to restricted files, CANlab has a private repository that contains a lot of useful information. We are happy to share most of this on request, but believe it is more useful for the lab specifically than for general public use.
% https://github.com/canlab/CANlab_data_and_equipment_private
% It includes:
% Datasets: Behavioral datasets from some unpublished and published studies
% Equipment_and_devices: Descriptions and information about devices we use, including thermal/pressure/etc. noxious stimulators
% Redcap: Data and forms backing up some Redcap datasets
% Lab_Photos
% Lab_protocols_and_procedures: A Project template including slides and folders, manuscript template, info on datalad, high-performance computing, pain calibration, IRB, file handling, and more.
% Paper_and_grant_templates: Templates for posters, presentations, writing
% Resources_and_information: Misc info on MRI acquisition, chronic pain, Matlab programming (including beginners' guide), R, statistics, writing. Includes archival copy of CANlab Repos Guide!
% Web_applications: Code for online mediation and NPS calculations on web
% Questionnaires: Survey instruments and scoring
%
%% Help with Matlab in general
%
% This is not a comprehensive introduction to Matlab. It’s assumed that you will use other resources to supplement your basic understanding how to work with Matlab, including some linked here: https://canlab.github.io/tutorials/
%