Parsing the numerical output from Sensovation SensoSpot image analysis.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Holger Frey 38224770ad renamed column constants 3 years ago
example_data added test data for raising errors 4 years ago
sensospot_data renamed column constants 3 years ago
tests renamed column constants 3 years ago
.gitignore some errors fixed in production 4 years ago
.pre-commit-config.yaml added measurement normalization 4 years ago
CHANGES.md removed "utils" and "dynamic_range" 3 years ago
CONTRIBUTING.md import of project template 5 years ago
LICENSE import of project template 5 years ago
Makefile swapped pytest random plugin to a more activly supported one 4 years ago
README.md renamed column constants 3 years ago
pyproject.toml added option to recurse one level down 3 years ago
tox.ini import of project template 5 years ago

README.md

Sensospot Data Parser

Parsing the numerical output from Sensovation Sensospot image analysis.

Example:


    import sensospot_data

    # read the raw data of a folder
    raw_data = sensospot_data.parse_folder(<path to results directory>)

    sorted(raw_data.columns) == [
        'Analysis.Name', 
        'Bkg.Area', 'Bkg.Mean', 'Bkg.Median', 'Bkg.StdDev', 'Bkg.Sum', 
        'Exposure.Id', 
        'Parameters.Channel', 'Parameters.Time', 
        'Pos.Id', 'Pos.Nom.X', 'Pos.Nom.Y', 'Pos.X', 'Pos.Y', 
        'Spot.Area', 'Spot.Diameter', 'Spot.Found', 'Spot.Mean', 'Spot.Median', 
        'Spot.Saturation', 'Spot.StdDev', 'Spot.Sum', 
        'Well.Column', 'Well.Name', 'Well.Row'
    ]

Constants

There is a columns module available, providing constans that define the column names.


    import sensospot_data

    sensospot_data.columns.ANALYSIS_NAME == "Analysis.Name"

Avaliable functions:

from .parser import parse_file, parse_folder # noqa: F401

  • parse_folder(path_to_folder) Searches the folder for parsable Sensospot .csv files, parses them into one big pandas data frame and will add additional meta data from parameters folder, if it is present.
  • parse_file(path_to_csv_file) Parses a Sensospot csv file into a pandas data frame and will add some additional meta data from the file name. Is internally also used by parse_folder()

CLI

For the (propably) most important function, there is even a cli command

Usage: sensospot_parse [OPTIONS] SOURCE

Arguments:
  SOURCE:             Folder with Sensospot measurement

Options:
  -o, --outfile TEXT  Output file name, use a dash '-' for stdout, default:
                      'collected_data.csv'
  -q, --quiet         Ignore Sanity Check
  -r, --recurse       Recurse into folders one level down
  --help              Show this message and exit.

Development

To install the development version of Sensovation Data Parser:

git clone https://git.cpi.imtek.uni-freiburg.de/holgi/sensospot_data.git

# create a virtual environment and install all required dev dependencies
cd sensospot_data
make devenv

To run the tests, use make tests (failing on first error) or make coverage for a complete report.