Skip to content

Commit

Permalink
Release v3.0.0 (#26)
Browse files Browse the repository at this point in the history
* Added a function to get the tapas revision and print it at start.

* Update README.md; GitHub Links, new support policy, links to toolboxes and updated list of their names

* updated print logo to translational not TNU; typo versions

* Update README.md; links to changelog; extra info on toolboxes; new version 2.7.3.2.

* Update CHANGELOG.md

* Update README.md;removed GPO from the list of available toolboxes

* Deleted PhysIO folder for reinsertion with commit history

* Added PhysIO via subtree merge

* Update README.md; release number 2.7.4.1 for integrating PhysIO R2017.3

* Update CHANGELOG.md; release number 2.7.4.1 for integrating PhysIO R2017.3

* added TAPAS logos to misc

* Update README.md; included logo and download info via releases

* Changed version.

* - HUGE toolbox: initial release

* - Added windows mex to gitignore

* - HUGE: updated readme file

* - added matlab autosave (*.asv) to gitignore

* - HUGE: rename readme files

* - HUGE: added prior generating function, renamed readme files, reorganized default parameter script

* - HUGE: moved default settings to inversion function

* - HUGE: improved reproducibility, added more comments

* Update CHANGELOG.md; CLA/CONTRIBUTING.md mentioned

* Update CHANGELOG.md; prospective date of release added

* added Contributing and CLA from tapas-meeting.wiki

* updated CLA file name

* - HUGE: added simplified interface; published demo script as html; added example for empirical Bayes; added function for generating example data; added function for basic visualization of results

* Implemented automatic download of the data. Not tested.

* Updated the readme file.

* Small error in documentation.

* Removed empty gpo folder from TAPAS

* rDCM Toolbox: Initial release

* Enabled the automatic compiling of mex files and added a new function for visualization of rDCM results

* Adapted the ReadMe.md file to acknowledge the use of SPM functions

* - HUGE: fixed bug when compiling from different directory; fixed bug when calling inversion function without optional parameters; updated readme file

* Updated changelog.

* Removed the mex-files, will be generated for each user automatically from the script

* Small modification to visualization and added a Manual

* Update README.md

* Polished the option and output structure; also adopted the Manual.pdf to account for these changes

* Additional polishing of code and Manual

* Changed the Header of all scripts and did some slight restructuring of tapas_rdcm_estimate

* - HUGE: added RNG seed as optional input; fixed typo

* Implement suggestions by YY for improvement of rDCM

* Small change to visualization function

* Adjusted the headers of the functions

* - HUGE: added suggestion for changelog entry for HUGE

* Corrected fileseparator in tapas_rdcm_tutorial.m

* Checkouted the latest version of dora from Eduardo's fork.

* Updated CHANGELOG.md

* Revert "Merge branch 'develop'"

This reverts commit 2d944ed, reversing
changes made to 72ff6f5.

* - HUGE: removed dependency on Matlab statistics toolbox

* Adapted the style of Changelog to style in TAPAS

* Added rDCM entry to CHANGELOG

* Made restrictInputs an explicit option to set

* Recovered deleted files.

* Improved visualization function

* Merge development into rDCM branch

* Added rDCM to the CHANGELOG of TAPAS

* HGF Toolbox version 5.2.0

* Updated changelog.

* Refactor dora to seria and delete SERI.

* Deleted old mex files not used anymore.

* Refactor mex files. C and matlab compiling.

* Refactoring the python code.

* Repaired bug in prosa.

* Updated cython code.

* Rename dora to seria.

* Deleted files that are no superficial.

* Deleted seri files from matlab.

* Working example of inversions.

* Working on improving examples.

* Working flat model.

* Working hier. mixed model.

* Started working on the implementation.

* Updated readme seria.

* Working on the documentation.

* Improved documentation.

* Small change.

* Documentation seria.

* Improved the documentation and some function.

* Update docs SERIA.

* Update documentation.

* Updated SERIA documentation.

* SERIA updated documentation.

* Update Documentation.

* Small change.

* Improved docs.

* small change.

* Update seri docs.

* small change.

* Indexed seria.

* SERIA docs.

* - Release PhysIO Toolbox R2018.1

* - added PhysIO to changelog

* Update CHANGELOG.md; line break and proper doi links everywhere

* PhysIO Release R2018.1.1 (bugfix, better documentation export)

* Implemented the reparametrization.

* Added functions to reparametrize.

* Updated implementation and remove small errors.

* Updated misc and log file.

* Refactor prosa and seria multi.

* Refactor the mex functions.

* Miscelaneous tools.

* Improved the reparametrization of parameters.

* Small correction.

* Added checking for parameters.

* Updated version of the code.

* Added figures and updated docs.

* Updated to the mpdcm toolbox.

* Updated changelog.

* Updated change log.

* Update README.md; https for github links

* Update README.md; compatibility with Markdown format

* Update README.md; html link to tutorial

* Update README.txt; sync to .md...are both needed?

* Update README.md; link to Manual and some markdown conformities. Removed mentioning of old TAPAS version, since it does not contain rDCM

* Update README.md; adjusted to the one in the main folder...do we need both?

* Delete README.txt; duplicate of .md file

* Delete README.md

* Put ti and linear in tools directory.
  • Loading branch information
tnutapas authored Sep 9, 2018
1 parent b9788c9 commit 122471a
Show file tree
Hide file tree
Showing 708 changed files with 44,154 additions and 19,756 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ lib
*.a
*.pyc
*.so
*.mexw64
*.asv
examples/
37 changes: 35 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,48 @@
# Changelog
TAPAS toolbox

## [3.0.0] 2018-09-09

### Added
- tapas\_get\_tapas\_revision.m outputs the branch and hash of the repository.
- Revision is printed when initiliazing tapas.
- Contributor License Agreement (CLA) file
- CONTRIBUTING.md explaining coding and style guidelines, signing procedure for CLA file
- Include the function tapas\_get\_current\_version.m.
- Implements download of example data from the server using
tapas_download_example_data.
- Now there is log file that list the versions of tapas, the download link
and the hash of the file that is downloaded.
- Use the an external file to do the md5 check sum. See external javamd5.
- HUGE toolbox: hierarchical unsupervised generative embedding
https://doi.org/10.1016/j.neuroimage.2018.06.073
- rDCM toolbox: Regression dynamic causal modeling
https://doi.org/10.1016/j.neuroimage.2017.02.090
https://doi.org/10.1016/j.neuroimage.2018.05.058

### Changed
- README.md to include reference to CONTRIBUTING.md and explanation of CLA
- Dropped 4 digits versioning for 3.
- The version of tapas is now read from misc/log\_tapas.txt. It is the first
line of this file.
- Updated the documentation of SEM.
- Updated SEM to include hierarchical models for inference.
- New version of the HGF toolbox (5.2.0). Details in tapas/HGF/README.md.
- New version of the PhysIO toolbox (R2018.1). Details in tapas/PhysIO/CHANGELOG.md.
- tapas_init.m displays a message to download the data in case the examples
directory is not present.
- Update MPDCM for supporting up to cuda 9.0 and openmp.

### Removed
- Deleted the gpo folder.

## [2.7.4.1] 2018-01-24

### Added
- includes PhysIO R2017.3
- new Readers: Human Connectome Project (HCP) and Siemens multiband (CMRR) WIP Physlog files
- extended documentation and FAQ via Wiki


## [2.7.3.2] 2018-01-19

### Changed
Expand All @@ -18,7 +52,6 @@ TAPAS toolbox
- tapas_version typo
- tapas_print_logo with T=Translational instead of TNU


## [2.7.3.1] 2017-08-18

### Changed
Expand Down
32 changes: 32 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
CONTRIBUTING Guide for Public TAPAS Contributors
================================================

How to Contribute
-----------------

- Start a discussion on feature requests or report bugs via [GitHub Issues](https://github.com/translationalneuromodeling/tapas/issues)
- Please **do not** submit code via the Issue system (e.g., as file attachments or posted snippets), but use *pull requests* (s.b.)
- Please provide code for TAPAS exclusively via submitting *Pull Requests* on GitHub
- Please accept the [Contributor License Agreement](Contributor-License-Agreement) by
1. adding your name (and affiliation, plus e-mail/GitHub username that serve to identify you unambiguously) to the `Contributor-License-Agreement.md` file in the `tapas/` main folder and
2. submitting this updated file with your pull request.
- This procedure ensures the continued legal maintainability of the TAPAS software suite.
- Have a look at [Wikipedia](https://en.wikipedia.org/wiki/Contributor_License_Agreement) for details on the rationale and legal implications of a CLA. Here is a quote of the essence:

> The purpose of a CLA is to ensure that the guardian of a project's outputs has
> the necessary ownership or grants of rights over all contributions to allow
> them to distribute under the chosen license.

Coding and Style Guidelines
---------------------------

- In general, try to adhere to existing style guides that are used by many programmers
- e.g., the [Matlab Style Guidelines V2.0](https://ch.mathworks.com/matlabcentral/fileexchange/46056-matlab-style-guidelines-2-0) by Richard Johnson
- Readability: Keep in mind that software should be used, and maybe extended by others!
- Have a look at the specific toolbox within TAPAS you want to contribute to and
- try to adhere to the coding style of that toolbox
- document well, and use consistent verbose headers for functions
- check whether the toolbox has its own `CONTRIBUTING.md` document for further specific requests.


89 changes: 89 additions & 0 deletions Contributor-License-Agreement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
Contributor License Agreement
=============================

This AGREEMENT is made by and between the

University of Zurich, Rämistrasse 71, 8006 Zürich, Switzerland
(hereinafter referred to as "University of Zurich")

and

each GitHub User listed in the following table:

Name | Company/Institution/Address | City | Country | E-Mail/GitHub Username
------------------------ | ----------------------------| --------- | ------- | ----------------------
Lars Kasper | TNU, University of Zurich | Zurich | CH | mrikasper
Eduardo Aponte | TNU, University of Zurich | Zurich | CH | tnutapas
| | | |
**-> Add Entry here <-** | | | |
(hereinafter referred to as "Contributor")

relating to the Contribution (as defined below) that Contributor makes to the following Project:

**TAPAS - Translational Algorithms for Psychiatry-Advancing Science**
(hereinafter referred to as "Project")

Contributor accepts and agrees to the following terms and conditions for his past, present and future Contributions submitted to University of Zurich.

By continuing the pull request, you confirm:
*I have read and understood the terms of this Agreement.*


TERMS AND CONDITIONS
--------------------

1. Definitions

1.1 "Contribution" means any source code, object code, patch, tool, sample, graphic, specification, manual, documentation, or any other material posted or submitted by Contributor to the Project.

1.2 "Agreement" shall mean this document as signed by the authorized official of the Contributor.

2. Grant/Scope of License

With respect to any worldwide copyrights, or copyright applications and registrations, in Contributions:
- Contributor hereby assigns to University of Zurich joint ownership, and to the extent that such assignment is or becomes invalid, ineffective or unenforceable, Contributor hereby grants to University of Zurich a perpetual, irrevocable, non-exclusive, worldwide, no-charge, royalty-free, unrestricted license to exercise all rights under those copyrights. This includes, at University of Zurich's option, the right to sublicense these same rights to third parties through multiple levels of sublicensees or other licensing arrangements;
- Contributor agrees that University of Zurich can do all things in relation to Contributions as if University of Zurich were the sole owner, and if University of Zurich makes a derivative work of a Contribution, the one who makes the derivative work (or has it made) will be the sole owner of that derivative work;
- Contributor agrees that Contributor will not assert any moral rights in Contributions against University of Zurich, University of Zurich's licensees or transferees;
- Contributor agrees that University of Zurich may register a copyright in Contributions and exercise all ownership rights associated with it; and
- Contributor agrees that neither Contributor nor University of Zurich has any duty to consult with, obtain the consent of, pay or render an accounting to the other for any use or distribution of Contributions.

3. Patents

With respect to any patents Contributor owns, or that Contributor can license without payment to any third party, Contributor hereby grants to University of Zurich a perpetual, irrevocable, non-exclusive, worldwide, no-charge, royalty-free license to:
- make, have made, use, sell, offer to sell, import, and otherwise transfer Contributions in whole or in part, alone or in combination with or included in any product, work or materials arising out of the project to which Contribution was submitted, and
- at University of Zurich's option, to sublicense these same rights to third parties through multiple levels of sublicensees or other licensing arrangements.

4. Rights of Contributor

Except as set out above, Contributor keeps all right, title, and interest in Contributions. The rights that Contributor grants to University of Zurich under these terms are effective on the date Contributor first submitted a contribution to University of Zurich, even if Contributor's submission took place before the date Contributor signs this Agreement. Any contribution University of Zurich makes available under any license will also be made available under a suitable FSF (Free Software Foundation) or OSI (Open Source Initiative) approved license.

5. Warranty

5.1 Contributor covenants, represents, warrants and agrees that:
- each Contribution that Contributor submits is and shall be an original work of authorship and Contributor can legally grant the rights set out in this Agreement;
- to the best of Contributor's knowledge, each contribution will not violate any third party's copyrights, trademarks, patents, or other intellectual property rights; and
- each contribution shall be in compliance with applicable export and import laws.

5.2 Contributor agrees to notify University of Zurich if Contributor becomes aware of any circumstance which would make any of the foregoing representations inaccurate in any respect. University of Zurich may publicly disclose Contributor's participation in the project, including the fact that Contributor has signed this Agreement.

6. Miscellaneous

6.1 This Agreement herein or any part thereof under this Agreement are not assignable by Contributor without the prior written approval of University of Zurich.

6.2 Neither party shall use the names or trademarks of the other, its related entities and its employees, or any adaptations thereof, in any advertising, promotional or sales literature, or in any securities reports required by the respective authorities, without the prior written consent of the party so affected.

6.3 Each party is acting as an independent contractor and not as an agent, partner, or joint venture with the other party for any purpose. Neither party shall have any right, power or authority to act or create any obligation, express or implied, on behalf of the other.

6.4 This Agreement sets forth the entire Agreement between the parties with respect to the subject matter hereof. No supplement, modification or amendment of this Agreement shall be binding, unless in writing signed by a duly authorized representative of each party to the Agreement.

6.5 Should some or several provisions of this Agreement be ineffective or invalid, or should there be an omission in this Agreement, the effectiveness, respectively the validity of the remaining provisions shall not be affected thereby. An ineffective, respectively, invalid provision shall be replaced by the interpretation of the agreement which comes nearest to the economic meaning and the envisaged economic purpose of the ineffective respectively, invalid provision. The same applies in the case of a contractual gap.

6.6 The terms stipulated in this Agreement may not be modified in any way without the mutual consent of the parties in writing.

7. Governing Law and Jurisdiction

THIS AGREEMENT SHALL BE GOVERNED BY THE LAWS OF SWITZERLAND. Any dispute arising from or in connection with this AGREEMENT will be finally settled by the courts of Zurich, Switzerland.


*This document is based on the "Oracle Contributor Agreement - version 1.7.1" licensed under CC BY SA (www.oracle.com/technetwork/oca-405177.pdf). This document is licensed under CC BY SA by University of Zurich.*

22 changes: 21 additions & 1 deletion HGF/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Release ID: $Format:%h %d$

---

Copyright (C) 2012-2017 Christoph Mathys <[email protected]>
Copyright (C) 2012-2018 Christoph Mathys <[email protected]>
Translational Neuromodeling Unit (TNU)
University of Zurich and ETH Zurich

Expand Down Expand Up @@ -46,6 +46,26 @@ hgf_demo.pdf.

## Release notes

### v5.2
- Brought hgf_demo.pdf up to date
- Added gaussian_obs_offset response model
- Brought example in simModel up to date
- Added sim and namep files for unitsq_sgm_mu3
- Fixed typo in softmax_mu3_wld
- Introduced softmax_mu3_wld decision model
- Estimate mu0_2 by default in hgf_ar1_binary_mab
- Improved comment in softmax_mu3_config
- Change to pi_2 update in hgf_ar1_binary_mab
- Enabled simulation for hgf_ar1_binary_mab
- Added softmax_mu3
- Added hgf_ar1_binary_mab
- Fixed automatic detection of number of levels in hgf_ar1_binary
- Fixed documentation of hgf_ar1_binary
- Fixed hgf_binary_mab_plotTraj
- Fixed trajectory calculations in hgf_binary_mab
- Adapted riddersgradient and riddershessian to new Matlab versions
- Quashed bug in rw_binary_dual found by [email protected]

### v5.1
- Added condhalluc_obs and condhalluc_obs2 models
- Introduced kappa1 in all binary HGF models
Expand Down
Binary file modified HGF/hgf_demo.pdf
Binary file not shown.
38 changes: 38 additions & 0 deletions HGF/tapas_gaussian_obs_offset.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
function [logp, yhat, res] = tapas_gaussian_obs_offset(r, infStates, ptrans)
% Calculates the log-probability of response y under the Gaussian noise model, with an offset
%
% --------------------------------------------------------------------------------------------------
% Copyright (C) 2018 Christoph Mathys, TNU, UZH & ETHZ
%
% This file is part of the HGF toolbox, which is released under the terms of the GNU General Public
% Licence (GPL), version 3. You can redistribute it and/or modify it under the terms of the GPL
% (either version 3 or, at your option, any later version). For further details, see the file
% COPYING or <http://www.gnu.org/licenses/>.

% Transform zeta to its native space
ze = exp(ptrans(1));
la = ptrans(2);

% Initialize returned log-probabilities, predictions,
% and residuals as NaNs so that NaN is returned for all
% irregualar trials
n = size(infStates,1);
logp = NaN(n,1);
yhat = NaN(n,1);
res = NaN(n,1);

% Weed irregular trials out from inferred states and responses
x = la + infStates(:,1,1); % Add offset lambda
x(r.irr) = [];
y = r.y(:,1);
y(r.irr) = [];

% Calculate log-probabilities for non-irregular trials
% Note: 8*atan(1) == 2*pi (this is used to guard against
% errors resulting from having used pi as a variable).
reg = ~ismember(1:n,r.irr);
logp(reg) = -1/2.*log(8*atan(1).*ze) -(y-x).^2./(2.*ze);
yhat(reg) = x;
res(reg) = y-x;

return;
56 changes: 56 additions & 0 deletions HGF/tapas_gaussian_obs_offset_config.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
function c = tapas_gaussian_obs_offset_config
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Contains the configuration for the Gaussian noise observation model for continuous responses, with
% an offset lambda
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% The Gaussian noise observation model assumes that responses have a Gaussian distribution around
% the inferred mean of the relevant state. The only parameter of the model is the noise variance
% (NOT standard deviation) zeta.
%
% --------------------------------------------------------------------------------------------------
% Copyright (C) 2018 Christoph Mathys, TNU, UZH & ETHZ
%
% This file is part of the HGF toolbox, which is released under the terms of the GNU General Public
% Licence (GPL), version 3. You can redistribute it and/or modify it under the terms of the GPL
% (either version 3 or, at your option, any later version). For further details, see the file
% COPYING or <http://www.gnu.org/licenses/>.


% Config structure
c = struct;

% Model name
c.model = 'tapas_gaussian_obs';

% Sufficient statistics of Gaussian parameter priors
%
% Zeta
c.logzemu = log(0.005);
c.logzesa = 0.1;

% Lambda
c.lamu = 0;
c.lasa = 10;

% Gather prior settings in vectors
c.priormus = [
c.logzemu,...
c.lamu,...
];

c.priorsas = [
c.logzesa,...
c.lasa,...
];

% Model filehandle
c.obs_fun = @tapas_gaussian_obs_offset;

% Handle to function that transforms observation parameters to their native space
% from the space they are estimated in
c.transp_obs_fun = @tapas_gaussian_obs_offset_transp;

return;
15 changes: 15 additions & 0 deletions HGF/tapas_gaussian_obs_offset_namep.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
function pstruct = tapas_gaussian_obs_offset_namep(pvec)
% --------------------------------------------------------------------------------------------------
% Copyright (C) 2018 Christoph Mathys, TNU, UZH & ETHZ
%
% This file is part of the HGF toolbox, which is released under the terms of the GNU General Public
% Licence (GPL), version 3. You can redistribute it and/or modify it under the terms of the GPL
% (either version 3 or, at your option, any later version). For further details, see the file
% COPYING or <http://www.gnu.org/licenses/>.

pstruct = struct;

pstruct.ze = pvec(1);
pstruct.la = pvec(2);

return;
28 changes: 28 additions & 0 deletions HGF/tapas_gaussian_obs_offset_sim.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
function y = tapas_gaussian_obs_offset_sim(r, infStates, p)
% Simulates observations with Gaussian noise
%
% --------------------------------------------------------------------------------------------------
% Copyright (C) 2018 Christoph Mathys, TNU, UZH & ETHZ
%
% This file is part of the HGF toolbox, which is released under the terms of the GNU General Public
% Licence (GPL), version 3. You can redistribute it and/or modify it under the terms of the GPL
% (either version 3 or, at your option, any later version). For further details, see the file
% COPYING or <http://www.gnu.org/licenses/>.

% Get parameters
ze = p(1);
la = p(2);

% Get observation prediction trajectory
yhat = la + infStates(:,1,1);

% Number of trials
n = length(yhat);

% Initialize random number generator
rng('shuffle');

% Simulate
y = yhat +sqrt(ze)*randn(n, 1);

return;
18 changes: 18 additions & 0 deletions HGF/tapas_gaussian_obs_offset_transp.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
function [pvec, pstruct] = tapas_gaussian_obs_offset_transp(r, ptrans)
% --------------------------------------------------------------------------------------------------
% Copyright (C) 2018 Christoph Mathys, TNU, UZH & ETHZ
%
% This file is part of the HGF toolbox, which is released under the terms of the GNU General Public
% Licence (GPL), version 3. You can redistribute it and/or modify it under the terms of the GPL
% (either version 3 or, at your option, any later version). For further details, see the file
% COPYING or <http://www.gnu.org/licenses/>.

pvec = NaN(1,length(ptrans));
pstruct = struct;

pvec(1) = exp(ptrans(1)); % ze
pstruct.ze = pvec(1);
pvec(2) = ptrans(2); % la
pstruct.la = pvec(2);

return;
2 changes: 1 addition & 1 deletion HGF/tapas_hgf_ar1_binary.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
try
l = r.c_prc.n_levels;
catch
l = (length(p)+1)/5;
l = (length(p)+1)/6;

if l ~= floor(l)
error('tapas:hgf:UndetNumLevels', 'Cannot determine number of levels');
Expand Down
Loading

0 comments on commit 122471a

Please sign in to comment.