Coder Social home page Coder Social logo

jnagy1 / irtools Goto Github PK

View Code? Open in Web Editor NEW
85.0 5.0 27.0 292 KB

MATLAB package of iterative regularization methods and large-scale test problems. This software is described in the paper "IR Tools: A MATLAB Package of Iterative Regularization Methods and Large-Scale Test Problems" that will be published in Numerical Algorithms, 2018.

License: Other

MATLAB 100.00%
regularization matlab inverse-problems krylov-subspace-methods image-deblurring tomography nmr conjugate-gradient gmres fista

irtools's Introduction

  ***************************************************************************
  * All the software  contained in this library  is protected by copyright. *
  * Permission  to use, copy, modify, and  distribute this software for any *
  * purpose without fee is hereby granted, provided that this entire notice *
  * is included  in all copies  of any software which is or includes a copy *
  * or modification  of this software  and in all copies  of the supporting *
  * documentation for such software.                                        *
  ***************************************************************************
  * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED *
  * WARRANTY. IN NO EVENT, NEITHER  THE AUTHORS, NOR THE PUBLISHER, NOR ANY *
  * MEMBER  OF THE EDITORIAL BOARD OF  THE JOURNAL  "NUMERICAL ALGORITHMS", *
  * NOR ITS EDITOR-IN-CHIEF, BE  LIABLE FOR ANY ERROR  IN THE SOFTWARE, ANY *
  * MISUSE  OF IT  OR ANY DAMAGE ARISING OUT OF ITS USE. THE ENTIRE RISK OF *
  * USING THE SOFTWARE LIES WITH THE PARTY DOING SO.                        *
  ***************************************************************************
  * ANY USE  OF THE SOFTWARE  CONSTITUTES  ACCEPTANCE  OF THE TERMS  OF THE *
  * ABOVE STATEMENT AND OF THE ACCOMPANYING FILE LICENSE.txt.               *
  ***************************************************************************

   AUTHORS:

       Silvia Gazzola
       University of Bath, United Kingdom
       Email: [email protected]

       Per Christian Hansen
       Technical University of Denmark, Denmark
       Email: [email protected]

       James G. Nagy
       Emory University, USA
       Email: [email protected]

   REFERENCE:

       IR Tools: A MATLAB Package of Iterative Regularization
       Methods and Large-Scale Test Problems
       NUMERICAL ALGORITHMS, XX (XXXX), pp. XXX-XXX
       DOI: XXXXXXXXXXXXXXXXXXXXXXXXXXX.

   SOFTWARE REVISION DATE:

       V1.0, April 2018

   SOFTWARE LANGUAGE:

       MATLAB 9.3 (R2017b)


=====================================================================
SOFTWARE
=====================================================================

The IR Tools package for MATLAB provides iterative regularization methods
and test problems for large-scale linear inverse problems.

The software has been developed and tested using MATLAB version 9.3.
No other MathWorks products or toolboxes are required.

To obtain full functionality of this package, it is recommended to also
install the AIR Tools II package from:
   https://github.com/jakobsj/AIRToolsII


=====================================================================
HOW TO INSTALL AND CHECK THE INSTALLATION
=====================================================================

Please follow these steps:

- Extract the archive in a directory of your choice. This creates a
  directory called IRTools with all files of the toolbox.

- Start MATLAB.

- Add the directory IRTools containing the toolbox as well as all
  subdirectories to the MATLAB search path.
  - The easiest way to do this is by using the function
    IRtools_setup which updates the path permanently.
  - The alternative is to use the "Set Path" tool in the "Home" tab
    of the main MATLAB window, by clicking "Add with Subfolders..."
    and choosing the IRTools directory.

- The software installation can be checked by running example scripts
  with the generic name EX___.


=====================================================================
SOFTWARE UPDATES AND BUG FIXES
=====================================================================

In addition to the refereed version of the software published along
with the journal paper, the IRtools software will be maintained
in the GitHub code repository

  https://github.com/jnagy1/IRtools

Please check this location for software updates and bug fixes.


=====================================================================
PACKAGE
=====================================================================

The IR Tools package is organized into a main directory and subdirectories:

IRtools                    - contains this README.txt file, a LICENSE.txt
                             file, Contents.m which provides a detailed 
                             overview of all files in the package (can be 
                             listed from within MATLAB using "help IRTools"), 
                             and an installation function called IRtools_setup.m
