示例#1
0
def get_hand_position_index(name):
    import StudioUICharaState
    from System import Array
    try:
        return Array.IndexOf(StudioUICharaState.handPtnAnimeName, name)    
    except:
        return None
示例#2
0
num_obj = ZenService.Analysis.AllParticles.RegionsCount
frame = ZenService.Experiment.CurrentTimePointIndex

# get current stage position XY of the image center
imgX = ZenService.Analysis.AllParticles.ImageStageXPosition
imgY = ZenService.Analysis.AllParticles.ImageStageYPosition

# get current object positions array for all detected objects
#posx = ZenService.Analysis.SingleParticle.CenterX
#posy = ZenService.Analysis.SingleParticle.CenterY
posx = ZenService.Analysis.SingleParticle.BoundCenterXStage
posy = ZenService.Analysis.SingleParticle.BoundCenterYStage
intensities = ZenService.Analysis.SingleParticle.IntensityMean_EGFP

# get ID of the brightest detected particle
ID = Array.IndexOf(intensities, max(intensities))

# move the stage
ZenService.HardwareActions.SetStagePosition(posx[ID], posy[ID])

# create strings:
POSX = createstr(posx)
POSY = createstr(posy)
INTS = createstr(intensities)

# write positions to data log file
logfile = ZenService.Xtra.System.AppendLogLine(
    str(frame) + '\t' + str(imgX) + '\t' + str(imgY) + '\t' + str(num_obj) +
    '\t' + POSX + '\t' + POSY + '\t' + INTS + '\t' + str(ID + 1) + '\t' +
    str(round(posy[ID], 2)) + '\t' + str(round(posy[ID], 2)))