Giter Club home page Giter Club logo

scianalysis's Introduction

SciAnalysis

Author : Kevin G. Yager

Ported to git by : Julien Lhermitte

Contributors: Ruipeng Li, Esther Tsai, Yugang Zhang

SciAnalysis is a set of Python scripts for batch processing of image data, including x-ray scattering detector images. The code was written primarily by Kevin Yager.

http://gisaxs.com/index.php/SciAnalysis

INSTALL:

  • python setup.py develop

OR, simply download the package and see examples/beamlines/NSLSII_11BM_CMS/UShell/SciAnalysis_jn.ipynb for tutorial.


Example protocals for X-ray scattering data:

  • Protocols.qr_image(blur=None, colorbar=True, save_results=['npz','hdf5'], transparent=False, label_filename=True) #plot_buffers = [0.1, 0.1, 0.1, 0.1], dpi=200
  • Protocols.linecut_angle(q0=2.30, dq=0.01, extra='_q2p30', show_region='save')
  • Protocols.linecut_qr(qz=0.025, dq=0.02, ylog=True, show_region='save', gridlines=True); #dq is half-width
  • Protocols.linecut_qz(name='linecut_qz_new', ylog=True, qr=0, dq=0.02, qmode = 'qx', show_region=True, plot_range=[0.2, 0.4, None, None]) # qmode = 'qx' or 'qr' (default)
  • Protocols.linecut_qz_fit(qr=0.0, dq=0.01, show_region=True, label_filename=True, trim_range=[0.01, 0.4], fit_range=[0.093, 0.115], plot_range=[0.01, 0.4, 0, None], q0=[0.11])
  • Protocols.circular_average_q2I_fit(plot_range=[0.8, 1.3, 0, None], qn_power=0.0, trim_range=[0.1, 3.5], fit_range=[0.95, 1.4], num_curves=2, q0=[1.00, 1.2], sigma=0.02, show_curves=1, label_filename=True),
  • Protocols.circular_average_sum('sum001', plot_range=[0, 3, 0, 1200], sum_range=[0.9, 1.1]) #range in q
  • Protocols.sector_average(angle=70, dangle=10, plot_range=[1.2, 3.7, 0, 1200], show_region=True) #pie-shaped with dangle opening (full angle)
  • Protocols.roi(show_region=True, qx=1, dqx=0.02, qz=1, dqz=0.02, prepend='stats_')

run_args = { 'verbosity' : 3,

        'save_results' : ['xml', 'plots', 'txt', 'hdf5'],
        
        'rcParams': {'axes.labelsize': 25,
                        'xtick.labelsize': 20,
                        'ytick.labelsize': 20,
                        'xtick.major.pad': 10,
                        'ytick.major.pad': 10,
                        },
        }

scianalysis's People

Contributors

0xzz avatar esther279 avatar jklynch avatar jrmlhermitte avatar kevinyager avatar ruipengli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

scianalysis's Issues

Examples?

Is there a specific reason why Examples are being left out?

XIO error when using parallelization.

When using the new "run_parallel" method, the script will randomly hang and lockup the desktop environment. The errors are like:

Running tile_img for tile
Running tile_svg for tile
Running average_image for tile
Processing 100 infiles...
Queueing thumbnails for tile_x001_y004
Queueing thumbnails for tile_x001_y003
Queueing thumbnails for tile_x001_y001
Queueing thumbnails for tile_x001_y002
Queueing thumbnails for tile_x001_y005
XIO: fatal IO error 25 (Inappropriate ioctl for device) on X server ":0"
after 1202 requests (1202 known processed) with 90 events remaining.
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
after 1202 requests (1202 known processed) with 90 events remaining.
XIO: fatal IO error 25 (Inappropriate ioctl for device) on X server ":0"
after 1210 requests (1210 known processed) with 112 events remaining.
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
after 1202 requests (1202 known processed) with 90 events remaining.
XIO: fatal IO error 25 (Inappropriate ioctl for device) on X server ":0"
after 1202 requests (1202 known processed) with 90 events remaining.

ERROR (ModuleNotFoundError) with running BCP example

While testing the software (runIm-BCP) I get the following console data:
Considering: ./ (2 subdirs, 3 files)
Considering: ./.idea (1 subdirs, 4 files)
Considering: ./.idea\inspectionProfiles (0 subdirs, 1 files)
Considering: ./data (1 subdirs, 7 files)
Running fft for C67 on Dow 55_q07
ERROR (ModuleNotFoundError) with file ./data\C67 on Dow 55_q07.jpg.

Process finished with exit code 0

Since there is no more information about which one is missing I consider it a bug. I got all packages listed in requirements installed.

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.