[neutron-mc] McStas Polarisation details

Dalgliesh, RM (Robert) R.M.Dalgliesh at rl.ac.uk
Fri Aug 19 17:30:09 CEST 2005


Sorry for the deluge of e-mails of Peter,
I'm learning quite a lot here.
It looks as if the neutron polarisation direction is rotated with the objects. There is a mccoordschange_polarisation function defined in mcstas-r.c which I presume is applied whenever ROTATED is applied. Unfortunately for the situation of a polarising mirror, where the polarisation direction is confined to the plane of the mirror, this isn't particularly useful as I want the neutron polarisation direction to remain fixed and mirror polarisation direction to change. If I want the neutron polarisation direction change I will then force the change by knowing the relationship between the incident polarisation direction and the component itself. I think I'm going to have to try and decouple this functionality somehow but this is now into the nuts and bolts of the mcstas instrument build process. Is there a more detailed manual anywhere with handy hints about doing such things or is just a case of ploughing my way throught the code?
My guess would be that the best way of doing this is to ensure that the neutron polarisation direction remains unchanged throughout the instrument unless changed by a component in some way. I would be interested to here other people's thoughts on this especially with regards to He3 cells. 

Thanks

Rob

-----------------------------------
Dr Robert Dalgliesh 
ISIS
Rutherford Appleton Labortory
Chilton
Didcot
Oxfordshire
UK
OX11 0QX
Tel: +44 (0)1235 445687
Fax: +44 (0)1235 445720
e-mail: r.m.dalgliesh at rl.ac.uk



-----Original Message-----
From: neutron-mc-bounces at risoe.dk [mailto:neutron-mc-bounces at risoe.dk] On Behalf Of Peter Willendrup
Sent: 19 August 2005 10:19
To: McStas users list at neutron.risoe.dk
Subject: Re: [neutron-mc] McStas Polarisation details

Hi Robert,

On Fri, 2005-08-19 at 10:02 +0100, Dalgliesh, RM (Robert) wrote:
> I've succesfully implemented polarising supermirrors, channeled guides 
> and detectors using mcstas-1.8 over the past few days in a simple way 
> but am now reaching the more technical details. I can rotate a 
> component such as a single mirror through 90° but for the polarisation 
> part of the calculation of the reflectivity the mirror needs to know 
> what direction it is pointing in. The method of rotating the 
> coordinate frame of the mirror doesn't allow me to know where things 
> are pointing. Is there a way within mcstas to access the rotation 
> matrix that has been applied to a component within that component.

This is indeed great news! We will be very happy to include your work in the project in some way if you agree to do so? Are the changes you've made related to components only or do you reach into runtime / language features aswell?

Yes, a feature like the one you need does exist, have a look in e.g. 
Source_flux_lambda.comp - the key is the rotation matrix ROT_A_CURRENT_COMP - in this source component used to define rectangular focusing (rectangular focusing is always gravitation-parallel in mcstas). Also, have a look at the mcstas-r.h and mcstas-r.c in the share part of the lib/ section, definition of the rotation axes etc. should be stated in there. 

If I can help in some other way, please let me know.

Good work,

Peter

--
Peter Willendrup <peter at willendrup.org>

_______________________________________________
neutron-mc mailing list
neutron-mc at risoe.dk
http://neutron.risoe.dk/mailman/listinfo/neutron-mc




More information about the mcstas-users mailing list