IRtools/IRcodes            - contains all iterative solvers 
IRtools/PRcodes            - contains all test problems
IRtools/OPcodes            - contains operators needed for some of the test 
                             problems in PRcodes
IRtools/EXcodes            - contains some sample example scripts to 
                             illustrate how to setup and solve test problems
IRtools/Extra              - contains a number of auxiliary functions needed
                             in some of the main functions.
IRtools/Extra/PRblur_tools - contains some auxiliary functions needed
                             to handle debluring problems generated
                             with PRblur.
IRtools/Extra/test_data    - contains some data files for the deblurring
                             test problems.

See the file Contents.m for a list of the files contained in the package.


=====================================================================
EXAMPLE SCRIPTS
=====================================================================

We include a number of example scripts that can be executed for
illustration of the basic use and functionality of the package.
These scripts have the generic name EX___, and can be found in
IRtools/EXcodes

irtools's People

Contributors

jnagy1 avatar silviagazzola avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

irtools's Issues

IRget, IRset, PRget, PRset missing

Expected behavior

  • Run IRrrgmres with no error

Actual behavior

  • An error occurs to due to unidentified function.
>> [X, info] = IRrrgmres(A, b, options);
Undefined function or variable 'IRset'.

Error in IRrrgmres (line 127)
options = IRset(defaultopt, options);

Conclusion

  • IRset and other functions not in the toolbox
  • Without IRset, an error occurs

Remedy

  • Provide the functions in title

IRSparsity fails to run

The error message when running IRSparsity:

Dot indexing is not supported for variables of this type.

Error in IRget>IRgetfast (line 103)
    value = defaultopt.(name);

Error in IRget (line 33)
    val = IRgetfast(options,name,value);

Error in IRhybrid_fgmres (line 191)
discrflat = IRget(options, 'discrflatTol', [], 'fast');

Error in IRell1 (line 151)
    [X, info] = IRhybrid_fgmres(A, b, options);

Error in EXsparsity (line 30)
[Xell1_GCV, info_ell1_GCV] = IRell1(A, bn, options);

Request

Could the richardson-lucy iteration scheme be included?

Best

Craig

Multiple Solvers Failing To Run

I believe this issue is due to the fact that most of the IR*.m files in the IRtools folder got updated relatively recently, but they depend on some IR*.m files in the Extras folder that were not updated. Not sure if you found your own temp fixes by now, but what I found to work on some similar issues was to add the following snippets to a few files:

IRoption_fields.m at line 71, but really could go anywhere in the allfields cell:

    'warmrestart';    
    'SparsityTrans';    
    'wname';            
    'wlevels';          
    'discrflatTol';      

IRset.m at line 287 (again could be anywhere in the switch):

  case {'warmrestart'} % off, on                   
    [validvalue, errmsg] = onOffType(field,value);
  case {'SparsityTrans'} % none, dwt               
    [validvalue, errmsg] = sparsityTransType(field,value);
  case {'wname'} % db1 default, probably others...  
    [validvalue, errmsg] = wnameType(field,value);
  case {'wlevels'} % probably a positive value?      
    [validvalue, errmsg] = nonNegscalar(field,value);
  case {'discrflatTol'} % probably a positive value? 

and then also the newly defined functions for sparsity and wname that I threw at the end of the file:

%------------------------------------------------------------------------

function [valid, errmsg] = sparsityTransType(field,value)
% One of these strings: none, dwt
valid =  (ischar(value) && any(strcmpi(value,{'none';'dwt'})));
if ~valid
  errmsg = sprintf('Invalid value for OPTIONS parameter %s: must be ''dwt'' or ''none''.',field);
else
  errmsg = '';
end

%------------------------------------------------------------------------

function [valid, errmsg] = wnameType(field,value)
% One of these strings: none, dwt
valid =  (ischar(value) && any(strcmpi(value,{'none';'db1'})));
if ~valid
  errmsg = sprintf('Invalid value for OPTIONS parameter %s: must be ''db1''.',field);
else
  errmsg = '';
end 

I'm sure there's other things missing, but this at least has me up and running so far.

Originally posted by @jjwadams in https://github.com/jnagy1/IRtools/issue_comments/613685418

The solution suggested above fixed a number of the solvers for me. However remaining issues:

IRell1 - Least squares solver with 1-norm penalization term - Issue with discflatTol & hybridvarient
IRfista - FISTA algorithm for constrained least squares problems Issue with 'shrink' in options
IRconstr_ls also didn't run without the manual fix suggested in the quoted text,
IRhtv again didn't run because of missing warmrestart

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.