McStas

Pay H. Schulze Horn horn at ill.fr
Mon Sep 6 15:24:24 CEST 1999


After a more a week now here is the Component, which gives the
Divergence in relation to the energy
out. Change it for distribution like you want.
The other monitor, which gives out everything, has small syntax-error
which i cant't find.

Are there any know problems with the ROTATED-command?

Also as an attachment you can find an instrument-definition with a small
component-definition, which are reproducing a thing i can't understand.

After the compiling with the shell command:
mcstas t9.instr && gcc -O -o t9 t9.c -lm && t9 -n 3

I had this output:
Phi:4.19437 theta0:-60

Phi:4.19437 theta0:-60

Phi:4.19437 theta0:-60

Why do i have a value of 4.19 degree as an divergence ?

Why not 2.1 ?

Why is it nearly the double value i was awaiting ?
 
I have installed the version:"McStas version 1.1, March 31, 1999" on a
Silicon graphics Iris with
Irix 5.3 and gcc 2.7.2.1 .


Thanks
	Pay

P.S.
Please forget the question for the monochromator component which
includes multiple scattering.
-------------- next part --------------

DEFINE COMPONENT Angle_test
DEFINITION PARAMETERS ()
SETTING PARAMETERS ()
STATE PARAMETERS (x,y,z,vx,vy,vz,t,s1,s2,p)
DECLARE
  %{
  %}

TRACE
  %{
	 double theta0, phi;
	 PROP_Z0;
	 theta0 = atan2(vx,vz);
	 phi = atan2(vy,vz);
	 printf("\nphi:%g theta0:%g\n",RAD2DEG*phi,RAD2DEG*theta0);
  %}

END
-------------- next part --------------
DEFINE INSTRUMENT t9()

DECLARE
%{
%}

INITIALIZE
%{
%}

TRACE

COMPONENT a1 = Arm()
	AT (0,0,0) ABSOLUTE
	ROTATED (0,0,0) ABSOLUTE

COMPONENT s = Source_div(
		width = 0.01,
		height = 0.01,
		hdiv=0,
		vdiv=0,
		E0 = e_zero,
		dE = 0)
	AT (0,0,0) RELATIVE a1
	ROTATED (0,0,0) RELATIVE a1

COMPONENT a2=Arm()
	AT (0,0,1) RELATIVE a1
	ROTATED (2.1,60,0) RELATIVE a1

COMPONENT moni2=Angle_test()
	AT (0,0,0) RELATIVE a2
	ROTATED (0,0,0) RELATIVE a2

END


More information about the mcstas-users mailing list