Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ronpandolfi/pygix
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: NSLS-II-SMI/pygix
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 13 commits
  • 6 files changed
  • 3 contributors

Commits on Oct 6, 2021

  1. Copy the full SHA
    0685aa0 View commit details
  2. Fix print statements

    mrakitin committed Oct 6, 2021
    Copy the full SHA
    419fae9 View commit details

Commits on Oct 7, 2021

  1. Verified

    This commit was signed with the committer’s verified signature.
    mrakitin Max Rakitin
    Copy the full SHA
    40ab59f View commit details
  2. REL: 2021.10.7

    mrakitin committed Oct 7, 2021

    Verified

    This commit was signed with the committer’s verified signature.
    mrakitin Max Rakitin
    Copy the full SHA
    1e6372a View commit details
  3. Add LICENSE to MANIFEST.in

    mrakitin committed Oct 7, 2021

    Verified

    This commit was signed with the committer’s verified signature.
    mrakitin Max Rakitin
    Copy the full SHA
    09e13e8 View commit details
  4. REL: 2021.10.7.1

    mrakitin committed Oct 7, 2021

    Verified

    This commit was signed with the committer’s verified signature.
    mrakitin Max Rakitin
    Copy the full SHA
    2bcdb88 View commit details

Commits on Jun 27, 2022

  1. Copy the full SHA
    d3a3832 View commit details

Commits on Jun 28, 2022

  1. Merge pull request tgdane#1 from gfreychet/master

    Modification due to non back compatibility of pyFAI modification of arguments names
    gfreychet authored Jun 28, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a68f90e View commit details

Commits on Nov 14, 2022

  1. REL: 2022.11.14

    mrakitin committed Nov 14, 2022
    Copy the full SHA
    d2852b5 View commit details

Commits on Oct 23, 2023

  1. Mofifcation of posrange to pos0_range for the lut methog to comply wi…

    …th pyFAI modification in 2023
    gfreychet committed Oct 23, 2023
    Copy the full SHA
    99dcb67 View commit details
  2. Change typo pos_R by pos_r

    gfreychet committed Oct 23, 2023
    Copy the full SHA
    40f80fe View commit details

Commits on May 21, 2024

  1. Copy the full SHA
    40f2c00 View commit details

Commits on May 22, 2024

  1. Revert the modification due to ocl issue. Delt in pyfai new version o…

    …n github and will be release in pyPI at some point
    gfreychet committed May 22, 2024
    Copy the full SHA
    1e1e4f5 View commit details
Showing with 67 additions and 41 deletions.
  1. +21 −0 LICENSE
  2. +3 −2 MANIFEST.in
  3. +6 −6 pygix/process.py
  4. +26 −26 pygix/transform.py
  5. +6 −2 requirements.txt
  6. +5 −5 setup.py
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2016 European Synchrotron Radiation Facility

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
5 changes: 3 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include README.md
include MANIFEST.in
include run_tests.py
include version.py
include LICENSE
# include run_tests.py
include version.py
12 changes: 6 additions & 6 deletions pygix/process.py
Original file line number Diff line number Diff line change
@@ -153,7 +153,7 @@ def _process1d(self):
t_start = time.time()

for i, f in enumerate(file_list):
print 'processing file: {}/{}\n\t{}'.format(i + 1, n_files, f)
print('processing file: {}/{}\n\t{}'.format(i + 1, n_files, f))

# THIS WORKS BUT NEEDS TESTING
# if self.out_fname is not None:
@@ -166,7 +166,7 @@ def _process1d(self):
t_end = time.time() - t_start
msg = '{} files processed in {} seconds\n'
msg += '{} seconds per file'
print msg.format(n_files, t_end, t_end/n_files)
print(msg.format(n_files, t_end, t_end/n_files))

y_scale = np.arange(0, n_files)
out = (out_array, x_scale, y_scale)
@@ -185,7 +185,7 @@ def _process2d(self):
t_start = time.time()

for i, f in enumerate(file_list):
print 'processing file: {}/{}\n\t{}'.format(i + 1, n_files, f)
print('processing file: {}/{}\n\t{}'.format(i + 1, n_files, f))

