pyemaps 1.0.3__tar.gz → 1.0.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. {pyemaps-1.0.3 → pyemaps-1.0.4}/PKG-INFO +1 -5
  2. pyemaps-1.0.4/__version__.py +1 -0
  3. {pyemaps-1.0.3 → pyemaps-1.0.4}/crystals.py +1 -1
  4. {pyemaps-1.0.3 → pyemaps-1.0.4}/diffract/bloch_dec.py +56 -39
  5. {pyemaps-1.0.3 → pyemaps-1.0.4}/pyemaps.egg-info/PKG-INFO +1 -5
  6. {pyemaps-1.0.3 → pyemaps-1.0.4}/pyemaps.egg-info/SOURCES.txt +2 -0
  7. {pyemaps-1.0.3 → pyemaps-1.0.4}/samples/si_scm.py +17 -17
  8. {pyemaps-1.0.3 → pyemaps-1.0.4}/setup.py +60 -32
  9. pyemaps-1.0.3/__version__.py +0 -1
  10. {pyemaps-1.0.3 → pyemaps-1.0.4}/COPYING +0 -0
  11. {pyemaps-1.0.3 → pyemaps-1.0.4}/CifFile/src/CifFile_module.py +0 -0
  12. {pyemaps-1.0.3 → pyemaps-1.0.4}/CifFile/src/StarFile.py +0 -0
  13. {pyemaps-1.0.3 → pyemaps-1.0.4}/CifFile/src/TypeContentsParser.py +0 -0
  14. {pyemaps-1.0.3 → pyemaps-1.0.4}/CifFile/src/YappsStarParser_1_0.py +0 -0
  15. {pyemaps-1.0.3 → pyemaps-1.0.4}/CifFile/src/YappsStarParser_1_1.py +0 -0
  16. {pyemaps-1.0.3 → pyemaps-1.0.4}/CifFile/src/YappsStarParser_2_0.py +0 -0
  17. {pyemaps-1.0.3 → pyemaps-1.0.4}/CifFile/src/YappsStarParser_STAR2.py +0 -0
  18. {pyemaps-1.0.3 → pyemaps-1.0.4}/CifFile/src/__init__.py +0 -0
  19. {pyemaps-1.0.3 → pyemaps-1.0.4}/CifFile/src/drel/__init__.py +0 -0
  20. {pyemaps-1.0.3 → pyemaps-1.0.4}/CifFile/src/drel/drel_ast_yacc.py +0 -0
  21. {pyemaps-1.0.3 → pyemaps-1.0.4}/CifFile/src/drel/drel_lex.py +0 -0
  22. {pyemaps-1.0.3 → pyemaps-1.0.4}/CifFile/src/drel/drel_runtime.py +0 -0
  23. {pyemaps-1.0.3 → pyemaps-1.0.4}/CifFile/src/drel/parsetab.py +0 -0
  24. {pyemaps-1.0.3 → pyemaps-1.0.4}/CifFile/src/drel/py_from_ast.py +0 -0
  25. {pyemaps-1.0.3 → pyemaps-1.0.4}/CifFile/src/parsetab.py +0 -0
  26. {pyemaps-1.0.3 → pyemaps-1.0.4}/CifFile/src/yapps3_compiled_rt.py +0 -0
  27. {pyemaps-1.0.3 → pyemaps-1.0.4}/MANIFEST.in +0 -0
  28. {pyemaps-1.0.3 → pyemaps-1.0.4}/README.md +0 -0
  29. {pyemaps-1.0.3 → pyemaps-1.0.4}/__config__.py +0 -0
  30. {pyemaps-1.0.3 → pyemaps-1.0.4}/__init__.py +0 -0
  31. {pyemaps-1.0.3 → pyemaps-1.0.4}/__main__.py +0 -0
  32. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/Aluminium.xtl +0 -0
  33. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/AluminiumOxide.xtl +0 -0
  34. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/Aluminium_FCC.xtl +0 -0
  35. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/BariumTitanate_180k.xtl +0 -0
  36. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/BariumTitanate_270k.xtl +0 -0
  37. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/BariumTitanate_Tetra.xtl +0 -0
  38. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/BiMnO3.xtl +0 -0
  39. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/Boron_Tetra.xtl +0 -0
  40. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/CadmiumSelenide_Hex.xtl +0 -0
  41. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/CadmiumSulfide_Cubic.xtl +0 -0
  42. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/CadmiumSulfide_Hex.xtl +0 -0
  43. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/Chromium_BCC.xtl +0 -0
  44. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/CoSb3_Skutterudite.xtl +0 -0
  45. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/CopperOxide.xtl +0 -0
  46. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/Copper_FCC.xtl +0 -0
  47. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/Cu2O_Cuprite.xtl +0 -0
  48. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/Diamond.xtl +0 -0
  49. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/ErbiumPyrogermanate.xtl +0 -0
  50. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/FePd_Tetra.xtl +0 -0
  51. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/FeS2_Pyrite.xtl +0 -0
  52. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/GalliumAntimonide.xtl +0 -0
  53. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/GalliumArsenide.xtl +0 -0
  54. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/GalliumNitride.xtl +0 -0
  55. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/Germanium.xtl +0 -0
  56. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/Gold_FCC.xtl +0 -0
  57. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/IndiumArsenide.xtl +0 -0
  58. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/LaMnO3.xtl +0 -0
  59. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/LeadZirconateTitanate.xtl +0 -0
  60. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/Li2MnO3.xtl +0 -0
  61. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/NaFeO2.xtl +0 -0
  62. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/Nb3Sn.xtl +0 -0
  63. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/Pentacene.xtl +0 -0
  64. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/SiAlONa.xtl +0 -0
  65. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/Silicon.xtl +0 -0
  66. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/StrontiumTitanate.xtl +0 -0
  67. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/TelluriumDioxide.xtl +0 -0
  68. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/TinDioxide_RT.xtl +0 -0
  69. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/TitaniumDioxide_Anatase.xtl +0 -0
  70. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/TitaniumDioxide_Rutile.xtl +0 -0
  71. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/TungstenDiselenide.xtl +0 -0
  72. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/VanadiumDioxide_RT.xtl +0 -0
  73. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/ZincOxide.xtl +0 -0
  74. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/Zinc_HCP.xtl +0 -0
  75. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/ZirconiumNitride.xtl +0 -0
  76. {pyemaps-1.0.3 → pyemaps-1.0.4}/cdata/limno2.xtl +0 -0
  77. {pyemaps-1.0.3 → pyemaps-1.0.4}/ddiffs.py +0 -0
  78. {pyemaps-1.0.3 → pyemaps-1.0.4}/diffract/__init__.py +0 -0
  79. {pyemaps-1.0.3 → pyemaps-1.0.4}/diffract/csf_dec.py +0 -0
  80. {pyemaps-1.0.3 → pyemaps-1.0.4}/diffract/dif_dec.py +0 -0
  81. {pyemaps-1.0.3 → pyemaps-1.0.4}/diffract/dpgen_dec.py +0 -0
  82. {pyemaps-1.0.3 → pyemaps-1.0.4}/diffract/mxtal_dec.py +0 -0
  83. {pyemaps-1.0.3 → pyemaps-1.0.4}/diffract/powder_dec.py +0 -0
  84. {pyemaps-1.0.3 → pyemaps-1.0.4}/diffract/stereo_dec.py +0 -0
  85. {pyemaps-1.0.3 → pyemaps-1.0.4}/display.py +0 -0
  86. {pyemaps-1.0.3 → pyemaps-1.0.4}/ediom/ediom.py +0 -0
  87. {pyemaps-1.0.3 → pyemaps-1.0.4}/ediom/ediom_dec.py +0 -0
  88. {pyemaps-1.0.3 → pyemaps-1.0.4}/emcontrols.py +0 -0
  89. {pyemaps-1.0.3 → pyemaps-1.0.4}/errors.py +0 -0
  90. {pyemaps-1.0.3 → pyemaps-1.0.4}/fileutils.py +0 -0
  91. {pyemaps-1.0.3 → pyemaps-1.0.4}/kdiffs.py +0 -0
  92. {pyemaps-1.0.3 → pyemaps-1.0.4}/license.txt +0 -0
  93. {pyemaps-1.0.3 → pyemaps-1.0.4}/pyemaps.egg-info/dependency_links.txt +0 -0
  94. {pyemaps-1.0.3 → pyemaps-1.0.4}/pyemaps.egg-info/requires.txt +0 -0
  95. {pyemaps-1.0.3 → pyemaps-1.0.4}/pyemaps.egg-info/top_level.txt +0 -0
  96. {pyemaps-1.0.3 → pyemaps-1.0.4}/pyproject.toml +0 -0
  97. {pyemaps-1.0.3 → pyemaps-1.0.4}/samples/al.img +0 -0
  98. {pyemaps-1.0.3 → pyemaps-1.0.4}/samples/al_db.bin +0 -0
  99. {pyemaps-1.0.3 → pyemaps-1.0.4}/samples/al_ediom.py +0 -0
  100. {pyemaps-1.0.3 → pyemaps-1.0.4}/samples/powder.py +0 -0
  101. {pyemaps-1.0.3 → pyemaps-1.0.4}/samples/si_bloch.py +0 -0
  102. {pyemaps-1.0.3 → pyemaps-1.0.4}/samples/si_constructor.py +0 -0
  103. {pyemaps-1.0.3 → pyemaps-1.0.4}/samples/si_csf.py +0 -0
  104. {pyemaps-1.0.3 → pyemaps-1.0.4}/samples/si_dif.py +0 -0
  105. {pyemaps-1.0.3 → pyemaps-1.0.4}/samples/si_dpgen.py +0 -0
  106. {pyemaps-1.0.3 → pyemaps-1.0.4}/samples/si_pyemaps.py +0 -0
  107. {pyemaps-1.0.3 → pyemaps-1.0.4}/samples/si_rawblochimgs.py +0 -0
  108. {pyemaps-1.0.3 → pyemaps-1.0.4}/samples/si_stereo.py +0 -0
  109. {pyemaps-1.0.3 → pyemaps-1.0.4}/scattering/__init__.py +0 -0
  110. {pyemaps-1.0.3 → pyemaps-1.0.4}/scattering/sct_dec.py +0 -0
  111. {pyemaps-1.0.3 → pyemaps-1.0.4}/setup.cfg +0 -0
  112. {pyemaps-1.0.3 → pyemaps-1.0.4}/spg/__init__.py +0 -0
  113. {pyemaps-1.0.3 → pyemaps-1.0.4}/spg/spg_dec.py +0 -0
