Skip to content

Commit 4f43d98

Browse files
committed
add some docs!
1 parent 7fe69f0 commit 4f43d98

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

src/py21cmwedge/uvgridder.py

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,14 @@ def uv_weights(self, u, v, spatial_function="triangle"):
252252
"""Compute weights for arbitrary baseline on a gridded UV plane.
253253
254254
uv must be in units of pixels.
255+
256+
Parameters
257+
----------
258+
convolve_beam: bool
259+
when set to true, perform an FFT convolution with the supplied beam
260+
spatial_function: string
261+
must be one of ["nearest", "triangle"]. Nearest modes performs delta function like assignment into a uv-bin
262+
triangle performs simple distance based weighting of uv-bins based on self.wavelength_scale slope
255263
"""
256264
# weights = 1. - np.abs(uv - grid)/np.diff(grid)[0]
257265
# weights = 1. - (np.abs(uv - grid)/np.diff(grid)[0])**2
@@ -285,7 +293,14 @@ def uv_weights(self, u, v, spatial_function="triangle"):
285293
return weights
286294

287295
def __sum_uv__(self, uv_key, spatial_function="triangle"):
288-
"""Convert uvbin dictionary to a UV-plane."""
296+
"""Convert uvbin dictionary to a UV-plane.
297+
298+
Parameters
299+
----------
300+
spatial_function: string
301+
must be one of ["nearest", "triangle"]. Nearest modes performs delta function like assignment into a uv-bin
302+
triangle performs simple distance based weighting of uv-bins based on self.wavelength_scale slope
303+
"""
289304
uvbin = self.uvbins[uv_key]
290305
nbls = len(uvbin)
291306
u, v = np.array(list(map(float, uv_key.split(","))))
@@ -297,7 +312,16 @@ def __sum_uv__(self, uv_key, spatial_function="triangle"):
297312
self.uvf_cube += nbls * _beam
298313

299314
def grid_uvw(self, convolve_beam=True, spatial_function="triangle"):
300-
"""Create UV coverage from object data."""
315+
"""Create UV coverage from object data.
316+
317+
Parameters
318+
----------
319+
convolve_beam: bool
320+
when set to true, perform an FFT convolution with the supplied beam
321+
spatial_function: string
322+
must be one of ["nearest", "triangle"]. Nearest modes performs delta function like assignment into a uv-bin
323+
triangle performs simple distance based weighting of uv-bins based on self.wavelength_scale slope
324+
"""
301325
self.uv_size = (
302326
int(np.round(self.bl_len_max / self.wavelength / self.uv_delta).max() * 1.1)
303327
* 2

0 commit comments

Comments
 (0)