Coverage for /wheeldirectory/casa-6.7.0-12-py3.10.el8/lib/py/lib/python3.10/site-packages/casatasks/sdimaging.py: 100%
27 statements
« prev ^ index » next coverage.py v7.6.4, created at 2024-11-01 07:19 +0000
« prev ^ index » next coverage.py v7.6.4, created at 2024-11-01 07:19 +0000
1##################### generated by xml-casa (v2) from sdimaging.xml #################
2##################### 3d5990fa46eb0dfcb908de9e27518a5f ##############################
3from __future__ import absolute_import
4import numpy
5from casatools.typecheck import CasaValidator as _val_ctor
6_pc = _val_ctor( )
7from casatools.coercetype import coerce as _coerce
8from casatools.errors import create_error_string
9from .private.task_sdimaging import sdimaging as _sdimaging_t
10from casatasks.private.task_logging import start_log as _start_log
11from casatasks.private.task_logging import end_log as _end_log
12from casatasks.private.task_logging import except_log as _except_log
14class _sdimaging:
15 """
16 sdimaging ---- SD task: imaging for total power and spectral data
19 Task sdimaging creates an image from input single-dish data sets.
20 The input can be either total power and spectral data.
22 The coordinate of output image is defined by four axes, i.e., two
23 spatial axes, frequency and polarization axes.n
24 By default, spatial coordinate of image is defined so that the all
25 pointing directions in POINTING tables of input data sets are covered
26 with the cell size, 1/3 of FWHM of primary beam of antennas in the
27 first MS. Therefore, it is often easiest to leave spatial definitions
28 at the default values. It is also possible to define spatial axes of
29 the image by specifying the image center direction (phasecenter),
30 number of image pixel (imsize) and size of the pixel (cell).n
31 The frequency coordinate of image is defined by three parameters,
32 the number of channels (nchan), the channel id/frequency/velocity of
33 the first channel (start), and channel width (width).There are three
34 modes available to define unit of start and width, i.e., 'channel' (use
35 channel indices), 'frequency' (use frequency unit, e.g., 'GHz'),
36 and 'velocity' (use velocity unit, e.g., 'km/s'). By default, nchan,
37 start, and width are defined so that all selected spectral windows are
38 covered with the channel width equal to separation of first two
39 channels selected.n
40 Finally, polarizations of image is defined by stokes parameter or
41 polarization. For example, stokes='XXYY' produces an image cube with
42 each plane contains the image of one of the polarizations, while
43 stokes='I' produces a 'total intensity' or Stokes I image.n
45 The task also supports various grid function (convolution kernel) to
46 weight spectra as well as an option to remove the most extreme minimum
47 and maximum (unweighted) values prior to computing the gridded pixel
48 values. See description below for details of gridfunction available.
52 --------- parameter descriptions ---------------------------------------------
54 infiles a list of names of input SD Measurementsets (only MS is allowed for this task)
55 outfile name of output image
56 overwrite overwrite the output file if already exists [True, False]
57 field select data by field IDs and names, e.g. "3C2*" (""=all)
58 spw select data by IF IDs (spectral windows), e.g. "3,5,7" (""=all)
59 antenna select data by antenna names or IDs, e.g, "PM03" ("" = all antennas)
60 scan select data by scan numbers, e.g. "21~23" (""=all)
61 intent select data by observational intent, e.g. "*ON_SOURCE*" (""=all)
62 mode spectral gridding type
63 nchan number of channels (planes) in output image (-1=all)
64 start start of output spectral dimension, e.g. "0", "110GHz", "-20km/s"
65 width width of output spectral channels
66 veltype velocity definition
67 outframe velocity frame of output image (""=current frame or LSRK for multiple-MS inputs)
68 gridfunction gridding function for imaging (see description in help)
69 convsupport convolution support for gridding
70 truncate truncation radius for gridding
71 gwidth HWHM for gaussian
72 jwidth c-parameter for jinc function
73 imsize x and y image size in pixels, e.g., [64,64]. Single value: same for both spatial axes ([] = number of pixels to cover whole pointings in MSes)
74 cell x and y cell size, (e.g., ["8arcsec","8arcsec"]. default unit arcmin. ("" = 1/3 of FWHM of primary beam)
75 phasecenter image center direction: position or field index, e.g., "J2000 17:30:15.0 -25.30.00.0". ("" = the center of pointing directions in MSes)
76 projection map projection type
77 ephemsrcname ephemeris source name, e.g. "MARS"
78 pointingcolumn pointing data column to use
79 restfreq rest frequency to assign to image, e.g., "114.5GHz"
80 stokes stokes parameters or polarization types to image, e.g. "I", "XX"
81 minweight Minimum weight ratio to the median of weight used in weight correction and weight beased masking
82 brightnessunit Overwrite the brightness unit in image (\'\' = respect the unit in MS) [\'K\' or \'Jy/beam\']
83 clipminmax Clip minimum and maximum value from each pixel. Note the benefit of clipping is lost when the number of integrations contributing to each gridded pixel is small, or where the incidence of spurious datapoints is approximately or greater than the number of beams (in area) encompassed by expected image.
84 enablecache Cache spectra pixels coordinates computed while creating the normal image, and re-use them when creating the weight image.
85 convertfirst Specify whether the direction of the specified pointing column must be converted to image"s reference frame prior to being interpolated at data-taking time, and when. "never": interpolate against the pointing column, then convert. "always": interpolate against the beforehand converted pointing column. "auto": if there are less pointings than selected data rows convert first, else interpolate first
86 interpolation Spectral interpolation ["nearest", "linear", "cubic"]
87 Interpolation rules to use when binning data channels onto image channels and evaluating visibility values at the centers of image channels.
88 Note :
89 - "linear" and "cubic" interpolation requires data points on both sides of each image frequency. Errors are therefore possible at edge channels, or near flagged data channels. When image channel width is much larger than the data channel width there is nothing much to be gained using linear or cubic thus not worth the extra computation involved.
90 - If there are significant differences in the observation dates of the input MSes, "nearest" interpolation may cause some problems with frequency channel matching.
91 [1;42mRETURNS[1;m void
93 --------- examples -----------------------------------------------------------
96 Keyword arguments:
97 infiles -- a list of names of input SD Measurementsets
98 example: 'm100.PM01.ms'
99 ['m100.PM01.ms','m100.PM03.ms']; multiple MSes
100 outfile -- name of output image
101 default: ''
102 example: 'mySDimage.im'
103 overwrite -- overwrite the output file if already exists
104 options: (bool) True,False
105 default: False (do NOT overwrite)
106 example: if True, existing file will be overwritten
107 field -- select data by field IDs and names
108 If field string is a non-negative integer, it is assumed to
109 be a field index otherwise, it is assumed to be a
110 field name
111 default: '' (use all fields)
112 example: field='3C2*' (all names starting with 3C2)
113 field='0,4,5~7' (field IDs 0,4,5,6,7)
114 field='0,3C273' (field ID 3 or filed named 3C273)
115 For multiple MS input, a list of field strings can be used:
116 field = ['0~2','0~4'] (field ids 0-2 for the first MS and 0-4
117 for the second)
118 field = '0~2' (field ids 0-2 for all input MSes)
119 this selection is in addition to the other selections to data
120 spw -- select data by spectral window IDs/channels
121 NOTE: channels de-selected here will contain all zeros if
122 selected by the parameter mode subparameters.
123 default: '' (use all IFs and channels)
124 example: spw='3,5,7' (IF IDs 3,5,7; all channels)
125 spw='<2' (IF IDs less than 2, i.e., 0,1; all channels)
126 spw='30~45GHz' (IF IDs with the center frequencies in range 30-45GHz; all channels)
127 spw='0:5~61' (IF ID 0; channels 5 to 61; all channels)
128 spw='3:10~20;50~60' (select multiple channel ranges within IF ID 3)
129 spw='3:10~20,4:0~30' (select different channel ranges for IF IDs 3 and 4)
130 spw='1~4;6:15~48' (for channels 15 through 48 for IF IDs 1,2,3,4 and 6)
131 For multiple MS input, a list of spw strings can be used:
132 spw=['0','0~3'] (spw ids 0 for the first MS and 0-3 for the second)
133 spw='0~3' (spw ids 0-3 for all input MSes)
134 this selection is in addition to the other selections to data
135 antenna -- select data by antenna names or IDs
136 If antenna string is a non-negative integer, it is
137 assumed to be an antenna index, otherwise, it is
138 considered an antenna name.
139 default: '' (all baselines, i.e. all antenna in case of auto data)
140 example: antenna='PM03'
141 For multiple MS input, a list of antenna strings can be used:
142 antenna=['5','6'] (antenna id5 for the first MS and 6 for the second)
143 antenna='5' (antenna index 5 for all input MSes)
144 this selection is in addition to the other selections to data
145 scan -- select data by scan numbers
146 default: '' (use all scans)
147 example: scan='21~23' (scan IDs 21,22,23)
148 For multiple MS input, a list of scan strings can be used:
149 scan=['0~100','10~200'] (scan ids 0-100 for the first MS
150 and 10-200 for the second)
151 scan='0~100 (scan ids 0-100 for all input MSes)
152 this selection is in addition to the other selections to data
153 intent -- select data by observational intent, also referred to as 'scan intent'
154 default: 'OBSERVE_TARGET#ON_SOURCE' (ALMA ON-source intent)
155 example: intent='' (use all scan intents)
156 intent='*ON_SOURCE*' (any valid scan-intent expression accepted by the MSSelection module can be specified)
157 For multiple MS input, a list of scan-intent expressions can be used:
158 intent=['ON_SOURCE','CALIBRATE_BANDPASS'] (scan intent ON_SOURCE for the first MS
159 and CALIBRATE_BANDPASS for the second)
160 this selection is in addition to the other selections to data
161 mode -- spectral gridding type
162 options: 'channel', 'velocity', 'frequency'
163 default: 'channel'
164 >>> mode expandable parameters
165 nchan -- Total number of channels in the output image.
166 default: -1; Automatically selects enough channels to cover
167 data selected by 'spw' consistent with 'start' and 'width'.
168 It is often easiest to leave nchan at the default value.
169 example: nchan=100
170 start -- First channel, velocity, or frequency.
171 For mode='channel'; This selects the channel index number
172 from the MS (0 based) that you want to correspond to the
173 first channel of the output cube. The output cube will be
174 in frequency space with the first channel having the
175 frequency of the MS channel selected by start. start=0
176 refers to the first channel in the first selected spw, even
177 if that channel is de-selected in the spw parameter.
178 Channels de-selected by the spw parameter will be filled with
179 zeros if included by the start parameter. For example,
180 spw=3~8:3~100 and start=2 will produce a cube that starts on
181 the third channel (recall 0 based) of spw index 3, and the
182 first channel will be blank.
183 default: '' (the first input channel of first input spw)
184 example: start=100 (mode='channel')
185 start='22.3GHz' (mode='frequency')
186 start='5.0km/s' (mode='velocity')
187 width -- Output channel width
188 For mode='channel', default=1; width>1 indicates channel averaging
189 example: width=4.
190 For mode= 'velocity' or 'frequency', default=''; width of
191 first input channel, or more precisely, the difference
192 in frequencies between the first two selected channels.
193 -- For example if channels 1 and 3 are selected with spw,
194 then the default width will be the difference between their
195 frequencies, and not the width of channel 1.
196 -- Similarly, if the selected data has uneven channel-spacing,
197 the default width will be picked from the first two selected
198 channels. In this case, please specify the desired width.
199 When specifying the width, one must give units
200 examples: width='1.0km/s', or width='24.2kHz'.
201 Setting width>0 gives channels of increasing frequency for
202 mode='frequency', and increasing velocity for mode='velocity'.
203 veltype -- Velocity definition
204 Options: 'radio','optical','true','relativistic'
205 default: 'radio'
206 outframe -- velocity reference frame of output image
207 Options: '','LSRK','LSRD','BARY','GEO','TOPO','GALACTO',
208 'LGROUP','CMB'
209 default: ''; same as input data or 'LSRK' for multiple-MS inputs
210 example: frame='bary' for Barycentric frame
211 gridfunction -- gridding function for imaging
212 options: 'BOX' (Box-car), 'SF' (Spheroidal),
213 'PB' (Primary-beam), 'GAUSS' (Gaussian),
214 'GJINC' (Gaussian*Jinc)
215 default: 'BOX'
216 example: 'SF'
217 >>> gridfunction expandable parameter:
218 convsupport -- convolution support for 'SF'
219 default: -1 (use default for each gridfunction)
220 example: 3
221 truncate -- truncattion radius of convolution kernel.
222 effective only for 'GAUSS' and 'GJINC'.
223 default: '-1' (use default for each gridfunction)
224 example: 3, '20arcsec', '3pixel'
225 gwidth -- HWHM for gaussian. Effective only for
226 'GAUSS' and 'GJINC'.
227 default: '-1' (use default for each gridfunction)
228 example: 3, '20arcsec', '3pixel'
229 jwidth -- Width of jinc function. Effective only for
230 'GJINC'.
231 default: '-1' (use default for each gridfunction)
232 example: 3, '20arcsec', '3pixel'
233 imsize -- x and y image size in pixels, symmetric for single value
234 default: [] (=cover all pointings in MS)
235 example: imsize=200 (equivalent to [200,200])
236 cell -- x and y cell size. default unit arcmin
237 default: '' (= 1/3 of FWHM of primary beam)
238 example: cell=['0.2arcmin, 0.2arcmin']
239 cell='0.2arcmin' (equivalent to example above)
240 phasecenter -- image phase center: direction measure or field ID
241 default: '' (= the center of pointing directions in
242 POINTING table of infiles)
243 example: 6 (field id), 'J2000 13h44m00 -17d02m00',
244 'AZEL -123d48m29 15d41m41'
245 projection -- map projection type. See Calabretta & Greisen (2002) for detail.
246 default: 'SIN'
247 options: 'SIN', 'CAR', 'TAN', 'SFL'
248 ephemsrcname -- ephemeris source name for moving source (solar sytem objects)
249 default: '' (none)
250 If specified source name matches one of the solar system
251 objects known by CASA (see examples below), the task realigns
252 the data by correcting spatial shifts of the source during
253 observation, so that the source appears to be fixed in the
254 image. If specified name doesn't match, the task will fail.
255 When moving source correction is applied, the source is fixed
256 to the position at the beginning of the on-source observation
257 in the data. Direction reference frame of output image refers
258 phasecenter (it is 'J2000' if phasecenter is empty). Note that
259 moving source correction is not applied unless the user
260 explicitly set ephemsrcname even if target field is one of
261 the solar system objects known by CASA. Note also that setting
262 'pointing_offset' or 'source_offset' to directioncolumn
263 disables moving source correction so that these values should
264 not be used when the user wants to activate moving source
265 correction.
266 examples: 'MERCURY', 'VENUS', 'MARS', 'JUPITER', 'SATURN',
267 'URANUS', 'NEPTUNE', 'PLUTO', 'SUN', 'MOON'
268 pointingcolumn -- pointing data column to use
269 option: 'direction', 'target', 'pointing_offset', 'source_offset', encoder'
270 default: 'direction'
271 restfreq -- specify rest frequency to use for output image
272 default: '' (refer input data)
273 example: 1.0e11, '100GHz'
274 stokes -- stokes parameters or polarization types to image
275 default: '' (use all polarizations)
276 example: 'XX'
277 minweight -- Minimum weight ratio to the median of weight used in
278 weight correction and weight based masking
279 default: 0.1
280 example: minweight = 0.
281 brightnessunit -- Overwrite the brightness unit in image.
282 default: '' (use the unit in MS)
283 Options: '', 'K' (Kelvin), 'Jy/beam'
284 clipminmax -- Clip minimum and maximum value from each pixel.
285 Note the benefit of clipping is lost when the number of
286 integrations contributing to each gridded pixel is small,
287 or where the incidence of spurious datapoints is
288 approximately or greater than the number of beams (in area)
289 encompassed by expected image.
290 default: False
291 option: True, False
292 interpolation -- Spectral interpolation.
293 Interpolation rules to use when binning data channels onto image channels and
294 evaluating visibility values at the centers of image channels.
295 Note :
296 - 'linear' and 'cubic' interpolation requires data points on both sides of each image frequency.
297 Errors are therefore possible at edge channels, or near flagged data channels.
298 When image channel width is much larger than the data channel width there is nothing much to be gained
299 using linear or cubic thus not worth the extra computation involved.
300 - If there are significant differences in observing dates of input MSes, some problems merely occur
301 in frequency channel matching when 'nearest' interpolation.
302 option: 'linear', 'nearest', 'cubic'
303 default: 'linear'
304 -----------------
305 Gridding Kernel
306 -----------------
307 The parameter gridfunction sets gridding function (convolution kernel)
308 for imaging. Currently, the task supports 'BOX' (Box-car), 'SF' (Prolate
309 Spheroidal Wave Function), 'GAUSS' (Gaussian), 'GJINC' (Gaussian*Jinc),
310 where Jinc(x) = J_1(pi*x/c)/(pi*x/c) with a first order Bessel function
311 J_1, and 'PB' (Primary Beam). For 'PB', correct antenna informations
312 should be included in input file.
314 There are four subparameters for gridfunction: convsupport, truncate,
315 gwidth, and jwidth. The convsupport is an integer specifying cut-off
316 radius for 'SF' in units of pixel. By default (convsupport=-1),
317 the cut-off radius is set to 3 pixels. The truncate is a cut-off
318 radius for 'GAUSS' or 'GJINC'. It accepts integer, float, and
319 string values of numeric plus unit. Allowed units are angular
320 units such as 'deg', 'arcmin', 'arcsec', and 'pixel'. Default unit
321 is 'pixel' so that string without unit or numerical values (integer
322 or float) will be interpreted as radius in pixel. Default value
323 for truncate, which is used when negative radius is set, is 3*HWHM
324 for 'GAUSS' and radius at first null for 'GJINC'. The gwidth is
325 the HWHM of gaussian for 'GAUSS' and 'GJINC'. Default value is
326 sqrt(log(2)) pixel for 'GAUSS' and 2.52*sqrt(log(2)) pixel for
327 'GJINC'. The jwidth specifies width of the jinc function (parameter
328 'c' in the definition above). Default is 1.55 pixel. Both gwidth
329 jwidth allows integer, float, or string of numeric plus unit.
330 Default values for gwidth and jwidth are taken from Mangum et al.
331 (2007). Formula for 'GAUSS' and 'GJINC' are taken from Table 1 in
332 the paper, and are written as below using gwidth and jwidth:
334 GAUSS: exp[-log(2)*(|r|/gwidth)**2]
336 GJINC: J_1(pi*|r|/jwidth)/(pi*|r|/jwidth)
337 * exp[-log(2)*(|r|/gwidth)^2]
340 Reference: Mangum, et al. 2007, A&A, 474, 679-687
342 --------------------
343 Mask in Output Image
344 --------------------
345 The parameter minweight defines a threshold of weight values
346 to mask. The pixels in outfile whose weight is smaller than
347 minweight*median(weight) are masked out. The task also creates
348 a weight image with the name outfile.weight.
353 """
355 _info_group_ = """single dish"""
356 _info_desc_ = """SD task: imaging for total power and spectral data"""
358 def __call__( self, infiles=[ ], outfile='', overwrite=False, field='', spw='', antenna='', scan='', intent='OBSERVE_TARGET#ON_SOURCE', mode='channel', nchan=int(-1), start=int(0), width=int(1), veltype='radio', outframe='', gridfunction='BOX', convsupport=int(-1), truncate=int(-1), gwidth=int(-1), jwidth=int(-1), imsize=[ ], cell='', phasecenter='', projection='SIN', ephemsrcname='', pointingcolumn='direction', restfreq='', stokes='', minweight=float(0.1), brightnessunit='', clipminmax=False, enablecache=True, convertfirst='never', interpolation='linear' ):
359 schema = {'infiles': {'type': 'cReqPathVec', 'coerce': [_coerce.to_list,_coerce.expand_pathvec]}, 'outfile': {'type': 'cStr', 'coerce': _coerce.to_str}, 'overwrite': {'type': 'cBool'}, 'field': {'anyof': [{'type': 'cStr', 'coerce': _coerce.to_str}, {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}]}, 'spw': {'anyof': [{'type': 'cStr', 'coerce': _coerce.to_str}, {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}]}, 'antenna': {'anyof': [{'type': 'cStr', 'coerce': _coerce.to_str}, {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}]}, 'scan': {'anyof': [{'type': 'cStr', 'coerce': _coerce.to_str}, {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}]}, 'intent': {'anyof': [{'type': 'cStr', 'coerce': _coerce.to_str}, {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}]}, 'mode': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'channel', 'frequency', 'velocity' ]}, 'nchan': {'type': 'cInt'}, 'start': {'anyof': [{'type': 'cStr', 'coerce': _coerce.to_str}, {'type': 'cInt'}]}, 'width': {'anyof': [{'type': 'cStr', 'coerce': _coerce.to_str}, {'type': 'cInt'}]}, 'veltype': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'OPTICAL', 'RELATIVISTIC', 'radio', 'true', 'optical', 'RADIO', 'TRUE', 'relativistic' ]}, 'outframe': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'LSRK', 'CMB', 'geo', 'bary', 'GALACTO', 'GEO', 'TOPO', 'LSRD', 'lsrk', 'topo', 'LGROUP', 'BARY', 'lsrd', 'cmb', 'galacto', 'lgroup', '' ]}, 'gridfunction': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'GJINC', 'pb', 'sf', 'GAUSS', 'PB', 'SF', 'gauss', 'BOX', 'box', 'gjinc' ]}, 'convsupport': {'type': 'cInt'}, 'truncate': {'anyof': [{'type': 'cStr', 'coerce': _coerce.to_str}, {'type': 'cInt'}, {'type': 'cFloat', 'coerce': _coerce.to_float}]}, 'gwidth': {'anyof': [{'type': 'cStr', 'coerce': _coerce.to_str}, {'type': 'cInt'}, {'type': 'cFloat', 'coerce': _coerce.to_float}]}, 'jwidth': {'anyof': [{'type': 'cStr', 'coerce': _coerce.to_str}, {'type': 'cInt'}, {'type': 'cFloat', 'coerce': _coerce.to_float}]}, 'imsize': {'anyof': [{'type': 'cIntVec', 'coerce': [_coerce.to_list,_coerce.to_intvec]}, {'type': 'cFloatVec', 'coerce': [_coerce.to_list,_coerce.to_floatvec]}]}, 'cell': {'anyof': [{'type': 'cStr', 'coerce': _coerce.to_str}, {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}, {'type': 'cFloatVec', 'coerce': [_coerce.to_list,_coerce.to_floatvec]}]}, 'phasecenter': {'type': 'cVariant', 'coerce': [_coerce.to_variant]}, 'projection': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'sin', 'SIN', 'SFL', 'CAR', 'sfl', 'car', 'TAN', 'tan' ]}, 'ephemsrcname': {'type': 'cStr', 'coerce': _coerce.to_str}, 'pointingcolumn': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'TARGET', 'encoder', 'ENCODER', 'source_offset', 'pointing_offset', 'target', 'POINTING_OFFSET', 'DIRECTION', 'SOURCE_OFFSET', 'direction' ]}, 'restfreq': {'anyof': [{'type': 'cStr', 'coerce': _coerce.to_str}, {'type': 'cFloat', 'coerce': _coerce.to_float}]}, 'stokes': {'type': 'cStr', 'coerce': _coerce.to_str}, 'minweight': {'type': 'cFloat', 'coerce': _coerce.to_float, 'min': 0}, 'brightnessunit': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ '', 'K', 'Jy/beam' ]}, 'clipminmax': {'type': 'cBool'}, 'enablecache': {'type': 'cBool'}, 'convertfirst': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'never', 'auto', 'always' ]}, 'interpolation': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'nearest', 'linear', 'cubic' ]}}
360 doc = {'infiles': infiles, 'outfile': outfile, 'overwrite': overwrite, 'field': field, 'spw': spw, 'antenna': antenna, 'scan': scan, 'intent': intent, 'mode': mode, 'nchan': nchan, 'start': start, 'width': width, 'veltype': veltype, 'outframe': outframe, 'gridfunction': gridfunction, 'convsupport': convsupport, 'truncate': truncate, 'gwidth': gwidth, 'jwidth': jwidth, 'imsize': imsize, 'cell': cell, 'phasecenter': phasecenter, 'projection': projection, 'ephemsrcname': ephemsrcname, 'pointingcolumn': pointingcolumn, 'restfreq': restfreq, 'stokes': stokes, 'minweight': minweight, 'brightnessunit': brightnessunit, 'clipminmax': clipminmax, 'enablecache': enablecache, 'convertfirst': convertfirst, 'interpolation': interpolation}
361 assert _pc.validate(doc,schema), create_error_string(_pc.errors)
362 _logging_state_ = _start_log( 'sdimaging', [ 'infiles=' + repr(_pc.document['infiles']), 'outfile=' + repr(_pc.document['outfile']), 'overwrite=' + repr(_pc.document['overwrite']), 'field=' + repr(_pc.document['field']), 'spw=' + repr(_pc.document['spw']), 'antenna=' + repr(_pc.document['antenna']), 'scan=' + repr(_pc.document['scan']), 'intent=' + repr(_pc.document['intent']), 'mode=' + repr(_pc.document['mode']), 'nchan=' + repr(_pc.document['nchan']), 'start=' + repr(_pc.document['start']), 'width=' + repr(_pc.document['width']), 'veltype=' + repr(_pc.document['veltype']), 'outframe=' + repr(_pc.document['outframe']), 'gridfunction=' + repr(_pc.document['gridfunction']), 'convsupport=' + repr(_pc.document['convsupport']), 'truncate=' + repr(_pc.document['truncate']), 'gwidth=' + repr(_pc.document['gwidth']), 'jwidth=' + repr(_pc.document['jwidth']), 'imsize=' + repr(_pc.document['imsize']), 'cell=' + repr(_pc.document['cell']), 'phasecenter=' + repr(_pc.document['phasecenter']), 'projection=' + repr(_pc.document['projection']), 'ephemsrcname=' + repr(_pc.document['ephemsrcname']), 'pointingcolumn=' + repr(_pc.document['pointingcolumn']), 'restfreq=' + repr(_pc.document['restfreq']), 'stokes=' + repr(_pc.document['stokes']), 'minweight=' + repr(_pc.document['minweight']), 'brightnessunit=' + repr(_pc.document['brightnessunit']), 'clipminmax=' + repr(_pc.document['clipminmax']), 'enablecache=' + repr(_pc.document['enablecache']), 'convertfirst=' + repr(_pc.document['convertfirst']), 'interpolation=' + repr(_pc.document['interpolation']) ] )
363 task_result = None
364 try:
365 task_result = _sdimaging_t( _pc.document['infiles'], _pc.document['outfile'], _pc.document['overwrite'], _pc.document['field'], _pc.document['spw'], _pc.document['antenna'], _pc.document['scan'], _pc.document['intent'], _pc.document['mode'], _pc.document['nchan'], _pc.document['start'], _pc.document['width'], _pc.document['veltype'], _pc.document['outframe'], _pc.document['gridfunction'], _pc.document['convsupport'], _pc.document['truncate'], _pc.document['gwidth'], _pc.document['jwidth'], _pc.document['imsize'], _pc.document['cell'], _pc.document['phasecenter'], _pc.document['projection'], _pc.document['ephemsrcname'], _pc.document['pointingcolumn'], _pc.document['restfreq'], _pc.document['stokes'], _pc.document['minweight'], _pc.document['brightnessunit'], _pc.document['clipminmax'], _pc.document['enablecache'], _pc.document['convertfirst'], _pc.document['interpolation'] )
366 except Exception as exc:
367 _except_log('sdimaging', exc)
368 raise
369 finally:
370 task_result = _end_log( _logging_state_, 'sdimaging', task_result )
371 return task_result
373sdimaging = _sdimaging( )