diff --git a/Docs/Changes.html b/Docs/Changes.html index 03a30a22..2110928b 100644 --- a/Docs/Changes.html +++ b/Docs/Changes.html @@ -1,303 +1,396 @@ - - - - - - - - - - - - - - - - -iFit: Changes and bugs - - - - - -

iFit: Changes and Bugs
-

- - - -
- - -
  1. Releases and Changes -
  2. Bugs list:
    1. File path names do not support spaces
    2. Data set maximum size
    3. CDF files written by Matlab can not be read by other software (hdfview, ncBrowse)
    4. Convolution brings strange results (Models/fconv) -
    5. Too many warnings displayed
    6. Execution/compilation issue with text files importer (iLoad/iData/load, looktxt, CrysFML/cif2hkl)
    7. Limitations in the standalone (binary) package
    8. iFit/McStas fails with a message such as 'version `GFORTRAN_1.4' not found'
    9. Import of a text file fails
- - - - -
-

Releases and Changes
-

- - - - - - -

Bugs list:

- - - -
You may test the package integrity by issuing the command:
-
- - - - - -
>> ifittest
- - - -
- -which will test, in a few minutes, all the examples given in this documentation and report -failures. The test may be aborted by closing the progress bar window.
-
-Please report bugs to ifit-users@mccode.org or to me [farhi (at) ill.fr]. You are encouraged to register to the ifit-users list.
-
- -

File path names do not support spaces

- -

Under Windows systems, file names including spaces, such as in 'My Documents' - may not be supported properly. In this case, move your files and -directories to another location which does not contain spaces.
-

- - - -

Data set maximum size

- -The iFit package may currently handle routinely data sets up to few 100 -Mb. Larger data sets can still be loaded, but are restricted by the -disk access and the available memory. Currently, files can be read at -about 8 Mb/s, mainly limited by the hard disk speed. Some binary files -can be imported faster (HDF initial access is nearly immediate, whatever be the -file size). We recommend to use SSD to load files with increased efficiency.
- -

CDF files written by Matlab can not be read by other software (hdfview, ncBrowse)

- -The CDF format (which you can view with OpenDX and Autoplot) is incompatible with the NetCDF one (which you can e.g. view with ncview, hdfview, ncBrowse, Panoply). In such cases, we recommend to rather export in HDF5 format with:
- -
>> save(object, 'file.hdf5')
- - - -

Convolution brings strange results (Models/fconv)
-

- - -The fconv function (FFT convolution) provided in the Models sub-library requires the two signals sampling not to be too coarse. Axes values too -sparse will lead to inaccurate results. One solution is to re-sample -the signals with more points. For iData objects, this can be -achieved with e.g. the interp(object, 3) to triple the number of points along axes.
- - -

Too many warnings displayed

- - -If the warnings being displayed produce too much output, you may reduce the level of verbosity with:
- - -
>> warning off backtrace	% reduce the warning message length
>> warning off % suppress all warnings (not recommended)
- - - - - - - - - -

Execution/compilation issue with text files importer (iLoad/iData/load, looktxt, CrysFML/cif2hkl)

- - - -In some cases, the provided -iFit/Loaders/private/looktxt.mex* may fail to execute (wrong -architecture, missing library). - - - -
- - - -Under Windows 64bit systems, -you may need the Visual C++ runtime libraries e.g. msvc[mpr]90.dll which -are provided with the Visual C++ installation (see below), to put in the -Windows system directory.
- - - - - -
- - - - -In case this is not a problem of library, remove the invalid mex file -(in iFit/Libraries/Loaders/private) , and -relaunch the importation process. A brand new MeX file will -automatically be generated, using the system C compiler. For manual compilation, navigate to the iFit/Libraries/Loaders/private directory and issue:
-
mex -O looktxt.c -DUSE_MEX
mex -O cbf_uncompress
- - - -Most systems provide a default C compiler.
- - - - - -You may need to select the compiler with the mex -setup command from Matlab.
- -
-
-
- - - - -It has been reported that MeX compilation may fail when spaces are part -of the path name to the iFit location (esp. under Windows systems). Move iFit to an other location which does not include spaces in its name (e.g. avoid My Documents) for compilation.
-
-A Fortran compiler is required when using cif2hkl (CIF,CFL,PCR,ShelX files), especially for the Rietveld model function. For manual compilation, navigate to the iFit/Scripts/Models/scattering/powder_diffraction directory and issue:
-
# gfortran -O2 -o cif2hkl cif2hkl.F90 -lm
- - -which creates the cif2hkl executable file, used by iFit.
-
-Refer to the related item in the Install page.
- -

