From Shpyrko Group Wiki
Jump to: navigation, search


Group Software

General Software we find useful:

  • We recommend latest version of Windows 7 and Microsoft Office 2007 or 2010.
  • We also run Ubuntu server (on which this wiki is hosted).
  • SSH Secure Shell client is great for connecting to linux servers.
  • Professional version of Adobe Acrobat is useful for easy creating, editing and commenting on PDF documents.

Scientific software:

  • Our group has a MATLAB group license, check with current group software contact person for distibution.\
  • For creating quality plots we recommend Origin.
  • C-PLOT is used by our group for data analysis and sometimes creating plots.
  • We also use IDL for some data analysis.


  • Endnote is great for managing references.
  • ISI Web of Knowledge and Web of Science, as well as Google Scholar are great for looking up and importing references. Make sure you go to Google Scholar preferences and select Endnote as your bibliography manager.
  • Zotero is a Firefox addon that works wonders for easily and quickly creating large citation databases off the web.
  • Digitizer is a web-based plot data extraction tool.

Analysis Code

Below are available versions of XPCS code in MatLab. Run XPCS_MainGUI.m to start the program. Please, contact Sebastian if you have suggestions or problems.

Most Recent Version:

March 20, 2012 File:XPCS beta 2 03

  • Main Program
    • Automatically load last attributes and setup used
    • Changed Color and added logo linked to homepage
    • Most GUIs are scalable for best viewing
    • File Definition moved with in sub GUIs
    • Added some support for .CDF files
    • Automatically save a run log
  • Attribute Definition
    • Define location of attributes within .hdf or .h5 files (sample attributes for APS 2-ID-B given)
  • Setup Definition Tool
    • Export/Import
    • Calculate and View 2-theta, nu angles and q_perpendicular across CCD
    • Fixed bug with offset pixel
    • Define Crystal
      • Give hkl vector and get source and detector location.
      • Import .CIF or previously exported data
    • View polarization direction
  • Mask Definition
    • Colorbar made to show original limits of scale for all scale types
    • Offset data. Automatically adjust for non-linear scales to keep values real.
    • Settings for tone mapping
    • Cut tool, allows viewing of data for line given
    • Cursor tool now also displays wave-vector transfer and angles for pixel selected in image
    • Display other attributes values
    • Automatically transfer imported image size to setup definition
    • Automatically transfer pixel offset from center calculation tool
    • Export images with color and mask shown
    • Split or Combine Images
    • Fixed bug with resizing background of GUI on accident when redisplaying data or setup after clicking figure handle
    • Fixed zooming problem when changing between different size images and now can't interact with background on accident
  • Image Processing (previously Background Subtraction)
    • Define a functional to perform on a set of images, including averaging, normalizing by attributes, fitting, etc.
    • Subtract images from slightly different setups by taking the pixel value for which the q-space matches the best.
    • View images after processing instead of exporting
  • View Analysis
    • Basic viewer for analyzed data

Older Versions:

May 08, 2011 File:XPCS

  • Added use of Dynamic Mask for analysis. Masks are created based on the individual image in Mask tool
  • Added feature to expand or contract the region of interest (ROI) boundary by a pixel in Mask tool
  • Added two-variable 2nd-order polynomial fit in ROI in Mask tool
  • Added two-variable elliptical Gaussian fit in ROI in Mask tool
  • Added find center using center of mass intensity in ROI in Mask tool
  • Added find center using two-variable elliptical Gaussian fit in ROI in Mask tool
  • Added find center using minimum width annulus in ROI in Mask tool
  • Added export image directly in Mask tool
  • Added use of masks in background subtraction tool
  • Modified background subtraction tool layout
  • Added viewing options (zoom, pan, rotate) in setup definition tool
  • Modified angle definitions in setup definition tool to conform to reflection geometry standards and use sample axis definitions

November 06, 2010 File:XPCS

  • Added ability to remove image during mask editing to see the mask only
  • Fixed error while hiding the mask
  • Added image mapping including: linear, square root, logarithmic, and tone mapping. Replaced XPCS_LogCheck function with new XPCS_mapScale function
  • Added image coloring including: Gray, Spectrum, Rainbow, Heat, and Cool
  • Added interactive tools: arrow, zoom, pan, data cursor, reset view
  • Remembers which file was loaded last or if the entire file list has been loaded, so that Analysis and movies do not have to reaload the same images
  • Edit XPCS_maskOpenFile function to take advantage of checking last file opened and also added capability to call function with specific file without calling dialog box
  • Changed how images are displayed by adding an extra scaled image, which can be reused to display, instead of repeatedly calculating the image map
  • Modified how the mask.thedata variable read in works; can now store many images, instead if reloading a specific frame
  • Modified Main file list to store number of frames per file
  • Created a new movieGUI, to control playing several frames of several files.
  • Added pause time option and autoscale option in movie control
  • Added movie export capability
  • Modified XPCS_openFolder to load only .hdf and .fits files from the specified folder

October 25, 2010 File:XPCS

  • Redefined how XPCS_fileReader and XPCS_convImgSize functions are called to expand their applicability
  • Simplified Code using the previous functions
  • Changed how XPCS_movie function works, allowing reading of multiple, multi-image .fits files

October 21, 2010 File:XPCS

  • Basic tool to load .hdf and .fits files and analyze within a desired region.
  • Import/export masks
  • Draw masks with rectangles, circles, polygons, or freehand
  • Define masked based on certain threshold value
  • Play movie of data
  • Define the setup using; automatically calculates q-scale across CCD
  • Background subtraction via automatically scaled images or defined values
  • Define independent data sets for analysis
  • Average over defined images
  • Autocorrelation and normalized difference method both compared to first or previous image

Coding Tips and Tricks

Out of Memory problems in Matlab 32-bit version

Increasing the heap space for the Java VM in MATLAB

Parallel Computing in Matlab

Personal tools