# THIS WORKS BUT NEEDS TESTING
# if self.out_fname is not None:
@@ -197,7 +197,7 @@ def _process2d(self):
t_end = time.time() - t_start
msg = '{} files processed in {} seconds\n'
msg += '{} seconds per file'
print msg.format(n_files, t_end, t_end/n_files)
print(msg.format(n_files, t_end, t_end/n_files))

return True

@@ -369,8 +369,8 @@ def init_pygix(calibration_dict):

if __name__ == '__main__':
if len(sys.argv) is not 2:
print 'usage: process.py recipe.yaml'
print('usage: process.py recipe.yaml')
sys.exit(0)
else:
rp = Processor(sys.argv[1])
rp.process()
rp.process()
52 changes: 26 additions & 26 deletions pygix/transform.py
Original file line number Diff line number Diff line change
@@ -424,17 +424,17 @@ def gi_setup_lut(self, shape, npt, process, mask=None,
if int2d:
gi_lut = splitBBoxLUT.HistoBBox2d(pos0, dpos0, pos1, dpos1,
bins=npt,
pos0Range=pos0Range,
pos1Range=pos1Range,
pos0_range=pos0Range,
pos1_range=pos1Range,
mask=mask,
mask_checksum=mask_checksum,
allow_pos0_neg=True,
unit=unit)
else:
gi_lut = splitBBoxLUT.HistoBBox1d(pos0, dpos0, pos1, dpos1,
bins=npt,
pos0Range=pos0Range,
pos1Range=pos1Range,
pos0_range=pos0Range,
pos1_range=pos1Range,
mask=mask,
mask_checksum=mask_checksum,
allow_pos0_neg=True,
@@ -498,17 +498,17 @@ def gi_setup_CSR(self, shape, npt, process, mask=None,
if int2d:
gi_lut = splitBBoxLUT.HistoBBox2d(pos0, dpos0, pos1, dpos1,
bins=npt,
pos0Range=pos0Range,
pos1Range=pos1Range,
pos0_range=pos0Range,
pos1_range=pos1Range,
mask=mask,
mask_checksum=mask_checksum,
allow_pos0_neg=True,
unit=unit)
else:
gi_lut = splitBBoxLUT.HistoBBox1d(pos0, dpos0, pos1, dpos1,
bins=npt,
pos0Range=pos0Range,
pos1Range=pos1Range,
pos0_range=pos0Range,
pos1_range=pos1Range,
mask=mask,
mask_checksum=mask_checksum,
allow_pos0_neg=True,
@@ -836,15 +836,15 @@ def transform_image(self, data, process='transform', npt=None,
not self._lut_gi_transformer.default_ipl):
reset = "x_range was defined in LUT"
elif (x_range is not None) and \
(self._lut_gi_transformer.pos0Range != (
(self._lut_gi_transformer.pos0_range != (
min(x_range), max(x_range) * EPS32)):
reset = ("x_range is defined"
" but not the same as in LUT")
if (
y_range is None) and not self._lut_gi_transformer.default_opl:
reset = "y_range not defined and LUT had y_range defined"
elif (y_range is not None) and \
(self._lut_gi_transformer.pos1Range != (
(self._lut_gi_transformer.pos1_range != (
min(y_range), max(y_range) * EPS32)):
reset = "y_range requested and LUT's y_range don't match"
error = False
@@ -966,7 +966,7 @@ def transform_image(self, data, process='transform', npt=None,
self._csr_gi_transformer.default_ipl:
reset = "x_range was defined in CSR"
elif (x_range is not None) and \
(self._csr_gi_transformer.pos0Range != \
(self._csr_gi_transformer.pos0_range != \
(min(x_range), max(x_range) * EPS32)):
reset = ("x_range is defined"
" but not the same as in CSR")
@@ -975,7 +975,7 @@ def transform_image(self, data, process='transform', npt=None,
reset = ("y_range not defined and"
" CSR had y_range defined")
elif (y_range is not None) and \
(self._csr_gi_transformer.pos1Range != \
(self._csr_gi_transformer.pos0_range != \
(min(y_range), max(y_range) * EPS32)):
reset = ("y_range requested and"
" CSR's y_range don't match")
@@ -1007,8 +1007,8 @@ def transform_image(self, data, process='transform', npt=None,
pos=pos,
weights=data,
bins=npt,
pos0Range=x_range,
pos1Range=y_range,
pos0_range=x_range,
pos1_range=y_range,
dummy=dummy,
delta_dummy=delta_dummy,
mask=mask, dark=dark, flat=flat,
@@ -1036,8 +1036,8 @@ def transform_image(self, data, process='transform', npt=None,
pos1=pos1,
delta_pos1=dpos1,
bins=npt,
pos0Range=x_range,
pos1Range=y_range,
pos0_range=x_range,
pos1_range=y_range,
dummy=dummy,
delta_dummy=delta_dummy,
mask=mask, dark=dark, flat=flat,
@@ -1500,14 +1500,14 @@ def integrate_1d(self, data, npt, process="sector",
p0_range is None) and not self._lut_gi_integrator.default_p0:
reset = "p0_range was defined in LUT"
elif (p0_range is not None) and \
(self._lut_gi_integrator.pos0Range != (
(self._lut_gi_integrator.pos0_range != (
min(p0_range), max(p0_range) * EPS32)):
reset = "p0_range is defined but not the same as in LUT"
if (
p1_range is None) and not self._lut_gi_integrator.default_p1:
reset = "p1_range not defined and LUT had p1_range defined"
elif (p1_range is not None) and \
(self._lut_gi_integrator.pos1Range != (
(self._lut_gi_integrator.pos1_range != (
min(p1_range), max(p1_range) * EPS32)):
reset = "p1_range requested and LUT's p1_range don't match"
if reset:
@@ -1625,8 +1625,8 @@ def integrate_1d(self, data, npt, process="sector",
pos=pos,
weights=data,
bins=npt,
pos0Range=p0_range,
pos1Range=p1_range,
pos0_range=p0_range,
pos1_range=p1_range,
dummy=dummy,
delta_dummy=delta_dummy,
mask=mask,
@@ -1643,8 +1643,8 @@ def integrate_1d(self, data, npt, process="sector",
pos=pos,
weights=variance,
bins=npt,
pos0Range=p0_range,
pos1Range=p1_range,
pos0_range=p0_range,
pos1_range=p1_range,
dummy=dummy,
delta_dummy=delta_dummy,
mask=mask)
@@ -1671,8 +1671,8 @@ def integrate_1d(self, data, npt, process="sector",
pos1=chi,
delta_pos1=dchi,
bins=npt,
pos0Range=p0_range,
pos1Range=p1_range,
pos0_range=p0_range,
pos1_range=p1_range,
dummy=dummy,
delta_dummy=delta_dummy,
mask=mask,
@@ -1691,8 +1691,8 @@ def integrate_1d(self, data, npt, process="sector",
pos1=chi,
delta_pos1=dchi,
bins=npt,
pos0Range=p0_range,
pos1Range=p1_range,
pos0_range=p0_range,
pos1_range=p1_range,
dummy=dummy,
delta_dummy=delta_dummy,
mask=mask)
8 changes: 6 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -4,5 +4,9 @@ numpy
cython
fabio
pyFAI
sphinx
sphinxcontrib-programoutput
PyYAML
# Those are optional build dependencies. It's better to create a separate
# `requirements-dev.txt` file and install the sphinx dependencies from it prior
# to the installation.
# sphinx
# sphinxcontrib-programoutput
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -68,19 +68,18 @@ def get_readme():
return long_description


classifiers = ["Development Status :: 2 - Pre-alpha",
classifiers = ["Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Programming Language :: Cython",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: Implementation :: CPython",
"Environment :: Console",
"Environment :: MacOS X",
"Environment :: Win32 (MS Windows)",
"License :: OSI Approved :: GPLv3+",
"License :: OSI Approved :: MIT License",
"Operating System :: Microsoft :: Windows",
"Operating System :: Unix",
"Operating System :: POSIX",
@@ -240,13 +239,14 @@ def make_distribution(self):

setup_kwargs.update(
name=PROJECT,
version=get_version(),
version="2022.11.14",
url="https://github.com/tgdane/pygix",
author="Thomas Dane",
author_email="thomasgdane@gmail.com",
classifiers=classifiers,
description="Software library for grazing-incidence/fibre X-Ray data analysis",
long_description=get_readme(),
long_description_content_type="text/markdown",
install_requires=install_requires,
setup_requires=setup_requires,
cmdclass=cmdclass,