ngcasa.imaging.direction_rotate

direction_rotate(mxds, rotation_parms, sel_parms)[source]

Rotate uvw coordinates and phase rotate visibilities. For a joint mosaics rotation_parms[‘common_tangent_reprojection’] must be true. The specified phasecenter and field phase centers are assumed to be in the same frame. East-west arrays, emphemeris objects or objects within the nearfield are not supported.

Parameters
  • mxds (xarray.core.dataset.Dataset) – Input vis.zarr multi dataset.

  • rotation_parms (dictionary) –

  • rotation_parms['new_phase_center'] (list of number, length = 2, units = radians) – The phase center to rotate to (right ascension and declination).

  • rotation_parms['common_tangent_reprojection'] (bool, default = True) – If true common tangent reprojection is used (should be true if a joint mosaic image is being created).

  • rotation_parms['single_precision'] (bool, default = True) – If rotation_parms[‘single_precision’] is true then the output visibilities are cast from 128 bit complex to 64 bit complex. Mathematical operations are always done in double precision.

  • sel_parms (dict) –

  • sel_parms['data_group_in'] (dict, default = vis_dataset.data_group[0][0]) – Only the id has to be specified The names of the input data and uvw data variables. For example sel_parms[‘data_group_in’] = {‘id’:’1’, ‘data’:’DATA’,’uvw’:’UVW’}.

  • sel_parms['data_group_out'] (dict, default = {**_vis_dataset.data_group[0],**{‘id’:str(new_data_group_id),’uvw’:’UVW_ROT’,’data’:’DATA_ROT’,’field_id’:rotation_parms[‘new_phase_center’]}}) – The names of the new data and uvw data variables that have been direction rotated. For example sel_parms[‘data_group_out’] = {‘id’:2,’data’:’DATA_ROT’,’uvw’:’UVW_ROT’}. The new_data_group_id is the next available id.

Returns

psf_dataset

Return type

xarray.core.dataset.Dataset