Skip to content

Commit

Permalink
1.4.4 release
Browse files Browse the repository at this point in the history
  • Loading branch information
kklmn committed Feb 22, 2023
1 parent 72ec1e1 commit 15cdb7c
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 35 deletions.
17 changes: 11 additions & 6 deletions XAFSmass/XAFSmassCalc.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import numpy as np
from pyparsing import (Suppress, Word, nums, Forward, Group,
Optional, OneOrMore, oneOf, ParseResults)
import materials_simple as rm
from materials_simple import read_atomic_data
from . import materials_simple as rm
from .materials_simple import read_atomic_data

crossSection = 4.208e7 # 2*r_0*c*h*N_A [eV*cm^2/mol]
R = 8.314510 # J/K/mol={m^3Pa/K/mol}
Expand Down Expand Up @@ -133,12 +133,17 @@ def _simple_line(x1, x2, y1, y2):


def find_edge_step(E, element):
lenArr, dE = 0, 10
lenArr, dE, backStep, maxStep = 0, 10, 250, 100
step = 0
while lenArr < 3:
mask = np.abs(E - element.E) < (250 + dE) # eV
mask = np.abs(E - element.E) < backStep
f2 = element.f2[mask]
ef2 = element.E[mask]
backStep += dE # eV
lenArr = len(ef2)
step += 1
if step > maxStep:
break
df2 = np.diff(f2)
dSigma2 = 0
f2jump = 0
Expand All @@ -151,8 +156,8 @@ def find_edge_step(E, element):
ef2jump = ef2[iEdge+1]
dSigma2 = f2jump * crossSection / ef2jump
sigma2x = f2[iEdge+1] * crossSection / ef2jump
except IndexError as e:
print(e)
except IndexError:
# print(e)
pass
return dSigma2, f2jump, sigma2x

Expand Down
7 changes: 4 additions & 3 deletions XAFSmass/XAFSmassQt.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
__author__ = "Konstantin Klementiev, Roman Chernikov"
__date__ = "28 Mar 2018"
__date__ = "22 Feb 2023"

import sys
import os
Expand All @@ -11,8 +11,9 @@
import matplotlib as mpl
from matplotlib.figure import Figure
from pyparsing import ParseBaseException
import XAFSmassCalc as xc
from __init__ import (__version__, __author__, __license__)
sys.path.append(os.path.join('..')) # analysis:ignore
from XAFSmass import XAFSmassCalc as xc
from XAFSmass.__init__ import (__version__, __author__, __license__)

