fit_all_regions
- jwst.adaptive_trace_model.trace_model.fit_all_regions(flux, error, alpha, region_map, maximum_cores='none', **fit_kwargs)[source]
Fit a trace model to all regions in the flux image.
- Parameters:
- fluxndarray
The flux image to fit.
- errorndarray
The error image associated with the flux.
- alphandarray
Alpha coordinates for all flux values.
- region_mapndarray of int
Map containing the slice or slit number for valid regions. Values are >0 for pixels in valid regions, 0 otherwise.
- maximum_coresstr
Number of cores to use for multiprocessing. If set to ‘none’ (the default), then no multiprocessing will be done. The other allowable values are ‘quarter’, ‘half’, ‘all’, and string integers. This is the fraction of available or the explicit number of cores to use for multiprocessing.
- **fit_kwargs
Keyword arguments to pass to the fitting routine (see
fit_2d_spline_trace).
- Returns:
- spline_modelsdict
Keys are region numbers, values are dicts containing a spline model, scale, and bounds for each column index in the region. If a spline model could not be fit, the column index number is not present.