Substantial contributions from Y. Debab and P. Willendrup.

If you produce scientific output using iFit, I'd appreciate if you cite the following reference:

- E. Farhi, Y. Debab and P. Willendrup, J. Neut. Res., 17 (2013) 1. DOI: 10.3233/JNR-130001
- E. Farhi, The iFit data analysis library, ILL, Computing for Science (2011) <http://ifit.mccode.org>.

Disclaimer:

This software is experimental, and should not be considered bullet-proof. In particular, expect many bugs - which should be reported to me [farhi (at) ill.fr] if you want them to be fixed quickly.

In short, you can use, copy, distribute and modify the Code. However, a number of restrictions apply, especially when producing derived work (that is modify and redistribute the code in other products). In particular, the derived work must be licensed under the EUPL or a Compatible License, label all modifications explicitly, distribute the Source Code, and cite the Original work.

Basically this is open-source. Use it if you find it useful, and enrich it.

If you do produce new methods, please send them back to me so that they are added in the software and thus benefit to the community.

A number of additions, included in the software, where obtained from the Matlab Central contributions, and are BSD licensed.

Matlab is a registered trademark of The Mathworks Inc. Related software (e.g. Matlab Compiler Runtime and Matlab) are covered by specific licenses.

I am currently the only developer of this project, which has been slowly designed for 10 years before writting the iFit basic project architecture. An initial prototype, specnd, was written earlier in years 2003-2004, then re-written from scratch with some of the current design principles in 2006 by Y. Debab [trainee at ILL] and me. The final project contains about 55000 lines of code (as of May 10th, 2011). About 10000 lines of code are contributed form other authors (see credits list below).

CodeBase Analysis (number of lines of code) on July, 2013 (release 1.4)

@iData | 17839 |

@iFunc |
4912 |

Loaders | 14583 |

Optimizers | 4340 (+8442 contributed) |

Models and Scripts |
3476 (+52407 from SASfit and
CrysFML) |

Applications | 3978 (+6266 for ResLibCal) |

TOTAL |
51 kLOC
(written for iFit) |

Contributed |
123 kLOC |

Docs |
21 kLOC |

CoCoMo analysis <http://en.wikipedia.org/wiki/COCOMO> for 'Organic' project (excluding the contributed code in Optimizers)

KLOC = 51; ab = 2.4; bb
= 1.05; cb = 2.5; db = 0.38;

Effort Applied | 149 [months-year] | E=ab*KLOC^bb |

Development Time | 16.7 [months] | D=cb*E^db |

People required | 8.9 [count] | E/D |

Estimated Cost | 489 [k$] |
E/D*55 |

Note: This clearly shows that I can work as 9 guys in a row, and I'm dramatically under-paid. In fact I estimate I have worked about a total of one man-year on iFit over the last ten years.

**SpinW**by Sandor Toth: a Matlab library that can plot and numerically simulate magnetic structures and excitations of given spin Hamiltonian using classical Monte Carlo simulation and linear spin wave theory.- ResLib by A. Zheludev: a library to compute 4D TAS resolution function.
**Horace**by T. Perring: a suite of programs for the visualisation and analysis of large datasets from time-of-flight neutron inelastic scattering spectrometers. [ deb amd64 ]

Sliceomatic by Eric Ludlam <eludlam@mathworks.com> (Matlab Central)

is used as a plotter for 3D volume
data, BSD license

<http://www.mathworks.com/matlabcentral/fileexchange/764>

fscatter3 by Felix Morsdorf, Jan
2003, Remote Sensing Laboratory Zuerich<http://www.mathworks.com/matlabcentral/fileexchange/764>

vol3d by Joe Conti, 2004, Oliver Woodford 2011

used in plot, BSD license

<http://www.mathworks.com/matlabcentral/fileexchange/4927-vol3d-m-vol3dtool-m>

<http://www.mathworks.com/matlabcentral/fileexchange/22940-vol3d-v2>

genopt by Douglas M. Schwarz 2006<http://www.mathworks.com/matlabcentral/fileexchange/4927-vol3d-m-vol3dtool-m>

<http://www.mathworks.com/matlabcentral/fileexchange/22940-vol3d-v2>

used in iData binary operators, BSD license

<http://www.mathworks.com/matlabcentral/fileexchange/10333-generalized-array-operations>

hPSO by Alexandros Leontitsis leoaleq@yahoo.com
Ioannina, Greece 2004 <http://www.mathworks.com/matlabcentral/fileexchange/10333-generalized-array-operations>

used in fminswarmhybrid and
fminswarm, no license

modified to handle a no-hybrid optimization (pure swarm in fminswarm)

<http://www.mathworks.com/matlabcentral/fileexchange/6497-hybrid-particle-swarm-optimization>

Simplex by F. Sigworth, 15
March 2003, S. H. Heinemann, 1987 and M. Caceci and W. Cacheris,
Byte, p. 340, May 1984.modified to handle a no-hybrid optimization (pure swarm in fminswarm)

<http://www.mathworks.com/matlabcentral/fileexchange/6497-hybrid-particle-swarm-optimization>

used in fminsimplex, BSD license

<http://www.mathworks.fr/matlabcentral/fileexchange/4317-state-machine-simplex-minimizer>

powell by Argimiro R. Secchi (arge@enq.ufrgs.br)
2001<http://www.mathworks.fr/matlabcentral/fileexchange/4317-state-machine-simplex-minimizer>

used in fminpowell, no license

<http://www.mathworks.com/matlabcentral/fileexchange/15072-unconstrained-optimization-using-powell>

ossrs by Sheela V. Belur
(sbelur@csc.com) 1998<http://www.mathworks.com/matlabcentral/fileexchange/15072-unconstrained-optimization-using-powell>

ga/gaconstrain by Javad Ivakpour javad7@gmail.com, May 2006

used in fminga, no license

<http://www.mathworks.com/matlabcentral/fileexchange/11317-genetic-algorithm-performance>

cmaes by Nikolaus Hansen,
2001-2007. e-mail: hansen@bionik.tu-berlin.de<http://www.mathworks.com/matlabcentral/fileexchange/11317-genetic-algorithm-performance>

solvopt by Alexei Kuntsevich and Franz Kappel , Graz (Austria) 1997

hooke by Kelley, 1998, Iterative Methods for Optimization, SIAM Frontier in Applied Mathematics 18 imfil by Kelley, 1998, Iterative Methods for Optimization, SIAM Frontier in Applied Mathematics 18 PSO by Brecht Donckels, BIOMATH, brecht.donckels@ugent.be 2006

sce and SIMPSA by Brecht Donckels, BIOMATH, brecht.donckels@ugent.be 2006

LMFsolve by Miroslav Balda, balda AT cdm DOT cas DOT cz 2009

used in fminlm, BSD license

<http://www.mathworks.com/matlabcentral/fileexchange/17534-lmfnlsq-solution-of-nonlinear-least-squares>

netcdf by Paul Spencer, 2007<http://www.mathworks.com/matlabcentral/fileexchange/17534-lmfnlsq-solution-of-nonlinear-least-squares>

used as netCDF importer in Loaders,
BSD license

<http://www.mathworks.com/matlabcentral/fileexchange/15177-netcdf-reader>

plot2svg by Juerg Schwizer,
22-Jan-2006<http://www.mathworks.com/matlabcentral/fileexchange/15177-netcdf-reader>

used as SVG exporter in Loaders, BSD license

<http://www.mathworks.com/matlabcentral/fileexchange/7401-scalable-vector-graphics-svg-export-of-figures>

<http://www.mathworks.com/matlabcentral/fileexchange/7401-scalable-vector-graphics-svg-export-of-figures>

export3Dline2VTK (xyz line), exportTriangulation2VTK (2D surface) from David Gingras, January 2009

used in iData/saveas VTK, BSD
license

<http://www.mathworks.com/matlabcentral/fileexchange/22602-export-triangulation-to-paraview>

<http://www.mathworks.com/matlabcentral/fileexchange/22603-export-3d-line-to-paraview>

writeVTK (3D object) by Tim 24 Mar
2009 <http://www.mathworks.com/matlabcentral/fileexchange/22602-export-triangulation-to-paraview>

<http://www.mathworks.com/matlabcentral/fileexchange/22603-export-3d-line-to-paraview>

used in iData/saveas VTK, no license

anneal by Joachim Vandekerckhove,
2006bfgswopt by Kelley, 1998, Iterative Methods for Optimization, SIAM Frontier in Applied Mathematics 18

ntrust by Kelley, 1998, Iterative Methods for Optimization, SIAM Frontier in Applied Mathematics 18 ukfopt by Yi Cao at Cranfield University, 08 January 2008

used in fminkalman, BSD license

<http://www.mathworks.com/matlabcentral/fileexchange/18217-learning-the-unscented-kalman-filter>

buscarnd by Argimiro R. Secchi
(arge@enq.ufrgs.br) and Giovani Tonel(giovani.tonel@ufrgs.br) on
September 2006<http://www.mathworks.com/matlabcentral/fileexchange/18217-learning-the-unscented-kalman-filter>

used in fminrand, no license

