def logicle(fcm, channels, T, m, r=None, scale_max=1e5, scale_min=0, w=0.5, a=0, rquant=None): """return logicle transformed points in fcm data for channels listed""" npnts = fcm.view().copy() for i in channels: if rquant: w = None tmp = npnts[:, i] r = quantile(tmp[tmp < 0], 0.05) if r is None and w is None: w = 0.5 tmp = scale_max * _logicle(npnts[:, i].T, T, m, r, w, a) #tmp[tmp<scale_min] = scale_min npnts.T[i] = tmp node = TransformNode('', fcm.get_cur_node(), npnts) fcm.add_view(node) return fcm
def log_transform(fcm, channels): npnts = fcm.view().copy() for i in channels: #npnts[:,i] = where(npnts[:,i] <= 1, 0, log10(npnts[:,i])) npnts[:, i] = _log_transform(npnts[:, i]) node = TransformNode('', fcm.get_cur_node(), npnts) fcm.add_view(node) return fcm
def hyperlog(fcm, channels, b, d, r, order=2, intervals=1000.0): npnts = fcm.view().copy() for i in channels: npnts.T[i] = _hyperlog(npnts[:, i].T, b, d, r, order=2, intervals=1000.0) node = TransformNode('', fcm.get_cur_node(), npnts) fcm.add_view(node) return fcm