From wildgrub at dxray.mpi-stuttgart.mpg.de Tue Apr 20 16:29:21 2004 From: wildgrub at dxray.mpi-stuttgart.mpg.de (Ulrich C. Wildgruber MPI fuer Metallforschung Stuttgart) Date: Tue, 20 Apr 2004 16:29:21 +0200 Subject: [neutron-mc] Monochromator_flat Message-ID: <408533C1.3070407@dxray.mpi-stuttgart.mpg.de> Dear colleagues, just today I looked at the source code of "Monochromator_flat.comp" and got stuck at: double Gauss_X[] = {-0.987992518020485, 0.937273392400706, 0.848206583410427, 0.724417731360170, 0.570972172608539, 0.394151347077563, 0.201194093997435, 0, 0.201194093997435, 0.394151347077563, 0.570972172608539, 0.724417731360170, 0.848206583410427, 0.937273392400706, 0.987992518020485}; Could it be that the lonely minus-sign attached to the first element is wrong or that other minus signs are missing? I wasn't able to get hold of the literature mentioned in the source listing. (/* Values for Gauss quadrature. Taken from Brice Carnahan, H. A. Luther and James O Wilkes, "Applied numerical methods", Wiley, 1996, page 103. */) Can anybody please confirm that everything is all right? Thanks! Uli -- Ulrich WILDGRUBER wildgrub at dxray.mpi-stuttgart.mpg.de wwwmf.mpi-stuttgart.mpg.de/abteilungen/dosch/dosch.html ----------------------------------------------------------------------------- Max-Planck-Institut f?r Metallforschung | Technische Universit?t M?nchen Heisenbergstr. 3 | ZWE Neue Forschungs-Neutronenquelle | Instrumentierung D-70569 Stuttgart | D-85747 Garching/M?nchen Tel.: (+49)-711-689-1900 | Tel.: (+49)-89-289-14681 Fax.: (+49)-711-689-1902 | Fax.: (+49)-89-289-14666 From v-ciampo at ill.fr Wed Apr 21 17:44:48 2004 From: v-ciampo at ill.fr (Lorenzo Ciampolini) Date: Wed, 21 Apr 2004 17:44:48 +0200 (CEST) Subject: [neutron-mc] Monochromator_flat In-Reply-To: <200404211001.i3LA11HU012345@ftp.risoe.dk> References: <200404211001.i3LA11HU012345@ftp.risoe.dk> Message-ID: <37813.193.49.43.8.1082562288.squirrel@mail.ill.fr> Hi Ulrich, For me too that's a bug, the first values up to 0 should be negative. I did not search for the literature, but I know what Gauss quadrature is and those X values should be the integration abscissae, which should be definitely symmetrical around zero (an additional argument is used to later offset the stuff). However, you might verify that (at least at the present moment) in the rest of the component code the Gaussian curves are centered at zero so the bug is effectless. Best regards, Lorenzo > Send neutron-mc mailing list submissions to > neutron-mc at risoe.dk > > To subscribe or unsubscribe via the World Wide Web, visit > http://neutron.risoe.dk/mailman/listinfo/neutron-mc > or, via email, send a message with subject or body 'help' to > neutron-mc-request at risoe.dk > > You can reach the person managing the list at > neutron-mc-admin at risoe.dk > > When replying, please edit your Subject line so it is more specific than > "Re: Contents of neutron-mc digest..." > > > Today's Topics: > > 1. Monochromator_flat (Ulrich C. Wildgruber MPI fuer Metallforschung > Stuttgart) > > --__--__-- > > Message: 1 > Date: Tue, 20 Apr 2004 16:29:21 +0200 > From: "Ulrich C. Wildgruber MPI fuer Metallforschung Stuttgart" > > To: neutron-mc at risoe.dk > Organization: MPI fuer Metallforschung Stuttgart > Reply-To: neutron-mc at risoe.dk > > Dear colleagues, > > just today I looked at the source code of "Monochromator_flat.comp" and > got stuck at: > > double Gauss_X[] = {-0.987992518020485, 0.937273392400706, > 0.848206583410427, > 0.724417731360170, 0.570972172608539, > 0.394151347077563, 0.201194093997435, 0, > 0.201194093997435, > 0.394151347077563, 0.570972172608539, > 0.724417731360170, 0.848206583410427, > 0.937273392400706, 0.987992518020485}; > > Could it be that the lonely minus-sign attached to the first element is > wrong or that other minus signs are missing? I wasn't able to get hold > of the literature mentioned in the source listing. > (/* Values for Gauss quadrature. Taken from Brice Carnahan, H. A. Luther > and > James O Wilkes, "Applied numerical methods", Wiley, 1996, page > 103. */) > > Can anybody please confirm that everything is all right? > > Thanks! > > Uli > > -- > Ulrich WILDGRUBER > wildgrub at dxray.mpi-stuttgart.mpg.de > wwwmf.mpi-stuttgart.mpg.de/abteilungen/dosch/dosch.html > ----------------------------------------------------------------------------- > Max-Planck-Institut f?r Metallforschung | Technische Universit?t M?nchen > Heisenbergstr. 3 | ZWE Neue Forschungs-Neutronenquelle > | Instrumentierung > D-70569 Stuttgart | D-85747 Garching/M?nchen > Tel.: (+49)-711-689-1900 | Tel.: (+49)-89-289-14681 > Fax.: (+49)-711-689-1902 | Fax.: (+49)-89-289-14666 > > > > > --__--__-- > > _______________________________________________ > neutron-mc mailing list > neutron-mc at risoe.dk > http://neutron.risoe.dk/mailman/listinfo/neutron-mc > > > End of neutron-mc Digest ********************************** Lorenzo Ciampolini, Dr. Sc. Techn. Ing?nieur Calcul et D?veloppement Universit? di Parma Tel: +33 4 76 20 70 71 c/o Institut Laue-Langevin 6, rue Jules Horowitz BP 156 F-38042 Grenoble cedex 9 ********************************* From peter.willendrup at risoe.dk Thu Apr 22 07:37:22 2004 From: peter.willendrup at risoe.dk (Peter Willendrup) Date: Thu, 22 Apr 2004 07:37:22 +0200 (CEST) Subject: [neutron-mc] Monochromator_flat In-Reply-To: <37813.193.49.43.8.1082562288.squirrel@mail.ill.fr> Message-ID: Hi Ulrich and Lorenzo, On Wed, 21 Apr 2004, Lorenzo Ciampolini wrote: > For me too that's a bug, the first values up to 0 should be negative. I > did not search for the literature, but I know what Gauss quadrature is and > those X values should be the integration abscissae, which should be > definitely symmetrical around zero (an additional argument is used to > later offset the stuff). > > However, you might verify that (at least at the present moment) in the > rest of the component code the Gaussian curves are centered at zero so the > bug is effectless. Thanks for pointing out the possible error. I tend to agree with Lorenzo that this is an effecless bug, but will check this ofcourse. It seems it comes from very ancient code (Monochromator_flat was Mosaic_simple before): http://fys-lin-1.risoe.dk/cgi-bin/cvsweb/mcstas/lib/obsolete/Mosaic_simple.comp?rev=1.2&content-type=text/x-cvsweb-markup (Dating back to july 1999... ;) ) Regards, Peter -- ------------------------------------- Peter Kjaer Willendrup, Cand. Scient Phone: (+45) 46 77 58 62 email: peter.willendrup at risoe.dk ------------------------------------- From wildgrub at dxray.mpi-stuttgart.mpg.de Thu Apr 22 13:24:48 2004 From: wildgrub at dxray.mpi-stuttgart.mpg.de (Ulrich C. Wildgruber MPI fuer Metallforschung Stuttgart) Date: Thu, 22 Apr 2004 13:24:48 +0200 Subject: [neutron-mc] Monochromator_flat References: <200404211001.i3LA11HU012345@ftp.risoe.dk> <37813.193.49.43.8.1082562288.squirrel@mail.ill.fr> Message-ID: <4087AB80.5D165E5@dxray.mpi-stuttgart.mpg.de> Lorenzo Ciampolini wrote: > > Hi Ulrich, > > For me too that's a bug, the first values up to 0 should be negative. I > did not search for the literature, but I know what Gauss quadrature is and > those X values should be the integration abscissae, which should be > definitely symmetrical around zero (an additional argument is used to > later offset the stuff). Hi Lorenzo! Thanks for confirming what we thought/hoped. Regards, Ulrich -- Ulrich WILDGRUBER wildgrub at dxray.mpi-stuttgart.mpg.de wwwmf.mpi-stuttgart.mpg.de/abteilungen/dosch/dosch.html ----------------------------------------------------------------------------- Max-Planck-Institut f?r Metallforschung | Technische Universit?t M?nchen Heisenbergstr. 3 | ZWE Neue Forschungs-Neutronenquelle | Instrumentierung D-70569 Stuttgart | D-85747 Garching/M?nchen Tel.: (+49)-711-689-1900 | Tel.: (+49)-89-289-14681 Fax.: (+49)-711-689-1902 | Fax.: (+49)-89-289-14666 From R.M.Dalgliesh at rl.ac.uk Tue May 4 10:20:08 2004 From: R.M.Dalgliesh at rl.ac.uk (Dalgliesh, RM (Robert) ) Date: Tue, 04 May 2004 09:20:08 +0100 Subject: [neutron-mc] scilab line length limit Message-ID: <37CAC51AC5C1D211966100A0C9ED000A04357A58@exchange07.rl.ac.uk> Has anyone else run into a problem with the length of the data line that scilab appears to be able to read in? I find that if you run with 1000 channels in a linear detector and gather enough counts that scilab issues this error when you try to run the mcstas.sci file. (1000 channels may seem a bit greedy but I am investigating a few instrument specific things that require fine wavelength resultion over a wide range.) !--error 6 inconsistent row/column dimensions at line 34 of function get_lmon1_dat called by : mc_lmon1_dat=get_lmon1_dat(); line 67 of exec file called by : line 6 of function mcload_inline called by : line 3 of function mcplot_inline called by : line 60 of function get_mcstas called by : mc_mcstas=get_mcstas(); line 97 of exec file called by : exec('mcstas.sci',-1);s=get_mcstas(); if I run fewer neutrons through the simulation everthing is ok beacuse 0 is put into the file as 0 not 0.00000e0. running the same instrument and reading into matlab is not a problem. The simple test instrument below illustrates the problem. if you run 1e4 neutrons through scilab is happy but 1e5 and it won't like it. I'm going to have a look through the scilab documentation to see if there is a limit to the length of line it can read in but just wondered if anyone else had experienced the same problem. DEFINE INSTRUMENT test() DECLARE %{ %} INITIALIZE %{ %} TRACE COMPONENT Origin = Arm() AT (0,0,0) ABSOLUTE COMPONENT source1 = Source_flat( radius = 0.1, dist = 2.0, xw = 0.1, yh = 0.1, E0 = 100.0, dE = 90.0) AT (0.0, 0.0, 0.00001) RELATIVE Origin COMPONENT lmon1 = L_monitor( nchan = 1000, filename = "lmon1.dat", xmin = -0.1, xmax = 0.1, ymin = -0.1, ymax = 0.1, Lmin = 0.0, Lmax = 10.0) AT (0.0, 0.0, 10.1) RELATIVE Origin FINALLY %{ %} /* The END token marks the instrument definition end */ END From peter.willendrup at risoe.dk Tue May 4 10:57:24 2004 From: peter.willendrup at risoe.dk (Peter Willendrup) Date: Tue, 04 May 2004 10:57:24 +0200 (CEST) Subject: [neutron-mc] scilab line length limit In-Reply-To: <37CAC51AC5C1D211966100A0C9ED000A04357A58@exchange07.rl.ac.uk> Message-ID: Hi Robert, On Tue, 4 May 2004, Dalgliesh, RM (Robert) wrote: > The simple test instrument below illustrates the problem. if you run 1e4 > neutrons through scilab is happy but 1e5 and it won't like it. > I'm going to have a look through the scilab documentation to see if there is > a limit to the length of line it can read in but just wondered if anyone > else had experienced the same problem. I reproduce your findings.... - And your point about a maximum line length might just be the cause for this... I am away most of this week, but will have a good look at this early next week. Thanks, Peter -- ------------------------------------- Peter Kjaer Willendrup, Cand. Scient Phone: (+45) 46 77 58 62 email: peter.willendrup at risoe.dk ------------------------------------- From farhi at ill.fr Tue May 4 11:22:47 2004 From: farhi at ill.fr (Emmanuel Farhi) Date: Tue, 04 May 2004 11:22:47 +0200 Subject: [neutron-mc] scilab line length limit References: <37CAC51AC5C1D211966100A0C9ED000A04357A58@exchange07.rl.ac.uk> Message-ID: <409760E7.D64993D3@ill.fr> Hy Robert and neutron-mc users, that's right, I think the buffer line in Scilab is limited, as well as the 'sack' for user variables. This stack is automatically inreased by McStas, but there is indeed an intrinsic limit in Scilab for the size of the data and length of lines in files. The only solution to this 'known bug' is to limit the size of monitors toreasonable values. Emmanuel. "Dalgliesh, RM (Robert)" wrote: > Has anyone else run into a problem with the length of the data line that > scilab appears to be able to read in? > I find that if you run with 1000 channels in a linear detector and gather > enough counts that scilab issues this error when you try to run the > mcstas.sci file. > (1000 channels may seem a bit greedy but I am investigating a few instrument > specific things that require fine wavelength resultion over a wide range.) > > !--error 6 > inconsistent row/column dimensions > at line 34 of function get_lmon1_dat called by : > mc_lmon1_dat=get_lmon1_dat(); > line 67 of exec file called by : > > line 6 of function mcload_inline called by : > line 3 of function mcplot_inline called by : > line 60 of function get_mcstas called by : > mc_mcstas=get_mcstas(); > line 97 of exec file called by : > exec('mcstas.sci',-1);s=get_mcstas(); > > if I run fewer neutrons through the simulation everthing is ok beacuse 0 is > put into the file as 0 not 0.00000e0. > running the same instrument and reading into matlab is not a problem. > > The simple test instrument below illustrates the problem. if you run 1e4 > neutrons through scilab is happy but 1e5 and it won't like it. > I'm going to have a look through the scilab documentation to see if there is > a limit to the length of line it can read in but just wondered if anyone > else had experienced the same problem. > > DEFINE INSTRUMENT test() > DECLARE > %{ > %} > INITIALIZE > %{ > %} > TRACE > COMPONENT Origin = Arm() > AT (0,0,0) ABSOLUTE > > COMPONENT source1 = Source_flat( > radius = 0.1, dist = 2.0, xw = 0.1, yh = 0.1, E0 = 100.0, > dE = 90.0) > AT (0.0, 0.0, 0.00001) RELATIVE Origin > > COMPONENT lmon1 = L_monitor( > nchan = 1000, filename = "lmon1.dat", xmin = -0.1, > xmax = 0.1, ymin = -0.1, ymax = 0.1, Lmin = 0.0, Lmax = 10.0) > AT (0.0, 0.0, 10.1) RELATIVE Origin > FINALLY > %{ > %} > /* The END token marks the instrument definition end */ > END > > _______________________________________________ > neutron-mc mailing list > neutron-mc at risoe.dk > http://neutron.risoe.dk/mailman/listinfo/neutron-mc -- What's up Doc ? -------------------------------------------- Emmanuel FARHI, http://www.ill.fr/Computing/people/Farhi \|/ ____ \|/ CS-Group ILL4/156, Institut Laue-Langevin (ILL) Grenoble ~@-/ oO \-@~ 6 rue J. Horowitz, BP 156, 38042 Grenoble Cedex 9,France /_( \__/ )_\ Work :Tel (33/0) 4 76 20 71 35. Fax (33/0) 4 76 20 76 48 \__U_/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter.willendrup at risoe.dk Tue May 11 11:15:16 2004 From: peter.willendrup at risoe.dk (Peter Willendrup) Date: Tue, 11 May 2004 11:15:16 +0200 (CEST) Subject: [neutron-mc] Test message, please ignore Message-ID: Hello everyone, To protect the email adresses of neutron-mc subscribers, the mailman mailinglist software has been upgraded. (In the web archive, email adresses now have __at__ instead of the usual at (@) sign) This is simply a test message to ensure that list is still working properly... Regards, Peter -- ------------------------------------- Peter Kjaer Willendrup, cand. scient Phone: (+45) 46 77 58 62 email: peter.willendrup at risoe.dk If your messages to me are rejected take a look at: ------------------------------------- From wildgrub at dxray.mpi-stuttgart.mpg.de Fri May 28 17:24:19 2004 From: wildgrub at dxray.mpi-stuttgart.mpg.de (Ulrich C. Wildgruber MPI fuer Metallforschung Stuttgart) Date: Fri, 28 May 2004 17:24:19 +0200 Subject: [neutron-mc] problem(?) with component monochromator_flat... Message-ID: <40B759A3.2000302@dxray.mpi-stuttgart.mpg.de> Hi everybody! I'd like to draw your attention to an instrument file (attached) were we don't understand what happens for certain input parameter sets: parameter set 1: TTM = 80.0 PHM = 40.0 E = 4.131meV (4.45A) DWERT = 3.461(A) parameter set 2: TTM = 84.0 PHM = 42.0 E = 4.131meV DWERT = 3.325 If I did Bragg's equation right we should see a reflection in both cases. However the intensity is 0 for parameter set "2". What are we doing wrong? Any advice is appreciated! Thanks Ulrich -- Ulrich WILDGRUBER wildgrub at dxray.mpi-stuttgart.mpg.de wwwmf.mpi-stuttgart.mpg.de/abteilungen/dosch/dosch.html ----------------------------------------------------------------------------- Max-Planck-Institut f?r Metallforschung | Technische Universit?t M?nchen Heisenbergstr. 3 | ZWE Neue Forschungs-Neutronenquelle | Instrumentierung D-70569 Stuttgart | D-85747 Garching/M?nchen Tel.: (+49)-711-689-1900 | Tel.: (+49)-89-289-14681 Fax.: (+49)-711-689-1902 | Fax.: (+49)-89-289-14666 -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: monotest.instr URL: From wildgrub at dxray.mpi-stuttgart.mpg.de Tue Jun 1 10:02:41 2004 From: wildgrub at dxray.mpi-stuttgart.mpg.de (Ulrich C. Wildgruber MPI fuer Metallforschung Stuttgart) Date: Tue, 01 Jun 2004 10:02:41 +0200 Subject: [neutron-mc] problem(?) with component monochromator_flat... References: <40B759A3.2000302@dxray.mpi-stuttgart.mpg.de> Message-ID: <40BC3821.5E8C04B9@dxray.mpi-stuttgart.mpg.de> "Ulrich C. Wildgruber MPI fuer Metallforschung Stuttgart" wrote: > > Hi everybody! > > I'd like to draw your attention to an instrument file (attached) were > we don't understand what happens for certain input parameter sets: > > parameter set 1: TTM = 80.0 > PHM = 40.0 > E = 4.131meV (4.45A) > DWERT = 3.461(A) > > parameter set 2: TTM = 84.0 > PHM = 42.0 > E = 4.131meV > DWERT = 3.325 > > If I did Bragg's equation right we should see a reflection in both > cases. However the intensity is 0 for parameter set "2". > What are we doing wrong? > > Any advice is appreciated! > > Thanks > > Ulrich > > -- > Ulrich WILDGRUBER > wildgrub at dxray.mpi-stuttgart.mpg.de > wwwmf.mpi-stuttgart.mpg.de/abteilungen/dosch/dosch.html > ----------------------------------------------------------------------------- > Max-Planck-Institut f?r Metallforschung | Technische Universit?t M?nchen > Heisenbergstr. 3 | ZWE Neue Forschungs-Neutronenquelle > | Instrumentierung > D-70569 Stuttgart | D-85747 Garching/M?nchen > Tel.: (+49)-711-689-1900 | Tel.: (+49)-89-289-14681 > Fax.: (+49)-711-689-1902 | Fax.: (+49)-89-289-14666 > > -------------------------------------------------------------------------------- > DEFINE INSTRUMENT MCRY_test(TTM, PHM, E, DWERT) > > /* test version 05/2004 */ > /* */ > > DECLARE > %{ > double dist1 = 2.5; > double dist2 = 2.5; > double beam_width = 0.05; > double beam_height = 0.05; > double mos0 = 22.6; > double ref0 = 0.7; > %} > > INITIALIZE > %{ > %} > > TRACE > > COMPONENT a1 = Arm() > AT (0,0,0) ABSOLUTE > > /* > COMPONENT source = Source_div_lambda( > width = 0.062, > height = 0.122, > hdiv = 1.0, > vdiv = 1.0, > //lambda_0 = 2.0, > lambda_0 = LAMBDA, > d_lambda = 0.1) > AT (0,0,0) RELATIVE a1 ROTATED (0,0,0) RELATIVE a1 > */ > > COMPONENT source = Source_div( > width = 0.062, > height = 0.122, > hdiv = 1.0, > vdiv = 1.0, > E0 = E, > dE = 0.1) > AT (0,0,0) RELATIVE a1 ROTATED (0,0,0) RELATIVE a1 > > /* monitoring primary beam... */ > COMPONENT sum1 = Monitor( > xmin = -0.1, xmax = 0.1, > ymin = -0.1, ymax = 0.1) > AT(0, 0, dist1+0.0171) RELATIVE a1 ROTATED (0,0,0) RELATIVE a1 > > COMPONENT psd1 = PSD_monitor( > xmin = -0.1, xmax = 0.1, > ymin = -0.1, ymax = 0.1, > nx = 41, > ny = 41, > filename = "NL1.psd") > AT(0, 0, dist1+0.0172) RELATIVE a1 ROTATED (0,0,0) RELATIVE a1 > > COMPONENT div1 = Divergence_monitor( > xmin = -0.1, xmax = 0.1, > ymin = -0.1, ymax = 0.1, > nh = 41, > nv = 41, > h_maxdiv = 2.0, > v_maxdiv = 2.0, > filename = "NL1.div") > AT(0, 0, dist1+0.0173) RELATIVE a1 ROTATED (0,0,0) RELATIVE a1 > > /* end of monitoring primary beam... */ > > /********************************************************/ > /* Monochromator */ > /********************************************************/ > /****************************************/ > /* center crystal package - position 0 */ > /****************************************/ > > COMPONENT mono0 = Arm() > AT (0, 0, dist1+0.167+0) RELATIVE a1 ROTATED (0, PHM, 0) RELATIVE a1 > > COMPONENT m0 = Monochromator_flat( > zmin = -0.011, zmax = +0.011, > ymin = -0.003, ymax = +0.003, > mosaich = mos0, > mosaicv = mos0, > r0 = ref0, > DM = DWERT) > AT (0, 0, 0) RELATIVE mono0 ROTATED (0, 0, 0) RELATIVE mono0 > > /* monitoring transmitted beam... */ > COMPONENT psd2 = PSD_monitor( > xmin = -beam_width, xmax = beam_width, > ymin = -beam_height, ymax = beam_height, > nx = 41, > ny = 41, > filename = "MatDet2.psd") > AT(0, 0, dist1+.501) RELATIVE a1 ROTATED (0,0,0) RELATIVE a1 > > COMPONENT sum2 = Monitor( > xmin = -beam_width, xmax = beam_width, > ymin = -beam_height, ymax = beam_height) > AT(0, 0, dist1+0.502) RELATIVE a1 ROTATED (0,0,0) RELATIVE a1 > /* end of monitoring transmitted beam... */ > > /* Bragg reflected beam along a2 */ > COMPONENT a2 = Arm() > AT (0, 0, 0) RELATIVE mono0 ROTATED (0, TTM, 0) RELATIVE a1 > > /* monitoring Brag reflected beam... */ > COMPONENT psd3 = PSD_monitor( > xmin = -beam_width, xmax = beam_width, > ymin = -beam_height, ymax = beam_height, > nx = 41, > ny = 41, > filename = "MatDet3.psd") > AT(0, 0, dist2+0.001) RELATIVE a2 ROTATED (0,0,0) RELATIVE a2 > > COMPONENT sum3 = Monitor( > xmin = -beam_width, xmax = beam_width, > ymin = -beam_height, ymax = beam_height) > AT(0, 0, dist2+0.002) RELATIVE a2 ROTATED (0,0,0) RELATIVE a2 > > COMPONENT div3 = Divergence_monitor( > xmin = -beam_width, xmax = beam_width, > ymin = -beam_height, ymax = beam_height, > nh = 41, > nv = 41, > h_maxdiv = 2.0, > v_maxdiv = 2.0, > filename = "MatDet3.div") > AT(0, 0, dist2+0.004) RELATIVE a2 ROTATED (0,0,0) RELATIVE a2 > /* end of monitoring Bragg reflected beam... */ > > END > > -------------------------------------------------------------------------------- > _______________________________________________ > neutron-mc mailing list > neutron-mc at risoe.dk > http://neutron.risoe.dk/mailman/listinfo/neutron-mc Hi again! Sorry for bothering everybody with my little problem on Friday. I was not aware of the fact that my components 'psd2' and 'sum2' which were supposed to monitor the beam transmitted through the monochromator caused the strange behaviour. Do I need to learn how to use 'groups' to avoid this effect? Thanks for reading my mail and for suggestions... I am assuming there is no simple fix to teach McStas to respond in a more 'natural' way... Thanks! Uli -- Ulrich WILDGRUBER wildgrub at dxray.mpi-stuttgart.mpg.de wwwmf.mpi-stuttgart.mpg.de/abteilungen/dosch/dosch.html ----------------------------------------------------------------------------- Max-Planck-Institut f?r Metallforschung | Technische Universit?t M?nchen Heisenbergstr. 3 | ZWE Neue Forschungs-Neutronenquelle | Instrumentierung D-70569 Stuttgart | D-85747 Garching/M?nchen Tel.: (+49)-711-689-1900 | Tel.: (+49)-89-289-14681 Fax.: (+49)-711-689-1902 | Fax.: (+49)-89-289-14666 From farhi at ill.fr Tue Jun 1 10:35:42 2004 From: farhi at ill.fr (Emmanuel Farhi) Date: Tue, 01 Jun 2004 10:35:42 +0200 Subject: [neutron-mc] problem(?) with component monochromator_flat... References: <40B759A3.2000302@dxray.mpi-stuttgart.mpg.de> <40BC3821.5E8C04B9@dxray.mpi-stuttgart.mpg.de> Message-ID: <40BC3FDD.72813E80@ill.fr> Hi Ulrich, You are right, you may use groups in order to catch the neutrons that do not follow the 'right' way, or an other solution is to use the Monitor_nD with "parallel" word in the option string parameter (this does about the same job as GROUP but only for monitors...). Emmanuel. "Ulrich C. Wildgruber MPI fuer Metallforschung Stuttgart" wrote: > "Ulrich C. Wildgruber MPI fuer Metallforschung Stuttgart" wrote: > > > > Hi everybody! > > > > I'd like to draw your attention to an instrument file (attached) were > > we don't understand what happens for certain input parameter sets: > > > > parameter set 1: TTM = 80.0 > > PHM = 40.0 > > E = 4.131meV (4.45A) > > DWERT = 3.461(A) > > > > parameter set 2: TTM = 84.0 > > PHM = 42.0 > > E = 4.131meV > > DWERT = 3.325 > > > > If I did Bragg's equation right we should see a reflection in both > > cases. However the intensity is 0 for parameter set "2". > > What are we doing wrong? > > > > Any advice is appreciated! > > > > Thanks > > > > Ulrich > > > > -- > > Ulrich WILDGRUBER > > wildgrub at dxray.mpi-stuttgart.mpg.de > > wwwmf.mpi-stuttgart.mpg.de/abteilungen/dosch/dosch.html > > ----------------------------------------------------------------------------- > > Max-Planck-Institut f?r Metallforschung | Technische Universit?t M?nchen > > Heisenbergstr. 3 | ZWE Neue Forschungs-Neutronenquelle > > | Instrumentierung > > D-70569 Stuttgart | D-85747 Garching/M?nchen > > Tel.: (+49)-711-689-1900 | Tel.: (+49)-89-289-14681 > > Fax.: (+49)-711-689-1902 | Fax.: (+49)-89-289-14666 > > > > -------------------------------------------------------------------------------- > > DEFINE INSTRUMENT MCRY_test(TTM, PHM, E, DWERT) > > > > /* test version 05/2004 */ > > /* */ > > > > DECLARE > > %{ > > double dist1 = 2.5; > > double dist2 = 2.5; > > double beam_width = 0.05; > > double beam_height = 0.05; > > double mos0 = 22.6; > > double ref0 = 0.7; > > %} > > > > INITIALIZE > > %{ > > %} > > > > TRACE > > > > COMPONENT a1 = Arm() > > AT (0,0,0) ABSOLUTE > > > > /* > > COMPONENT source = Source_div_lambda( > > width = 0.062, > > height = 0.122, > > hdiv = 1.0, > > vdiv = 1.0, > > //lambda_0 = 2.0, > > lambda_0 = LAMBDA, > > d_lambda = 0.1) > > AT (0,0,0) RELATIVE a1 ROTATED (0,0,0) RELATIVE a1 > > */ > > > > COMPONENT source = Source_div( > > width = 0.062, > > height = 0.122, > > hdiv = 1.0, > > vdiv = 1.0, > > E0 = E, > > dE = 0.1) > > AT (0,0,0) RELATIVE a1 ROTATED (0,0,0) RELATIVE a1 > > > > /* monitoring primary beam... */ > > COMPONENT sum1 = Monitor( > > xmin = -0.1, xmax = 0.1, > > ymin = -0.1, ymax = 0.1) > > AT(0, 0, dist1+0.0171) RELATIVE a1 ROTATED (0,0,0) RELATIVE a1 > > > > COMPONENT psd1 = PSD_monitor( > > xmin = -0.1, xmax = 0.1, > > ymin = -0.1, ymax = 0.1, > > nx = 41, > > ny = 41, > > filename = "NL1.psd") > > AT(0, 0, dist1+0.0172) RELATIVE a1 ROTATED (0,0,0) RELATIVE a1 > > > > COMPONENT div1 = Divergence_monitor( > > xmin = -0.1, xmax = 0.1, > > ymin = -0.1, ymax = 0.1, > > nh = 41, > > nv = 41, > > h_maxdiv = 2.0, > > v_maxdiv = 2.0, > > filename = "NL1.div") > > AT(0, 0, dist1+0.0173) RELATIVE a1 ROTATED (0,0,0) RELATIVE a1 > > > > /* end of monitoring primary beam... */ > > > > /********************************************************/ > > /* Monochromator */ > > /********************************************************/ > > /****************************************/ > > /* center crystal package - position 0 */ > > /****************************************/ > > > > COMPONENT mono0 = Arm() > > AT (0, 0, dist1+0.167+0) RELATIVE a1 ROTATED (0, PHM, 0) RELATIVE a1 > > > > COMPONENT m0 = Monochromator_flat( > > zmin = -0.011, zmax = +0.011, > > ymin = -0.003, ymax = +0.003, > > mosaich = mos0, > > mosaicv = mos0, > > r0 = ref0, > > DM = DWERT) > > AT (0, 0, 0) RELATIVE mono0 ROTATED (0, 0, 0) RELATIVE mono0 > > > > /* monitoring transmitted beam... */ > > COMPONENT psd2 = PSD_monitor( > > xmin = -beam_width, xmax = beam_width, > > ymin = -beam_height, ymax = beam_height, > > nx = 41, > > ny = 41, > > filename = "MatDet2.psd") > > AT(0, 0, dist1+.501) RELATIVE a1 ROTATED (0,0,0) RELATIVE a1 > > > > COMPONENT sum2 = Monitor( > > xmin = -beam_width, xmax = beam_width, > > ymin = -beam_height, ymax = beam_height) > > AT(0, 0, dist1+0.502) RELATIVE a1 ROTATED (0,0,0) RELATIVE a1 > > /* end of monitoring transmitted beam... */ > > > > /* Bragg reflected beam along a2 */ > > COMPONENT a2 = Arm() > > AT (0, 0, 0) RELATIVE mono0 ROTATED (0, TTM, 0) RELATIVE a1 > > > > /* monitoring Brag reflected beam... */ > > COMPONENT psd3 = PSD_monitor( > > xmin = -beam_width, xmax = beam_width, > > ymin = -beam_height, ymax = beam_height, > > nx = 41, > > ny = 41, > > filename = "MatDet3.psd") > > AT(0, 0, dist2+0.001) RELATIVE a2 ROTATED (0,0,0) RELATIVE a2 > > > > COMPONENT sum3 = Monitor( > > xmin = -beam_width, xmax = beam_width, > > ymin = -beam_height, ymax = beam_height) > > AT(0, 0, dist2+0.002) RELATIVE a2 ROTATED (0,0,0) RELATIVE a2 > > > > COMPONENT div3 = Divergence_monitor( > > xmin = -beam_width, xmax = beam_width, > > ymin = -beam_height, ymax = beam_height, > > nh = 41, > > nv = 41, > > h_maxdiv = 2.0, > > v_maxdiv = 2.0, > > filename = "MatDet3.div") > > AT(0, 0, dist2+0.004) RELATIVE a2 ROTATED (0,0,0) RELATIVE a2 > > /* end of monitoring Bragg reflected beam... */ > > > > END > > > > -------------------------------------------------------------------------------- > > _______________________________________________ > > neutron-mc mailing list > > neutron-mc at risoe.dk > > http://neutron.risoe.dk/mailman/listinfo/neutron-mc > > Hi again! > > Sorry for bothering everybody with my little problem on Friday. > I was not aware of the fact that my components 'psd2' and 'sum2' > which were supposed to monitor the beam transmitted through the > monochromator caused the strange behaviour. > Do I need to learn how to use 'groups' to avoid this effect? > Thanks for reading my mail and for suggestions... > I am assuming there is no simple fix to teach > McStas to respond in a more 'natural' way... > > Thanks! > > Uli > -- > Ulrich WILDGRUBER > wildgrub at dxray.mpi-stuttgart.mpg.de > wwwmf.mpi-stuttgart.mpg.de/abteilungen/dosch/dosch.html > ----------------------------------------------------------------------------- > Max-Planck-Institut f?r Metallforschung | Technische Universit?t M?nchen > Heisenbergstr. 3 | ZWE Neue Forschungs-Neutronenquelle > | Instrumentierung > D-70569 Stuttgart | D-85747 Garching/M?nchen > Tel.: (+49)-711-689-1900 | Tel.: (+49)-89-289-14681 > Fax.: (+49)-711-689-1902 | Fax.: (+49)-89-289-14666 > > _______________________________________________ > neutron-mc mailing list > neutron-mc at risoe.dk > http://neutron.risoe.dk/mailman/listinfo/neutron-mc -- What's up Doc ? -------------------------------------------- Emmanuel FARHI, http://www.ill.fr/Computing/people/Farhi \|/ ____ \|/ CS-Group ILL4/156, Institut Laue-Langevin (ILL) Grenoble ~@-/ oO \-@~ 6 rue J. Horowitz, BP 156, 38042 Grenoble Cedex 9,France /_( \__/ )_\ Work :Tel (33/0) 4 76 20 71 35. Fax (33/0) 4 76 20 76 48 \__U_/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter.willendrup at risoe.dk Tue Jun 1 13:09:09 2004 From: peter.willendrup at risoe.dk (Peter Willendrup) Date: Tue, 01 Jun 2004 13:09:09 +0200 (CEST) Subject: [neutron-mc] Monochromator_flat In-Reply-To: <37813.193.49.43.8.1082562288.squirrel@mail.ill.fr> Message-ID: Hi everyone, On Wed, 21 Apr 2004, Lorenzo Ciampolini wrote: > For me too that's a bug, the first values up to 0 should be negative. I > did not search for the literature, but I know what Gauss quadrature is and > those X values should be the integration abscissae, which should be > definitely symmetrical around zero (an additional argument is used to > later offset the stuff). I have now checked the reference mentioned in the code, and you are (ofcourse) completely right, Lorenzo! As you also mention, the bug is effectless. To avoid any future problems, the bug has been fixed in the development sources. Thanks for to Ulrich for pointing out the possible problem. Regards, Peter -- ------------------------------------- Peter Kjaer Willendrup, Cand. Scient Phone: (+45) 46 77 58 62 email: peter.willendrup at risoe.dk ------------------------------------- From Timur.Elzhov at jinr.ru Fri Jun 18 18:08:28 2004 From: Timur.Elzhov at jinr.ru (Timur Elzhov) Date: Fri, 18 Jun 2004 16:08:28 -0000 Subject: [neutron-mc] Not-vacuum neutron guide Message-ID: <20040618160825.GA17201@nf034.jinr.ru> Hello, dear McStas experts. I was asked is it possible to compute not-vacuum (say, filled with argon or air) neutron guide in McStas? Thanks. -- WBR, Timur. From Timur.Elzhov at jinr.ru Fri Jun 25 18:08:25 2004 From: Timur.Elzhov at jinr.ru (Timur Elzhov) Date: Fri, 25 Jun 2004 16:08:25 -0000 Subject: [neutron-mc] Propagation in neutron guide Message-ID: <20040625160758.GA1421@nf034.jinr.ru> Dear McStas experts, I noticed, that in "source" components the neutron weight is multiplicated by 1/r^2 factor. That's clear -- that's reverse square law for isotropic radiation. But I do not see this multiplier on neutron propagation in the guides. I looked through macro PROP_Z0 as well as PROP_DT(), but found nothing about 1/r^2. Why? Regards, Timur V. Elzhov