Skip to content
Snippets Groups Projects

Disable frequency chunking for full-Jones solves

Merged David Rafferty requested to merge remove_di_solve_frequency_chunking into master
All threads resolved!
+ 14
3
@@ -326,9 +326,20 @@ class Observation(object):
freqchunk_filename = self.ms_filename
# Divide up the bandwidth if needed
samplesperchunk = int(round(target_chunksize / self.channelwidth))
freqchunksize = samplesperchunk * self.channelwidth # Hz
nfreqchunks = max(1, int(np.ceil(self.numchannels * self.channelwidth / freqchunksize)))
if solve_type == 'fulljones':
# Don't use frequency chunking for full-Jones solves, as it is not
# supported when solving is done against the MODEL_DATA column. The
# chunking is disabled by setting samplesperchunk = 0, as this sets the
# value of nchan in the DP3 call (and nchan = 0 means all channels; see
# https://dp3.readthedocs.io/en/latest/steps/Input.html#msin-46-nchan).
# Such chunking is not needed in any case for the full-Jones solves, as it
# is a direction-independent solve and thus the memory usage is low
samplesperchunk = 0
nfreqchunks = 1
else:
samplesperchunk = int(round(target_chunksize / self.channelwidth))
freqchunksize = samplesperchunk * self.channelwidth # Hz
nfreqchunks = max(1, int(np.ceil(self.numchannels * self.channelwidth / freqchunksize)))
setattr(self, f'nfreqchunks_{solve_type}', nfreqchunks)
self.log.debug('Using {0} frequency chunk{1} for the {2} gain '
'calibration (if done)'.format(nfreqchunks, "s" if nfreqchunks > 1 else "", solve_type))
Loading