Git Product home page Git Product logo

nanoscope's Introduction

NanoScope AFM

https://travis-ci.org/jmarini/nanoscope.svg?branch=master

Nanoscope is a library to handle parsing and processing of Veeco Nanoscope Dimension AFM files. Currently hard-coded to only work for version 0x05120130 and 0x09300201 since that is what I have access to for testing, but it will likely work on newer versions.

Features

The current featureset includes:

  • Read raw Nanoscope files and image data (height, amplitude, phase, etc.)
  • Calculate standard summary information (RMS Roughness, Z-range, etc.)
  • Output the image in a Pillow-compatible format for saving
  • Data is cached after individual process steps to avoid unneeded reprocessing

Installation

Nanoscope can be easily installed using pip.

$ pip install nanoscope

Usage

An example of typical usage is shown below, including using Pillow to save the image to png and printing Z-range and RMS data to the console

import nanoscope
from PIL import Image

p = nanoscope.read('./file.000')
p.height.process()
print(p.height.zrange, p.height.rms)
pixels = p.height.colorize()
Image.fromarray(pixels).save('file.png')

Arbitrary image types may also be accessed by name (case sensitive) and the name of all image types may be queried

The various image types can also be looped through using an iterator when processing, and the settings of the processing steps customized

import nanoscope

p = nanoscope.read('./file.000')
for img in p:
    img.process(order=2)  # flatten the image using second-order function
    print(img.type, img.rms)

The processing steps can also be called individually if needed

import nanoscope
p = nanoscope.read('./file.000')
p.height.flatten()  # flatten the image, defaults to first-order flatten
p.height.convert()  # convert the raw data to scaled values

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.