Limitations in the standalone (binary) package

- -When running the standalone version (binary), new Matlab functions can not be defined, except anonymous functions (inline). You may use iFunc models as a substitute. Also, the doc, web and edit commands are limited, and may not work properly, depending on the system.
-

iFit/McStas fails with a message such as 'version `GFORTRAN_1.4' not found'

-Matlab comes with its own C and Fortran libraries (e.g. in MATLABROOT/sys/os/<arch>/). - Some of these may not match those those from the running system (seen -on Linux systems). In this case, as McStas runs from a Matlab -environment that overloads libraries on top of the normal libraries from - the system - used by McStas - you may get a message such as (here libgfortran.so is faulty) :
-
Can't load '/usr/local/lib/perl/5.12.4/auto/PGPLOT/PGPLOT.so' for module PGPLOT: 
/usr/local/MATLAB/R2012a/sys/os/glnxa64/libgfortran.so.3: version
`GFORTRAN_1.4' not found
(required by /usr/lib/libpgplot.so.5) at
/usr/lib/perl/5.12/DynaLoader.pm line 192.
at /usr/local/lib/mcstas/tools/perl/mcstas_config.perl line 123
-In order to solve this, you need to update the faulty Matlab libraries -with the one from the system. The following procedure is valid for Linux - systems (where it was identified), assuming Matlab has been installed -in e.g. MATLABROOT = /usr/local/MATLAB/R2012a - but it may also be in -e.g. /opt/MATLAB/R2012a.
-
-We first look for locations of the faulty library in the system (requires package locate or mlocate to be installed - alternatively you can use ldconfig -v and look where libgfortran appears in the long list...)
-
# locate libgfortran.so
+
+  
+    
+    iFit: Changes and bugs
+  
+  
+    
+    

iFit: Changes and Bugs
+

+
+
    + +
  1. Releases and Changes +
  2. +
  3. Bugs list: +
      +
    1. File path names do not support + spaces
    2. +
    3. Data set maximum size
    4. +
    5. CDF files written by Matlab can + not be read by other software (hdfview, ncBrowse)
    6. +
    7. Convolution brings strange + results (Models/fconv) +
    8. +
    9. Too many warnings displayed
    10. +
    11. Execution/compilation issue with + text files importer (iLoad/iData/load, looktxt, + CrysFML/cif2hkl)
    12. +
    13. Limitations in the standalone + (binary) package
    14. +
    15. iFit/McStas fails with a message + such as 'version `GFORTRAN_1.4' not found'
    16. +
    17. Import of a text file fails
    18. +
    +
  4. +
+
+

Releases and + Changes
+

+ + +

Bugs list:

+
You may test the package integrity + by issuing the command:
+
+
>> ifittest
+
+ which will test, in a few minutes, all the examples given in this + documentation and report + failures. The test may be aborted by closing the progress bar + window.
+
+ Please report bugs to ifit-users@mccode.org + or to me [farhi (at) ill.fr]. + You are encouraged to register to the ifit-users + list.
+
+

File path names do + not support spaces

+

Under Windows systems, file names including spaces, such as in 'My Documents' may not be + supported properly. In this case, move your files and directories + to another location which does not contain spaces.
+

+

Data set maximum + size

+ The iFit package may currently handle routinely data sets up to few + 100 + Mb. Larger data sets can still be loaded, but are restricted by the + disk access and the available memory. Currently, files can be read + at + about 8 Mb/s, mainly limited by the hard disk speed. Some binary + files + can be imported faster (HDF initial access is nearly immediate, + whatever be the + file size). We recommend to use SSD to load files with increased + efficiency.
+

CDF files written + by Matlab can not be read by other software (hdfview, ncBrowse)

