Skip to content

Commit 5ae7a55

Browse files
committed
Move convolution_functions into griddata
1 parent 9ad453b commit 5ae7a55

30 files changed

Lines changed: 86 additions & 76 deletions

‎data_models/data_model_helpers.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
from processing_library.image.operations import create_image_from_array
1717
from processing_components.griddata.operations import create_griddata_from_array
18-
from processing_components.convolution_function.operations import create_convolutionfunction_from_array
18+
from processing_components.griddata.convolution_functions import create_convolutionfunction_from_array
1919

2020
from processing_components.image.operations import export_image_to_fits, import_image_from_fits
2121
from data_models.memory_data_models import Visibility, BlockVisibility, Configuration, \

‎docs/ARL_Module_View.png‎

3.92 KB
Loading

‎docs/ARL_calibration.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ In this code:
4747
- A single modelpartition is taken to be a vector composed of skycomponent, gaintable tuples.
4848

4949
- The E step for a specific window is the sum of the window data model and the discrepancy between the observed data
50-
and the summed modelpartitions.
50+
and the summed modelpartitions.
5151

5252
- The M step for a specific window is the optimisation of the skymodel vector given the window data model. This involves fitting a skycomponent and fitting for the gain phases.
5353

‎docs/ARL_directory_serial_workflows.rst‎

Lines changed: 0 additions & 19 deletions
This file was deleted.

docs/ARL_directory_arlexecute_workflows.rst renamed to docs/ARL_directory_workflows.rst

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Calibration workflows
1212

1313
* Calibrate workflow: :py:mod:`workflows.arlexecute.calibration.calibration_arlexecute.calibrate_list_arlexecute_workflow`
1414

15-
1615
Imaging workflows
1716
=================
1817

@@ -36,3 +35,33 @@ Execution
3635
=========
3736

3837
* Execution framework (an interface to Dask): :py:mod:`wrappers.arlexecute.execution_support.arlexecute`
38+
39+
Serial workflows
40+
****************
41+
42+
Workflows created using the ARL processing components executed directly from python. These are higher level and fewer
43+
in number than processing components.
44+
45+
Calibration workflows
46+
=====================
47+
48+
* Calibrate workflow: :py:mod:`workflows.serial.calibration.calibration_serial.calibrate_list_serial_workflow`
49+
50+
Imaging workflows
51+
=================
52+
53+
* Invert: :py:mod:`workflows.serial.imaging.imaging_serial.invert_list_serial_workflow`
54+
* Predict: :py:mod:`workflows.serial.imaging.imaging_serial.predict_list_serial_workflow`
55+
* Deconvolve: :py:mod:`workflows.serial.imaging.imaging_serial.deconvolve_list_serial_workflow`
56+
57+
Pipeline workflows
58+
==================
59+
60+
* ICAL: :py:mod:`workflows.serial.pipelines.pipeline_serial.ical_list_serial_workflow`
61+
* Continuum imaging: :py:mod:`workflows.serial.pipelines.pipeline_serial.continuum_imaging_list_serial_workflow`
62+
* Spectral line imaging: :py:mod:`workflows.serial.pipelines.pipeline_serial.spectral_line_imaging_list_serial_workflow`
63+
64+
Simulation workflows
65+
====================
66+
67+
* Testing and simulation support: :py:mod:`workflows.serial.simulation.simulation_serial.simulate_list_serial_workflow`

‎docs/index.rst‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ For clarity, not all connections are shown in this diagram.
2020

2121
ARL_quickstart
2222
ARL_directory
23+
ARL_directory_workflows
2324
ARL_API
24-
ARL_directory_serial_workflows
25-
ARL_directory_arlexecute_workflows
2625

2726
Reference material:
2827

processing_components/convolution_function/operations.py renamed to processing_components/griddata/convolution_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def calculate_bounding_box_convolutionfunction(cf, fractional_level=1e-4):
190190
Returns a list of bounding boxes where each element is
191191
(z, (y0, y1), (x0, x1))
192192
193-
These can be used in gridding/degridding.
193+
These can be used in griddata/degridding.
194194
195195
:param cf:
196196
:param fractional_level:

‎processing_components/griddata/gridding.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
""" Imaging is based on used of the FFT to perform Fourier transforms efficiently. Since the observed visibility data_models
22
do not arrive naturally on grid points, the sampled points are resampled on the FFT grid using a convolution function to
3-
smear out the sample points. The resulting grid points are then FFT'ed. The result can be corrected for the gridding
3+
smear out the sample points. The resulting grid points are then FFT'ed. The result can be corrected for the griddata
44
convolution function by division in the image plane of the transform.
55
6-
This module contains functions for performing the gridding process and the inverse degridding process.
6+
This module contains functions for performing the griddata process and the inverse degridding process.
77
88
The GridData data model is used to hold the specification of the desired result.
99
"""

