Add pymca fitting
https://github.com/woutdenolf/spectrocrunch/blob/master/spectrocrunch/xrf/fit.py (PerformBatchFitHDF5: fit 1 scan and 1 detector)
- single scan (Bliss HDF5 dataset or SPEC EDF files)
- many scans (XRF map for different energies, XRF map for different angles)
- multiple detectors (multiple spectra for each scan point)
- option 1: add all spectra (1 pymca config to fit that sum)
- option 2: fit all detectors separately and add (weight add) the results
For EDF:
https://github.com/woutdenolf/spectrocrunch/blob/master/spectrocrunch/io/xiaedf.py
Not sure it is worth it. Perhaps a simple EDF to HDF5 (in-memory?) with external datasets will suffice. Let efficient but EDF will disappear in some years.
The EDF stuff should probably be in ewoksdata.
Ewoks tasks (fluo):
- fit 1 scan and 1 detector: (npts, nchan) -> (npts, nparams)
- fit 1 scan and N detectors: (npts, ndets, nchan) -> (npts, ndets, nparams) or (npts, nparams)
- fit M scan and 1 detector: (M, npts, nchan) -> (M, npts, nparams)
- fit M scans and N detectors: (M, npts, ndets, nchan) -> (M, npts, ndets, nparams) or (M, npts, nparams)
- sum 1 scan (could be inside the fit task): (npts, ndets, nparams) -> (npts, nparams)
- sum M scans (could be inside the fit task): (M, npts, ndets, nparams) -> (M, npts, nparams)
- normalize (deadtime correction, exposure time correction, flux correction): divide by one of the nparam's
- make NXtomo (XRF angle stack)
Ewoks tasks (imreg):
- align stack: (M, npts, nparams) -> (M, nx, ny, nparams)
- crop borders
Edited by Wout De Nolf