#NEWLINE# def measure( input , save_results = True , show = False ) : #NEWLINE# #INDENT# from disco.worker.pipeline.worker import Worker , Stage #NEWLINE# from disco.core import Job #NEWLINE# job = Job ( worker = Worker ( save_results = save_results ) ) #NEWLINE# job . pipeline = [ ( 'split' , Stage ( 'map' , input_chain = input . params [ 'input_chain' ] , init = simple_init , process = map_fit ) ) , ( 'group_all' , Stage ( 'reduce' , init = simple_init , process = reduce_fit , combine = True ) ) ] #NEWLINE# job . params = input . params #NEWLINE# job . run ( name = 'Distribution' , input = input . params [ 'data_tag' ] ) #NEWLINE# return job . wait ( show = show )