<http://www.mathworks.com/matlabcentral/fileexchange/12776-ramdomic-search>

ReadINX by J. Ollivier (ollivier@ill.eu) 2007<http://www.mathworks.com/matlabcentral/fileexchange/12776-ramdomic-search>

used as INX file importer.

cbfread, speread and marread by
Oliver Bunk (oliver.bunknull@pnullsi.ch) 2011fitswrite by R. G. Abraham, Institute of Astronomy, Cambridge University (abraham@ast.cam.ac.uk) 1999

histcn by Bruno Luong (brunoluong@yahoo.com) Aug 25th 2011

used to build histograms from event
data sets (accumarray/hist), BSD license

<http://www.mathworks.com/matlabcentral/fileexchange/23897-n-dimensional-histogram>

rndread from cad2matdemo by Don Riley Jun 2003<http://www.mathworks.com/matlabcentral/fileexchange/23897-n-dimensional-histogram>

used to read STL ascii files with
colors, BSD license

<http://www.mathworks.com/matlabcentral/fileexchange/3642-cad2matdemo-m>

import_stl_fast by Eric Trautmann
31 Mar 2011 <http://www.mathworks.com/matlabcentral/fileexchange/3642-cad2matdemo-m>

used to read STL ascii files with
colors, BSD license

<http://www.mathworks.com/matlabcentral/fileexchange/30923-fast-stl-import-function>

<http://www.mathworks.com/matlabcentral/fileexchange/30923-fast-stl-import-function>

used to read STL binary files, BSD
license

<http://www.mathworks.com/matlabcentral/fileexchange/29906-binary-stl-file-reader>

figure2xhtml by Dirk-Jan Kroon, Jul
2011<http://www.mathworks.com/matlabcentral/fileexchange/29906-binary-stl-file-reader>

used in iData/save for X3D/XHTML
export, BSD license

<http://www.mathworks.com/matlabcentral/fileexchange/32207-matlab-3d-figure-to-3d-xhtml>

uiinspect and findjobj by Y.
Altman, Dec 2007<http://www.mathworks.com/matlabcentral/fileexchange/32207-matlab-3d-figure-to-3d-xhtml>

used in ifit standalone as
propedit/inspect replacement, BSD license

<http://www.mathworks.com/matlabcentral/fileexchange/17935>

sifread by Leutenegger November
2006, updated Uli Klessinger 18 Jun 2012<http://www.mathworks.com/matlabcentral/fileexchange/17935>

used in Loaders to import SIF files,
BSD license

<http://www.mathworks.com/matlabcentral/fileexchange/11224-andor-sif-image-reader>

adsc_read by Gil Toombes, 2004<http://www.mathworks.com/matlabcentral/fileexchange/11224-andor-sif-image-reader>

used to import ADSC X-ray CCD image,
no license

<http://bigbro.biophys.cornell.edu/~toombes/Software/ADSC_Detectors_Using_Spec/>

PDB_geometry by Gil Toombes, 2004<http://bigbro.biophys.cornell.edu/~toombes/Software/ADSC_Detectors_Using_Spec/>

used as file importer and I(q)
generator, no license

SASfit from J. Kohlbrecher and I.
Bressler, PSI, 2006-2012used to define a number of structure
factors and small angle scattering form factors, GPL3

<http://kur.web.psi.ch/sans1/SANSSoft/sasfit.html>

tom_mrcread from Wolfgang
Baumeister (TOM Matlab toolbox),
2008<http://kur.web.psi.ch/sans1/SANSSoft/sasfit.html>

CrysFML by Juan Rodriguez-Carvajal and Javier Gonzalez-Platas, ILL and ULL, Tenerife,

used to build a powder/Laue Rietveld
model*, GPL3*

<http://www.ill.eu/sites/fullprof/php/programs24b7.html>

ResLib by A. Zheludev, using
especially ResMat, ResMatS and ResPlot3D<http://www.ill.eu/sites/fullprof/php/programs24b7.html>

ResCal5 by (A. Tennant and D. Mc Morrow), using especially rc_cnmat, rc_popma, rc_projs

used in ResLibCal,
GPL

<http://www.ill.eu/en/instruments-support/computing-for-science/cs-software/all-software/matlab-ill/rescal-for-matlab/>

Res3ax (J. Ollivier), using
res3ax5, no license<http://www.ill.eu/en/instruments-support/computing-for-science/cs-software/all-software/matlab-ill/rescal-for-matlab/>

ResCal by Hargreave,Hullah,1979, ported into vTAS_view (A. Bouvet/A. Filhol)

used in ResLibCal,
no license

