pysted.exp_data_gen.Synapse

class pysted.exp_data_gen.Synapse(n_molecs, datamap_pixelsize_nm=20, width_nm=(400, 800), height_nm=(300, 600), img_shape=(64, 64), dendrite_thickness=(1, 10), mode='rand', seed=None)

Synapse class Implemented with the intent of using a datamap_pixelsize of 20nm, to generate synapses with width of 500nm and height of 200nm inside a 64px by 64px datamap (1080nm x 1080nm). The synapse will have nanodomains along its upper edge :param n_molecs: The number of molecules that will be placed in every pixel of the synapse :param datamap_pixelsize_nm: The pixelsize (in nm) of the datamap :param width_nm: Interval for the desired width (in nm) of the synapse. The width will be sampled from this interval :param height_nm: Interval for the desired height (in nm) of the synapse. The height will be sampled from this

interval

Parameters:
  • img_shape – The shape of the image (tuple)

  • dendrite_thickness – Interval for the desired thickness of the dendrite (in pixels) to which the synapse is connected. The height will be sampled from this interval. Basically, this just determines how much of the dendrite we see in the ROI, drawn as a line on the bottom of the image.

  • mode – The mode used for the random synapse generation. ‘mushroom’ will produce a mushroom-like synapse (i.e., an ellipse connected to the dendrite by a recangular-ish neck). ‘bump’ will produce a bump-like synapse (i.e., a have ellipse protruding from the dendrite). ‘rand’ will randomly select one of these 2 modes.

  • seed – Sets the seed for the randomness

Synapse.add_nanodomains(n_nanodmains[, ...])

Adds nanodomains on the periphery of the synapse. :param n_nanodmains: The number of nanodomains that will be attempted to be added. If n_nanodomains is too high and the min_dist_nm is too high, it may not be able to place all the nanodomains, in which case a warning will be raised to tell the user not all nanodomains have been placed :param min_dist_nm: The minimum distance (in nm) separating the nanodomains. :param n_molecs_in_domain: The number of molecules to be added at the nanodomain positions :param seed: Sets the seed for the random placement of nanodomains :param valid_thickness: The thickness of the valid region for the nanodomains. This value is 0 by default, meaning the nanodomains will only be placed on the upper perimeter of the synapse.

Synapse.fatten_nanodomains()

Fattens the nanodomains by 1 pixel on each side (if the side is within the synapse)

Synapse.filter_valid_nanodomain_pos([thickness])

Returns a list of the valid nanodomain positions. The valid positions are on the upper half of the perimeter of the synapse :param thickness: The thickness of the valid region for the nanodomains. This value is 0 by default, meaning the nanodomains will only be placed on the upper perimeter of the synapse :return: list of the valid positions for the nanodomains.

Synapse.flash_nanodomains(current_time, ...)

Verifies if the nanodomains need to be updated for the flash, updates them if it is the case

Synapse.rotate_and_translate([rot_angle, ...])