Giter Site home page Giter Site logo

barionleg / xi-cam.ncem Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ercius/xi-cam.ncem

0.0 0.0 0.0 218 KB

A plugin for the Xicam scientific data visualization and analysis software. Developed by the National Center for Electron Microscopy (NCEM).

Python 100.00%

xi-cam.ncem's Introduction

Xi-cam.NCEM

A plugin for the Xi-cam image program for electron microscopy data visualization supported by the National Center for Electron Microscopy facility of the Molecular Foundry.

This plugin is the main graphical user interface for the openNCEM ncempy package for visualizing electron microscopy data.

Supported file types are:

  • Digital Micrograph version 3 and 4
  • Thermo Fischer (FEI) SER files
  • Thermo Fischer (FEI) EMD files written by Velox
  • Berkeley EMD files
  • MRC format files
  • TIF files with ImageJ metadata

Components

The Xi-cam.NCEM plugin implements two types of data viewing

View

Opens and displays 2D and 3D versions of the files mentioned above.

FFTView

Shows the real space image and 'live' FFT diffractogram of a chosen region of the image.

Installation

PIP

There is now a pip installable package on pypi.org. Simply do:

pip install xicam
pip insttall xicam.NCEM

Conda

If you are using conda you can first make a new environment

conda create --name xicam python=3.8 numpy scipy dask jupyter h5py pyqtgraph matplotlib netcdf4 xarray requests astropy numcodecs pyqt intake humanize zarr
activate xicam

Then use pip to install xicam and xicam.NCEM

pip install xicam
pip insttall xicam.NCEM

From source

Here are a set of steps to install this program from source using git, conda, and pip on Windows.

  1. Clone the Xicam repository from XI-CAM on github
git clone https://github.com/Xi-CAM/Xi-cam.git

2a. Get the stable Xi-cam.NCEM plugin from XI-CAM

git clone https://github.com/Xi-CAM/Xi-cam.NCEM.git

2b. OR the development version from Peter Ercius's repository

git clone https://github.com/ercius/Xi-cam.NCEM.git
  1. Create and activate a new conda environment. Some dependencies are installed by pip later.
conda create --name xicam python=3.8 numpy scipy dask jupyter h5py pyqtgraph matplotlib netcdf4 xarray requests astropy numcodecs pyqt intake humanize zarr
activate xicam
  1. Run the following pip commands from the parent directory of the cloned repositories above.
pip install -e Xi-cam\\
pip install -e Xi-cam.NCEM\\
  • Note: Slashes (\ on windows and / on Linux or Mac) at the end of the line are important to force a local installation rather than downloading from pypi
  • Note: The -e option installs the packages as 'editable' so you can update the program easily using git

Debugging

Xicam allows the user to just call the xicam executable from anywhere once the anaconda environment is activated, which is very convenient. However, there the error is captured by a logger (see below) and debugging is difficult. Debugging in QT is possible (see below).

Simple debugging

1. Open the xi-cam-unified/xicam folder. In this folder is a python file named run-xicam.py.

Run this file in the command prompt using

python run-xicam.py

The console output is shown in that console including print and error messages.

PDB debugging

To enable debugging for a pyqt program insert this code where you want to stop the program

from PyQt5.QtCore import pyqtRemoveInputHook
from pdb import set_trace
pyqtRemoveInputHook()
set_trace()

Resuming might be possible using

from PyQt5.QtCore import pyqtRestoreInputHook
pyqtRestoreInputHook()

and then pressing CTRL-C to stop the command printing. I have not tried this though.

xi-cam.ncem's People

Contributors

ercius avatar ronpandolfi 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.