get_reg_image¶
- threadcount.fit.get_reg_image(region)[source]¶
Create kernel image from list of pixels.
The input region is typically the output of
get_region(). This kernel image is used for spatial averaging, and it’s values are either 1 (if included in region) or 0.- Parameters:
region (list of pixel positions (y, x)) – The list of pixel positions relative to an arbitrary point, usually (0,0) in the case of output from
get_region(), to set to value 1 in the output image- Returns:
An array consisting of the smallest area that will encompass the list of pixels in region, with the relative shape of region preserved. The array is 0 except for region pixels are set to 1.
- Return type:
2d numpy array