Exemplo n.º 1
0
        # On a grid.
        if 1:
            #x_vals[j] = 10.0 + 10.0*(j%23)
            #y_vals[j] = 10.0 + 10.0*math.floor(float(j)/23.0)
            x_vals[j] = 20.0 + 20.0 * (j % 10)
            y_vals[j] = 20.0 + 20.0 * math.floor(float(j) / 10.0)
            z_off = -0.5 + float(j) / float(num_objects - 1)
            #z_off = -0.4 + 0.8 * float(j)/float(num_objects - 1)
            #z_off = 0.0
            z_vals[j] = z_off * 1000.0

    # Generate objects.
    objects = PSF.PSF(x_vals, y_vals, z_vals, h_vals)

    # Draw the image.
    image = dg.drawGaussians([x_size, y_size], objects, background=50, res=5)
    #image = dg.drawGaussians([x_size, y_size], objects, background = 0, res = 5)
    #image[0:(x_size/2),:] += 50

    # Add poisson noise and baseline.
    image = numpy.random.poisson(image) + 100.0

    # Save the image.
    dax_data.addFrame(image)

    # Save the molecule locations.
    a_vals = PSF.PSFIntegral(z_vals, h_vals)

    ax = numpy.ones(num_objects)
    ww = 2.0 * 160.0 * numpy.ones(num_objects)
    if (PSF.psf_type == "astigmatic"):
Exemplo n.º 2
0
        # On a grid.
        if 1:
            #x_vals[j] = 10.0 + 10.0*(j%23)
            #y_vals[j] = 10.0 + 10.0*math.floor(float(j)/23.0)
            x_vals[j] = 20.0 + 20.0*(j%10)
            y_vals[j] = 20.0 + 20.0*math.floor(float(j)/10.0)            
            z_off = -0.5 + float(j)/float(num_objects - 1)
            #z_off = -0.4 + 0.8 * float(j)/float(num_objects - 1)
            #z_off = 0.0
            z_vals[j] = z_off * 1000.0

    # Generate objects.
    objects = PSF.PSF(x_vals, y_vals, z_vals, h_vals)
    
    # Draw the image.
    image = dg.drawGaussians([x_size, y_size], objects, background = 50, res = 5)
    #image = dg.drawGaussians([x_size, y_size], objects, background = 0, res = 5)
    #image[0:(x_size/2),:] += 50

    # Add poisson noise and baseline.
    image = numpy.random.poisson(image) + 100.0
        
    # Save the image.
    dax_data.addFrame(image)

    # Save the molecule locations.
    a_vals = PSF.PSFIntegral(z_vals, h_vals)
    
    ax = numpy.ones(num_objects)
    ww = 2.0 * 160.0 * numpy.ones(num_objects)
    if (PSF.psf_type == "astigmatic"):