Skip to main content

Combines dataArrays with attributes for fitting plotting and analysis including models for Xray and neutron scattering

Project description

The aim of Jscatter is treatment of experimental data and models:

  • Reading and analyzing experimental data with associated attributes as temperature, wavevector, comment, ….

  • Multidimensional fitting taking attributes into account.

  • Providing useful models for neutron and X-ray scattering form factors, structure factors and dynamic models (quasi elastic neutron scattering) and other topics.

  • Simplified plotting with paper ready quality.

  • Easy model building for non programmers.

  • Python scripts/Jupyter Notebooks to document data evaluation and modelling.

Binder citation install license pyversion Read the Docs Beginners Guide

Jscatter Logo

Main concept

  • Data are organised in dataArray/dataList with attributes as .temperature, .wavevector, .pressure and methods for filter, merging and more.

  • Multidimensional, attribute dependent fitting (least square Levenberg-Marquardt, Bayesian fit, differential evolution, …).

  • Provide relative simple plotting commands to allow a fast view on data and possible later pretty up.

  • User write models using the existing model library or self created models.

    The model library contains routines e.g. for vectorized quadrature (formel) or specialised models for scattering as formfactor, structurefactor, dynamic and biomacromolecules.

Documentation

Documentation located at http://jscatter.readthedocs.io. A number of examples how to use Jscatter is provided and can be run from Jscatter.

A short example how to use Jscatter

import jscatter as js

i5=js.dL(js.examples.datapath+'/iqt_1hho.dat')     # read the data (16 sets) with attributes
# define a model for the fit
diffusion=lambda A,D,t,wavevector,elastic=0:A*np.exp(-wavevector**2*D*t)+elastic

# do the fit
i5.fit(model=diffusion,                     # the fit function
       freepar={'D':[0.08],'A':0.98},       # start parameters, "[]" -> independent fit
       fixpar={'elastic':0.0},              # fixed parameters
       mapNames={'t':'X','wavevector':'q'}) # map names from the model to names from the data

p=js.grace(1.2,0.8)                         # open a plot
p.plot(i5,symbol=[-1,0.4,-1],legend='Q=$q') # plot with Q values in legend
p.plot(i5.lastfit,symbol=0,line=[1,1,-1])   # plot fit as lines
p.save('test.agr')

** Released under the GPLv3 **

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jscatter-1.6.4.1.tar.gz (19.2 MB view details)

Uploaded Source

File details

Details for the file jscatter-1.6.4.1.tar.gz.

File metadata

  • Download URL: jscatter-1.6.4.1.tar.gz
  • Upload date:
  • Size: 19.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for jscatter-1.6.4.1.tar.gz
Algorithm Hash digest
SHA256 3fdb825068133c9b2e48a4dec6821b74e61cd44007b3f0ca9fefab8bf24fa8a7
MD5 cd297bc2073b7141250069f1b68ff37d
BLAKE2b-256 1b1f6abfb2f753acc07ba3614edce781b42bdb1b72cfe90766a8fd8b918b7595

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page