Inertial mass determination
Project description
Welcome to pyIMD!
With the introduction of a picoscopic cell balance that is compatible with optical microscopy, a new tool for the investigation of the cell state-dependent cell mass regulation is available for use in biophysics, cell biology, physiology and medicine. However, the analysis of the data can be challenging due to a) the amount of high resolution data or b) the structure of low-stress measurement (low resolution) data. Here, we introduce the software pyIMD, which allows to easily extract the mass as a function of time for non-moving cells out of the raw data. pyIMD Stands for Python inertial mass determination.
This documentation of pyIMD describes the API as well as gives provides a sample data set as well as sample scripts to run pyIMD from Jupyter or the Python console but it also contains a tutorial about how pyIMD is used with the user interface. The aim of this module is the calculation of the total/inertial mass for measurements taken in the continuous sweep or in the phase-lock loop (PLL) mode.
Links
Installation
If you download the portable for your operating system there is no need for any installation and you can use pyIMD directly trough the user interface.
Otherwise, to install this module from source, type on your terminal:
>>> git clone https://git.bsse.ethz.ch/cunya/pyIMD >>> cd pyIMD >>> pip install .
Example data
Example data files can be found in this repo. We provide example data of the various devices used (Cytomass and Nanonis) in various formats.
Go to Example_data.
Go to Example_scripts.
Usage
To use this module in a Python script, write:
>>> from pyIMD.imd import InertialMassDetermination
Set path to files either absolute or relative to where you run the script from, i.e. using the provided show case data:
>>> file_path1 = "/pyIMD/examples/data/show_case/0190110_ShowCase_PLL_B.txt" >>> file_path2 = "/pyIMD/examples/data/show_case/20190110_ShowCase_PLL_A.txt" >>> file_path3 = "/pyIMD/examples/data/show_case/20190110_ShowCase_PLL_LongTerm.txt" >>> imd.create_pyimd_project(file_path1, file_path2, file_path3, '\t', 23, 'PLL', figure_width=16.5, figure_height=20, initial_parameter_guess=[60.0, 2.0, 0.0, 0.0], cell_position=9.5, figure_format='pdf') >>> imd.run_intertial_mass_determination()
List default settings for calculation:
>>> imd.print_pyimd_project()
Change settings for calculation and figure output the following way before calling run_intertial_mass_determination():
>>> imd.settings.spring_constant = 4
More info and examples can be found in the online Documentation
Note
Use tab completion to access the object’s attributes (e.g. to get the calculated mass):
>>> mass = imd.calculated_cell_mass
Known Issues
In a IPython notebook the progress bar works not properly but has no effect on the calculations. In a IPython notebook the calculation speed is much slower.
Contribute
Please do contribute! Issues and pull requests are welcome. Thank you for your help improving software one changelog at a time!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.