Skip to main content

XANES package

Project description

Presentation of THORONDOR, a program for data analysis and treatment in NEXAFS

Authors : Simonne and Martini

The Program is meant to be imported as a python package, if you download it, please save the THORONDOR folder in ...\Anaconda3\Lib\site-packages

The installation command can be found here : https://pypi.org/project/THORONDOR/ There are two main classes at the core of THORONDOR:

Data should be of the same type, either .txt, .dat or .csv. Please use a comma instead of a dot as decimal separator.

The class Dataset

A new instance of the Dataset class will be initialized for each Dataset saved in the data folder. This object is then saved in the list "ClassList", attribute of the second class "GUI". For each Dataset, all the different dataframes that will be created as well as specific information e.g. $E_0$ the edge jump can be find as attributes of this class. Certain attributes are instanced directly with the class, such as:

  • Name of Dataset
  • Path of original dataset
  • Timestamp

At the end of the data reduction, each Dataset should have at least three different data sets as attributes, saved as pandas.DataFrame():

  • df : Original data
  • ShiftedDf : If one shifts the energy
  • ReducedDf : If one applies some background reduction or normalization method
  • ReducedDfSplines : If one applied the specific Splines background reduction and normalization method.

A Logbook entry might also be associated, under Dataset.LogbookEntry, this is done via the GUI, the logbook should be in the common excel formats.

It is possible to add commentaries for each Dataset by using the Dataset.Comment() and to specify some additional inf with the function Dataset.AdditionalInfo().

Each Dataset can be retrieved by using the function Dataset.unpickle() with the path of the saved Class as an argument.

The class GUI

This class is a Graphical User Interface (GUI) that is meant to be used to process important amount of XAS datasets, that focus on similar energy range (same nb of points) and absorption edge. There are two ways of initializing the procedure in a jupyter notebook:

  • GUI = THORONDOR.GUI(); one will have to write the name of the data folder in which all his raw datasets are saved, in a .txt format.
  • GUI = THORONDOR.GUI.GetClassList(DataFolder = "<yourdatafolder>") ;if one has already worked on a folder and wishes to retrieve his work.

This class makes extensive use of the ipywidgets and is thus meant to be used with a jupyter notebook. Additional informations are provided in the "ReadMe" tab of the GUI.

All the different attributes of this class can also be exported in a single hdf5 file using the pandas .to_hdf5 methods. They should be accessed using the read_hdf methods from pandas.

The necessary Python packages are : numpy, pandas, matplotlib, glob, errno, os, shutil, ipywidgets, IPython, scipy, datetime, importlib, pickle, lmfit, encee and inspect.

FlowChart

FlowChart

Tutorial

Slide0 Slide1 Slide2 Slide3 Slide4 Slide5 Slide6 Slide7 Slide8 Slide10

For users on Jupyter Lab, please follow this thread : https://stackoverflow.com/questions/49542417/how-to-get-ipywidgets-working-in-jupyter-lab

Project details


Download files

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

Source Distribution

THORONDOR-0.1.1.1.tar.gz (553.5 kB view details)

Uploaded Source

Built Distribution

THORONDOR-0.1.1.1-py3-none-any.whl (648.8 kB view details)

Uploaded Python 3

File details

Details for the file THORONDOR-0.1.1.1.tar.gz.

File metadata

  • Download URL: THORONDOR-0.1.1.1.tar.gz
  • Upload date:
  • Size: 553.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for THORONDOR-0.1.1.1.tar.gz
Algorithm Hash digest
SHA256 d0af385ef3cf2425ac6b41e492415eeffa82cfd053994718e288a4399ccf4d50
MD5 05b086eafdf9f61a9e798e7aaa7069c2
BLAKE2b-256 9e1f0a588c909653f30ffa601928373e66ad26c44c311dc6ab8e776b2a6469be

See more details on using hashes here.

File details

Details for the file THORONDOR-0.1.1.1-py3-none-any.whl.

File metadata

  • Download URL: THORONDOR-0.1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 648.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for THORONDOR-0.1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 70776b3856ad2768f233955a3823c7f1546bc1590d672b3764262ee6d71cfd7b
MD5 15666a6d2e2e9dd8d9b1484f6970f5e8
BLAKE2b-256 4f45c283573820dbf62c9730b9199c096fb1c4f19c48868db04e318852111ed4

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