|
int | _convert_frame_to_time (self, int frame, int exposure_time, int interval_time, int oversample_motion_time) |
|
| _update_units (self, unit, orig_type, update_type) |
|
bool | _check_init_dict (self) |
|
dict | _read_json (self, str json_file) |
|
| _define_space (self, dims=(100, 100), movie_frames=500) |
|
| _convert_track_dict_points_per_frame (self, tracks, movie_frames) |
|
| _convert_track_dict_msd (self, tracks) |
|
| _create_track_pop_dict (self, np.ndarray simulation_cube) |
|
| _create_map (self, np.ndarray initial_map, dict points_per_frame, str axial_function) |
|
dict | _point_per_time_selection (self, dict points_per_time) |
|
| _format_points_per_frame (self, points_per_frame) |
|
◆ __init__()
SMS_BP.simulate_cell.Simulate_cells.__init__ |
( |
| self, |
|
|
dict | str | init_dict_json ) |
Docstring for Simulate_cells: Class for simulating cells in space.
Parameters:
-----------
init_dict_json : dict|str
dictionary of parameters or path to the json file containing the parameters
see sim_config.md for more details
Returns:
--------
None
◆ _check_init_dict()
bool SMS_BP.simulate_cell.Simulate_cells._check_init_dict |
( |
| self | ) |
|
|
protected |
Docstring for _check_init_dict: check the init_dict for the required keys, and if they are consistent with other keys
Parameters:
-----------
None
Returns:
--------
bool: True if the init_dict is correct
Raises:
-------
InitializationKeys: if the init_dict does not have the required keys
InitializationValues: if the init_dict values are not consistent with each other
◆ _convert_frame_to_time()
int SMS_BP.simulate_cell.Simulate_cells._convert_frame_to_time |
( |
| self, |
|
|
int | frame, |
|
|
int | exposure_time, |
|
|
int | interval_time, |
|
|
int | oversample_motion_time ) |
|
protected |
Docstring for _convert_frame_to_time: convert the frame number to time
Parameters:
-----------
frame : int
frame number
exposure_time : int
exposure time
interval_time : int
interval time
oversample_motion_time : int
oversample motion time
Returns:
--------
int
time in the appropriate units
◆ _convert_track_dict_msd()
SMS_BP.simulate_cell.Simulate_cells._convert_track_dict_msd |
( |
| self, |
|
|
| tracks ) |
|
protected |
Docstring for _convert_track_dict_msd: convert the track dictionary to a dictionary of tracks with the format
required for the msd function
Parameters:
-----------
tracks : dict
dictionary of tracks, keys = track number, values = dictionary with keys = 'xy','frames','diffusion_coefficient','initial','hurst'
Returns:
--------
track_msd : dict
dictionary of tracks with the format required for the msd function, keys = track number, values = list of (x,y,T) tuples
◆ _convert_track_dict_points_per_frame()
SMS_BP.simulate_cell.Simulate_cells._convert_track_dict_points_per_frame |
( |
| self, |
|
|
| tracks, |
|
|
| movie_frames ) |
|
protected |
Docstring for _convert_track_dict_points_per_frame: convert the track dictionary to a dictionary of points per frame
Parameters:
-----------
tracks : dict
dictionary of tracks, keys = track number, values = dictionary with keys = 'xy','frames','diffusion_coefficient','initial','hurst'
movie_frames : int
number of frames in the movie
Returns:
--------
points_per_frame : dict
dictionary of points per frame, keys = frame number, values = list of (x,y,z) tuples
◆ _create_map()
SMS_BP.simulate_cell.Simulate_cells._create_map |
( |
| self, |
|
|
np.ndarray | initial_map, |
|
|
dict | points_per_frame, |
|
|
str | axial_function ) |
|
protected |
Docstring for __create_map: create the map for the simulation using the points_per_frame dictionary
Parameters:
-----------
initial_map : array-like
empty space for simulation
points_per_frame : dict
dictionary of points per frame (this is different from the points_per_time dictionary, and is sampled at the exposure time)
axial_function : str
function to be used to create the axial map
Returns:
--------
map : array-like
map for the simulation
◆ _create_track_pop_dict()
SMS_BP.simulate_cell.Simulate_cells._create_track_pop_dict |
( |
| self, |
|
|
np.ndarray | simulation_cube ) |
|
protected |
Docstring for _create_cell_tracks: create the tracks for the cell
Parameters:
-----------
simulation_cube : array-like
empty space for simulation
Returns:
--------
tracks : list
list of tracks for each cell
points_per_time : list
list of number of points in each time
◆ _define_space()
SMS_BP.simulate_cell.Simulate_cells._define_space |
( |
| self, |
|
|
| dims = (100, 100), |
|
|
| movie_frames = 500 ) |
|
protected |
Docstring for _define_space: make the empty space for simulation
Parameters:
-----------
dims : tuple, Default = (100,100)
dimensions of the space to be simulated
movie_frames : int, Default = 500
number of frames to be simulated
Returns:
--------
space : array-like, shape = (movie_frames,dims[0],dims[1])
empty space for simulation
◆ _format_points_per_frame()
SMS_BP.simulate_cell.Simulate_cells._format_points_per_frame |
( |
| self, |
|
|
| points_per_frame ) |
|
protected |
Docstring for _format_points_per_frame: format the points per frame dictionary so that for each key the set of tracks in it are
converted to a numpy array of N x 2 where N is the total amount of points in that frame. You don't need this function.
Parameters:
-----------
points_per_frame : dict
keys = str(i) for i in range(self.total_time), values = list of tracks, which are collections of [x,y] coordinates
Returns:
--------
points_per_frame : dict
keys = str(i) for i in range(movie_frames), values = numpy array of N x 2 where N is the total amount of points in that frame
◆ _point_per_time_selection()
dict SMS_BP.simulate_cell.Simulate_cells._point_per_time_selection |
( |
| self, |
|
|
dict | points_per_time ) |
|
protected |
Docstring for _track_and_point_per_time_selection: select the tracks and points per time for the simulation
Parameters:
-----------
points_per_time : dict
dictionary of points per time
Returns:
--------
points_per_frame: dict
dictionary of points per frame
◆ _read_json()
dict SMS_BP.simulate_cell.Simulate_cells._read_json |
( |
| self, |
|
|
str | json_file ) |
|
protected |
Docstring for _read_json: read the json file and return the dictionary
Parameters:
-----------
json_file : str
path to the json file
Returns:
--------
dict
dictionary of parameters
◆ _update_units()
SMS_BP.simulate_cell.Simulate_cells._update_units |
( |
| self, |
|
|
| unit, |
|
|
| orig_type, |
|
|
| update_type ) |
|
protected |
Docstring for _update_units: update the unit from one type to another
Parameters:
-----------
unit : int
unit to be updated
orig_type : str
original type of unit
update_type : str
type to update unit to
◆ condensates() [1/2]
dict SMS_BP.simulate_cell.Simulate_cells.condensates |
( |
| self | ) |
|
◆ condensates() [2/2]
SMS_BP.simulate_cell.Simulate_cells.condensates |
( |
| self, |
|
|
dict | condensates ) |
◆ get_and_save_sim()
None SMS_BP.simulate_cell.Simulate_cells.get_and_save_sim |
( |
| self, |
|
|
str | cd, |
|
|
str | img_name, |
|
|
str | subsegment_type, |
|
|
int | sub_frame_num, |
|
|
** | kwargs ) |
Docstring for make_directory_structure: make the directory structure for the simulation and save the image + the data and parameters
Also perform the subsegmentation and save the subsegments in the appropriate directory
Parameters:
-----------
cd : str
directory to save the simulation
img_name : str
name of the image
img : array-like
image to be subsegmented
subsegment_type : str
type of subsegmentation to be performed, currently only "mean" is supported
sub_frame_num : int
number of subsegments to be created
**kwargs : dict
dictionary of keyword arguments
KWARGS:
-------
data : dict, Default = None
dictionary of data to be saved, Keys = "map","tracks","points_per_frame" Values = array-like.
See the return of the function simulate_cell_tracks for more details
parameters : dict, Default = self.init_dict
Returns:
--------
none
◆ get_cell()
dict SMS_BP.simulate_cell.Simulate_cells.get_cell |
( |
| self | ) |
|
Docstring for get_cell: get the cell simulation
Parameters:
-----------
None
Returns:
--------
cell : dict
dictionary of the cell simulation, keys = "map","tracks","points_per_frame"
◆ _condensates
SMS_BP.simulate_cell.Simulate_cells._condensates |
|
protected |
◆ axial_detection_range_pix
SMS_BP.simulate_cell.Simulate_cells.axial_detection_range_pix |
◆ condensate_diffusion_updated
SMS_BP.simulate_cell.Simulate_cells.condensate_diffusion_updated |
◆ condensates
SMS_BP.simulate_cell.Simulate_cells.condensates |
◆ diffusion_transition_matrix
SMS_BP.simulate_cell.Simulate_cells.diffusion_transition_matrix |
◆ exposure_time
SMS_BP.simulate_cell.Simulate_cells.exposure_time |
◆ frame_count
SMS_BP.simulate_cell.Simulate_cells.frame_count |
◆ hurst_transition_matrix
SMS_BP.simulate_cell.Simulate_cells.hurst_transition_matrix |
◆ init_dict
SMS_BP.simulate_cell.Simulate_cells.init_dict |
◆ interval_time
SMS_BP.simulate_cell.Simulate_cells.interval_time |
◆ oversample_motion_time
SMS_BP.simulate_cell.Simulate_cells.oversample_motion_time |
◆ pixel_size_pix
SMS_BP.simulate_cell.Simulate_cells.pixel_size_pix |
◆ psf_sigma_pix
SMS_BP.simulate_cell.Simulate_cells.psf_sigma_pix |
◆ total_time
SMS_BP.simulate_cell.Simulate_cells.total_time |
◆ track_diffusion_updated
SMS_BP.simulate_cell.Simulate_cells.track_diffusion_updated |
◆ track_length_mean
SMS_BP.simulate_cell.Simulate_cells.track_length_mean |
◆ transition_matrix_time_step
SMS_BP.simulate_cell.Simulate_cells.transition_matrix_time_step |
The documentation for this class was generated from the following file: