edtools.find_beam_center
Functions:
|
Find the center of the primary beam in the image img The position is determined by summing along X/Y directions and finding the position along the two directions independently. |
|
Find the index of the pixel corresponding to peak maximum in 1D pattern arr. |
|
|
|
read in the file. |
|
read an adsc header. |
|
|
|
Translate an image according to shift. |
|
Write adsc format. |
- edtools.find_beam_center.find_beam_center(img: ~numpy.ndarray, sigma: int = 30, m: int = 100, kind: int = 3) -> (<class 'float'>, <class 'float'>)
Find the center of the primary beam in the image img The position is determined by summing along X/Y directions and finding the position along the two directions independently.
Uses interpolation by factor m to find the coordinates of the pimary beam with subpixel accuracy.
- edtools.find_beam_center.find_peak_max(arr: ~numpy.ndarray, sigma: int, m: int = 50, w: int = 10, kind: int = 3) -> (<class 'float'>, <class 'float'>)
Find the index of the pixel corresponding to peak maximum in 1D pattern arr.
First, the pattern is smoothed using a gaussian filter with standard deviation sigma The initial guess takes the position corresponding to the largest value in the resulting pattern A window of size 2*w+1 around this guess is taken and expanded by factor m to to interpolate the pattern to get the peak maximum position with subpixel precision.
- edtools.find_beam_center.main()
- edtools.find_beam_center.read_adsc(fname: str) -> (<built-in function array>, <class 'dict'>)
read in the file.
- edtools.find_beam_center.readheader(infile)
read an adsc header.
- edtools.find_beam_center.swap_needed(header: dict) bool
- edtools.find_beam_center.translate_image(arr, shift: array) array
Translate an image according to shift. Shift should be a 2D numpy array
- edtools.find_beam_center.write_adsc(fname: str, data: array, header: dict = {})
Write adsc format.