<http://www.ill.eu/instruments-support/computing-for-science/cs-software/all-software/pkfit-and-filing/macos9-vms-linux/pkfitvmstutorial/>

yaml by Kota Yamaguchi 2011
<kyamagu@cs.stonybrook.edu><http://www.ill.eu/instruments-support/computing-for-science/cs-software/all-software/pkfit-and-filing/macos9-vms-linux/pkfitvmstutorial/>

used to read/write yaml/json, BSD
and Apache2 license

struct2xml by W. Falkena,
ASTI, TUDelft, 27-08-2010used to write XML files, BSD license

<http://www.mathworks.com/matlabcentral/fileexchange/28639-struct2xml>

mlabwrap by Alexander
Schmolck and Vivek Rathod 2003-20011, with contribution from Dani
Valevski 2011<http://www.mathworks.com/matlabcentral/fileexchange/28639-struct2xml>

used for I/O with JSON format, BSD
license

<http://www.mathworks.com/matlabcentral/fileexchange/27169-json4mat>

<http://www.mathworks.com/matlabcentral/fileexchange/27169-json4mat>

used for read some NMR data sets
(Bruker/WinNMR, Varian, JEOL), no license

<http://dosytoolbox.chemistry.manchester.ac.uk>

<http://matnmr.sourceforge.net/>

<http://dosytoolbox.chemistry.manchester.ac.uk>

<http://matnmr.sourceforge.net/>

used for smoothing and rebinning
data sets (discrete cosine transform based), no license

<http://www.biomecardio.com/matlab/> and http://www.mathworks.com/matlabcentral/fileexchange/27994-inpaint-over-missing-data-in-1-d--2-d--3-d--n-d-arrays

Garcia D, Robust smoothing of gridded data in one and higher dimensions with missing values.*Comput Statist Data Anal*,
2010;54:1167-1178

Narasimha M. et al, On the computation of the discrete cosine transform,*IEEE
Trans Comm*, 26, 6, 1978, pp 934-936.

Wang G, Garcia D et al. A three- dimensional gap filling method for large geophysical datasets: Application to global satellite soil moisture observations.*Environ Modell Softw*, 2012;30:139-142.

<http://www.biomecardio.com/matlab/> and http://www.mathworks.com/matlabcentral/fileexchange/27994-inpaint-over-missing-data-in-1-d--2-d--3-d--n-d-arrays

Garcia D, Robust smoothing of gridded data in one and higher dimensions with missing values.

Narasimha M. et al, On the computation of the discrete cosine transform,

Wang G, Garcia D et al. A three- dimensional gap filling method for large geophysical datasets: Application to global satellite soil moisture observations.

used for the continuous wavelet
transform, kind of BSD

<http://noc.ac.uk/using-science/crosswavelet-wavelet-coherence>

Grinsted, A., Moore, J.C., Jevrejeva, S. (2004) Application of the cross wavelet transform and wavelet coherence to geophysical time series, Nonlin. Processes Geophys., 11, 561-566, doi:10.5194/npg-11-561-2004.

Wavelet software was provided by C. Torrence and G. Compo, and is available at URL: http://paos.colorado.edu/research/wavelets/

<http://noc.ac.uk/using-science/crosswavelet-wavelet-coherence>

Grinsted, A., Moore, J.C., Jevrejeva, S. (2004) Application of the cross wavelet transform and wavelet coherence to geophysical time series, Nonlin. Processes Geophys., 11, 561-566, doi:10.5194/npg-11-561-2004.

Wavelet software was provided by C. Torrence and G. Compo, and is available at URL: http://paos.colorado.edu/research/wavelets/

used for dramatic improvement when
saving/loading objects from MAT, BSD license

<https://www.mathworks.com/matlabcentral/fileexchange/34564-fast-serialize-deserialize>

<https://www.mathworks.com/matlabcentral/fileexchange/34564-fast-serialize-deserialize>

used to read Igor pro Wave files,
BSD license

<http://www.mathworks.com/matlabcentral/fileexchange/42679-igor-pro-file-format-ibw-to-matlab-variable>

<http://www.mathworks.com/matlabcentral/fileexchange/42679-igor-pro-file-format-ibw-to-matlab-variable>

used for k-means method, BSD license

<http://www.mathworks.com/matlabcentral/fileexchange/41967-fast-segmentation-of-n-dimensional-grayscale-images>

<http://www.mathworks.com/matlabcentral/fileexchange/41967-fast-segmentation-of-n-dimensional-grayscale-images>

used in iLoad/read_obj, BSD license

<http://www.mathworks.com/matlabcentral/fileexchange/27982-wavefront-obj-toolbox>