processing_components/convolution_function/kernels.py renamed to processing_components/griddata/kernels.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from processing_library.fourier_transforms.convolutional_gridding import coordinates, grdsf
1111
from processing_library.image.operations import copy_image, create_w_term_like, pad_image, fft_image
1212
from processing_library.image.operations import create_image_from_array
13-
from processing_components.convolution_function.operations import create_convolutionfunction_from_image
13+
from processing_components.griddata.convolution_functions import create_convolutionfunction_from_image
1414
from processing_components.image.operations import reproject_image, create_empty_image_like
1515

1616
log = logging.getLogger(__name__)
@@ -19,11 +19,11 @@
1919
def create_box_convolutionfunction(im, oversampling=1, support=1):
2020
""" Fill a box car function into a ConvolutionFunction
2121
22-
Also returns the gridding correction function as an image
22+
Also returns the griddata correction function as an image
2323
2424
:param im: Image template
2525
:param oversampling: Oversampling of the convolution function in uv space
26-
:return: gridding correction Image, gridding kernel as ConvolutionFunction
26+
:return: griddata correction Image, griddata kernel as ConvolutionFunction
2727
"""
2828
assert isinstance(im, Image)
2929
cf = create_convolutionfunction_from_image(im, oversampling=1, support=4)
@@ -33,7 +33,7 @@ def create_box_convolutionfunction(im, oversampling=1, support=1):
3333
cf.data[...] = 0.0 + 0.0j
3434
cf.data[..., 2, 2] = 1.0 + 0.0j
3535

36-
# Now calculate the gridding correction function as an image with the same coordinates as the image
36+
# Now calculate the griddata correction function as an image with the same coordinates as the image
3737
# which is necessary so that the correction function can be applied directly to the image
3838
nchan, npol, ny, nx = im.data.shape
3939
nu = numpy.abs(coordinates(nx))
@@ -55,11 +55,11 @@ def create_pswf_convolutionfunction(im, oversampling=8, support=6):
5555
Fill the Prolate Spheroidal Wave Function into a GriData with the specified oversampling. Only the inner
5656
non-zero part is retained
5757
58-
Also returns the gridding correction function as an image
58+
Also returns the griddata correction function as an image
5959
6060
:param im: Image template
6161
:param oversampling: Oversampling of the convolution function in uv space
62-
:return: gridding correction Image, gridding kernel as ConvolutionFunction
62+
:return: griddata correction Image, griddata kernel as ConvolutionFunction
6363
"""
6464
assert isinstance(im, Image)
6565
# Calculate the convolution kernel. We oversample in u,v space by the factor oversampling
@@ -82,7 +82,7 @@ def create_pswf_convolutionfunction(im, oversampling=8, support=6):
8282
norm = numpy.sum(numpy.real(cf.data[0, 0, 0, 0, 0, :, :]))
8383
cf.data /= norm
8484

85-
# Now calculate the gridding correction function as an image with the same coordinates as the image
85+
# Now calculate the griddata correction function as an image with the same coordinates as the image
8686
# which is necessary so that the correction function can be applied directly to the image
8787
nchan, npol, ny, nx = im.data.shape
8888
nu = numpy.abs(2.0 * coordinates(nx))
@@ -106,11 +106,11 @@ def create_awterm_convolutionfunction(im, make_pb=None, nw=1, wstep=1e15, oversa
106106
:param nw: Number of w planes
107107
:param wstep: Step in w (wavelengths)
108108
:param oversampling: Oversampling of the convolution function in uv space
109-
:return: gridding correction Image, gridding kernel as GridData
109+
:return: griddata correction Image, griddata kernel as GridData
110110
"""
111111
d2r = numpy.pi / 180.0
112112

113-
# We only need the gridding correction function for the PSWF so we make
113+
# We only need the griddata correction function for the PSWF so we make
114114
# it for the shape of the image
115115
nchan, npol, ony, onx = im.data.shape
116116

‎processing_components/imaging/base.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
from processing_library.imaging.imaging_params import get_frequency_map
3838
from processing_library.util.coordinate_support import simulate_point, skycoord_to_lmn
3939

40-
from ..convolution_function.kernels import create_pswf_convolutionfunction
40+
from processing_components.griddata.kernels import create_pswf_convolutionfunction
4141
from ..griddata.gridding import grid_visibility_to_griddata, \
4242
fft_griddata_to_image, fft_image_to_griddata, \
4343
degrid_visibility_from_griddata
@@ -471,10 +471,10 @@ def pwr23(n):
471471
log.info('advice_wide_field: Number of planes in w stack %d' % (vis_slices))
472472
log.info('advice_wide_field: Number of planes in w projection %d' % wprojection_planes)
473473
if wprojection_planes > 1:
474-
log.info('advice_wide_field: Recommend that wprojection gridding is used')
474+
log.info('advice_wide_field: Recommend that wprojection griddata is used')
475475
kernel = 'wprojection'
476476
else:
477-
log.info('advice_wide_field: Recommend that 2d gridding (i.e. no wprojection) is used')
477+
log.info('advice_wide_field: Recommend that 2d griddata (i.e. no wprojection) is used')
478478
kernel = '2d'
479479

480480
nwpixels = int(npixels * image_fov)

0 commit comments

Comments
 (0)