+ The CDF + format (which you can view with OpenDX and Autoplot) is incompatible with the + NetCDF + one (which you can e.g. view with ncview, + hdfview, + ncBrowse, Panoply). In + such cases, we recommend to rather export in HDF5 format with:
+
>> save(object, 'file.hdf5')
+

Convolution brings + strange results (Models/fconv)
+

+ The fconv function (FFT convolution) provided in the Models sub-library requires the two signals + sampling not to be too coarse. Axes values too + sparse will lead to inaccurate results. One solution is to re-sample + the signals with more points. For iData + objects, this can be + achieved with e.g. the interp(object, + 3) to triple the number of points along axes.
+

Too many warnings + displayed

+ If the warnings being displayed produce too much output, you may + reduce the level of verbosity with:
+
>> warning off backtrace	% reduce the warning message length
>> warning off % suppress all warnings (not recommended)
+

Execution/compilation + issue with text files importer (iLoad/iData/load, looktxt, + CrysFML/cif2hkl)

+ In some cases, the provided + iFit/Loaders/private/looktxt.mex* may fail to execute (wrong + architecture, missing library). +
+ Under Windows 64bit systems, + you may need the Visual C++ runtime libraries e.g. msvc[mpr]90.dll + which + are provided with the Visual C++ installation (see below), to put in + the Windows system directory.
+
+ In case this is not a problem of library, remove the invalid mex file (in iFit/Libraries/Loaders/private) + , and + relaunch the importation process. A brand new MeX file will + automatically be generated, using the system C compiler. For manual + compilation, navigate to the iFit/Libraries/Loaders/private + directory and issue:
+
mex -O looktxt.c -DUSE_MEX
mex -O cbf_uncompress
+ Most systems provide a default C compiler.
+ + You may need to select the compiler with the mex -setup + command from Matlab.
+
+
+
+ It has been reported that MeX compilation may fail when spaces are + part of the path name to the iFit location (esp. under Windows + systems). Move iFit to an + other location which does not include spaces in its name (e.g. avoid + My Documents) for + compilation.
+
+ A Fortran compiler is required when using cif2hkl (CIF,CFL,PCR,ShelX files), especially for + the Rietveld model function. For manual compilation, navigate to the + iFit/Scripts/Models/scattering/powder_diffraction + directory and issue:
+
# gfortran -O2 -o cif2hkl cif2hkl.F90 -lm
+ which creates the cif2hkl executable file, used by iFit.
+
+ Refer to the related item in the Install page.
+

Limitations in the + standalone (binary) package

+ When running the standalone version (binary), new Matlab functions + can not + be defined, except anonymous functions (inline). You may use iFunc + models as a substitute. Also, the doc, + web and edit + commands are limited, and may not work properly, depending on the + system.
+

iFit/McStas fails + with a message such as 'version `GFORTRAN_1.4' not found'

