sardana-org / sardana

Moved to GitLab: https://gitlab.com/sardana-org/sardana
39 stars 52 forks source link

TwoC diffractometer #1451

Closed dschick closed 3 years ago

dschick commented 3 years ago

hi @teresanunez ,

I was wondering if you have already an implementation of a TwoC diffractoemeter for the HklPseudoMotorController? It is defined in the hkl lib but I am not sure if the doucmentation is not complete as no engines are listed there.

However, would it be as simple as:

class Diffrac2C(DiffracBasis):  # DiffractometerType: "2C"

    """ The PseudoMotor controller for the diffractometer"""

    pseudo_motor_roles = "h", "k", "l", "q", 
    motor_roles = "th", "tth"

    def __init__(self, inst, props, *args, **kwargs):
        """ Do the default init plus the specific diffractometer
        staff.
        @param properties of the controller
        """

        DiffracBasis.__init__(self, inst, props, *args, **kwargs)

Is there some definition of the diffractometer angles available? I am currently using the E4CV and created dummy motors for phi, chi, gamma which are all set to 0. Saradana docs state that psi is the azimuthal angle and hkl docs state that:

"psi" : angle between the reference vector and the diffraction plan

I am not sure I got that.

Many thanks in advance

Daniel

teresanunez commented 3 years ago

Hi Daniel,
I am not sure that the implementation of the 2C diffractometers is correctly done and tested in the hkl libraries. Have you talked to Frederic Picca about that?. If not I can ask him, just now I don´t remember it, but I have in mind that is not really implemented (or at least not tested or used). The implementation in sardana does nothing than what the hkl library does, so what is there is always right (or it should be).

                                           Best Regards,
                                                                         Teresa
dschick commented 3 years ago

many thanks for the quick reply! I thinky I might be also happy with the E4CV

Very convinent macros - great work by you and Frederic!

Door_scattering_1 [111]: pa                                                                                           
Eulerian 4C Vertical Geometry (E4CV), bissector

  1st Reflection (index 0): 
    omega chi phi tth: 1.999966093 0 0 4.000031249999999
                           H K L =  0 0 1

  2nd Reflection (index 1): 
    omega chi phi tth: 4.000075957 0 0 4.000031249999999
                           H K L =  1 0 1

  Lattice Constants (lengths / angles):
                      real space = 6.283 6.283 6.283 / 90 90 90

  Azimuthal reference:
                           H K L = -999 -999 -999 

  Lambda = 17.536667609618107
  UB-Matrix
          1.00003    -6.12341e-17    -8.64522e-07
                0         1.00003               0
      8.64522e-07    -6.12342e-17         1.00003