Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diffractometer: add pa() report #437

Merged
merged 5 commits into from
Sep 30, 2020
Merged

diffractometer: add pa() report #437

merged 5 commits into from
Sep 30, 2020

Conversation

prjemian
Copy link
Contributor

fixes #434 to make a report of the diffractometer sample(s), orientation, and reflection(s)

@prjemian prjemian added this to the 1.3.8 milestone Sep 29, 2020
@prjemian prjemian self-assigned this Sep 29, 2020
@prjemian
Copy link
Contributor Author

@gfabbris, @ambarb: please look at this PR (and issue in #434)

@prjemian
Copy link
Contributor Author

simpler example:

In [13]: sim4c = APS_diffractometer.SoftE4CV('', name='sim4c')                                                                                                   
In [17]: r1 = sim4c.calc.sample.add_reflection(1, 1, 0, 
    ...:     position=sim4c.calc.Position(omega=45, chi=45, phi=90.0, tth=90)) 
    ...: r2 = sim4c.calc.sample.add_reflection(0, 1, 0, 
    ...:     position=sim4c.calc.Position(omega=30, chi=90, phi=90.0, tth=60)) 
    ...: sim4c.calc.sample.compute_UB(r1, r2) 
    ...:                                                                                                                                                         
Out[17]: 1

In [18]: sim4c.pa()                                                                                                                                              
===================== ==========================================================================
term                  value                                                                     
===================== ==========================================================================
diffractometer        sim4c                                                                     
geometry              E4CV                                                                      
class                 SoftE4CV                                                                  
energy (keV)          0.80509                                                                   
wavelength (angstrom) 1.54000                                                                   
calc engine           hkl                                                                       
mode                  bissector                                                                 
positions             ===== =======                                                             
                      name  value                                                               
                      ===== =======                                                             
                      omega 0.00000                                                             
                      chi   0.00000                                                             
                      phi   0.00000                                                             
                      tth   0.00000                                                             
                      ===== =======                                                             
sample: main          ================= ========================================================
                      term              value                                                   
                      ================= ========================================================
                      unit cell edges   a=1.54, b=1.54, c=1.54                                  
                      unit cell angles  alpha=90.0, beta=90.0, gamma=90.0                       
                      ref 1 (hkl)       h=1.0, k=1.0, l=0.0                                     
                      ref 1 positioners omega=45.00000, chi=45.00000, phi=90.00000, tth=90.00000
                      ref 2 (hkl)       h=0.0, k=1.0, l=0.0                                     
                      ref 2 positioners omega=30.00000, chi=90.00000, phi=90.00000, tth=60.00000
                      [U]               [[ 1.00000000e+00 -1.11022302e-16  1.08845649e-16]      
                                         [ 1.11022302e-16  1.00000000e+00 -1.08845649e-16]      
                                         [-1.08845649e-16  1.08845649e-16  1.00000000e+00]]     
                      [UB]              [[ 4.07999046e+00 -7.02797298e-16  1.94261847e-16]      
                                         [ 4.52969935e-16  4.07999046e+00 -6.93916573e-16]      
                                         [-4.44089210e-16  4.44089210e-16  4.07999046e+00]]     
                      ================= ========================================================
===================== ==========================================================================

Out[18]: <pyRestTable.rest_table.Table at 0x7f4eb464fc40>

@prjemian
Copy link
Contributor Author

TODO: report any constraints

Copy link
Contributor Author

Codacy Here is an overview of what got changed by this pull request:

Complexity increasing per file
==============================
- apstools/diffractometer.py  5
         

See the complete overview on Codacy

@prjemian prjemian merged commit 84e841c into master Sep 30, 2020
@prjemian prjemian deleted the 434-pa branch September 30, 2020 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

diffractometer: add pa() report
1 participant