+ Matlab comes with its own C and Fortran libraries (e.g. in + MATLABROOT/sys/os/<arch>/). Some of these + may not match those those from the running system (seen on Linux + systems). In this case, as McStas runs from a Matlab environment + that overloads libraries on top of the normal libraries from the + system - used by McStas - you may get a message such as (here libgfortran.so + is faulty) :
+
Can't load '/usr/local/lib/perl/5.12.4/auto/PGPLOT/PGPLOT.so' for module PGPLOT: 
/usr/local/MATLAB/R2012a/sys/os/glnxa64/libgfortran.so.3: version
`GFORTRAN_1.4' not found
(required by /usr/lib/libpgplot.so.5) at
/usr/lib/perl/5.12/DynaLoader.pm line 192.
at /usr/local/lib/mcstas/tools/perl/mcstas_config.perl line 123
+ In order to solve this, you need to update the faulty Matlab + libraries with the one from the system. The following procedure is + valid for Linux systems (where it was identified), assuming Matlab + has been installed in e.g. MATLABROOT = /usr/local/MATLAB/R2012a - + but it may also be in e.g. /opt/MATLAB/R2012a.
+
+ We first look for locations of the faulty library in the system + (requires package locate + or mlocate to be installed + - alternatively you can use ldconfig + -v and look where libgfortran + appears in the long list...)
+
# locate libgfortran.so
 /usr/lib/x86_64-linux-gnu/libgfortran.so.3 <- this is the library from the system, to put in the Matlab location
-Then we first make a copy of the initial Matlab library to update
-
# sudo mv /usr/local/MATLAB/R2012a/sys/os/glnxa64/libgfortran.so.3 /usr/local/MATLAB/R2012a/sys/os/glnxa64/libgfortran.so.3.org
-Then we copy the library from the system into the Matlab location
-
# sudo ln -s /usr/lib/x86_64-linux-gnu/libgfortran.so.3 /usr/local/MATLAB/R2012a/sys/os/glnxa64/
-Then, you need to restart Matlab/iFit to notice the issue has been fixed.
-

Import of a text file fails

-First check that the looktxt MeX file is working (this will appear in -the error message). If not, remove the invalid one (in -iFit/Libraries/Loaders/private) and restart the importation. A new MeX -file will be compiled from the source (requires a valid compiler, see above).
-
-If you can not import a reluctant text file, try the most tolerant text reader configurations:
- -
>> iData('filename','text format with fast import method')
>> iData('filename','Data (text format)')
- -will import the raw content, without post formatting of the object in -memory. You will probably need to assign manually some of the Signal and - Axes (see iData object help).
-
-Text files containing NaN's inside matrices - are not imported properly (NaN is read as a text inside a matrix, and -thus breaks the matrix into bits). One way is to replace all NaN's by 0 -values. This also stands for Inf's and other text embedded inside numerical blocks.
- - - - - -
-
-
E. -Farhi - iFit/Changes - -$Date$ $Revision$ - - -back to Main -iFit Page ILL, Grenoble, France <www.ill.eu> -
-
- - - - \ No newline at end of file + Then we first make a copy of the initial Matlab library to update
+
# sudo mv /usr/local/MATLAB/R2012a/sys/os/glnxa64/libgfortran.so.3 /usr/local/MATLAB/R2012a/sys/os/glnxa64/libgfortran.so.3.org
+ Then we copy the library from the system into the Matlab location
+
# sudo ln -s /usr/lib/x86_64-linux-gnu/libgfortran.so.3 /usr/local/MATLAB/R2012a/sys/os/glnxa64/
+ Then, you need to restart Matlab/iFit to notice the issue has been + fixed.
+

Import of a text + file fails

+ First check that the looktxt MeX file is working (this will appear + in the error message). If not, remove the invalid one (in + iFit/Libraries/Loaders/private) and restart the importation. A new + MeX file will be compiled from the source (requires a valid + compiler, see above).
+
+ If you can not import a reluctant text + file, try the most tolerant text reader configurations:
+
>> iData('filename','text format with fast import method')
>> iData('filename','Data (text format)')
+ will import the raw content, without post formatting of the object + in memory. You will probably need to assign manually some of the + Signal and Axes (see iData object help).
+
+ Text files containing NaN's inside + matrices are not imported properly (NaN is read as a text + inside a matrix, and thus breaks the matrix into bits). One way is + to replace all NaN's by 0 values. This also stands for Inf's + and other text embedded inside numerical blocks.
+
+
+
E. +Farhi + - iFit/Changes - + $Date$ + $Revision$ + - + back to Main + iFit Page ILL, Grenoble, France
+            <www.ill.eu> +
+
+ + diff --git a/Scripts/load/opensqw.m b/Scripts/load/opensqw.m index e1489dc3..d37a3759 100644 --- a/Scripts/load/opensqw.m +++ b/Scripts/load/opensqw.m @@ -18,9 +18,15 @@ % this is a SQW file % handle import of NetCDF files from nMoldyn - if isfield(out, 'Sqw_total') - setaxis(out, 'Signal','Sqw_total'); - if isfield(out,'q'), setaxis(out,1,'q'); end + if isfield(out, 'Sqw_total') || isfield(out, 'S_k_f_total') + if isfield(out, 'S_k_f_total') + setaxis(out, 'Signal','S_k_f_total'); + else + setaxis(out, 'Signal','Sqw_total'); + end + if isfield(out,'q'), setaxis(out,1,'q'); + elseif isfield(out,'k'), setaxis(out,1,'k'); + end if isfield(out,'frequency'), setaxis(out,2,'frequency'); end if isfield(out,'title_nc'), label(out, 0, out.title_nc); end else