@@ -1,13 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyemaps
3
- Version: 1.0.3
4
- Summary: UNKNOWN
3
+ Version: 1.0.4
5
4
  Home-page: https://www.emlabsolutions.com
6
5
  Author: EMLab Solutions, Inc.
7
6
  Author-email: support@emlabsoftware.com
8
- License: UNKNOWN
9
7
  Keywords: Transmission,Electron,Diffraction,Simulation,Crystallography,Python
10
- Platform: UNKNOWN
11
8
  Classifier: Development Status :: 5 - Production/Stable
12
9
  Classifier: Programming Language :: Python :: 3.7
13
10
  Classifier: Operating System :: Microsoft :: Windows
@@ -21,4 +18,3 @@ License-File: license.txt
21
18
  License-File: COPYING
22
19
 
23
20
  Check our full [pyemaps documentation](https://emlab-solutions.github.io/pyemaps) for latest updates.
24
-
@@ -0,0 +1 @@
1
+ __version__ = "1.0.4"
@@ -36,7 +36,7 @@ and calculations.
36
36
  from enum import Enum
37
37
  import os
38
38
  import json
39
- from tkinter import N
39
+ # from tkinter import N
40
40
 
41
41
  import numpy as np
42
42
  from numpy import asfortranarray as farray
@@ -383,47 +383,47 @@ def add_bloch(target):
383
383
 
384
384
  print(f"{sn1}{sn2}{st1}{st2}{st3}")
385
385
 
386
- def getBeams(self, bPrint=False):
387
- '''
388
- Prints selected beams for current dynamic diffraction simulation
389
- session marked by
390
- `beginBloch <pyemaps.crystals.html#pyemaps.crystals.Crystal.beginBloch>`_
391
- and `endBloch <pyemaps.crystals.html#pyemaps.crystals.Crystal.endBloch>`_.
386
+ # def getBeams(self, bPrint=False):
387
+ # '''
388
+ # Prints selected beams for current dynamic diffraction simulation
389
+ # session marked by
390
+ # `beginBloch <pyemaps.crystals.html#pyemaps.crystals.Crystal.beginBloch>`_
391
+ # and `endBloch <pyemaps.crystals.html#pyemaps.crystals.Crystal.endBloch>`_.
392
392
 
393
- This information is available right after beginBloch call.
393
+ # This information is available right after beginBloch call.
394
394
 
395
- :param bPrint: whether to print selected beams info on standard output
396
- :type bPrint: bool, optional, default `False`
395
+ # :param bPrint: whether to print selected beams info on standard output
396
+ # :type bPrint: bool, optional, default `False`
397
397
 
398
- :return: The number of selected beams and the selected beams list in Miller indexes.
399
- :rtype: a python tuple.
398
+ # :return: The number of selected beams and the selected beams list in Miller indexes.
399
+ # :rtype: a python tuple.
400
400
 
401
- '''
402
- nmidx = bloch.get_nbeams()
403
- if nmidx <= 0:
404
- raise BlochError("failed to retrieve diffracted beams info")
401
+ # '''
402
+ # nmidx = bloch.get_nbeams()
403
+ # if nmidx <= 0:
404
+ # raise BlochError("failed to retrieve diffracted beams info")
405
405
 
406
- ev = farray(np.zeros((3, nmidx), dtype=int))
407
- ev, ret = bloch.getbeams(ev)
406
+ # ev = farray(np.zeros((3, nmidx), dtype=int))
407
+ # ev, ret = bloch.getbeams(ev)
408
408
 
409
- if ret != 0:
410
- raise BlochError("failed to retrieve incidental beams info")
409
+ # if ret != 0:
410
+ # raise BlochError("failed to retrieve incidental beams info")
411
411
 
412
- evv = np.transpose(ev)
412
+ # evv = np.transpose(ev)
413
413
 
414
- if bPrint:
415
- shkl = "h K l"
416
- print(f"{shkl:^12}")
414
+ # if bPrint:
415
+ # shkl = "h K l"
416
+ # print(f"{shkl:^12}")
417
417
 
418
- for e in evv:
419
- h,k,l = e
420
- sh = '{0: < #04d}'. format(int(h))
421
- sk = '{0: < #04d}'. format(int(k))
422
- sl = '{0: < #04d}'. format(int(l))
418
+ # for e in evv:
419
+ # h,k,l = e
420
+ # sh = '{0: < #04d}'. format(int(h))
421
+ # sk = '{0: < #04d}'. format(int(k))
422
+ # sl = '{0: < #04d}'. format(int(l))
423
423
 
424
- print(f"{sh}{sk}{sl}")
424
+ # print(f"{sh}{sk}{sl}")
425
425
 
426
- return nmidx, evv
426
+ # return nmidx, evv
427
427
 
428
428
  # ----------------deprecated and folded into getSCMatrix call----------------
429
429
  # def getEigen(self, ib_coords=(0,0)):
@@ -437,6 +437,7 @@ def add_bloch(target):
437
437
  # :type ib_coords: tuple, optional, default (0,0)
438
438
  # :return: a list of complex eigen values at sampling point location
439
439
  # :rtype: numpy.ndarray
440
+
440
441
  # Example of the eigen vales:
441
442
  # .. code-block:: console
442
443
  # Eigen values at: (0, 0):
@@ -474,22 +475,24 @@ def add_bloch(target):
474
475
  Obtains scattering matrix at a given sampling point. To get a list of sampling
475
476
  points used in this dynamic simulation session, call
476
477
  `printIBDetails <pyemaps.crystals.html#pyemaps.crystals.Crystal.printIBDetails>`_
477
- after `beginBloch <pyemaps.crystals.html#pyemaps.crystals.Crystal.beginBloch>`_
478
+ after `beginBloch <pyemaps.crystals.html#pyemaps.crystals.Crystal.beginBloch>`_.
479
+ In addition to the scattering matrix, it also generates associated eigen values
480
+ and diffracted beams.
478
481
 
479
482
  This call must be made during a dynamic simulation session marked by
480
483
  `beginBloch <pyemaps.crystals.html#pyemaps.crystals.Crystal.beginBloch>`_ and
481
- `endBloch <pyemaps.crystals.html#pyemaps.crystals.Crystal.endBloch>`_
484
+ `endBloch <pyemaps.crystals.html#pyemaps.crystals.Crystal.endBloch>`_.
482
485
 
483
- :param ib_coords: Sampling point coordinates tuple
486
+ :param ib_coords: Sampling point coordinates tuple.
484
487
  :type ib_coords: tuple, optional, defaults to (0, 0)
485
488
 
486
- :param thickness: Sample thickness
489
+ :param thickness: Sample thickness.
487
490
  :type thickness: int, optional, defaults to 200
488
491
 
489
- :param rvec: R vector shifting atom coordinates in crystal, each value between 0.0 and 1.0
492
+ :param rvec: R vector shifting atom coordinates in crystal, each value between 0.0 and 1.0.
490
493
  :type rvec: tuple of 3 floats, optional, defaults to (0.0,0.0,0.0)
491
494
 
492
- :return: 2D scattering matrix size and the complex scattering matrix and its associated eigen values.
495
+ :return: scattering matrix size; scattering matrix; eigen values; diffracted beams.
493
496
  :rtype: a tuple.
494
497
 
495
498
  Default values for sample_thickness:
@@ -498,6 +501,19 @@ def add_bloch(target):
498
501
 
499
502
  DEF_THICKNESS[0] = 200
500
503
 
504
+ Example of the eigen vales:
505
+
506
+ .. code-block:: console
507
+
508
+ Eigen values at: (0, 0):
509
+ [ 0.04684002-0.00218389j -0.2064669 -0.00147516j -0.30446348+0.00055009j
510
+ -0.27657617+0.00023512j -0.2765751 +0.00023515j 0.00539041-0.00382443j
511
+ -0.535879 -0.00023585j -0.5612881 +0.00045343j -0.55369247+0.00026236j
512
+ -0.55368818+0.00026249j -0.19093572+0.00066419j -0.1550311 +0.00045471j
513
+ -0.15503166+0.00045471j -0.58842399-0.00202841j -0.67850191+0.00042728j
514
+ -0.72713566+0.00060655j -0.70972681+0.00052279j -0.72092338+0.0005903j
515
+ -0.72093237+0.00059052j -0.64608335-0.0001983j -0.64607544-0.00019853j]
516
+
501
517
  '''
502
518
 
503
519
  # validate the input values
@@ -518,11 +534,12 @@ def add_bloch(target):
518
534
 
519
535
  scm = farray(np.zeros((scmdim, scmdim)), dtype=np.complex64)
520
536
  ev = farray(np.zeros(scmdim), dtype=np.complex64)
521
- scm, ev, ret = bloch.getscm(sample_thickness, rvec, scm, ev)
537
+ bms = farray(np.zeros((3, scmdim), dtype=int))
538
+ scm, ev, bms, ret = bloch.getscm(sample_thickness, rvec, scm, ev, bms)
522
539
  if ret != 0:
523
540
  raise BlochError('Error retieving scattering matrix, input matrix dimension too small, use printIBDetails to find extact dimentsion')
524
541
 
525
- return scmdim, scm, ev
542
+ return scmdim, scm, ev, np.transpose(bms)
526
543
 
527
544
  def endBloch(self):
528
545
  """
@@ -649,7 +666,7 @@ def add_bloch(target):
649
666
 
650
667
  # ---These calls must be between beginBloch and endBloch calls
651
668
  target.printIBDetails = printIBDetails
652
- target.getBeams = getBeams
669
+ # target.getBeams = getBeams <-------deprecate
653
670
  target.getSCMatrix = getSCMatrix
654
671
  target.getBlochImages = getBlochImages
655
672
  # ---These calls must be between beginBloch and endBloch calls
@@ -1,13 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyemaps
3
- Version: 1.0.3
4
- Summary: UNKNOWN
3
+ Version: 1.0.4
5
4
  Home-page: https://www.emlabsolutions.com
6
5
  Author: EMLab Solutions, Inc.
7
6
  Author-email: support@emlabsoftware.com
8
- License: UNKNOWN
9
7
  Keywords: Transmission,Electron,Diffraction,Simulation,Crystallography,Python
10
- Platform: UNKNOWN
11
8
  Classifier: Development Status :: 5 - Production/Stable
12
9
  Classifier: Programming Language :: Python :: 3.7
13
10
  Classifier: Operating System :: Microsoft :: Windows
@@ -21,4 +18,3 @@ License-File: license.txt
21
18
  License-File: COPYING
22
19
 
23
20
  Check our full [pyemaps documentation](https://emlab-solutions.github.io/pyemaps) for latest updates.
24
-
@@ -36,6 +36,8 @@ C:/Users/sharon/dev_space/pyemaps_root/pyemaps/emaps/asf.f90
36
36
  C:/Users/sharon/dev_space/pyemaps_root/pyemaps/emaps/atom.f
37
37
  C:/Users/sharon/dev_space/pyemaps_root/pyemaps/emaps/bloch.f90
38
38
  C:/Users/sharon/dev_space/pyemaps_root/pyemaps/emaps/bloch_mem.f90
39
+ C:/Users/sharon/dev_space/pyemaps_root/pyemaps/emaps/cbloch.f90
40
+ C:/Users/sharon/dev_space/pyemaps_root/pyemaps/emaps/cdpgen.f90
39
41
  C:/Users/sharon/dev_space/pyemaps_root/pyemaps/emaps/crystal_mem.f90
40
42
  C:/Users/sharon/dev_space/pyemaps_root/pyemaps/emaps/csf.f90
41
43
  C:/Users/sharon/dev_space/pyemaps_root/pyemaps/emaps/csf_types.f90
@@ -62,47 +62,47 @@ def runSCMTests():
62
62
  print(f'Number of sampling points: {ns}')
63
63
  print(f'{s}')
64
64
 
65
- print(f'----Selected Beams in Miller Indexes----: ')
66
- _, _ = si.getBeams(bPrint = True)
67
-
68
65
  # get the scattering matrix and associated eigen values now
69
66
  try:
70
- nd, si_scm, si_ev = si.getSCMatrix(ib_coords = ib_coords)
67
+ ndim, si_scm, si_ev, si_beams = si.getSCMatrix(ib_coords = ib_coords)
71
68
  except BlochError as e:
72
69
  print(f'Failed to generate scattering matrix {e.message}')
73
70
  except Exception as e:
74
71
  print(f'Failed to generate scattering matrix {e}')
75
72
  else:
76
- print(f'----Scattering matrix at sampling point {ib_coords}----:')
77
- print(f'Size of the scattering matrix: {nd}x{nd}')
73
+ print(f'\n----Scattering matrix at sampling point {ib_coords}----:')
74
+ print(f'Size of the scattering matrix: {ndim}x{ndim}')
78
75
  print(f' \n{si_scm}')
79
76
 
80
- print(f'----Eigen values at: {ib_coords}----')
77
+ print(f'\n----Eigen values at: {ib_coords}----')
81
78
  print(si_ev)
82
79
 
83
- print(f'----More details associated with scattering matrix calculation')
80
+ print(f'\n----Diffracted beams at: {ib_coords}----')
81
+ print(si_beams)
82
+
83
+ print(f'\n----More details associated with scattering matrix calculation')
84
84
  si.printIBDetails()
85
85
 
86
- # select a random sampling point from s
86
+ # select a random sampling point from s and calculate scattering matrix
87
87
  randnum = random.randrange(0, ns-1)
88
88
 
89
89
  ib_coords = s[randnum]
90
90
  try:
91
- nd, si_scm, si_ev = si.getSCMatrix(ib_coords = ib_coords)
91
+ nd, si_scm, si_ev, si_beams = si.getSCMatrix(ib_coords = ib_coords)
92
92
  except Exception:
93
93
  print(f'Error obtaining scattering matrix at random sampling points {ib_coords}')
94
94
  else:
95
- print(f'--Scattering matrix at a randomly selected sampling point {ib_coords}----:')
95
+ print(f'\n----Scattering matrix at a randomly selected sampling point {ib_coords}----:')
96
96
  print(f'Size of the scattering matrix: {nd}x{nd}')
97
97
  print(f'{si_scm}')
98
- print(f'----Eigen values at: {ib_coords}----')
98
+ print(f'\n----Eigen values at: {ib_coords}----')
99
99
  print(si_ev)
100
+ print(f'\n----Diffracted beams at: {ib_coords}----')
101
+ print(si_beams)
100
102
 
101
- finally:
102
- si.endBloch()
103
- finally:
104
- # cleanup
105
- si.endBloch()
103
+
104
+ # cleanup
105
+ si.endBloch()
106
106
 
107
107
  if __name__ == "__main__":
108
108
  runSCMTests()
@@ -29,38 +29,57 @@ IFORTROOT = os.getenv('IFORTROOT')
29
29
 
30
30
  dpgen_cobj = 'write_dpbin.o'
31
31
 
32
- # removing 4R8 option - returning to 4 bytes real
33
- # compile_args=['-Qm64',
34
- # '-WB',
35
- # '-heap-arrays',
36
- # # '-Qopenmp',
37
- # # '-Qopenmp-simd',
38
- # '-GS',
39
- # '-4R8',
40
- # '-fpp',
41
- # '-warn:nointerfaces',
42
- # '-O2', #this option does not work with -fast
43
- # '-libs:static',
44
- # '-MT',
45
- # '-assume:buffered_io',
46
- # '-traceback',
47
- # # '-align:array32byte',
48
- # # '-Qparallel',
49
- # # '-Qopt-report:2',
50
- # '-c']
51
-
32
+ compile_args_debug=['-Qm64',
33
+ '-Od',
34
+ '-WB',
35
+ '-heap-arrays:1024',
36
+ '-Qopenmp',
37
+ '-Qmkl',
38
+ # '-Qopenmp-simd',
39
+ # '-GS:partial',
40
+ '-fpp',
41
+ '-warn:all',
42
+ # '-O2', #this option does not work with -fast
43
+ # '-libs:static',
44
+ # '-MT',
45
+ # '-assume:buffered_io',
46
+ # '-traceback',
47
+ # '-check:all',
48
+ # '-align:array32byte',
49
+ # '-Qparallel',
50
+ # '-Qopt-report:2',
51
+ '-c']
52
+ # --------------- production options--------------
52
53
  compile_args=['-Qm64',
53
54
  '-WB',
54
- '-heap-arrays',
55
- '-GS',
55
+ '-heap-arrays:1024',
56
+ '-Qopenmp',
57
+ '-Qmkl',
58
+ '-GS:partial',
56
59
  '-fpp',
57
- '-warn:nointerfaces',
60
+ '-warn:all',
58
61
  '-O2', #this option does not work with -fast
59
62
  '-libs:static',
60
63
  '-MT',
61
64
  '-assume:buffered_io',
62
- # '-traceback',
63
65
  '-c']
66
+
67
+ # --------debugging options-----------
68
+ # compile_args=['-Qm64',
69
+ # '-WB',
70
+ # '-heap-arrays:1024',
71
+ # '-check:all',
72
+ # 'Qfp-stack-check',
73
+ # '-Qopenmp',
74
+ # '-GS:partial',
75
+ # '-fpp',
76
+ # '-warn:nointerfaces',
77
+ # # '-O2', #this option does not work with -fast
78
+ # # '-libs:static',
79
+ # '-MT',
80
+ # '-assume:buffered_io',
81
+ # '-traceback',
82
+ # '-c']
64
83
 
65
84
  compile_args_lin= ['-m64',
66
85
  '-WB',
@@ -114,6 +133,7 @@ dif_source = [
114
133
  ]
115
134
 
116
135
  bloch_files = ['zg.f90',
136
+ 'cbloch.f90',
117
137
  'bloch_mem.f90',
118
138
  'bloch.f90'
119
139
  ]
@@ -122,7 +142,8 @@ stereo_files = ['stereo.f90']
122
142
  mxtal_files = ['mxtal_mem.f90',
123
143
  'mxtal.f90']
124
144
 
125
- dpgen_files =['dp_types.f90',
145
+ dpgen_files =['cdpgen.f90',
146
+ 'dp_types.f90',
126
147
  'dp_gen.f90'
127
148
  ]
128
149
 
@@ -179,11 +200,14 @@ def get_ediom_sources():
179
200
  return src_list
180
201
 
181
202
  def get_ediom_includes():
182
-
203
+ # for ccompiler cl arguement too long issue
204
+ # see https://github.com/pypa/setuptools/pull/3775/commits/dd03b731045d5bb0b47648554f9a1a7429ef306a
205
+ # temporary fix
183
206
  import numpy as np
184
207
  from sysconfig import get_paths
185
208
 
186
209
  includeDirs=[np.get_include()]
210
+ # python's include
187
211
  includeDirs.append(get_paths()['include'])
188
212
  includeDirs.append(get_ediom_srcdir())
189
213
 
@@ -365,6 +389,7 @@ def get_library_dirs():
365
389
  import platform
366
390
 
367
391
  lib_folder = ''
392
+ mkl_folder = 'intel64'
368
393
 
369
394
  osname = platform.platform().lower()
370
395
  print(f'OS name found: {osname}')
@@ -377,7 +402,7 @@ def get_library_dirs():
377
402
 
378
403
  libdir = []
379
404
  libdir.append(os.path.join(IFORTROOT, 'compiler', 'lib', lib_folder)) #intel openmp libdir
380
- libdir.append(os.path.join(MKLROOT, 'lib', lib_folder))
405
+ libdir.append(os.path.join(MKLROOT, 'lib', mkl_folder))
381
406
 
382
407
  return libdir
383
408
 
@@ -405,7 +430,7 @@ def get_libraries():
405
430
  def get_compiler_args():
406
431
  import sys
407
432
  if sys.platform == 'win32':
408
- return compile_args
433
+ return compile_args if pyemaps_debug == 0 else compile_args_debug
409
434
  elif sys.platform == 'linux':
410
435
  return compile_args_lin
411
436
  else:
@@ -428,8 +453,6 @@ def get_install_requires():
428
453
  raise Exception('The OS is not supported')
429
454
 
430
455
  def get_emaps_macros():
431
- # print(f'setup.py: build_type: {build_type}')
432
- # exit()
433
456
 
434
457
  if build_type != 'uiuc' and build_type != 'full' and build_type != 'free':
435
458
  raise ValueError("Error: build type not specified")
@@ -459,14 +482,20 @@ def get_emaps_macros():
459
482
  else:
460
483
  # print(f'Build is not a debug build: {pyemaps_debug}')
461
484
  undef_list.append('__BDEBUG__')
485
+ undef_list.append('__INIT0__')
462
486
 
463
487
  # print(f'defundef list: {def_list}, {undef_list}')
464
488
  # exit()
465
489
  return [def_list, undef_list]
466
490
 
467
491
  # ------------------- must set this before build -------------------
468
- pyemaps_build_defs, pyemaps_build_undefs= get_emaps_macros()
469
492
 
493
+ # from distutils import ccompiler
494
+ # cc = ccompiler.new_compiler()
495
+ # cc.set_include_dirs([])
496
+
497
+
498
+ pyemaps_build_defs, pyemaps_build_undefs= get_emaps_macros()
470
499
  pyemaps_dif = Extension("pyemaps.diffract.emaps",
471
500
  sources = get_diffract_sources(),
472
501
  extra_f90_compile_args = get_compiler_args(),
@@ -513,7 +542,6 @@ pyemaps_ediom = Extension(
513
542
  libraries =[],
514
543
  define_macros = pyemaps_build_defs,
515
544
  undef_macros = pyemaps_build_undefs,
516
- extra_compile_args =[],
517
545
  extra_link_args =[],
518
546
  swig_opts =['-python']
519
547
  )
@@ -1 +0,0 @@
1
- __version__ = "1.0.3"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes