Advanced Photon Source at Argonne National Laboratory   APS USAXS instrument
USAXS instrument at the Advanced Photon Source,
X-ray science division, beamline 9ID-C

Advanced Photon Source

A U.S. Department of Energy, Office of Science,
Office of Basic Energy Sciences national synchrotron x-ray research facility

Argonne Home > Advanced Photon Source > USAXS >

Important links:

USAXS web page

Irena 2 (software for SAS modeling)

Nika 1 (software for SAS area detector  data reduction )

Irena 2 movies & Handouts

Nika movies & Handouts

Indra 2 (software for USAXS data reduction)

Some other useful code for Igor Pro I wrote:

Cromer-Lieberman code for IgorPro (ver. 4.0): AtomicFormFactors

Clementine, package for modeling decay kinetics

Other useful links…

Home page of Pete Jemian (more SAS)

APS SAS web page

"Nika" package for 2D -> 1D SAS data reduction for Igor Pro

  Please use following citation when using Nika package:

Jan Ilavsky, "Nika - software for 2D data reduction", J. Appl. Cryst. (2012), vol. 45, pp. 324-328. DOI:10.1107/S0021889812004037 .

Nika is package of Igor Pro macros designed to reduce 2D (area) detector (e.g., CCD) data into 1D "lineouts" for SAXS or WAXS. Similarly to Irena package for 1D SAS data analysis and  USAXS data analysis Indra 2, this one is written for Igor Pro, version 6.37 or Igor 7.x from Wavemetrics, Inc.

For introduction and description of capabilities, please see here:

On-line manual : You can open on line manual in your web browser and read it here: .

Discussion forum for users (in testing mode): Gitter

Wiki : There is now wiki for Irena and Nika packages on our Github depository. Check it up - questions of general importance may be asnwered there, if someone already asked them.

Workshops on using Irena & Nika packages... since 2012 we organize at the APS ~ three sessions per year workshops on use of Irena and Nika packages. To request to be put on waiting list for next workshops send e-mail to Connie.

Distribution & Installation:
Current version
released 11/05/2017
Igor 7.05 and higher
Use only one of these methods

(for most)

For Igor 7 only.
Check Youtube channel for instructions.
Uses Github to distribute Irena, Nika, and Indra. Most likely what you want!

Clone & link
(for experts)

For Igor 7 only. Clone the Github depository to your computer and link folders from your clone to proper Igor locations. If you need help, let me know.
NOTE: Github depository "master" version should be considered development version and while I try to submit to Github only working versions, the code is "beta" version only...

Manual & help

WEB version of manuals for Irena and Nika. If needed, download pdf version of the manuals from that web site.


Igor 6 version :


Igor 6.37 32bit
(Nika ver 1.76 )

For Igor 6.37 32bit, Installs/updates/uninstalls Irena, Nika, Indra, and 32 bit versions of xop, uses APS depository.
Nika version 1.76 is the last version which is Igor 6 compatible and is now obsolete.
NOTE: 64bit version of Igor 6.37 is NOT supported, use 32bit version ONLY.

If the above fails - Igor 6 only :
Igor 6.37 - local copy

Universal Installer 1.32.pxp, (~78Mb)

If you have bad network connection or need to install on many computers at once. Download both files, unzip the zip file and place in the same folder with the Universal Installer. Run the Universal installer and choose "use local copy". For Igor 6.37, 32bit version ONLY.

Manual methods (not recommended, unless above methods fail)
zip files
Download, unzip and install manually to proper places as indicated by folders in the zip file. Iinstall xop support manually (see below), including installing HDF5 support (provided by Wavemetrics, but not installed by default).
XOP zip files


Install when using zip file installlation. Please make sure you install the correct version for your platform.
Is included in the zip file.
Prior versions

Nika v 1.31, Nika_v1.60

1.18 is the last release for Igor 5.0: Nika_v_1.18

Mailing group for Nika users: If you want to be informed about Nika updates and possibly have place to inquire about data reduction problems, visit the page: where you can join this group.

Obtaining help:

  1. Read manual :
  2. Need help and understanding of Igor Pro? Check Wavemetrics youtube channel!
  3. Watch Help movies. Try my Youtube channel!
  4. Participate in one of the workshops
  5. Register for discussion group and ask author question there.
  6. E-mail author a question

BUGs can be expected, please, let me know if something is not right!

Extending the code capabilities beyond design.


Modification history:

1.78 11/05/2017
Promoted required minimum version to 7.05 due to bug in Igor prior of this version.
Added restore of prior size of panels when user closes and reopens a tool. Data stored in the current Igor experiment. Size limited to 50% width and 90% height. Hold down any modifier key and size will be reset to original default state.
Added ColorTable to preferences, Saved every time color table is changed and restored as needed. Should change the Panel GUI and colors of graph, if exists.
Modified folder name length - now each segments (_C, sectors, etc) will use longest possible part of the input file name, previously was limited to 17 characters. This allows longest user input names, but different directions may have different length of name allowed as the strings are different length. _C is shortest, in this case the length of name is about 29 characters.
Added ability to read multidimensional data from Nexus. Up to 4D data can be read, index 0 is first, index 2 second index, next two indexes are the image points. Standard. 3D data have only index1 (index0=0), 2D data have both indexes=0.
9ID support - will keep the _270_30 sector of SAXS data for use with desmeared USAXS data.
Added UserSamplename string to each folder for long names.
Changed and streamlined 9IDC support package to have less controls and be more robust. Reads parameters from each file.
ASCII exporter - added export of GSAS-II xye data file.
Removed pdf manual from distribution. It is obsolete, use on-line version and if needed, download pdf from the on-line source.
Added Update Message to CheckForUpdate code. If present, it will display a message for users.

1.77, 5/1/2017
Made Igor 7 compatible ONLY. Thanks to GeneralProcedures changes will not work on Igor 6.
Version check - using Github now.
Added buttons with links to web based manual pages to each tool.
Reduced number of characters allowed in name to 18, Ellipse was adding too many characters and was creating errors…

1.76, 5/1/2017
Version 1.75 updated with on line manuals, Igor 6 release only.

Fixed old bug where Sample Thickness was not converted to cm before use. This means that prior experiments with calibration constants need to have calibration constant also scaled by factor of 10 to compensate. Added warning to Panel version check.
Modified Nexus support, added new library to use it. Major revision of Nexus import and export of data.
Moved some common functions to IN2G_GeneralProcedures
Removed Utility_JZT from distribution, not needed and causing conflict with JZT package.
Updated manual.
Fixed slow down caused by debugging messages function

1.74 6/28/2016
Due to some new features used, requires Igor 6.34 or higher
Added more lines to calibrants. Up to 10 diffraction lines re allowed and used if user selects.
Added control which sets default scaling for images when loaded, so user can set preferred scaling. Note: Igor does enforce maximum size of image and will not scale above screen size.

1.73 3/5/2016
Added Panel scaling to most large panels
Added option to provide string function which will create name for the data to enable fancy renaming of input data. Has help which pops up with example.
Moved the modification conditions for auto naming (based on 2D data name) to the tabs for sectors and lineouts, where it belongs.
Modified USAXS/SAXS/WAXS configurator for Pilatus 200kw and use of empty background subtraction (with the transmission diode measurement).

1.72 2/1/2016
Igor 7 compatibility release
Modified FITS loader to handle data from different sources, as long as we are looking for sufficiently large 2D image (either in primary or any extension).
Added small function in Menu which enables to set all paths for Nika to the same place (sample, empty, Calibration, mask…). Can be changed later, but helps to setup easily.
Modified check for updates macro to use http once, if it fails use ftp, if that fails also then bail out and give error. Should be much easier for users who are on systems without net connectivity.
Added time stamp to the Live processing print statements for user orientation.

1.70 10/30/2015
Verified to work on Igor 7 beta 1
Added Configuration manager - allows users to have multiple fully configured "versions" of Nika inside one experiment and switch between them for convenience. Great if you have two different sample-to-detector distances etc.
File import - modified Pilatus img file loader - sample which contained 4096 bytes header was provided by user, so I added code which checks for the header and if present, skips the header and stores the header in the wave note. Some minor changes to logic of all Pilatus file types, hopefully I did not break anything.
9ID/15ID normalization SAXS - minor fix. WAXS, well, it is still settling down, not sure what the right numbers are…

1.69 never released
Major addition - created new calculation of the Q resolution using integration width of pixel (that used to be there), beam size and pixel size. Added beam size controls. If set to 0, ignored.
Added some warning and better handling when preferences change uncertainty calculation method
9ID/15ID configuration - force SEM as uncertainty method for WAXS and pinSAXS (Pilatus) while Std. Dev for big SAXS (MarCCD).
Added ability to type in Q distance from center for line profile. Is rounded to nearest full pixel.

1.68 3/8/2015
Fixed Ag Behenate line 5 which had typo it the d spacing.
ADSC file format - finish, need dialog, for now added ADSC_A
Fixed Azimuthal data export ASCII export tool. Bug caused garbage production, data in Igor were correct.
Renamed Prev. tab into PolTran = Polra transform. Better term for what the procedure does.
Bug fix - Fixed calculation of one of the angles in GISAXS geometry (alpha-f), which was incorrect. This require adding two options for GISAXS geometries and adding new panel which provides user selection. It also requires extensive description in the manual. Read the manual for description.
Modified Instrument config for 9IDC USAXS/SAXS/WAXS (should work as well for 15IDD USAXS/SAXS/WAXS)


These macros MAY produce Huge files. In my testing I have seen files well beyond 1 Gb. Conversion of CCD images at 3.5k x 3.5k level (Mar Image plate) and beyond takes some time and requires major CPU power. Make sure your hardware is up to the challenge. Note, I do not yet include any pixle splitting and do not provide any "bin width" data for q space smearing...


I have been testing this package against Fit2D package. In my test cases I have been able to reproduce same Intensity vs q dependence. Nika provides statistical errors calculated simply from statistics of pixles included in any given q bin...
 If you believe, the results are incorrect, let me know ASAP.

Registration/e-mail list:

Please, if you are using these macros let me know via e-mail. This will allow me to have some idea who is interested in these macros and how much of my time is worth to invest in further development. Also, please, indicate if you would like to be included on e-mail list I would like to maintain – I can then sent e-mail announcements when a new version is available. I will not misuse the e-mail list in any way…

 Quick disclaimer:

This set of macros is currently being developed for use on any SAS data. Their use by anyone for open science is free of charge. If you want to use them for proprietary work, please contact me, the author, Jan Ilavsky, for permission. There are no warrantees with respect to functionality of these macros, please, verify all results by independent methods.


Privacy & Security Notice  |   Contact Us    
This page last modified: 2017-11-04 4:35 PM