<http://www.mathworks.com/matlabcentral/fileexchange/27982-wavefront-obj-toolbox>

used in iLoad/read_lvm and
read_tdms, BSD

<http://www.mathworks.com/matlabcentral/fileexchange/19913-lvm-file-import>

<http://www.mathworks.com/matlabcentral/fileexchange/30023-tdms-reader>

<http://www.mathworks.com/matlabcentral/fileexchange/44206-converttdms--v10->

<http://www.mathworks.com/matlabcentral/fileexchange/19913-lvm-file-import>

<http://www.mathworks.com/matlabcentral/fileexchange/30023-tdms-reader>

<http://www.mathworks.com/matlabcentral/fileexchange/44206-converttdms--v10->

used in iLoad/read_llb_tas, no
license

adapted from old fortran code (software: wf, routines convasc_C, convasc_D, convasc_S, convdat, read_fich)

adapted from old fortran code (software: wf, routines convasc_C, convasc_D, convasc_S, convdat, read_fich)

used in iData/saveas, BSD

<http://www.mathworks.com/matlabcentral/fileexchange/20922-stlwrite-filename--varargin->

<http://www.mathworks.com/matlabcentral/fileexchange/20922-stlwrite-filename--varargin->

used in Models/sqw_phon, BSD and
import_poscar

<http://www.mathworks.com/matlabcentral/fileexchange/36836-vasplab>

<http://www.mathworks.com/matlabcentral/fileexchange/36836-vasplab>

used in Models/sqw_phon, BSD

<http://www.mathworks.com/matlabcentral/fileexchange/29774-stoichiometry-tools>

<http://www.mathworks.com/matlabcentral/fileexchange/29774-stoichiometry-tools>

used in iData/save, BSD

<http://www.mathworks.com/matlabcentral/fileexchange/47814-export-3d-data-to-paraview-in-vtk-legacy-file-format>

<http://www.mathworks.com/matlabcentral/fileexchange/47814-export-3d-data-to-paraview-in-vtk-legacy-file-format>

used in iData/save, BSD

<http://www.mathworks.com/matlabcentral/fileexchange/27021-imagic--mrc-and-dm3-file-i-o>

<http://www.mathworks.com/matlabcentral/fileexchange/27021-imagic--mrc-and-dm3-file-i-o>

used in iLoad, MIT

<http://fr.mathworks.com/matlabcentral/fileexchange/47696-chromatography-toolbox>

<http://fr.mathworks.com/matlabcentral/fileexchange/47696-chromatography-toolbox>

used in iLoad, BSD

<http://www.mathworks.com/matlabcentral/fileexchange/18233-nanovis--molecular-visualizer>

<http://www.mathworks.com/matlabcentral/fileexchange/18233-nanovis--molecular-visualizer>

used in miFit, BSD

<https://www.mathworks.com/matlabcentral/fileexchange/28016-straightforward-copy-and-paste-functions>

<https://www.mathworks.com/matlabcentral/fileexchange/28016-straightforward-copy-and-paste-functions>

used in Models, GPL

<https://github.com/tsdev/spinw>

S. Toth and B. Lake, J. Phys.: Condens. Matter 27, 166002 (2015).

<https://github.com/tsdev/spinw>

S. Toth and B. Lake, J. Phys.: Condens. Matter 27, 166002 (2015).

used in Optimizers

<https://github.com/tsdev/spinw>

S. Toth and B. Lake, J. Phys.: Condens. Matter 27, 166002 (2015).

<https://github.com/tsdev/spinw>

S. Toth and B. Lake, J. Phys.: Condens. Matter 27, 166002 (2015).

used in iData/save to x3d BSD

<http://uk.mathworks.com/matlabcentral/fileexchange/40942-plot-mesh-as-interactive-html>

<http://uk.mathworks.com/matlabcentral/fileexchange/40942-plot-mesh-as-interactive-html>

used in miFit to allow Drag-n-Drop,
BSD

<https://fr.mathworks.com/matlabcentral/fileexchange/53511-drag---drop-functionality-for-java-gui-components>

<https://fr.mathworks.com/matlabcentral/fileexchange/53511-drag---drop-functionality-for-java-gui-components>

used in miFit and standalone as a
simple text editor,
BSD

<http://fr.mathworks.com/matlabcentral/fileexchange/47614-textedit>

<http://fr.mathworks.com/matlabcentral/fileexchange/47614-textedit>

used in Models/sqw_phonons with QuantumEspresso,
BSD

<http://www.homepages.ucl.ac.uk/~ucfbdxa/phon/>

<http://www.homepages.ucl.ac.uk/~ucfbdxa/phon/>