Skip to content

Commit

Permalink
SPR1-2367 Remove IMAGING_WEIGHT column from MS
Browse files Browse the repository at this point in the history
This column is initialised full of zeroes and just takes up space
(4 bytes per main table entry, i.e. time-frequency-baseline cell, so
about 6-12% overhead). It can be recreated in CASA at a later stage.

The column is a leftover of good old blank.ms, which included it along
with MODEL_DATA and CORRECTED_DATA. The latter two columns were made
optional in the sneaky 41af4b8 as part of #75 in version 0.9, but this
one was missed.

Also remove the commented-out code that has tagged along forever :-)
  • Loading branch information
ludwigschwardt committed Jul 5, 2022
1 parent eeda25d commit 43e0a90
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions katdal/ms_extra.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,16 +228,6 @@ def dmspec(coldesc, tile_mem_limit=None):
dmgroup_spec[dm_group] = dmspec(desc["desc"])
additional_columns.append(desc)

dm_group = 'ImagingWeight'
shape = [nchan]
desc = tables.tablecreatearraycoldesc(
"IMAGING_WEIGHT", 0,
comment="Weight set by imaging task (e.g. uniform weighting)",
options=4, valuetype='float', shape=shape, ndim=len(shape),
datamanagergroup=dm_group, datamanagertype='TiledColumnStMan')
dmgroup_spec[dm_group] = dmspec(desc["desc"])
additional_columns.append(desc)

# Add MODEL_DATA and CORRECTED_DATA if requested
if model_data:
dm_group = 'ModelData'
Expand Down Expand Up @@ -388,8 +378,6 @@ def populate_main_dict(uvw_coordinates, vis_data, flag_data, weight_data, timest
# https://casadocs.readthedocs.io/en/stable/notebooks/data_weights.html
# for further details
main_dict['SIGMA_SPECTRUM'] = weight_data ** -0.5
# Weight set by imaging task (e.g. uniform weighting) (float, 1-dim)
# main_dict['IMAGING_WEIGHT'] = np.ones((num_vis_samples, 1), dtype=np.float32)
# The sampling interval (double)
main_dict['INTERVAL'] = integrate_length * np.ones(num_vis_samples)
# The model data column (complex, 3-dim)
Expand Down

0 comments on commit 43e0a90

Please sign in to comment.