Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | ms | |
Tool | ms |
items | in | Record with items and their new values | |
Allowed: | Record | ||
Default: | no default |
Unlike the getdata function you can only put items that correspond to actual table columns. You cannot change the data shape either so that the number of correlations, channels and rows (or intereferometers/time slots) must match the values in the selected measurement set. If the values were obtained using the getdata function with ifraxis argument set to T, then,any default values added to fill in missing intereferometer/timeslots pairs will be ignored when writing the modified values back using this function.
The measurement set has to be opened for read/write access to be able to use this function.
You need to call selectinit before calling this function. If you haven't then selectinit will be called for you with default arguments.
Items prefixed with either; corrected, model, residual or obs_residual and the imaging_weight item are not available unless your measurement set has been processed either with the imager or calibrator tools.
include 'ms.g' myms := ms("3C273XC1.ms", readonly=F) myms.selectinit(datadescid=1) rec := myms.getdata("weight data") rec.weight[,] := 1; include 'statistics.g' rec.corrected_data -:= mean(rec.corrected_data); myms.putdata(rec);This example selects all the data from the measurement set where the value in the
DATA_DESC_ID
column is zero. This
corresponds to a particular spectral window and polarization
setup. Note that the measurement set was opened for writing as
well as reading. The fourth line reads all the weights and the
corrected data into the Glish variable rec. The weights are set
to one. The more obscure syntax is used as typing
rec.weight:= 1
will not preserve the shape of the weight
array. The corrected data then has its mean subtracted from
it. The mean function is defined in statistics.g. Finally the data
is written back into the measurement set table.