palmari.data_structure package#
Submodules#
palmari.data_structure.acquisition module#
- class palmari.data_structure.acquisition.Acquisition(tif_file, experiment: Experiment, tif_pipeline: TifPipeline)[source]#
Bases:
object
An acquisition corresponds to a PALM movie. It is part of an
Experiment
, and bound to aTifPipeline
with which it is processed.- property ID: str#
- add_traj_cols_to_locs(traj_columns: pandas.core.frame.DataFrame)[source]#
traj_columns is a dataframe whose index corresponds to the ‘n’ column (traj ID) We merge it with the locs dataframe
- property drift_is_corrected: bool#
- get_property(col: str) Any [source]#
Access an acquisition’s property, read from its experiment’s index table.
- Parameters
col (str) – name of the index table column to look into
- Returns
value of the corresponding row x column in the experiment’s index table
- Return type
Any
- property image: dask.array.core.Array#
The actual movie, loaded with Dask.
- Returns
the movie.
- Return type
da.Array
- property intensity: pandas.core.frame.DataFrame#
- property intensity_is_computed: bool#
- property intensity_path: str#
- property is_localized: bool#
- property is_processed: bool#
- property is_tracked#
- property locs: pandas.core.frame.DataFrame#
- property locs_path: str#
- property polygon_files: List#
- property polygon_folder: str#
- property raw_locs: pandas.core.frame.DataFrame#
- property raw_locs_path: str#
- trajectories_list(min_length: int = 7, return_indices: bool = True, filter: Optional[Callable] = None)[source]#
Returns a list of trajectories whose length is above a given threshold, possibly filtered according to the locs they’re based on
- Parameters
min_length (int, optional) – Defaults to 7.
return_indices (bool, optional) – Whether to return indices (‘n’ column of the locs DataFrame) along with coordinates. Defaults to True.
filter (Callable, optional) – Callable, which takes as input the locs DataFrame and returns a boolean Series with the same index. Defaults to None.
- Returns
either a list of trajectories, or a tuple containing this same list and the list of indices
- Return type
_type_
- property tubeness: numpy.array#
- property tubeness_is_computed: bool#
- property tubeness_path: str#
- view(min_traj_length=1, polygon_ID_col: Optional[str] = None, short_for_tests: bool = False, contrast_limits: tuple = (100, 500))[source]#
palmari.data_structure.experiment module#
- class palmari.data_structure.experiment.Experiment(data_folder: str, export_folder: str, DT: Optional[float] = None, pixel_size: Optional[float] = None, file_pattern: Optional[str] = None)[source]#
Bases:
object
- property all_files: List[str]#
Return all files indexed in self.index_df
- Returns
all files indexed in self.index_df
- Return type
List[Acquisition]
- property custom_fields: dict#
Override this in a subclass of Experience to meet your needs keys of the dict are column names values are used to fill the columns, using the TIF file name of each acquisition values can be :
string : True if the file name contains that string
int : the i-th part of the file name, when split using the filesystem separator
callable : callable(filename)
for instance
{"condition":get_condition_from_name}
- get_ID_of_acq(acquisition: palmari.data_structure.acquisition.Acquisition)[source]#
- property index_df: pandas.core.frame.DataFrame#
- look_for_new_columns(overwrite=False)[source]#
Computes custom columns
- Parameters
overwrite (bool, optional) – Whether to overwrite pre-existing values. Defaults to False.
- look_for_updates()[source]#
Look if the index dataframe matches the reality of present/absent files And computes custom columns if needed
- parameter_influence_on_stats(param_name: str, stats: list = ['n_locs'], mode: str = 'hist')[source]#
Plots the influence of a processing parameter on some statistics.
- Parameters
param_name (str) – The parameter whose influence is studied. it should be one returned by acquisition.basic_stats
stats (list, optional) – Statistics to compare. Defaults to [“n_locs”].
mode (str, optional) – Plotting mode. supported : “bars” and “hist”. Defaults to “hist”.
- property runs_stats: pandas.core.frame.DataFrame#