get_task_result_count

get_task_result_count(context: Context, taskname: str = 'hif_makeimages') int[source]

Count occurrences of a task result in the context.results list.

Loop over the content of the context.results list and compare taskname to the pipeline_casa_task attribute of each result object. Increase counter if taskname substring is found in the attribute.

The order number is determined by counting the number of previous execution of the task, based on the content of the context.results list. The introduction of this method is necessary because VLASS-SE-CONT imaging happens in multiple stages (hif_makeimages calls). Imaging parameters change from stage to stage, therefore it is necessary to know what is the current stage ordinal number.