Giter Club home page Giter Club logo

mesoscope's Introduction

mesoscope

Latest Version Build Status Binder

preprocessing and conversion for mesoscope data

This package contains a module and command line tool to process raw data from the two-photon random access mesoscope (2P-RAM). The raw output of the mesocope, via the ScanImage control software, is a matrix of resonant scan lines across multiple rois stored as TIF files. For the majority of applications, users will want to merge and reshape their contents into images that are appropriately merged and reshaped. This module helps you do that.

install

You can install using pip

pip install mesoscope

example

Here we'll convert the example test data included with the repository

import mesoscope as ms

data, meta = ms.load('test/resources/input')
newdata, newmeta = ms.convert(data, meta)

data.shape
>> (23, 5152, 64)

converted.shape
>> (23, 464, 576)

use as command line tool

Given a directory with input TIF files and a metadata file as JSON, just call

mesoscope convert input/ output/

This will create a folder output with the converted images. Type mesoscope convert -h to see other options. Note that during image writing int16 values will be written as uint16 so any negative values will be clipped at 0.

use as a module

The mesocope package includes just two methods

data, meta = load(path, engine=None)

Loads both data and metadata from the specified path. The optional engine can be used to load the data using a parallel backend. Currently supports either None (for local compute) or a SparkContext (for parallelization using a Spark cluster).

newdata, newmeta = convert(data, meta)

Converts the given data using the provided metadata. The data should be a numpy array or a thunder images object.

mesoscope's People

Contributors

freeman-lab avatar sofroniewn avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.