Skip to content
Snippets Groups Projects
Commit 4fa383b6 authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

TMSS-652: fix in output correlated dataproduct filter

parent a819f30a
No related branches found
No related tags found
1 merge request!403Resolve TMSS-652 and TMSS-714
......@@ -107,12 +107,8 @@ def _convert_correlator_settings_to_parset_dict(subtask: models.Subtask, spec: d
parset[beam_prefix+"Correlator.angle2"] = phase_center['pointing']['angle2']
# TODO: do not use SubtaskOutput.objects.filter but make subtask.subtask_outputs work
subtask_outputs = list(models.SubtaskOutput.objects.filter(subtask_id=subtask.id))
subtask_output_ids = [o.id for o in subtask_outputs]
# TODO: don't assume ordering by filename is sufficient: we need to inspect the dataproduct properties to make sure saps and subbands are in the correct order
dataproducts = list(models.Dataproduct.objects.filter(producer_id__in=subtask_output_ids).filter(dataformat=Dataformat.Choices.MEASUREMENTSET.value).filter(datatype=Datatype.Choices.VISIBILITIES).order_by('filename'))
dataproducts = list(subtask.output_dataproducts.filter(dataformat__value=Dataformat.Choices.MEASUREMENTSET.value).filter(datatype__value=Datatype.Choices.VISIBILITIES.value).order_by('filename'))
parset["Observation.DataProducts.Output_Correlated.filenames"] = [dp.filename for dp in dataproducts]
parset["Observation.DataProducts.Output_Correlated.locations"] = ["%s:%s" % (subtask.cluster.name, dp.directory) for dp in dataproducts]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment