def create_point_analysis(self, dataset, x: int = None, y: int = None): """ Select the pixel with coords (y, x) from each frame """ if dataset.shape.nav.dims > 2: raise ValueError( "incompatible dataset: need at most two navigation dimensions") parameters = { 'cx': x, 'cy': y, } parameters = {k: v for k, v in parameters.items() if v is not None} return PointMaskAnalysis(dataset=dataset, parameters=parameters)
def create_point_analysis(self, dataset, x: int = None, y: int = None): """ Create an Analysis that selects the pixel with coords (y, x) from each frame Returns ------- PointMaskAnalysis : libertem.analysis.base.Analysis When run by the Context, this Analysis generates a :class:`libertem.analysis.masks.SingleMaskResultSet`. """ if dataset.shape.nav.dims > 2: raise ValueError( "incompatible dataset: need at most two navigation dimensions") parameters = { 'cx': x, 'cy': y, } parameters = {k: v for k, v in parameters.items() if v is not None} return PointMaskAnalysis(dataset=dataset, parameters=parameters)