Commit db89eac3 authored by Thomas Vincent's avatar Thomas Vincent

use default n_proc in fit

parent 44cbe21c
......@@ -39,6 +39,7 @@ import multiprocessing.sharedctypes as mp_sharedctypes
import numpy as np
# from silx.math import curve_fit
from ... import config
from ...io import QSpaceH5
from ...fit import (GaussianFitter, GaussianResults,
CentroidFitter, CentroidResults,
......@@ -61,9 +62,8 @@ class PeakFitter(Thread):
[1, 2, 3] is provided, only those cubes will be fitted.
:type img_indices: *optional* `array_like`
:param n_proc: number of process to use. If None, the number of process
used will be the one returned by multiprocessing.cpu_count().
:type n_proc: `int`
:param Union[int,None] n_proc:
Number of process to use. If None, the config value is used.
"""
READY, RUNNING, DONE, ERROR, CANCELED = __STATUSES = range(5)
......@@ -93,7 +93,7 @@ class PeakFitter(Thread):
if n_proc:
self.__n_proc = n_proc
else:
n_proc = self.__n_proc = mp.cpu_count()
n_proc = self.__n_proc = config.DEFAULT_PROCESS_NUMBER
self.__shared_progress = mp_sharedctypes.RawArray(ctypes.c_int32,
n_proc)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment