#!/usr/bin/env python # file name: /home/pXXuser/sardanaMacros/scanDataMod.py # """the demo for a data scan""" __all__ = ["scanDataMod"] from sardana.macroserver.macro import * from sardana.macroserver.macro import macro, Type class scanDataMod(Macro): """An example on how to look at the data after a scan has been executed""" def run(self): a = self.ascan("exp_dmy01", 0, 1, 10, 0.1) for elm in a.data.records: self.output( elm.data['hasppXX:10000/expchan/vc_sig_gen/1']) # # to understand how the data is packed you may use the following print statements # # self.output( dir(a)) # self.output( dir(a.data)) # self.output( dir(a.data.records)) # self.output( dir(a.data.records[0])) # self.output( a.data.records[0].data) #