Commit dc4f9d9e authored by Ruxandra Cojocaru's avatar Ruxandra Cojocaru

Merge branch 'development' into 'master'

Development - solved 3 issues

Closes #4

See merge request cojocaru/swarp!3
parents e14839cc 05f742b8
# SWaRP
Speckle Wavefront Reconstruction Package. Based on X-ray Speckle Tracking (XST) principle.
## How to install the package in Linux
git clone https://gitlab.esrf.fr/cojocaru/swarp
cd swarp
For python2 (first install python-pip):
pip install .
Alternative: sudo python setup.py install
For python3 (first install python3-pip):
python3 -m pip install .
## How to run the code (for now)
python waveFront.py image1 image2 file.ini
e.g. python waveFront.py ./resources/image1.edf ./resources/image2.edf ./resources/test_input.ini
python detectorDistortion.py path_to_files file.ini
e.g. python detectorDistortion.py ./resources/det-dist/ ./resources/test_input.ini
## Code manual:
https://www.eucall.eu/sites/sites_custom/site_eucall/content/e21597/e25317/e79563/EUCALL_WP7_PUCCA_Deliverable_7_8_D37_30_09_2018.pdf?preview=preview
## Authors
* **Ruxandra Cojocaru**, cojocaru@esrf.fr
* **Sebastien Berujon**, sebastien.berujon@esrf.fr
## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
""" #/*##########################################################################
Copyright (C) 2018 European Synchrotron Radiation Facility #
# SWaRP: Speckle Wavefront Reconstruction Package
This file is part of SWaRP. #
# Copyright (c) 2016-2018 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 # This file is part of the SWaRP Speckle Wavefront Reconstruction Package
"Software"), to deal in the Software without restriction, including # developed at the ESRF by the staff of BM05 as part of EUCALL WP7:PUUCA.
without limitation the rights to use, copy, modify, merge, publish, #
distribute, sublicense, and/or sell copies of the Software, and to # This project has received funding from the European Union’s Horizon 2020
permit persons to whom the Software is furnished to do so, subject to # research and innovation programme under grant agreement No 654220.
the following conditions: #
# Permission is hereby granted, free of charge, to any person obtaining a copy
The above copyright notice and this permission notice shall be included # of this software and associated documentation files (the "Software"), to deal
in all copies or substantial portions of the Software. # in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # copies of the Software, and to permit persons to whom the Software is
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # furnished to do so, subject to the following conditions:
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. #
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # The above copyright notice and this permission notice shall be included in
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # all copies or substantial portions of the Software.
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE #
SOFTWARE OR THE USE OR OTHER DEALINGS IN 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.
#
#############################################################################*/
__author__ = ['Ruxandra Cojocaru', 'Sebastien Berujon'] __author__ = ['Ruxandra Cojocaru', 'Sebastien Berujon']
__contact__ = 'cojocaru@esrf.fr; sebastien.berujon@esrf.fr' __contact__ = 'cojocaru@esrf.fr; sebastien.berujon@esrf.fr'
......
""" Unit tests #/*##########################################################################
#
Copyright (C) 2016-2018 European Synchrotron Radiation Facility # SWaRP: Speckle Wavefront Reconstruction Package
#
Permission is hereby granted, free of charge, to any person obtaining a # Copyright (c) 2016-2018 European Synchrotron Radiation Facility
copy of this software and associated documentation files (the #
"Software"), to deal in the Software without restriction, including # This file is part of the SWaRP Speckle Wavefront Reconstruction Package
without limitation the rights to use, copy, modify, merge, publish, # developed at the ESRF by the staff of BM05 as part of EUCALL WP7:PUUCA.
distribute, sublicense, and/or sell copies of the Software, and to #
permit persons to whom the Software is furnished to do so, subject to # This project has received funding from the European Union’s Horizon 2020
the following conditions: # research and innovation programme under grant agreement No 654220.
#
The above copyright notice and this permission notice shall be included # Permission is hereby granted, free of charge, to any person obtaining a copy
in all copies or substantial portions of the Software. # of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # copies of the Software, and to permit persons to whom the Software is
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # furnished to do so, subject to the following conditions:
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY #
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # The above copyright notice and this permission notice shall be included in
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # all copies or substantial portions of the Software.
SOFTWARE OR THE USE OR OTHER DEALINGS IN 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.
#
#############################################################################*/
__author__ = ['Ruxandra Cojocaru', 'Sebastien Berujon'] __author__ = ['Ruxandra Cojocaru', 'Sebastien Berujon']
__contact__ = 'cojocaru@esrf.fr; sebastien.berujon@esrf.fr' __contact__ = 'cojocaru@esrf.fr; sebastien.berujon@esrf.fr'
......
#!/bin/python #!/bin/python
"""Calculate the pixel size from a scan of detector position and #/*##########################################################################
calculate detector distortion #
# SWaRP: Speckle Wavefront Reconstruction Package
Written by R. Cojocaru, starting November 2016 #
Based on a Matlab script by S. Berujon # Copyright (c) 2016-2018 European Synchrotron Radiation Facility
#
Copyright (C) 2018 European Synchrotron Radiation Facility # This file is part of the SWaRP Speckle Wavefront Reconstruction Package
# developed at the ESRF by the staff of BM05 as part of EUCALL WP7:PUUCA.
Permission is hereby granted, free of charge, to any person obtaining a #
copy of this software and associated documentation files (the # This project has received funding from the European Union’s Horizon 2020
"Software"), to deal in the Software without restriction, including # research and innovation programme under grant agreement No 654220.
without limitation the rights to use, copy, modify, merge, publish, #
distribute, sublicense, and/or sell copies of the Software, and to # Permission is hereby granted, free of charge, to any person obtaining a copy
permit persons to whom the Software is furnished to do so, subject to # of this software and associated documentation files (the "Software"), to deal
the following conditions: # in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
The above copyright notice and this permission notice shall be included # copies of the Software, and to permit persons to whom the Software is
in all copies or substantial portions of the Software. # furnished to do so, subject to the following conditions:
#
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # The above copyright notice and this permission notice shall be included in
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # all copies or substantial portions of the Software.
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. #
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # 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.
#
#############################################################################*/
import sys import sys
import os import os
......
#!/bin/python #!/bin/python
""" Library containing useful functions for the entire software package #/*##########################################################################
Written by R. Cojocaru, starting November 2016 #
Based on Matlab code by S. Berujon # SWaRP: Speckle Wavefront Reconstruction Package
#
Copyright (C) 2018 European Synchrotron Radiation Facility # Copyright (c) 2016-2018 European Synchrotron Radiation Facility
#
Permission is hereby granted, free of charge, to any person obtaining a # This file is part of the SWaRP Speckle Wavefront Reconstruction Package
copy of this software and associated documentation files (the # developed at the ESRF by the staff of BM05 as part of EUCALL WP7:PUUCA.
"Software"), to deal in the Software without restriction, including #
without limitation the rights to use, copy, modify, merge, publish, # This project has received funding from the European Union’s Horizon 2020
distribute, sublicense, and/or sell copies of the Software, and to # research and innovation programme under grant agreement No 654220.
permit persons to whom the Software is furnished to do so, subject to #
the following conditions: # Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
The above copyright notice and this permission notice shall be included # in the Software without restriction, including without limitation the rights
in all copies or substantial portions of the Software. # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # furnished to do so, subject to the following conditions:
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF #
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # The above copyright notice and this permission notice shall be included in
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # all copies or substantial portions of the Software.
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, #
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # 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.
#
#############################################################################*/
__author__ = ['Ruxandra Cojocaru', 'Sebastien Berujon'] __author__ = ['Ruxandra Cojocaru', 'Sebastien Berujon']
__contact__ = 'cojocaru@esrf.fr; sebastien.berujon@esrf.fr' __contact__ = 'cojocaru@esrf.fr; sebastien.berujon@esrf.fr'
...@@ -364,7 +370,7 @@ def check_input(section, path_ini, dt): ...@@ -364,7 +370,7 @@ def check_input(section, path_ini, dt):
['pix_size2', 'float', None, True, True, None], ['pix_size2', 'float', None, True, True, None],
['diff_wf', 'bool', True, True, False, None], ['diff_wf', 'bool', True, True, False, None],
['undistort', 'bool', False, True, False, None], ['undistort', 'bool', False, True, False, None],
['mask_half_size', 'int', 0, True, True, None], ['mask_half_size', 'int', 0, True, True, None],
['path_dark1', 'path', None, True, True, None], ['path_dark1', 'path', None, True, True, None],
['path_flat1', 'path', None, True, True, None], ['path_flat1', 'path', None, True, True, None],
['prefix_dark1', 'str', None, True, False, None], ['prefix_dark1', 'str', None, True, False, None],
...@@ -2490,15 +2496,15 @@ def build_mask(mask_center, mask_size, grad_shape): ...@@ -2490,15 +2496,15 @@ def build_mask(mask_center, mask_size, grad_shape):
test_err(False, 'build_mask', err_msg) test_err(False, 'build_mask', err_msg)
if(mask_type == 'circ'): if(mask_type == 'circ'):
[X1, Y1] = np.meshgrid(np.arange(m), np.arange(n)) [X1, Y1] = np.meshgrid(np.arange(m), np.arange(n))
X = X1 - center_x X = X1 - center_x
Y = Y1 - center_y Y = Y1 - center_y
mask0 = np.power(np.square(X) + np.square(Y), 0.5) mask0 = np.power(np.square(X) + np.square(Y), 0.5)
mask2 = (mask0 <= (mask_diam/2)) mask2 = (mask0 <= (mask_diam/2))
else: else:
mask2 = np.zeros((n, m)) mask2 = np.zeros((n, m))
mask2[(center_y - mask_size[0]) : (center_y + mask_size[0] + 1), mask2[(center_y - mask_size[0]) : (center_y + mask_size[0] + 1),
(center_x - mask_size[1]) : (center_x + mask_size[1] + 1)] = 1 (center_x - mask_size[1]) : (center_x + mask_size[1] + 1)] = 1
mask = (mask2 == True) mask = (mask2 == True)
......
"""Source: #/*##########################################################################
https://github.com/cjordan/pyGrad2Surf #
# SWaRP: Speckle Wavefront Reconstruction Package
Copyright (c) 2016 Christopher Jordan #
# Copyright (c) 2016-2018 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 # This file is part of the SWaRP Speckle Wavefront Reconstruction Package
"Software"), to deal in the Software without restriction, including # developed at the ESRF by the staff of BM05 as part of EUCALL WP7:PUUCA.
without limitation the rights to use, copy, modify, merge, publish, #
distribute, sublicense, and/or sell copies of the Software, and to # This project has received funding from the European Union’s Horizon 2020
permit persons to whom the Software is furnished to do so, subject to # research and innovation programme under grant agreement No 654220.
the following conditions: #
# Permission is hereby granted, free of charge, to any person obtaining a copy
The above copyright notice and this permission notice shall be included # of this software and associated documentation files (the "Software"), to deal
in all copies or substantial portions of the Software. # in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # copies of the Software, and to permit persons to whom the Software is
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # furnished to do so, subject to the following conditions:
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. #
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # The above copyright notice and this permission notice shall be included in
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # all copies or substantial portions of the Software.
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE #
SOFTWARE OR THE USE OR OTHER DEALINGS IN 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.
#
#############################################################################*/
import warnings import warnings
import numpy as np import numpy as np
......
""" #/*##########################################################################
Written by R. Cojocaru, November 2016; Updated January 2017 #
Based on Matlab code by S. Berujon # SWaRP: Speckle Wavefront Reconstruction Package
#
# Copyright (c) 2016-2018 European Synchrotron Radiation Facility
#
# This file is part of the SWaRP Speckle Wavefront Reconstruction Package
# developed at the ESRF by the staff of BM05 as part of EUCALL WP7:PUUCA.
#
# This project has received funding from the European Union’s Horizon 2020
# research and innovation programme under grant agreement No 654220.
#
# 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.
#
#############################################################################*/
Copyright (C) 2016-2018 European Synchrotron Radiation Facility __author__ = 'Ruxandra Cojocaru, Sebastien Berujon'
__contact__ = 'cojocaru@esrf.fr; sebastien.berujon@esrf.fr'
Permission is hereby granted, free of charge, to any person obtaining a __license__ = 'MIT'
copy of this software and associated documentation files (the __copyright__ = 'European Synchrotron Radiation Facility, Grenoble, France'
"Software"), to deal in the Software without restriction, including __date__ = '27/08/2018'
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.
"""
import cv2 import cv2
import numpy as np import numpy as np
......
""" Unit tests #/*##########################################################################
#
Copyright (C) 2016-2018 European Synchrotron Radiation Facility # SWaRP: Speckle Wavefront Reconstruction Package
#
Permission is hereby granted, free of charge, to any person obtaining a # Copyright (c) 2016-2018 European Synchrotron Radiation Facility
copy of this software and associated documentation files (the #
"Software"), to deal in the Software without restriction, including # This file is part of the SWaRP Speckle Wavefront Reconstruction Package
without limitation the rights to use, copy, modify, merge, publish, # developed at the ESRF by the staff of BM05 as part of EUCALL WP7:PUUCA.
distribute, sublicense, and/or sell copies of the Software, and to #
permit persons to whom the Software is furnished to do so, subject to # This project has received funding from the European Union’s Horizon 2020
the following conditions: # research and innovation programme under grant agreement No 654220.
#
The above copyright notice and this permission notice shall be included # Permission is hereby granted, free of charge, to any person obtaining a copy
in all copies or substantial portions of the Software. # of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # copies of the Software, and to permit persons to whom the Software is
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # furnished to do so, subject to the following conditions:
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY #
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # The above copyright notice and this permission notice shall be included in
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # all copies or substantial portions of the Software.
SOFTWARE OR THE USE OR OTHER DEALINGS IN 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.
#
#############################################################################*/
__author__ = ['Ruxandra Cojocaru', 'Sebastien Berujon'] __author__ = ['Ruxandra Cojocaru', 'Sebastien Berujon']
__contact__ = 'cojocaru@esrf.fr; sebastien.berujon@esrf.fr' __contact__ = 'cojocaru@esrf.fr; sebastien.berujon@esrf.fr'
......
""" Unit tests #/*##########################################################################
#
Copyright (C) 2016-2018 European Synchrotron Radiation Facility # SWaRP: Speckle Wavefront Reconstruction Package
#
Permission is hereby granted, free of charge, to any person obtaining a # Copyright (c) 2016-2018 European Synchrotron Radiation Facility
copy of this software and associated documentation files (the #
"Software"), to deal in the Software without restriction, including # This file is part of the SWaRP Speckle Wavefront Reconstruction Package
without limitation the rights to use, copy, modify, merge, publish, # developed at the ESRF by the staff of BM05 as part of EUCALL WP7:PUUCA.
distribute, sublicense, and/or sell copies of the Software, and to #
permit persons to whom the Software is furnished to do so, subject to # This project has received funding from the European Union’s Horizon 2020
the following conditions: # research and innovation programme under grant agreement No 654220.
#
The above copyright notice and this permission notice shall be included # Permission is hereby granted, free of charge, to any person obtaining a copy
in all copies or substantial portions of the Software. # of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # copies of the Software, and to permit persons to whom the Software is
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # furnished to do so, subject to the following conditions:
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY #
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # The above copyright notice and this permission notice shall be included in
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # all copies or substantial portions of the Software.
SOFTWARE OR THE USE OR OTHER DEALINGS IN 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.
#
#############################################################################*/
__author__ = ['Ruxandra Cojocaru', 'Sebastien Berujon'] __author__ = ['Ruxandra Cojocaru', 'Sebastien Berujon']
__contact__ = 'cojocaru@esrf.fr; sebastien.berujon@esrf.fr' __contact__ = 'cojocaru@esrf.fr; sebastien.berujon@esrf.fr'
......
""" Unit tests #/*##########################################################################
#
Copyright (C) 2016-2018 European Synchrotron Radiation Facility # SWaRP: Speckle Wavefront Reconstruction Package
#
Permission is hereby granted, free of charge, to any person obtaining a # Copyright (c) 2016-2018 European Synchrotron Radiation Facility
copy of this software and associated documentation files (the #
"Software"), to deal in the Software without restriction, including # This file is part of the SWaRP Speckle Wavefront Reconstruction Package
without limitation the rights to use, copy, modify, merge, publish, # developed at the ESRF by the staff of BM05 as part of EUCALL WP7:PUUCA.
distribute, sublicense, and/or sell copies of the Software, and to #
permit persons to whom the Software is furnished to do so, subject to # This project has received funding from the European Union’s Horizon 2020
the following conditions: # research and innovation programme under grant agreement No 654220.
#
The above copyright notice and this permission notice shall be included # Permission is hereby granted, free of charge, to any person obtaining a copy
in all copies or substantial portions of the Software. # of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # copies of the Software, and to permit persons to whom the Software is
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # furnished to do so, subject to the following conditions:
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY #
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # The above copyright notice and this permission notice shall be included in
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # all copies or substantial portions of the Software.
SOFTWARE OR THE USE OR OTHER DEALINGS IN 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.
#
#############################################################################*/
__author__ = ['Ruxandra Cojocaru', 'Sebastien Berujon'] __author__ = ['Ruxandra Cojocaru', 'Sebastien Berujon']
__contact__ = 'cojocaru@esrf.fr; sebastien.berujon@esrf.fr' __contact__ = 'cojocaru@esrf.fr; sebastien.berujon@esrf.fr'
......
#!/bin/python #!/bin/python
"""Wavefront reconstructuon #/*##########################################################################
#
Written by R. Cojocaru, starting Feb. 2017 # SWaRP: Speckle Wavefront Reconstruction Package
Based on a Matlab script by S. Berujon #
# Copyright (c) 2016-2018 European Synchrotron Radiation Facility
Copyright (C) 2016-2018 European Synchrotron Radiation Facility #
# This file is part of the SWaRP Speckle Wavefront Reconstruction Package
Permission is hereby granted, free of charge, to any person obtaining a # developed at the ESRF by the staff of BM05 as part of EUCALL WP7:PUUCA.
copy of this software and associated documentation files (the #
"Software"), to deal in the Software without restriction, including # This project has received funding from the European Union’s Horizon 2020
without limitation the rights to use, copy, modify, merge, publish, # research and innovation programme under grant agreement No 654220.
distribute, sublicense, and/or sell copies of the Software, and to #
permit persons to whom the Software is furnished to do so, subject to # Permission is hereby granted, free of charge, to any person obtaining a copy
the following conditions: # of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
The above copyright notice and this permission notice shall be included # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
in all copies or substantial portions of the Software. # copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS #
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # The above copyright notice and this permission notice shall be included in
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # all copies or substantial portions of the Software.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY #
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # 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.
#
#############################################################################*/
__author__ = 'Ruxandra Cojocaru, Sebastien Berujon' __author__ = 'Ruxandra Cojocaru, Sebastien Berujon'
__contact__ = 'cojocaru@esrf.fr; sebastien.berujon@esrf.fr' __contact__ = 'cojocaru@esrf.fr; sebastien.berujon@esrf.fr'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment