def small_intensity_table(): intensities = np.array([[[0, 1], [1, 0]], [[1, 0], [0, 1]], [[0, 0], [1, 1]]]) spot_attributes = dataframe_to_multiindex( pd.DataFrame( data={ IntensityTable.SpotAttributes.X: [0, 1, 2], IntensityTable.SpotAttributes.Y: [3, 4, 5], IntensityTable.SpotAttributes.Z: [0, 0, 0], IntensityTable.SpotAttributes.RADIUS: [0.1, 0.2, 0.3] })) return IntensityTable.from_spot_data(intensities, spot_attributes)
def small_intensity_table(): intensities = np.array([ [[0, 1], [1, 0]], [[1, 0], [0, 1]], [[0, 0], [1, 1]], [ [0.5, 0.5], # this one should fail decoding [0.5, 0.5] ], [[0.1, 0], [0, 0.1]], # this one is a candidate for intensity filtering ]) spot_attributes = pd.DataFrame( data={ Indices.X.value: [0, 1, 2, 3, 4], Indices.Y.value: [3, 4, 5, 6, 7], Indices.Z.value: [0, 0, 0, 0, 0], Features.SPOT_RADIUS: [0.1, 2, 3, 2, 1] }) return IntensityTable.from_spot_data(intensities, spot_attributes)