# ==this may help to resolve conflict betwen Qt4 and Qt5=======================
# mpl.use("Qt4Agg")
Expand Down
4 changes: 2 additions & 2 deletions XAFSmass/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,12 @@
"""
__module__ = "XAFSmass"
__versioninfo__ = (1, 4, 3)
__versioninfo__ = (1, 4, 4)
__version__ = '.'.join(map(str, __versioninfo__))
__author__ = \
"Konstantin Klementiev (MAX IV Laboratory), " +\
"Roman Chernikov (Canadian Light Source)"
__email__ = \
"[email protected], [email protected]"
__date__ = "20 Feb 2023"
__date__ = "22 Feb 2023"
__license__ = "MIT license"
2 changes: 1 addition & 1 deletion XAFSmass/help/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '1.4.3',
VERSION: '1.4.4',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
6 changes: 3 additions & 3 deletions XAFSmass/help/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Index &#8212; XAFSmassQt 1.4.3 documentation</title>
<title>Index &#8212; XAFSmassQt 1.4.4 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />

Expand All @@ -26,7 +26,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">XAFSmassQt 1.4.3 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">XAFSmassQt 1.4.4 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Index</a></li>
</ul>
</div>
Expand Down Expand Up @@ -104,7 +104,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">XAFSmassQt 1.4.3 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">XAFSmassQt 1.4.4 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Index</a></li>
</ul>
</div>
Expand Down
10 changes: 5 additions & 5 deletions XAFSmass/help/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

<title>XAFSmass &#8212; XAFSmassQt 1.4.3 documentation</title>
<title>XAFSmass &#8212; XAFSmassQt 1.4.4 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />

Expand All @@ -28,7 +28,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="#">XAFSmassQt 1.4.3 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="#">XAFSmassQt 1.4.4 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">XAFSmass</a></li>
</ul>
</div>
Expand All @@ -42,10 +42,10 @@ <h3>Navigation</h3>
<h1>XAFSmass<a class="headerlink" href="#xafsmass" title="Permalink to this heading"></a></h1>
<dl class="field-list simple">
<dt class="field-odd">Release<span class="colon">:</span></dt>
<dd class="field-odd"><p>1.4.3 <a class="reference external" href="https://zenodo.org/badge/latestdoi/54989911"><img alt="DOI" src="https://zenodo.org/badge/54989911.svg" /></a></p>
<dd class="field-odd"><p>1.4.4 <a class="reference external" href="https://zenodo.org/badge/latestdoi/54989911"><img alt="DOI" src="https://zenodo.org/badge/54989911.svg" /></a></p>
</dd>
<dt class="field-even">Date<span class="colon">:</span></dt>
<dd class="field-even"><p>Feb 20, 2023</p>
<dd class="field-even"><p>Feb 22, 2023</p>
</dd>
<dt class="field-odd">Authors<span class="colon">:</span></dt>
<dd class="field-odd"><p>Konstantin Klementiev (MAX IV Laboratory), Roman Chernikov (Canadian Light Source)</p>
Expand Down Expand Up @@ -300,7 +300,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="#">XAFSmassQt 1.4.3 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="#">XAFSmassQt 1.4.4 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">XAFSmass</a></li>
</ul>
</div>
Expand Down
6 changes: 3 additions & 3 deletions XAFSmass/help/license.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

<title>The MIT License &#8212; XAFSmassQt 1.4.3 documentation</title>
<title>The MIT License &#8212; XAFSmassQt 1.4.4 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />

Expand All @@ -27,7 +27,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">XAFSmassQt 1.4.3 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">XAFSmassQt 1.4.4 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">The MIT License</a></li>
</ul>
</div>
Expand Down Expand Up @@ -97,7 +97,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">XAFSmassQt 1.4.3 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">XAFSmassQt 1.4.4 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">The MIT License</a></li>
</ul>
</div>
Expand Down
2 changes: 1 addition & 1 deletion XAFSmass/help/objects.inv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Sphinx inventory version 2
# Project: XAFSmassQt
# Version: 1.4.3
# Version: 1.4.4
# The remainder of this file is compressed using zlib.
xڅ�1 �0�w�A�*��֥ Ttp�#���꿯zښR�v���;��k�2c��hTc��!lu��'hT��@�VH��{e�5[���(�?o� ��)+�߅jT��B�:sM�'P�qw�gQ���C�4�d�Q�b�D`&�(���>�M���3�~��5�TL�z�O,���Md=n�4ʤ�'�F����
6 changes: 3 additions & 3 deletions XAFSmass/help/py-modindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Python Module Index &#8212; XAFSmassQt 1.4.3 documentation</title>
<title>Python Module Index &#8212; XAFSmassQt 1.4.4 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />

Expand All @@ -29,7 +29,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="#" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">XAFSmassQt 1.4.3 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">XAFSmassQt 1.4.4 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Python Module Index</a></li>
</ul>
</div>
Expand Down Expand Up @@ -96,7 +96,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="#" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">XAFSmassQt 1.4.3 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">XAFSmassQt 1.4.4 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Python Module Index</a></li>
</ul>
</div>
Expand Down
6 changes: 3 additions & 3 deletions XAFSmass/help/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Search &#8212; XAFSmassQt 1.4.3 documentation</title>
<title>Search &#8212; XAFSmassQt 1.4.4 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />

Expand All @@ -32,7 +32,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">XAFSmassQt 1.4.3 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">XAFSmassQt 1.4.4 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Search</a></li>
</ul>
</div>
Expand Down Expand Up @@ -95,7 +95,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">XAFSmassQt 1.4.3 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">XAFSmassQt 1.4.4 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Search</a></li>
</ul>
</div>
Expand Down
2 changes: 1 addition & 1 deletion XAFSmass/help/searchindex.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
# built documents.
#
# The short X.Y version.
version = '1.4.3'
version = '1.4.4'
# The full version, including alpha/beta/rc tags.
release = '1.4.3'
release = '1.4.4'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@

setup(
name='XAFSmass',
version='1.4.2',
version='1.4.4',
description='A program for calculating the mass of XAFS samples. '
'For synchrotron users.',
long_description=long_description,
long_description_content_type='text/x-rst',
author='Konstantin Klementiev, Roman Chernikov',
author_email='[email protected], [email protected]',
url='http://xafsmass.readthedocs.io',
platforms='OS Independent',
license='MIT License',
keywords='',
zip_safe=True,
zip_safe=False,
packages=['XAFSmass'],
package_data={'XAFSmass': ['data/*.*', 'help/*.*', 'help/_images/*.*',
'help/_images/math/*.*', 'help/_sources/*.*',
Expand Down

0 comments on commit 15cdb7c

Please sign in to comment.