From peter.willendrup at risoe.dk Mon Sep 8 10:34:23 2008 From: peter.willendrup at risoe.dk (Peter Willendrup) Date: Mon, 08 Sep 2008 10:34:23 +0200 Subject: [mcstas-users] Trace (3D view) in McStas Version 1.12 In-Reply-To: References: <20080828100002.90FCB953DF7@eagle.zigzak.net> Message-ID: <61B46E67-02ED-4F59-979E-7FAA99D7A1B8@risoe.dk> Hello everyone, The problem reported by Shu Yan Zhang at ISIS regarding Matlab and Win32 has been reproduced and fixed. If you want to successfully run McStas 1.12 with Matlab on Win32, please replace your c:\mcstas\bin\mcdisplay.pl with the one downloadable from http://cvs.mcstas.org/cgi-bin/viewcvs.cgi/mcstas/mcdisplay.pl?revision=1.70&root=McStasStable&view=markup An update release of McStas 1.12 will be released during fall 2008, including this and other fixes. Regards, Peter Willendrup -- ------------------------------------------------------------------- Peter Willendrup - Udviklingsingeni?r RIS? DTU Afdelingen for Materialeforskning Frederiksborgvej 399 DK-4000 Roskilde Tlf.: 4677 5862 Mobil.: 2125 4612 ------------------------------------------------------------------- On 28/08/2008, at 12.47, Zhang, SY (Shu Yan) wrote: >> My PC has Windows XP (I used McStas-1.12-i686-Win32.exe to install = >> McStas). When I use McStas Version 1.12 to simulate Trace (3D >> view) = >> and plot the result with Matlab, Matlab seems able to display the = >> setup, but when I click =91Unlock=92, nothing happens. >> >> Currently I have uninstalled the new version of McStas and used = >> McStas version 1.9. I don=92t have problem simulating Trace using = >> Version 1.9. What do you think the problem could be using the = >> Version 1.12? _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users From peter.willendrup at risoe.dk Thu Aug 28 10:46:36 2008 From: peter.willendrup at risoe.dk (Peter Willendrup) Date: Thu, 28 Aug 2008 10:46:36 +0200 Subject: [mcstas-users] Trace (3D view) in McStas Version 1.12 In-Reply-To: References: Message-ID: Hello Shu Yan, On 27/08/2008, at 16.59, Zhang, SY (Shu Yan) wrote: > My PC has Windows XP (I used McStas-1.12-i686-Win32.exe to install > McStas). When I use McStas Version 1.12 to simulate Trace (3D view) > and plot the result with Matlab, Matlab seems able to display the > setup, but when I click ?Unlock?, nothing happens. > > Currently I have uninstalled the new version of McStas and used > McStas version 1.9. I don?t have problem simulating Trace using > Version 1.9. What do you think the problem could be using the > Version 1.12? > > I will try to see if I can reproduce your problem on an XP here. Which Matlab version are you running? Another option is to try to use PGPLOT which is distributed with McStas as of version 1.11. Regards, Peter Willendrup -- ------------------------------------------------------------------- Peter Willendrup - Udviklingsingeni?r RIS? DTU Afdelingen for Materialeforskning Frederiksborgvej 399 DK-4000 Roskilde Tlf.: +45 4677 5862 Mobil.: +45 2125 4612 ------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users From S.Y.Zhang at rl.ac.uk Wed Aug 27 16:59:17 2008 From: S.Y.Zhang at rl.ac.uk (Zhang, SY (Shu Yan)) Date: Wed, 27 Aug 2008 15:59:17 +0100 Subject: [mcstas-users] Trace (3D view) in McStas Version 1.12 Message-ID: Hi My PC has Windows XP (I used McStas-1.12-i686-Win32.exe to install McStas). When I use McStas Version 1.12 to simulate Trace (3D view) and plot the result with Matlab, Matlab seems able to display the setup, but when I click 'Unlock', nothing happens. Currently I have uninstalled the new version of McStas and used McStas version 1.9. I don't have problem simulating Trace using Version 1.9. What do you think the problem could be using the Version 1.12? Many thanks, Shu Yan -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users From percival at physics.queensu.ca Sun Jul 27 18:05:30 2008 From: percival at physics.queensu.ca (Aaron M. Percival) Date: Sun, 27 Jul 2008 12:05:30 -0400 Subject: [mcstas-users] Too low I and N on detector In-Reply-To: <2004983.872471216897023613.JavaMail.coremail@bj126app38.126.com> References: <2004983.872471216897023613.JavaMail.coremail@bj126app38.126.com> Message-ID: <816e49cc0807270905l4e10eba9x4ee3ced648bf76cc@mail.gmail.com> Hi Tom, Upon a quick review of your instrument file, I have the following suggestions to improve efficiency: In such an instrument that involves a long pre-sample guide, I would suggest using the virtual_input/virtual_output component (see documentation). Insert a virtual_input after the PSDafterSlit_before component. Run a simulation such that a statistically appropriate distribution of neutrons is observed on this detector. Create a new instrument, starting from the Sample component, using the virtual_output as a source. The repeat parameter the virtual_output should then be used to set the number of neutron histories to simulation (do not let ncount be the limiting factor or relative intensities will not be correct). Append the SPLIT keyword (something like SPLIT 10 COMPONENT Sample=...) to your Sample component (see documentation). Using the dphi parameter of the PowderN component to limit vertical scattering to an appropriate range. Your source focusing seems a little strange. You have as a default dist = 2. Try focusing to the M2Exit slit, which would give dist =4.049 and make xw and yh slightly larger than the dimensions of this slit (use your own discretion). You might even try focusing to the end of the collimator1 component. Just be sure that xw and yh are not limiting factors to divergence or neutron distribution. I'm also curious to know what your ncount was for this simulation. My feeling would be that with your current setup, you'd probably need an ncount of around 1e11 to get a sufficient signal into your final detector. I would stress that you use virtual_input and virtual_output to split this simulation into two parts. This will greatly help your efficiency, especially if you will be detecting more than one diffraction peak from your sample. The logic is that since your pre-sample guide and collimation will probably be static, there is no need to continuously simulate this part of the instrument. If you build a data file with sufficient neutron histories at the slit_before component, then you can simply repeat this set of histories to build enough statistics on your final detector. The SPLIT 10 appended to the sample component will also increase your efficiency by ~10x. Should you have further questions, feel free to ask, as I have extensive experience simulating this type of two-axis instrument. Cheers, Aaron 2008/7/24 wokaoyan1981 > Hello colleagues, > > I've set up a residual stress instrument.The simulation result > suggests(Neutron count=109): Neutrons after Fe(211) diffraction are I > I_err N=[29927.1 31233.5 3];And neutrons reaching the detector through > aperture are I I_err N=[0 0 0]. Both I and N are too low. > I raised horizontal divergences of the first and second collimator but I > and N remain too low. What should I do in order to get high I and N on > detector? > > Here is the code: > > /******************************************************************************* > * McStas instrument definition URL=http://www.mcstas.org > * > * Instrument: residual stress instrument > * > * %Identification > * Written by: Tom > * Date:10 Jan 2008 > * Origin: institute > * Release: McStas 1.6 > * Version: 0.2 > * %INSTRUMENT_SITE:thesis > * > * residual stress instrument > * > * %Description > * try to optimize parameters of residual stress instrument. default > geometry is > * from blueprints of residual stress instruments at > CARR,FRM-II(Germany),E3* (Germany) * and SALSA(France) > * Example: mcrun residual_stress.instr > * > * %Parameters > * dist: [m] focusing distance from source to SlitIn > * GapM2_G: [m] distance between M2Exit and guide entrance > * xw: [m] width of neutron guide entrance > * yh: [m] height of neutron guide entrance > * l: [m] length of straight neutron guide > * m: [1] m-value of material1.5~3 > * CH1: ['] horizontal divergence of the first collimator > * len_C1 [m] length of the first collimator > * L1: [m] distance between exit of first collimator and > * monochromator?0.01~0.3m > * A1: [deg] rotation of mono > * DM: [Angs] d-spacing of monochromator > * NH: [columns] number of slabs horizontal > * NV: [rows] number of slabs vertical > * mosaich? ['] Horisontal mosaic FWHM > * mosaicv: ['] Vertical mosaic FWHM > * RV: [m] Monochromator vertical curvature, 0 for flat, -1 for > automatic > * setting(then RV=2*L2*sin(DEG2RAD*A1) ) > * RH: [m] Monochromator horizontal curvature, 0 for flat, -1 for > automatic > * setting(then RH = 2*L2/sin(DEG2RAD*A1)) > * L2: [m] distance between monochromator and sample,1.9~2.2 > * CH2: ['] horizontal divergence of the second collimator > * DS: [Angs] d-spacing of sample:default Fe(hkl) > * L3: [m] distance between sample and detector > * %Link > * A reference/HTML link for more information > * > * %End > > *******************************************************************************/ > /* Change name of instrument and input parameters with default values */ > DEFINE INSTRUMENT residual_stress( > dist=2, GapM2_G=0, xw=0.06, yh=0.11, l=6, m=2, CH1=10, > L1=0.3, A1=45, DM=1.0886, len_C1=0.6, NH=1, NV=15, > mosaich=30,mosaicv=30, > RV=-1, RH=0, L2=1.9,CH2=30,DS=1.1782,L3=1.0) > /* The DECLARE section allows us to declare variables or small */ > /* functions in C syntax. These may be used in the whole instrument. */ > > DECLARE > %{ > double M2Exit_mono; /* distance between M2Exit and monochromator */ > double lambda; /*wavelength after diffraction*/ > double monow; /*width of mono*/ > double A2; /*half of sample take off angle*/ > %} > > /* The INITIALIZE section is executed when the simulation starts */ > /* (C code). You may use them as component parameter values. */ > INITIALIZE > %{ > M2Exit_mono=GapM2_G+l+len_C1+L1; > lambda=2*DM*sin(DEG2RAD*A1); > if (RV<0) RV=2*L2*sin(DEG2RAD*A1); > if (RH<0) RH = 2*L2/sin(DEG2RAD*A1); > monow=xw/sin(DEG2RAD*A1); > A2=asin(lambda/(2*DS))*RAD2DEG; > printf("\nlambda=%f\tRV=%f\tRH=%f\tmonow=%f\tA2=%f\n",lambda,RV,RH,monow,A2); > > %} > > /* Here comes the TRACE section, where the actual */ > /* instrument is defined as a sequence of components. */ > TRACE > /* Progress_bar is an Arm displaying simulation progress.*/ > COMPONENT Origin = Progress_bar() > AT (0,0,0) ABSOLUTE > > /********************* neutron source********************************/ > COMPONENT Source = Source_Maxwell_3( > height = 0.75, width =0.52988 , > l_low =0.2,l_high =7, > dist = dist, > xw = 0.06, yh = 0.11, > T1 = 320,I1 =9.87E12) > AT (0, 0, 0) RELATIVE Origin > > /************channel(Al and Fe) inside reactor, length:4.049m**********/ > COMPONENT SlitIn = Slit( > width = 0.06, height = 0.11) > AT (0, 0, 0 ) RELATIVE Source > > COMPONENT M2Exit = Slit( > width = 0.06, height = 0.11) > AT (0, 0, 4.049 ) RELATIVE SlitIn > > > /*************************straight_guide*******************/ > COMPONENT straight_guide = Guide( > w1 = xw, h1 = yh, w2 = xw, h2 = yh, l =l, m = m) > AT (0, 0, GapM2_G) RELATIVE M2Exit > > > /**************************first collimator**************************/ > COMPONENT collimator1 = Collimator_linear( > xmin = -xw/2, xmax = xw/2, ymin = -yh/2, ymax = yh/2, > len = len_C1, divergence = CH1) > AT (0, 0, l) RELATIVE straight_guide > > > /*************************mono_craddle***************************/ > COMPONENT mono_craddle = Arm( > ) > AT (0, 0, M2Exit_mono) RELATIVE M2Exit > ROTATED (0, A1, 0) RELATIVE Origin > > /***************************monochromator > Ge(511)****************************/ > COMPONENT monochromator = Monochromator_curved( > width=monow, height=0.15, NH=NH, NV=NV,reflect = "0", transmit = "0", > gap = 0.0005, mosaich = mosaich, mosaicv = mosaicv, r0 = 0.7, > t0 = 1.0, RV = RV, RH = RH, DM = DM) > AT (0, 0, 0) RELATIVE mono_craddle > > /*********************mono_out*******************/ > COMPONENT mono_out = Arm( > ) > AT (0, 0, 0) RELATIVE mono_craddle > ROTATED (0, 2*A1, 0) RELATIVE Origin > > /********************detectors before second > collimator**************************/ > COMPONENT LDbeforeC2 = L_monitor( > nchan = 200, filename = "LDbeforeC2", xwidth = 0.15, > yheight = 0.15, Lmin = 0, Lmax = lambda+0.1) > AT (0, 0, 0.8) RELATIVE mono_out > > COMPONENT PSDbeforeC2 = PSD_monitor( > filename = "PSDbeforeC2", xwidth = 0.15, yheight = 0.15) > AT (0, 0, 0.8) RELATIVE mono_out > > /***********************second collimator***************************/ > COMPONENT collimator2 = Collimator_linear( > xmin = -xw/2, xmax = xw/2, ymin = -yh/2, ymax = yh/2, len = 0.4, > divergence = CH2) > AT (0, 0, 0.8) RELATIVE mono_out > > /**********************detector after second > collimator********************/ > COMPONENT PSDafterC2 = PSD_monitor( > filename = "PSDafterC2", xwidth = 0.06, yheight = 0.11) > AT (0, 0, 0.4) RELATIVE collimator2 > > > /**********************aperture before sample*************************/ > COMPONENT slit_before = Slit( > width = 0.008, height = 0.008) > AT (0, 0, 1.88) RELATIVE mono_out > > /**********************detector behind Slit_before***********************/ > COMPONENT PSDafterSlit_before = PSD_monitor( > filename = "PSDafterSlit_before", xwidth = 0.01, yheight = 0.01) > AT (0, 0, 0.01) RELATIVE slit_before > > > /************************Fe(221) sample****************************/ > COMPONENT Sample = PowderN( > reflections = "Fe.laz", radius = 0.004, yheight = 0.8) > AT (0, 0, L2) RELATIVE mono_out > EXTEND > %{ > if(!SCATTERED) ABSORB; /*perfect beamstop*/ > %} > > /************************sample_out************************/ > COMPONENT sample_out = Arm( > ) > AT (0, 0, 0) RELATIVE Sample > ROTATED (0, -2*A2, 0) RELATIVE Sample > > /************************detector before slit_after********************/ > COMPONENT PSDbeforeSlit_after = PSD_monitor( > filename = "PSDbeforeSlit_after", xwidth = 0.008, > yheight = 0.050) > AT (0, 0, 0.01) RELATIVE sample_out > > /************************aperture after sample***************************/ > COMPONENT slit_after = Slit( > width = 0.008, height = 0.050) > AT (0, 0, 0.02) RELATIVE sample_out > > /************************detector*********************************/ > COMPONENT PSDafterSample = PSDlin_monitor( > nx = 200, filename = "PSDafterSample", xwidth = 0.2, > yheight = 0.2) > AT (0, 0, L3) RELATIVE sample_out > > > /* This section is executed when the simulation ends (C code). Other */ > /* optional sections are : SAVE */ > FINALLY > %{ > %} > /* The END token marks the instrument definition end */ > END > > Regards, > Tom > > > > > > > > > ------------------------------ > ?????vip???? > ?????????????! > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users > > -- ************************************************* Aaron M. Percival M.Sc. Candidate Dept. of Physics, Engineering Physics & Astronomy Queen's University Kingston, Ontario, Canada, K7L 3N6 Office: 613-533-6000 ext. 74789 Fax: 613-533-6463 ************************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users From wokaoyan1981 at 126.com Thu Jul 24 12:57:03 2008 From: wokaoyan1981 at 126.com (wokaoyan1981) Date: Thu, 24 Jul 2008 18:57:03 +0800 (CST) Subject: [mcstas-users] Too low I and N on detector Message-ID: <2004983.872471216897023613.JavaMail.coremail@bj126app38.126.com> Hello colleagues, I've set up a residual stress instrument.The simulation result suggests(Neutron count=109): Neutrons after Fe(211) diffraction are I I_err N=[29927.1 31233.5 3];And neutrons reaching the detector through aperture are I I_err N=[0 0 0]. Both I and N are too low. I raised horizontal divergences of the first and second collimator but I and N remain too low. What should I do in order to get high I and N on detector? Here is the code: /******************************************************************************* * McStas instrument definition URL=http://www.mcstas.org * * Instrument: residual stress instrument * * %Identification * Written by: Tom * Date:10 Jan 2008 * Origin: institute * Release: McStas 1.6 * Version: 0.2 * %INSTRUMENT_SITE:thesis * * residual stress instrument * * %Description * try to optimize parameters of residual stress instrument. default geometry is * from blueprints of residual stress instruments at CARR,FRM-II(Germany),E3* (Germany) * and SALSA(France) * Example: mcrun residual_stress.instr * * %Parameters * dist: [m] focusing distance from source to SlitIn * GapM2_G: [m] distance between M2Exit and guide entrance * xw: [m] width of neutron guide entrance * yh: [m] height of neutron guide entrance * l: [m] length of straight neutron guide * m: [1] m-value of material1.5~3 * CH1: ['] horizontal divergence of the first collimator * len_C1 [m] length of the first collimator * L1: [m] distance between exit of first collimator and * monochromator?0.01~0.3m * A1: [deg] rotation of mono * DM: [Angs] d-spacing of monochromator * NH: [columns] number of slabs horizontal * NV: [rows] number of slabs vertical * mosaich? ['] Horisontal mosaic FWHM * mosaicv: ['] Vertical mosaic FWHM * RV: [m] Monochromator vertical curvature, 0 for flat, -1 for automatic * setting(then RV=2*L2*sin(DEG2RAD*A1) ) * RH: [m] Monochromator horizontal curvature, 0 for flat, -1 for automatic * setting(then RH = 2*L2/sin(DEG2RAD*A1)) * L2: [m] distance between monochromator and sample,1.9~2.2 * CH2: ['] horizontal divergence of the second collimator * DS: [Angs] d-spacing of sample:default Fe(hkl) * L3: [m] distance between sample and detector * %Link * A reference/HTML link for more information * * %End *******************************************************************************/ /* Change name of instrument and input parameters with default values */ DEFINE INSTRUMENT residual_stress( dist=2, GapM2_G=0, xw=0.06, yh=0.11, l=6, m=2, CH1=10, L1=0.3, A1=45, DM=1.0886, len_C1=0.6, NH=1, NV=15, mosaich=30,mosaicv=30, RV=-1, RH=0, L2=1.9,CH2=30,DS=1.1782,L3=1.0) /* The DECLARE section allows us to declare variables or small */ /* functions in C syntax. These may be used in the whole instrument. */ DECLARE %{ double M2Exit_mono; /* distance between M2Exit and monochromator */ double lambda; /*wavelength after diffraction*/ double monow; /*width of mono*/ double A2; /*half of sample take off angle*/ %} /* The INITIALIZE section is executed when the simulation starts */ /* (C code). You may use them as component parameter values. */ INITIALIZE %{ M2Exit_mono=GapM2_G+l+len_C1+L1; lambda=2*DM*sin(DEG2RAD*A1); if (RV<0) RV=2*L2*sin(DEG2RAD*A1); if (RH<0) RH = 2*L2/sin(DEG2RAD*A1); monow=xw/sin(DEG2RAD*A1); A2=asin(lambda/(2*DS))*RAD2DEG; printf("\nlambda=%f\tRV=%f\tRH=%f\tmonow=%f\tA2=%f\n",lambda,RV,RH,monow,A2); %} /* Here comes the TRACE section, where the actual */ /* instrument is defined as a sequence of components. */ TRACE /* Progress_bar is an Arm displaying simulation progress.*/ COMPONENT Origin = Progress_bar() AT (0,0,0) ABSOLUTE /********************* neutron source********************************/ COMPONENT Source = Source_Maxwell_3( height = 0.75, width =0.52988 , l_low =0.2,l_high =7, dist = dist, xw = 0.06, yh = 0.11, T1 = 320,I1 =9.87E12) AT (0, 0, 0) RELATIVE Origin /************channel(Al and Fe) inside reactor, length:4.049m**********/ COMPONENT SlitIn = Slit( width = 0.06, height = 0.11) AT (0, 0, 0 ) RELATIVE Source COMPONENT M2Exit = Slit( width = 0.06, height = 0.11) AT (0, 0, 4.049 ) RELATIVE SlitIn /*************************straight_guide*******************/ COMPONENT straight_guide = Guide( w1 = xw, h1 = yh, w2 = xw, h2 = yh, l =l, m = m) AT (0, 0, GapM2_G) RELATIVE M2Exit /**************************first collimator**************************/ COMPONENT collimator1 = Collimator_linear( xmin = -xw/2, xmax = xw/2, ymin = -yh/2, ymax = yh/2, len = len_C1, divergence = CH1) AT (0, 0, l) RELATIVE straight_guide /*************************mono_craddle***************************/ COMPONENT mono_craddle = Arm( ) AT (0, 0, M2Exit_mono) RELATIVE M2Exit ROTATED (0, A1, 0) RELATIVE Origin /***************************monochromator Ge(511)****************************/ COMPONENT monochromator = Monochromator_curved( width=monow, height=0.15, NH=NH, NV=NV,reflect = "0", transmit = "0", gap = 0.0005, mosaich = mosaich, mosaicv = mosaicv, r0 = 0.7, t0 = 1.0, RV = RV, RH = RH, DM = DM) AT (0, 0, 0) RELATIVE mono_craddle /*********************mono_out*******************/ COMPONENT mono_out = Arm( ) AT (0, 0, 0) RELATIVE mono_craddle ROTATED (0, 2*A1, 0) RELATIVE Origin /********************detectors before second collimator**************************/ COMPONENT LDbeforeC2 = L_monitor( nchan = 200, filename = "LDbeforeC2", xwidth = 0.15, yheight = 0.15, Lmin = 0, Lmax = lambda+0.1) AT (0, 0, 0.8) RELATIVE mono_out COMPONENT PSDbeforeC2 = PSD_monitor( filename = "PSDbeforeC2", xwidth = 0.15, yheight = 0.15) AT (0, 0, 0.8) RELATIVE mono_out /***********************second collimator***************************/ COMPONENT collimator2 = Collimator_linear( xmin = -xw/2, xmax = xw/2, ymin = -yh/2, ymax = yh/2, len = 0.4, divergence = CH2) AT (0, 0, 0.8) RELATIVE mono_out /**********************detector after second collimator********************/ COMPONENT PSDafterC2 = PSD_monitor( filename = "PSDafterC2", xwidth = 0.06, yheight = 0.11) AT (0, 0, 0.4) RELATIVE collimator2 /**********************aperture before sample*************************/ COMPONENT slit_before = Slit( width = 0.008, height = 0.008) AT (0, 0, 1.88) RELATIVE mono_out /**********************detector behind Slit_before***********************/ COMPONENT PSDafterSlit_before = PSD_monitor( filename = "PSDafterSlit_before", xwidth = 0.01, yheight = 0.01) AT (0, 0, 0.01) RELATIVE slit_before /************************Fe(221) sample****************************/ COMPONENT Sample = PowderN( reflections = "Fe.laz", radius = 0.004, yheight = 0.8) AT (0, 0, L2) RELATIVE mono_out EXTEND %{ if(!SCATTERED) ABSORB; /*perfect beamstop*/ %} /************************sample_out************************/ COMPONENT sample_out = Arm( ) AT (0, 0, 0) RELATIVE Sample ROTATED (0, -2*A2, 0) RELATIVE Sample /************************detector before slit_after********************/ COMPONENT PSDbeforeSlit_after = PSD_monitor( filename = "PSDbeforeSlit_after", xwidth = 0.008, yheight = 0.050) AT (0, 0, 0.01) RELATIVE sample_out /************************aperture after sample***************************/ COMPONENT slit_after = Slit( width = 0.008, height = 0.050) AT (0, 0, 0.02) RELATIVE sample_out /************************detector*********************************/ COMPONENT PSDafterSample = PSDlin_monitor( nx = 200, filename = "PSDafterSample", xwidth = 0.2, yheight = 0.2) AT (0, 0, L3) RELATIVE sample_out /* This section is executed when the simulation ends (C code). Other */ /* optional sections are : SAVE */ FINALLY %{ %} /* The END token marks the instrument definition end */ END Regards, Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users From wokaoyan1981 at 126.com Sun Jul 27 09:49:58 2008 From: wokaoyan1981 at 126.com (wokaoyan1981) Date: Sun, 27 Jul 2008 15:49:58 +0800 (CST) Subject: [mcstas-users] Too low I and N Message-ID: <22826999.184881217144998477.JavaMail.coremail@bj126app28.126.com> Hello colleagues, I've set up a residual stress instrument.The simulation result suggests(Neutron count=109): Neutrons after Fe(211) diffraction are I I_err N=[29927.1 31233.5 3];And neutrons reaching the detector through aperture are I I_err N=[0 0 0]. Both I and N are too low. I raised horizontal divergences of the first and second collimator but I and N remain too low. What should I do in order to get high I and N on detector? Here is the code: /******************************************************************************* * McStas instrument definition URL=http://www.mcstas.org * * Instrument: residual stress instrument * * %Identification * Written by: Tom * Date:10 Jan 2008 * Origin: institute * Release: McStas 1.6 * Version: 0.2 * %INSTRUMENT_SITE:thesis * * residual stress instrument * * %Description * try to optimize parameters of residual stress instrument. default geometry is * from blueprints of residual stress instruments at CARR,FRM-II(Germany),E3* (Germany) * and SALSA(France) * Example: mcrun residual_stress.instr * * %Parameters * dist: [m] focusing distance from source to SlitIn * GapM2_G: [m] distance between M2Exit and guide entrance * xw: [m] width of neutron guide entrance * yh: [m] height of neutron guide entrance * l: [m] length of straight neutron guide * m: [1] m-value of material1.5~3 * CH1: ['] horizontal divergence of the first collimator * len_C1 [m] length of the first collimator * L1: [m] distance between exit of first collimator and * monochromator?0.01~0.3m * A1: [deg] rotation of mono * DM: [Angs] d-spacing of monochromator * NH: [columns] number of slabs horizontal * NV: [rows] number of slabs vertical * mosaich? ['] Horisontal mosaic FWHM * mosaicv: ['] Vertical mosaic FWHM * RV: [m] Monochromator vertical curvature, 0 for flat, -1 for automatic * setting(then RV=2*L2*sin(DEG2RAD*A1) ) * RH: [m] Monochromator horizontal curvature, 0 for flat, -1 for automatic * setting(then RH = 2*L2/sin(DEG2RAD*A1)) * L2: [m] distance between monochromator and sample,1.9~2.2 * CH2: ['] horizontal divergence of the second collimator * DS: [Angs] d-spacing of sample:default Fe(hkl) * L3: [m] distance between sample and detector * %Link * A reference/HTML link for more information * * %End *******************************************************************************/ /* Change name of instrument and input parameters with default values */ DEFINE INSTRUMENT residual_stress( dist=2, GapM2_G=0, xw=0.06, yh=0.11, l=6, m=2, CH1=10, L1=0.3, A1=45, DM=1.0886, len_C1=0.6, NH=1, NV=15, mosaich=30,mosaicv=30, RV=-1, RH=0, L2=1.9,CH2=30,DS=1.1782,L3=1.0) /* The DECLARE section allows us to declare variables or small */ /* functions in C syntax. These may be used in the whole instrument. */ DECLARE %{ double M2Exit_mono; /* distance between M2Exit and monochromator */ double lambda; /*wavelength after diffraction*/ double monow; /*width of mono*/ double A2; /*half of sample take off angle*/ %} /* The INITIALIZE section is executed when the simulation starts */ /* (C code). You may use them as component parameter values. */ INITIALIZE %{ M2Exit_mono=GapM2_G+l+len_C1+L1; lambda=2*DM*sin(DEG2RAD*A1); if (RV<0) RV=2*L2*sin(DEG2RAD*A1); if (RH<0) RH = 2*L2/sin(DEG2RAD*A1); monow=xw/sin(DEG2RAD*A1); A2=asin(lambda/(2*DS))*RAD2DEG; printf("\nlambda=%f\tRV=%f\tRH=%f\tmonow=%f\tA2=%f\n",lambda,RV,RH,monow,A2); %} /* Here comes the TRACE section, where the actual */ /* instrument is defined as a sequence of components. */ TRACE /* Progress_bar is an Arm displaying simulation progress.*/ COMPONENT Origin = Progress_bar() AT (0,0,0) ABSOLUTE /********************* neutron source********************************/ COMPONENT Source = Source_Maxwell_3( height = 0.75, width =0.52988 , l_low =0.2,l_high =7, dist = dist, xw = 0.06, yh = 0.11, T1 = 320,I1 =9.87E12) AT (0, 0, 0) RELATIVE Origin /************channel(Al and Fe) inside reactor, length:4.049m**********/ COMPONENT SlitIn = Slit( width = 0.06, height = 0.11) AT (0, 0, 0 ) RELATIVE Source COMPONENT M2Exit = Slit( width = 0.06, height = 0.11) AT (0, 0, 4.049 ) RELATIVE SlitIn /*************************straight_guide*******************/ COMPONENT straight_guide = Guide( w1 = xw, h1 = yh, w2 = xw, h2 = yh, l =l, m = m) AT (0, 0, GapM2_G) RELATIVE M2Exit /**************************first collimator**************************/ COMPONENT collimator1 = Collimator_linear( xmin = -xw/2, xmax = xw/2, ymin = -yh/2, ymax = yh/2, len = len_C1, divergence = CH1) AT (0, 0, l) RELATIVE straight_guide /*************************mono_craddle***************************/ COMPONENT mono_craddle = Arm( ) AT (0, 0, M2Exit_mono) RELATIVE M2Exit ROTATED (0, A1, 0) RELATIVE Origin /***************************monochromator Ge(511)****************************/ COMPONENT monochromator = Monochromator_curved( width=monow, height=0.15, NH=NH, NV=NV,reflect = "0", transmit = "0", gap = 0.0005, mosaich = mosaich, mosaicv = mosaicv, r0 = 0.7, t0 = 1.0, RV = RV, RH = RH, DM = DM) AT (0, 0, 0) RELATIVE mono_craddle /*********************mono_out*******************/ COMPONENT mono_out = Arm( ) AT (0, 0, 0) RELATIVE mono_craddle ROTATED (0, 2*A1, 0) RELATIVE Origin /********************detectors before second collimator**************************/ COMPONENT LDbeforeC2 = L_monitor( nchan = 200, filename = "LDbeforeC2", xwidth = 0.15, yheight = 0.15, Lmin = 0, Lmax = lambda+0.1) AT (0, 0, 0.8) RELATIVE mono_out COMPONENT PSDbeforeC2 = PSD_monitor( filename = "PSDbeforeC2", xwidth = 0.15, yheight = 0.15) AT (0, 0, 0.8) RELATIVE mono_out /***********************second collimator***************************/ COMPONENT collimator2 = Collimator_linear( xmin = -xw/2, xmax = xw/2, ymin = -yh/2, ymax = yh/2, len = 0.4, divergence = CH2) AT (0, 0, 0.8) RELATIVE mono_out /**********************detector after second collimator********************/ COMPONENT PSDafterC2 = PSD_monitor( filename = "PSDafterC2", xwidth = 0.06, yheight = 0.11) AT (0, 0, 0.4) RELATIVE collimator2 /**********************aperture before sample*************************/ COMPONENT slit_before = Slit( width = 0.008, height = 0.008) AT (0, 0, 1.88) RELATIVE mono_out /**********************detector behind Slit_before***********************/ COMPONENT PSDafterSlit_before = PSD_monitor( filename = "PSDafterSlit_before", xwidth = 0.01, yheight = 0.01) AT (0, 0, 0.01) RELATIVE slit_before /************************Fe(221) sample****************************/ COMPONENT Sample = PowderN( reflections = "Fe.laz", radius = 0.004, yheight = 0.8) AT (0, 0, L2) RELATIVE mono_out EXTEND %{ if(!SCATTERED) ABSORB; /*perfect beamstop*/ %} /************************sample_out************************/ COMPONENT sample_out = Arm( ) AT (0, 0, 0) RELATIVE Sample ROTATED (0, -2*A2, 0) RELATIVE Sample /************************detector before slit_after********************/ COMPONENT PSDbeforeSlit_after = PSD_monitor( filename = "PSDbeforeSlit_after", xwidth = 0.008, yheight = 0.050) AT (0, 0, 0.01) RELATIVE sample_out /************************aperture after sample***************************/ COMPONENT slit_after = Slit( width = 0.008, height = 0.050) AT (0, 0, 0.02) RELATIVE sample_out /************************detector*********************************/ COMPONENT PSDafterSample = PSDlin_monitor( nx = 200, filename = "PSDafterSample", xwidth = 0.2, yheight = 0.2) AT (0, 0, L3) RELATIVE sample_out /* This section is executed when the simulation ends (C code). Other */ /* optional sections are : SAVE */ FINALLY %{ %} /* The END token marks the instrument definition end */ END Regards, Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users From linda.udby at risoe.dk Tue Aug 19 11:14:16 2008 From: linda.udby at risoe.dk (Linda Udby) Date: Tue, 19 Aug 2008 11:14:16 +0200 (CEST) Subject: [mcstas-users] Res_monitor problem In-Reply-To: <44091.192.168.160.57.1218188252.squirrel@mail.ill.fr> References: <44091.192.168.160.57.1218188252.squirrel@mail.ill.fr> Message-ID: Hi Lionel, sorry for the slow reply, but I have been on vacation. The res_sample is meant to be inelastic, did you put dE!=0? The res_monitor is supposed to produce a datafile from which you can generate the resolution function my the mcresplot command. regards Linda On Fri, 8 Aug 2008 gerard at ill.fr wrote: > Hello everybody, > > I'm working on Mcstas for the ILL as a practice and I don't manage to > bring the res_monitor to work, neither with res_sample nor with the > tofres_sample. I always get messages like "process stopped" or "I/O error: > success" and the simulation breaks down. Has someone a working example > with this component in use? Here everybody seems to be on holidays, so I > can't really continue. > > Thanks a lot in advance > > Lionel GERARD > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users > > > -- Phd student Linda Udby Materials Science Department RisoeNational Laboratory, of Sustainable Energy DK-4000 tel: +45 46 77 58 65 _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users From lefmann at fys.ku.dk Fri Aug 8 12:00:24 2008 From: lefmann at fys.ku.dk (Kim Lefmann) Date: Fri, 08 Aug 2008 12:00:24 +0200 (CEST) Subject: [mcstas-users] Res_monitor problem In-Reply-To: <44091.192.168.160.57.1218188252.squirrel@mail.ill.fr> References: <44091.192.168.160.57.1218188252.squirrel@mail.ill.fr> Message-ID: Hello Lionel, The Res-sample, res-monitor was written very long time ago and has not been much in use. Linda Udby has recently used it, but it seemingly gave wrong results. However, it did not break down the simulations... Could you forward the instrument file, then we can test it. best, Kim Lefmann On Fri, 8 Aug 2008, gerard at ill.fr wrote: > Hello everybody, > > I'm working on Mcstas for the ILL as a practice and I don't manage to > bring the res_monitor to work, neither with res_sample nor with the > tofres_sample. I always get messages like "process stopped" or "I/O error: > success" and the simulation breaks down. Has someone a working example > with this component in use? Here everybody seems to be on holidays, so I > can't really continue. > > Thanks a lot in advance > > Lionel GERARD > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users > _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users From gerard at ill.fr Fri Aug 8 11:37:32 2008 From: gerard at ill.fr (gerard at ill.fr) Date: Fri, 08 Aug 2008 11:37:32 +0200 (CEST) Subject: [mcstas-users] Res_monitor problem Message-ID: <44091.192.168.160.57.1218188252.squirrel@mail.ill.fr> Hello everybody, I'm working on Mcstas for the ILL as a practice and I don't manage to bring the res_monitor to work, neither with res_sample nor with the tofres_sample. I always get messages like "process stopped" or "I/O error: success" and the simulation breaks down. Has someone a working example with this component in use? Here everybody seems to be on holidays, so I can't really continue. Thanks a lot in advance Lionel GERARD _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users From S.Y.Zhang at rl.ac.uk Thu Aug 28 12:47:57 2008 From: S.Y.Zhang at rl.ac.uk (Zhang, SY (Shu Yan)) Date: Thu, 28 Aug 2008 11:47:57 +0100 Subject: [mcstas-users] RE: mcstas-users Digest, Vol 3, Issue 9 In-Reply-To: <20080828100002.90FCB953DF7@eagle.zigzak.net> References: <20080828100002.90FCB953DF7@eagle.zigzak.net> Message-ID: Dear Peter Thank you for your prompt reply. I use Matlab version 7.5.0.342 (R2007b). Thank you for your advice using PGPLOT. I will try to install the new version and use PGPLOT on another PC, and then I will let you know how it goes. Kind regards, Shu Yan -----Original Message----- From: mcstas-users-bounces at mcstas.org [mailto:mcstas-users-bounces at mcstas.org] On Behalf Of mcstas-users-request at mcstas.org Sent: 28 August 2008 11:00 To: mcstas-users at mcstas.org Subject: mcstas-users Digest, Vol 3, Issue 9 Send mcstas-users mailing list submissions to mcstas-users at mcstas.org To subscribe or unsubscribe via the World Wide Web, visit http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users or, via email, send a message with subject or body 'help' to mcstas-users-request at mcstas.org You can reach the person managing the list at mcstas-users-owner at mcstas.org When replying, please edit your Subject line so it is more specific than "Re: Contents of mcstas-users digest..." Today's Topics: 1. Trace (3D view) in McStas Version 1.12 (Zhang, SY (Shu Yan)) 2. Re: Trace (3D view) in McStas Version 1.12 (Peter Willendrup) ---------------------------------------------------------------------- Message: 1 Date: Wed, 27 Aug 2008 15:59:17 +0100 From: "Zhang, SY (Shu Yan)" Subject: [mcstas-users] Trace (3D view) in McStas Version 1.12 To: Message-ID: Content-Type: text/plain; charset="us-ascii" Hi My PC has Windows XP (I used McStas-1.12-i686-Win32.exe to install McStas). When I use McStas Version 1.12 to simulate Trace (3D view) and plot the result with Matlab, Matlab seems able to display the setup, but when I click 'Unlock', nothing happens. Currently I have uninstalled the new version of McStas and used McStas version 1.9. I don't have problem simulating Trace using Version 1.9. What do you think the problem could be using the Version 1.12? Many thanks, Shu Yan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://eagle.zigzak.net/pipermail/mcstas-users/attachments/20080827/5a14 2551/attachment.html ------------------------------ Message: 2 Date: Thu, 28 Aug 2008 10:46:36 +0200 From: Peter Willendrup Subject: Re: [mcstas-users] Trace (3D view) in McStas Version 1.12 To: "McStas users list at mcstas.org" Message-ID: Content-Type: text/plain; charset="windows-1252" Hello Shu Yan, On 27/08/2008, at 16.59, Zhang, SY (Shu Yan) wrote: > My PC has Windows XP (I used McStas-1.12-i686-Win32.exe to install = > McStas). When I use McStas Version 1.12 to simulate Trace (3D view) = > and plot the result with Matlab, Matlab seems able to display the = > setup, but when I click =91Unlock=92, nothing happens. > > Currently I have uninstalled the new version of McStas and used = > McStas version 1.9. I don=92t have problem simulating Trace using = > Version 1.9. What do you think the problem could be using the = > Version 1.12? > > I will try to see if I can reproduce your problem on an XP here. Which = Matlab version are you running? Another option is to try to use PGPLOT which is distributed with = McStas as of version 1.11. Regards, Peter Willendrup -- ------------------------------------------------------------------- Peter Willendrup - Udviklingsingeni=F8r RIS=D8 DTU Afdelingen for Materialeforskning Frederiksborgvej 399 DK-4000 Roskilde Tlf.: +45 4677 5862 Mobil.: +45 2125 4612 ------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://eagle.zigzak.net/pipermail/mcstas-users/attachments/20080828/11= f16f9f/attachment.htm ------------------------------ _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users End of mcstas-users Digest, Vol 3, Issue 9 ****************************************** _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users From peter.willendrup at risoe.dk Tue Aug 5 08:54:41 2008 From: peter.willendrup at risoe.dk (Peter Willendrup) Date: Tue, 05 Aug 2008 08:54:41 +0200 Subject: [mcstas-users] problem solved In-Reply-To: <4396122.710041217861362937.JavaMail.coremail@bj126app22.126.com> References: <9583A3F1-A5B8-4569-8EB7-118FB8B27E3F@risoe.dk> <12197506.502051217833440240.JavaMail.coremail@bj126app101.126.com> <4396122.710041217861362937.JavaMail.coremail@bj126app22.126.com> Message-ID: <36B4CE78-A742-4A81-B17A-D18BE8D2863A@risoe.dk> Hi there, On Aug 4, 2008, at 4:49 PM, wokaoyan1981 wrote: > I think the problem has been soloved. The pop-up window C:\Perl > \bin\perl.exe should't be shut down until simulation ends. > Otherwise, no monitor data is generated. I see the point, will modify the text message which can easily be misunderstood as is. Thank you. Regards, Peter _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users From wokaoyan1981 at 126.com Mon Aug 4 16:49:22 2008 From: wokaoyan1981 at 126.com (wokaoyan1981) Date: Mon, 04 Aug 2008 22:49:22 +0800 (CST) Subject: [mcstas-users] problem solved In-Reply-To: <9583A3F1-A5B8-4569-8EB7-118FB8B27E3F@risoe.dk> References: <9583A3F1-A5B8-4569-8EB7-118FB8B27E3F@risoe.dk> <12197506.502051217833440240.JavaMail.coremail@bj126app101.126.com> Message-ID: <4396122.710041217861362937.JavaMail.coremail@bj126app22.126.com> Hello Peter, I think the problem has been soloved. The pop-up window C:\Perl\bin\perl.exe should't be shut down until simulation ends. Otherwise, no monitor data is generated. In case of I2.instr downloaded, both of filenames "LDafterSource.txt" and "LDafterSource" are ok. Best regards, Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users From wokaoyan1981 at 126.com Fri Aug 8 08:00:15 2008 From: wokaoyan1981 at 126.com (wokaoyan1981) Date: Fri, 08 Aug 2008 14:00:15 +0800 (CST) Subject: [mcstas-users] Problem of Virtual-output/input Message-ID: <25007960.619001218175215800.JavaMail.coremail@bj126app38.126.com> Hello Emmanuel, Thank you for your reply.I do not use network disk. I just output to local computer. Taking notice of the neutron file "DataAfterMono_list.p.x.y.z.vx.vy.vz.t.sx.sy.sz", it approximates 1.2GB including 17417317 events (all)! Is it the reason why it takes a long time to "Virtual_input" neutron file? The codes to generate data is as the following: /******************************************************************************* * * %Parameters * dist: [m] focusing distance from source to SlitIn * GapM2_G: [m] distance between M2Exit and guide entrance * xw: [m] width of neutron guide entrance * yh: [m] height of neutron guide entrance * l: [m] length of straight neutron guide * m: [1] multiplication factor * CH1: ['] horizontal divergence of the first collimator * len_C1 [m] length of the first collimator * L1: [m] distance between first collimator exit and mono,0.01~0.3AA * lambda: [Angs] Wavelength at monochromator,value:1.2~3 * DM: [Angs] d-spacing of monochromator * NH: [columns] number of horizontal slabs * NV: [columns} number of vertical slabs * mosaich: ['] horizontal mosaics * mosaicv: ['] vertical mosaics * RV: [m] Monochromator vertical curvature, 0 for flat, -1 for automatic * setting(then RV=2*L2*sin(DEG2RAD*A1) ) * RH: [m] Monochromator horizontal curvature, 0 for flat, -1 for automatic * setting(then RH = 2*L2/sin(DEG2RAD*A1)) * L2: [m] distance between mono and sample * %Link * A reference/HTML link for more information * * %End *******************************************************************************/ /* Change name of instrument and input parameters with default values */ DEFINE INSTRUMENT residual_stress( dist=4.049, GapM2_G=0, xw=0.06, yh=0.11, l=6, m=2, CH1=10, L1=0.3, A1=30, DM=3.355, len_C1=0.6, NH=1, NV=15, mosaich=25,mosaicv=25, RV=-1, RH=0, L2=1.9) /* The DECLARE section allows us to declare variables or small */ /* functions in C syntax. These may be used in the whole instrument. */ DECLARE %{ double M2Exit_mono; /* distance between M2Exit and monochromator */ double lambda; /*wavelength after diffraction*/ double monow; /*width of mono*/ %} /* The INITIALIZE section is executed when the simulation starts */ /* (C code). You may use them as component parameter values. */ INITIALIZE %{ M2Exit_mono=GapM2_G+l+len_C1+L1; lambda=2*DM*sin(DEG2RAD*A1); if (RV<0) RV=2*L2*sin(DEG2RAD*A1); if (RH<0) RH = 2*L2/sin(DEG2RAD*A1); monow=xw/sin(DEG2RAD*A1); printf("\nlambda=%f\tRV=%f\tRH=%f\tmonow=%f\n",lambda,RV,RH,monow); %} /* Here comes the TRACE section, where the actual */ /* instrument is defined as a sequence of components. */ TRACE /* Progress_bar is an Arm displaying simulation progress.*/ COMPONENT Origin = Progress_bar() AT (0,0,0) ABSOLUTE /********************* reactor source********************************/ COMPONENT Source = Source_Maxwell_3( height = 0.11, width =0.06 , l_low =0.2,l_high =7, dist = dist, xw = 0.08, yh = 0.13, T1 = 320,I1 =9.87E12) AT (0, 0, 0) RELATIVE Origin /***********thermal channel,4.049m*110mm*60mm********/ COMPONENT SlitIn = Slit( width = 0.06, height = 0.11) AT (0, 0, 0 ) RELATIVE Source COMPONENT M2Exit = Slit( width = 0.06, height = 0.11) AT (0, 0, 4.049 ) RELATIVE SlitIn /************************straightguide*******************/ COMPONENT straight_guide = Guide( w1 = xw, h1 = yh, w2 = xw, h2 = yh, l =l, m = m) AT (0, 0, GapM2_G) RELATIVE M2Exit /**********************first collimator**********************/ COMPONENT collimator1 = Collimator_linear( xmin = -xw/2, xmax = xw/2, ymin = -yh/2, ymax = yh/2, len = len_C1, divergence = CH1) AT (0, 0, l) RELATIVE straight_guide /************************mono_craddle*************************/ COMPONENT mono_craddle = Arm( ) AT (0, 0, M2Exit_mono) RELATIVE M2Exit ROTATED (0, A1, 0) RELATIVE Origin /***************************monochromator****************************/ COMPONENT monochromator = Monochromator_curved( width=monow, height=0.13, NH=NH, NV=NV,reflect = "HOPG.rfl", transmit = "HOPG.trm", gap = 0.0005, mosaich = mosaich, mosaicv = mosaicv, r0 = 1, t0 = 1.0, RV = RV, RH = RH, DM = DM) AT (0, 0, 0) RELATIVE mono_craddle /*********************mono_out*******************/ COMPONENT mono_out = Arm( ) AT (0, 0, 0) RELATIVE mono_craddle ROTATED (0, +2*A1, 0) RELATIVE Origin /******************psd_after_mono********************/ COMPONENT psd_after_mono = PSD_monitor( nx = 90, ny =90, filename = "psd_after_mono ", xwidth =0.2, yheight =0.2) AT (0, 0, 0.4) RELATIVE mono_out /********************Virtual_output*********************/ COMPONENT DataAfterMono = Virtual_output( file = "DataAfterMono") AT (0, 0, 0.4) RELATIVE mono_out /* This section is executed when the simulation ends (C code). Other */ /* optional sections are : SAVE */ FINALLY %{ %} /* The END token marks the instrument definition end */ END I run it with ncount=1E8, Scilab on another computer(XP platform).It needs 14.2667 minutes. Under the same directory, I run the split simulation with repeat=1,lenC2=0.45 and ncout=1E8, Scilab. It takes /******************************************************************************* * %Parameters * repeat: [1] repeat count * lenC2: [m] length of collimator 2 * %Link * A reference/HTML link for more information * * %End *******************************************************************************/ /* Change name of instrument and input parameters with default values */ DEFINE INSTRUMENT test(repeat=1,lenC2) /* The DECLARE section allows us to declare variables or small */ /* functions in C syntax. These may be used in the whole instrument. */ DECLARE %{ %} /* The INITIALIZE section is executed when the simulation starts */ /* (C code). You may use them as component parameter values. */ INITIALIZE %{ %} /* Here comes the TRACE section, where the actual */ /* instrument is defined as a sequence of components. */ TRACE COMPONENT SourceAfterMono = Virtual_input( file = "DataAfterMono_list.p.x.y.z.vx.vy.vz.t.sx.sy.sz", repeat_count = repeat) AT (0,0,0) ABSOLUTE COMPONENT PsdAtEntrance = PSD_monitor( filename = "PsdAtEntrance", xwidth = 0.2, yheight = 0.2) AT (0, 0, 1.35-lenC2) RELATIVE SourceAfterMono /* This section is executed when the simulation ends (C code). Other */ /* optional sections are : SAVE */ FINALLY %{ %} /* The END token marks the instrument definition end */ END Looking forward to your reply! Regards, Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users From farhi at ill.fr Tue Aug 5 14:32:11 2008 From: farhi at ill.fr (Emmanuel FARHI) Date: Tue, 05 Aug 2008 14:32:11 +0200 (CEST) Subject: [mcstas-users] Problem about McStas version 1.12 In-Reply-To: <9583A3F1-A5B8-4569-8EB7-118FB8B27E3F@risoe.dk> References: <12197506.502051217833440240.JavaMail.coremail@bj126app101.126.com> <9583A3F1-A5B8-4569-8EB7-118FB8B27E3F@risoe.dk> Message-ID: <56282.193.49.43.124.1217939531.squirrel@195.83.126.3> Hi guys, In principle, the virtual event files are saved in McStas native PGPLOT format. The automated extension is indeed quite long, and you should use a .dat or .txt in the filename. I think the directory/font problem is probably the major reason for your problems. Emmanuel. > (Sorry if you recieve this message twice - realised I attached a BIG > zip file on last reply - replaced by an http URL this time) > > Hello Tom, > > > On Aug 4, 2008, at 9:04 AM, wokaoyan1981 wrote: > >> I updated McStas to version 1.12. Learning to use component >> Virtual_output and Virtual_input,a problem is met: >> I've got "DataAfterSource_list.p.x.y.z.vx.vy.vz.t.sx.sy.sz" >> running the codes below(ncount=1e7): >> >> < Cut > >> >> COMPONENT LDafterSource = L_monitor( >> filename = "LDafterSource.txt", xwidth = 0.2, yheight = 0.2, >> Lmin = 0.8, Lmax = 15) >> AT (0, 0, 0.5) RELATIVE PREVIOUS >> >> I run it with ncount=1e7(corresponding to repeat_count=1), plot >> result,format:Scilab. But the expected LDafterSource.sci file is not >> created. Only a mcstas.sci is made. Then how can I take a look at >> the results on detector? > > In your LDafterSource definition above, your filename is > "LDafterSource.txt", ie. with an appended "txt" - could this be the > source of your problem? (And this is only a problem if you run mcplot > LDafterSource.txt directly. Running mcplot or mcplot mcstas.sci works > fine here.) Otherwise, I was perfectly able to run the instrument > definitions from your last mail, adding in only DEFINE INSTRUMENT > etc., see http://tmp.mcstas.org/Tom.zip , also including the output > data from a run on Windows XP and a screenshot of the plot from Scilab. > >> By the way, the "Test McStas installation" does not work properly >> and files could not be saved under non_English directories. > > Running mcrun --test from e.g. c:\ works fine for me. > > It is well known that we do not support non-ascii charachters (and > also spaces etc.) in filenames, this might change in the future. For > now however, I have no way of testing how McStas runs with asian or > other special character sets, sorry about that. > > > Regards, > > Peter Willendrup > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users > -- FARHI Emmanuel Groupe DS/CS, ILL4/156, Tel 04 76 20 71 35 ILL, Grenoble _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users From peter.willendrup at risoe.dk Mon Aug 4 11:13:15 2008 From: peter.willendrup at risoe.dk (Peter Willendrup) Date: Mon, 04 Aug 2008 11:13:15 +0200 Subject: [mcstas-users] Problem about McStas version 1.12 In-Reply-To: <12197506.502051217833440240.JavaMail.coremail@bj126app101.126.com> References: <12197506.502051217833440240.JavaMail.coremail@bj126app101.126.com> Message-ID: <9583A3F1-A5B8-4569-8EB7-118FB8B27E3F@risoe.dk> (Sorry if you recieve this message twice - realised I attached a BIG zip file on last reply - replaced by an http URL this time) Hello Tom, On Aug 4, 2008, at 9:04 AM, wokaoyan1981 wrote: > I updated McStas to version 1.12. Learning to use component > Virtual_output and Virtual_input,a problem is met: > I've got "DataAfterSource_list.p.x.y.z.vx.vy.vz.t.sx.sy.sz" > running the codes below(ncount=1e7): > > < Cut > > > COMPONENT LDafterSource = L_monitor( > filename = "LDafterSource.txt", xwidth = 0.2, yheight = 0.2, > Lmin = 0.8, Lmax = 15) > AT (0, 0, 0.5) RELATIVE PREVIOUS > > I run it with ncount=1e7(corresponding to repeat_count=1), plot > result,format:Scilab. But the expected LDafterSource.sci file is not > created. Only a mcstas.sci is made. Then how can I take a look at > the results on detector? In your LDafterSource definition above, your filename is "LDafterSource.txt", ie. with an appended "txt" - could this be the source of your problem? (And this is only a problem if you run mcplot LDafterSource.txt directly. Running mcplot or mcplot mcstas.sci works fine here.) Otherwise, I was perfectly able to run the instrument definitions from your last mail, adding in only DEFINE INSTRUMENT etc., see http://tmp.mcstas.org/Tom.zip , also including the output data from a run on Windows XP and a screenshot of the plot from Scilab. > By the way, the "Test McStas installation" does not work properly > and files could not be saved under non_English directories. Running mcrun --test from e.g. c:\ works fine for me. It is well known that we do not support non-ascii charachters (and also spaces etc.) in filenames, this might change in the future. For now however, I have no way of testing how McStas runs with asian or other special character sets, sorry about that. Regards, Peter Willendrup _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users From wokaoyan1981 at 126.com Mon Aug 4 09:04:00 2008 From: wokaoyan1981 at 126.com (wokaoyan1981) Date: Mon, 04 Aug 2008 15:04:00 +0800 (CST) Subject: [mcstas-users] Problem about McStas version 1.12 Message-ID: <12197506.502051217833440240.JavaMail.coremail@bj126app101.126.com> Hello colleagues, I updated McStas to version 1.12. Learning to use component Virtual_output and Virtual_input,a problem is met: I've got "DataAfterSource_list.p.x.y.z.vx.vy.vz.t.sx.sy.sz" running the codes below(ncount=1e7): COMPONENT Origin = Progress_bar() AT (0,0,0) ABSOLUTE COMPONENT source = Source_simple( radius = 0.2, dist = 1, xw = 0.05, yh = 0.05, Lambda0 = 1.2, dLambda = 0.1) AT (0, 0, 0) RELATIVE Origin COMPONENT DataAfterSource = Virtual_output( file = "DataAfterSource") AT (0, 0, 0.2) RELATIVE source In the same directory, new instrument is set as: COMPONENT mysource = Virtual_input( file = "DataAfterSource_list.p.x.y.z.vx.vy.vz.t.sx.sy.sz", verbose = 1, repeat_count = 1) AT (0, 0, 0) ABSOLUTE COMPONENT LDafterSource = L_monitor( filename = "LDafterSource.txt", xwidth = 0.2, yheight = 0.2, Lmin = 0.8, Lmax = 1.5) AT (0, 0, 0.5) RELATIVE PREVIOUS I run it with ncount=1e7(corresponding to repeat_count=1), plot result,format:Scilab. But the expected LDafterSource.sci file is not created. Only a mcstas.sci is made. Then how can I take a look at the results on detector? By the way, the "Test McStas installation" does not work properly and files could not be saved under non_English directories. Regards, Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users From peter.willendrup at risoe.dk Wed Jul 2 10:38:56 2008 From: peter.willendrup at risoe.dk (Peter Willendrup) Date: Wed, 02 Jul 2008 10:38:56 +0200 Subject: [mcstas-users] guide_tapering bug In-Reply-To: <57BFD82EEF0CDE41A72C4EDADF8A01B205431D48@exchange27.fed.cclrc.ac.uk> References: <57BFD82EEF0CDE41A72C4EDADF8A01B205431D48@exchange27.fed.cclrc.ac.uk> Message-ID: Hello, On Jul 2, 2008, at 10:13 AM, Dalgliesh, RM (Robert) wrote: > I've just spotted a small bug in the guide tapering component from > Uwe as it is distributed. > It is currently not possible to put more than one of these guides > into an instrument as the output parameters list needs changing > > OUTPUT > PARAMETERS > (w1c > ,w2c > ,ww,hh,whalf,hhalf,lwhalf,lhhalf,h1_in,h2_out,w1_in,w2_out,l_seg,seg, > h12, h2, w12, w2, a_ell_q, b_ell_q, lbw, lbh, mxi ,u1 ,u2 ,div1, > p2_para, > test,Div1, i,ii,seg, fu, pos, file_name, ep, num) > > seems to work. Thanks Rob - will fix that in CVS. Cheers, Peter _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users From R.M.Dalgliesh at rl.ac.uk Wed Jul 2 10:13:03 2008 From: R.M.Dalgliesh at rl.ac.uk (Dalgliesh, RM (Robert)) Date: Wed, 02 Jul 2008 09:13:03 +0100 Subject: [mcstas-users] guide_tapering bug Message-ID: <57BFD82EEF0CDE41A72C4EDADF8A01B205431D48@exchange27.fed.cclrc.ac.uk> Hi Peter, I've just spotted a small bug in the guide tapering component from Uwe as it is distributed. It is currently not possible to put more than one of these guides into an instrument as the output parameters list needs changing OUTPUT PARAMETERS(w1c,w2c,ww,hh,whalf,hhalf,lwhalf,lhhalf,h1_in,h2_out,w1_in,w2_out,l_seg,seg, h12, h2, w12, w2, a_ell_q, b_ell_q, lbw, lbh, mxi ,u1 ,u2 ,div1, p2_para, test,Div1, i,ii,seg, fu, pos, file_name, ep, num) seems to work. Rob --------------------------------------------- Dr. Robert Dalgliesh ISIS Rutherford Appleton Laboratory Chilton Didcot Oxfordshire OX11 0QX Tel: +44(0)1235 445687 Fax: +44(0)1235 445720 e-mail: r.m.dalgliesh at rl.ac.uk _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users From wokaoyan1981 at 126.com Wed Aug 6 12:14:15 2008 From: wokaoyan1981 at 126.com (wokaoyan1981) Date: Wed, 06 Aug 2008 18:14:15 +0800 (CST) Subject: [mcstas-users] Could Virtual_output/Virtual_input raise efficiency? Message-ID: <25453670.831461218017655302.JavaMail.coremail@bj126app79.126.com> Hi colleagues, Learning to use Virtual_output/Virtual_input, I found something interesting: I put Virtual_output and PSD after monochromator to end the fisrt split simulation I1: DEFINE INSTRUMENT I1(?) /******************psd_after_mono********************/ COMPONENT psd_after_mono = PSD_monitor( nx = 90, ny =90, filename = "psd_after_mono ", xwidth =0.2, yheight =0.2) AT (0, 0, 0.4) RELATIVE mono_out /********************Virtual_output*********************/ COMPONENT DataAfterMono = Virtual_output( file = "DataAfterMono") AT (0, 0, 0.4) RELATIVE mono_out Then run it with ncount=1E8 and Scilab format. The obtained data file ?psd_after_mono? suggests I I_err N=[4.02214E+8 2.18807E+6 172701]. The second split simulation I2 only includes a PSD behind: DEFINE INSTRUMENT I2(?) COMPONENT SourceAfterMono = Virtual_input( file = "DataAfterMono_list.p.x.y.z.vx.vy.vz.t.sx.sy.sz", repeat_count = 1) AT (0,0,0) ABSOLUTE COMPONENT PsdAtEntrance = PSD_monitor( filename = "PsdAtEntrance", xwidth = 0.2, yheight = 0.2) AT (0, 0, 1.1) RELATIVE SourceAfterMono Then ncount is set as 1E8 corresponding to repeat_count=1.To my surprise, running I2 needs 20 minutes as much time as I1.It means that, in this case, the use of Virtual_output/Virtual_input would?t help to raise simulation efficiency. I suspect the phenomenon is related to high I and N at SourceAfterMono. But I?m not sure. Would you please give some explanation? Best wishes, Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users From farhi at ill.fr Wed Aug 6 23:01:35 2008 From: farhi at ill.fr (Emmanuel FARHI) Date: Wed, 06 Aug 2008 23:01:35 +0200 (CEST) Subject: [mcstas-users] Could Virtual_output/Virtual_input raise efficiency? In-Reply-To: <25453670.831461218017655302.JavaMail.coremail@bj126app79.126.com> References: <25453670.831461218017655302.JavaMail.coremail@bj126app79.126.com> Message-ID: <46235.193.49.43.124.1218056495.squirrel@195.83.126.3> Hello, The event file contains 172000 events. It seems strange that I2 takes 20 minutes ! It should be a glimpse of an eye (a few seconds). Do you use a network disk ? E. > Hi colleagues, > > > > > Learning to use Virtual_output/Virtual_input, I found something > interesting: > > I put Virtual_output and PSD after monochromator to end the fisrt split > simulation I1: > > DEFINE INSTRUMENT I1(??) > > previous mail> > > /******************psd_after_mono********************/ > > COMPONENT psd_after_mono = PSD_monitor( > > nx = 90, ny =90, filename = "psd_after_mono ", > > xwidth =0.2, yheight =0.2) > > AT (0, 0, 0.4) RELATIVE mono_out > > /********************Virtual_output*********************/ > > COMPONENT DataAfterMono = Virtual_output( > > file = "DataAfterMono") > > AT (0, 0, 0.4) RELATIVE mono_out > > > > Then run it with ncount=1E8 and Scilab format. The obtained data file > ??psd_after_mono?? suggests I I_err N=[4.02214E+8 2.18807E+6 172701]. > > The second split simulation I2 only includes a PSD behind: > > DEFINE INSTRUMENT I2(??) > > COMPONENT SourceAfterMono = Virtual_input( > > file = "DataAfterMono_list.p.x.y.z.vx.vy.vz.t.sx.sy.sz", repeat_count > = 1) > > AT (0,0,0) ABSOLUTE > > COMPONENT PsdAtEntrance = PSD_monitor( > > filename = "PsdAtEntrance", xwidth = 0.2, yheight = 0.2) > > AT (0, 0, 1.1) RELATIVE SourceAfterMono > > > > Then ncount is set as 1E8 corresponding to repeat_count=1.To my surprise, > running I2 needs 20 minutes as much time as I1.It means that, in this > case, the use of Virtual_output/Virtual_input would??t help to raise > simulation efficiency. > > > > I suspect the phenomenon is related to high I and N at SourceAfterMono. > But I??m not sure. Would you please give some explanation? > > > > Best wishes, > > Tom > > > > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users > -- FARHI Emmanuel Groupe DS/CS, ILL4/156, Tel 04 76 20 71 35 ILL, Grenoble _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users From lefmann at fys.ku.dk Tue Aug 5 13:51:32 2008 From: lefmann at fys.ku.dk (Kim Lefmann) Date: Tue, 05 Aug 2008 13:51:32 +0200 (CEST) Subject: [mcstas-users] adjusted dist, xw and yh In-Reply-To: References: <816e49cc0807270905l4e10eba9x4ee3ced648bf76cc@mail.gmail.com> <2004983.872471216897023613.JavaMail.coremail@bj126app38.126.com> <28343837.641751217391429541.JavaMail.coremail@bj126app102.126.com> <9AB6502E-EE86-43AF-8179-F6A253D1B7C6@risoe.dk> Message-ID: Hej, > >> Har lige l?st korrespondencen. Gode svar, du har sendt til brugerne! > > Tak. :) Det kr?ver lidt diplomati jo... ;) Og lidt indsigt i hvor man skal > m?de den > enkelte bruger... Netop, dine mails virker b?de im?dekommende og instruktive. En forn?jelse at l?se (forh?bentlig ogs? for brugerne...) > Har lige snakket med Jytte, Helen er tilbage fra ferie ig?r - s? lad os se om > vi ikke > h?rer noget snart... (idag/imorgen, ellers tager jeg aff?re - ok?) super - Kim From lefmann at fys.ku.dk Tue Aug 5 13:42:17 2008 From: lefmann at fys.ku.dk (Kim Lefmann) Date: Tue, 05 Aug 2008 13:42:17 +0200 (CEST) Subject: [mcstas-users] adjusted dist, xw and yh In-Reply-To: <9AB6502E-EE86-43AF-8179-F6A253D1B7C6@risoe.dk> References: <816e49cc0807270905l4e10eba9x4ee3ced648bf76cc@mail.gmail.com> <2004983.872471216897023613.JavaMail.coremail@bj126app38.126.com> <28343837.641751217391429541.JavaMail.coremail@bj126app102.126.com> <9AB6502E-EE86-43AF-8179-F6A253D1B7C6@risoe.dk> Message-ID: Hej Peter, Har lige l?st korrespondencen. Gode svar, du har sendt til brugerne! - Kim From percival at physics.queensu.ca Thu Jul 31 05:45:27 2008 From: percival at physics.queensu.ca (Aaron M. Percival) Date: Wed, 30 Jul 2008 23:45:27 -0400 Subject: [mcstas-users] adjusted dist, xw and yh In-Reply-To: <9AB6502E-EE86-43AF-8179-F6A253D1B7C6@risoe.dk> References: <816e49cc0807270905l4e10eba9x4ee3ced648bf76cc@mail.gmail.com> <2004983.872471216897023613.JavaMail.coremail@bj126app38.126.com> <28343837.641751217391429541.JavaMail.coremail@bj126app102.126.com> <9AB6502E-EE86-43AF-8179-F6A253D1B7C6@risoe.dk> Message-ID: <816e49cc0807302045t2905cf9em7a0a61401065292a@mail.gmail.com> Hello again Tom, In taking a closer look at your instrument, I would personally be focusing to slightly in front of the M2Exit slit. My preference would be the following: xw=0.08m , yh= 0.13m, dist=3.9m This will assure that the focusing parameters do not influence the results of the simulation. Looking at your project 3, these parameters are probably fine. However, in project 4 you are probably under illuminated the collimator and definitely under illuminating the guide. Now, to continue on with your simulation, I would suggest using the virtual_input after collimator1 along with the same assortment of detectors. Run a simulation such that you have a good distribution of divergence and histories on your detectors. You can then continue the simulation form the point after the collimator1 using the virtual_output. You will find that the repeat parameter will come in handy. Remember to use the SPLIT 10 keyword on the powderN component. Hope this helps, feel free to ask further questions. Aaron On Wed, Jul 30, 2008 at 4:14 AM, Peter Willendrup wrote: > Hello Tom, > On Jul 30, 2008, at 6:17 AM, wokaoyan1981 wrote: > > Thank you for your wonderful suggestions. I delete components behind > collimator 1 and set a series of monitors instead . Parameters dist, xw > and yh are set as the following: > 1: xw=0.06m?yh=0.11m?dist=2.000m?prototype?; > 2: xw=0.08m?yh=0.13m?dist=2.000m; > 3: xw=0.08m?yh=0.13m?dist=4.049m (focusing to the M2Exit slit)? > 4: xw=0.08m?yh=0.13m?dist=10.649m (focusing to the end of the collimator1) > ? > > The simulation suggests: N increases remarkably while ERR decreases. > > > Yes, this is indeed the case. Consider a given McStas detector bin. N > neutron rays (not actual neutrons but neutron "rays", cf. chapter 4 in the > manual) hit this bin. > The N neutron rays each have a given weight p_j, from which we determine > the intensity (in units of neutrons/second) by Sum(p_j). ERR is nothing but > the RMS error in units of neutrons/second, given that N rays of individual > weight p_j hit the bin. So yes, ERR will decrease with increased N. > > In summary, I and ERR is your intensity with errorbars while N describes > your statistics (and hence defines the errorbars). > > > I don't know which project to choose since the results differ in neutron > intenstiy, divergence and distribution. See I, y_div, x_I in enclosure. > > > I did not look at your instrument file in detail, so exuse me if I get > something wrong. The table above suggests that you are experimenting with > focusing from the source? Source focusing is only meant to reduce the solid > angle of the produced neutrons, ie. it does not make sense to emit neutrons > in full 4PI (as a real world neutron source) when we are only interested in > neutrons that hit our guide entrance. > > Beware however; If you reduce the solid angle so much that eg. the first > guide element is under illuminated you WILL get faulty results, in terms of > underestimated divergence and wrong intensity. > > Will have a real look at your instrument file as soon as time allows. > > > Hope this helps, > > Peter Willendrup > > > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users > > -- ************************************************* Aaron M. Percival M.Sc. Candidate Dept. of Physics, Engineering Physics & Astronomy Queen's University Kingston, Ontario, Canada, K7L 3N6 Office: 613-533-6000 ext. 74789 Fax: 613-533-6463 ************************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users From peter.willendrup at risoe.dk Wed Jul 30 10:14:12 2008 From: peter.willendrup at risoe.dk (Peter Willendrup) Date: Wed, 30 Jul 2008 10:14:12 +0200 Subject: [mcstas-users] adjusted dist, xw and yh In-Reply-To: <28343837.641751217391429541.JavaMail.coremail@bj126app102.126.com> References: <816e49cc0807270905l4e10eba9x4ee3ced648bf76cc@mail.gmail.com> <2004983.872471216897023613.JavaMail.coremail@bj126app38.126.com> <28343837.641751217391429541.JavaMail.coremail@bj126app102.126.com> Message-ID: <9AB6502E-EE86-43AF-8179-F6A253D1B7C6@risoe.dk> Hello Tom, On Jul 30, 2008, at 6:17 AM, wokaoyan1981 wrote: > Thank you for your wonderful suggestions. I delete components behind > collimator 1 and set a series of monitors instead . Parameters > dist, xw and yh are set as the following: > 1: xw=0.06m?yh=0.11m?dist=2.000m?prototype?; > 2: xw=0.08m?yh=0.13m?dist=2.000m; > 3: xw=0.08m?yh=0.13m?dist=4.049m (focusing to the M2Exit slit)? > 4: xw=0.08m?yh=0.13m?dist=10.649m > (focusing to the end of the collimator1)? > > The simulation suggests: N increases remarkably while ERR decreases. Yes, this is indeed the case. Consider a given McStas detector bin. N neutron rays (not actual neutrons but neutron "rays", cf. chapter 4 in the manual) hit this bin. The N neutron rays each have a given weight p_j, from which we determine the intensity (in units of neutrons/second) by Sum(p_j). ERR is nothing but the RMS error in units of neutrons/second, given that N rays of individual weight p_j hit the bin. So yes, ERR will decrease with increased N. In summary, I and ERR is your intensity with errorbars while N describes your statistics (and hence defines the errorbars). > > I don?t know which project to choose > since the results differ in neutron intenstiy, divergence and > distribution. See I, y_div, x_I in enclosure. I did not look at your instrument file in detail, so exuse me if I get something wrong. The table above suggests that you are experimenting with focusing from the source? Source focusing is only meant to reduce the solid angle of the produced neutrons, ie. it does not make sense to emit neutrons in full 4PI (as a real world neutron source) when we are only interested in neutrons that hit our guide entrance. Beware however; If you reduce the solid angle so much that eg. the first guide element is under illuminated you WILL get faulty results, in terms of underestimated divergence and wrong intensity. Will have a real look at your instrument file as soon as time allows. Hope this helps, Peter Willendrup -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users From wokaoyan1981 at 126.com Wed Jul 30 06:17:09 2008 From: wokaoyan1981 at 126.com (wokaoyan1981) Date: Wed, 30 Jul 2008 12:17:09 +0800 (CST) Subject: [mcstas-users] adjusted dist, xw and yh In-Reply-To: <816e49cc0807270905l4e10eba9x4ee3ced648bf76cc@mail.gmail.com> References: <816e49cc0807270905l4e10eba9x4ee3ced648bf76cc@mail.gmail.com> <2004983.872471216897023613.JavaMail.coremail@bj126app38.126.com> Message-ID: <28343837.641751217391429541.JavaMail.coremail@bj126app102.126.com> Hello Aaron, Thank you for your wonderful suggestions. I delete components behind collimator 1 and set a series of monitors instead . Parameters dist, xw and yh are set as the following: 1: xw=0.06m?yh=0.11m?dist=2.000m?prototype?; 2: xw=0.08m?yh=0.13m?dist=2.000m; 3: xw=0.08m?yh=0.13m?dist=4.049m (focusing to the M2Exit slit)? 4: xw=0.08m?yh=0.13m?dist=10.649m (focusing to the end of the collimator1)? The simulation suggests: N increases remarkably while ERR decreases. I don?t know which project to choose since the results differ in neutron intenstiy, divergence and distribution. See I, y_div, x_I in enclosure. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: re.doc Type: application/msword Size: 150016 bytes Desc: not available URL: -------------- next part -------------- _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users From gerard at ill.fr Wed Sep 10 16:23:20 2008 From: gerard at ill.fr (gerard at ill.fr) Date: Wed, 10 Sep 2008 16:23:20 +0200 (CEST) Subject: [mcstas-users] Monitor_nD challenge Message-ID: <42593.192.168.160.90.1221056600.squirrel@mail.ill.fr> Hello everybody, I'm again asking for help on Mcstas, but this time for a component behaving strangely. In this test instrument, highly inspired from the vanadium example, I have put on parallel two monitors which should give the same results: the PSD_monitor_4PI and the Monitor_nD with 4Pi & PSD options. And surprise: the monitor_nD always shows two vertical stripes at +/- 90?. This doesn't change regardless to the shape or rotation of the sample, or the absorption. The people I'm working with here also can't explain this strange behavior, so if someone feels concerned... Thank you in advance Lionel GERARD -------------- next part -------------- A non-text attachment was scrubbed... Name: sampletest.instr Type: application/octet-stream Size: 3434 bytes Desc: not available URL: From farhi at ill.fr Wed Sep 10 22:40:25 2008 From: farhi at ill.fr (Emmanuel FARHI) Date: Wed, 10 Sep 2008 22:40:25 +0200 (CEST) Subject: [mcstas-users] Monitor_nD challenge In-Reply-To: <42593.192.168.160.90.1221056600.squirrel@mail.ill.fr> References: <42593.192.168.160.90.1221056600.squirrel@mail.ill.fr> Message-ID: <50676.193.49.43.124.1221079225.squirrel@195.83.126.3> Hi, just read Component manual page 117 "Monitor_nD equivalences". In fact, the PSD_monitor_4PI is not a 2-angle detector, but an angle-vertical position (have a look at its code). Use: options="auto theta bins=90, auto y bins=90, sphere parallel" The two stripes originate from the poles that are equivalent, and thus the intensity at 90 degrees (which correspond to a single point on a sphere - think about the earth), is spread over a -90 +90 vertical angle range. Emmanuel. > Hello everybody, > > I'm again asking for help on Mcstas, but this time for a component > behaving strangely. In this test instrument, highly inspired from the > vanadium example, I have put on parallel two monitors which should give > the same results: the PSD_monitor_4PI and the Monitor_nD with 4Pi & PSD > options. And surprise: the monitor_nD always shows two vertical stripes at > +/- 90?. This doesn't change regardless to the shape or rotation of the > sample, or the absorption. The people I'm working with here also can't > explain this strange behavior, so if someone feels concerned... > > Thank you in advance > > Lionel GERARD > > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users > -- FARHI Emmanuel Groupe DS/CS, ILL4/156, Tel 04 76 20 71 35 ILL, Grenoble From peter.willendrup at risoe.dk Wed Sep 24 20:57:01 2008 From: peter.willendrup at risoe.dk (Peter Willendrup) Date: Wed, 24 Sep 2008 20:57:01 +0200 Subject: [mcstas-users] Bug in mcrun/mcgui on Windows, plus fix Message-ID: <472BFC73-4FDE-47C4-B170-473F9602DF01@risoe.dk> Hello everyone, Tom Chen has recently made me aware of a bug preventing him to do optimization from mcgui, which always selected --ncount=1e6. Further testing showed that both scans and --optim runs using both mcgui and mcrun were affected. Only Windows installations of McStas 1.12 are affected. To remedy the problem, please replace your c:\McStas\bin\mcrun.pl with the attached version. An updated version of McStas 1.12 with this and other fixes will be made available within a few weeks. Regards, Peter Willendrup -- ------------------------------------------------------------------- Peter Willendrup - Udviklingsingeni?r RIS? DTU Afdelingen for Materialeforskning Frederiksborgvej 399 DK-4000 Roskilde Tlf.: 4677 5862 Mobil.: 2125 4612 ------------------------------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: mcrun.pl Type: text/x-perl-script Size: 51835 bytes Desc: not available URL: -------------- next part -------------- From Berno.Spiegelhalder at astrium.eads.net Thu Sep 25 08:54:27 2008 From: Berno.Spiegelhalder at astrium.eads.net (Spiegelhalder, Berno) Date: Thu, 25 Sep 2008 08:54:27 +0200 Subject: AW: [mcstas-users] Bug in mcrun/mcgui on Windows, plus fix In-Reply-To: <472BFC73-4FDE-47C4-B170-473F9602DF01@risoe.dk> References: <472BFC73-4FDE-47C4-B170-473F9602DF01@risoe.dk> Message-ID: <571A54BF6A74D7498BEF4C8D84E26B260367B9@FFWEXMC1.de.astrium.corp> Hello Peter, Could you send please this file 'mcrun.pl' as a zip file? Some firewalls may not let pass through files with such an ending. Thank you in advance; Regards, Berno -----Urspr?ngliche Nachricht----- Von: mcstas-users-bounces at mcstas.org [mailto:mcstas-users-bounces at mcstas.org] Im Auftrag von Peter Willendrup Gesendet: Mittwoch, 24. September 2008 20:57 An: McStas users list at mcstas.org Betreff: [mcstas-users] Bug in mcrun/mcgui on Windows, plus fix Hello everyone, Tom Chen has recently made me aware of a bug preventing him to do optimization from mcgui, which always selected --ncount=1e6. Further testing showed that both scans and --optim runs using both mcgui and mcrun were affected. Only Windows installations of McStas 1.12 are affected. To remedy the problem, please replace your c:\McStas\bin\mcrun.pl with the attached version. An updated version of McStas 1.12 with this and other fixes will be made available within a few weeks. Regards, Peter Willendrup -- ------------------------------------------------------------------- Peter Willendrup - Udviklingsingeni?r RIS? DTU Afdelingen for Materialeforskning Frederiksborgvej 399 DK-4000 Roskilde Tlf.: 4677 5862 Mobil.: 2125 4612 ------------------------------------------------------------------- This email (including any attachments) may contain confidential and/or privileged information or information otherwise protected from disclosure. If you are not the intended recipient, please notify the sender immediately, do not copy this message or any attachments and do not use it for any purpose or disclose its content to any person, but delete this message and any attachments from your system. Astrium disclaims any and all liability if this email transmission was virus corrupted, altered or falsified. ---------------------------------------------------------------------- Astrium GmbH Vorsitzender des Aufsichtsrates: Thomas S. M?ller - Gesch?ftsf?hrung: Evert Dudok (Vorsitzender), Dr. Reinhold Lutz, Pablo Salame Fischer Sitz der Gesellschaft: M?nchen - Registergericht: Amtsgericht M?nchen, HRB Nr. 107647 Weitere Informationen ?ber EADS Astrium unter www.astrium.eads.net From peter.willendrup at risoe.dk Thu Sep 25 09:21:06 2008 From: peter.willendrup at risoe.dk (Peter Willendrup) Date: Thu, 25 Sep 2008 09:21:06 +0200 Subject: [mcstas-users] Bug in mcrun/mcgui on Windows, plus fix In-Reply-To: <472BFC73-4FDE-47C4-B170-473F9602DF01@risoe.dk> References: <472BFC73-4FDE-47C4-B170-473F9602DF01@risoe.dk> Message-ID: <4E51C6F0-CDA2-4A51-B6FF-28A6EAD876B7@risoe.dk> Hello again, I have been made aware that some mail systems might not allow attachments with .pl suffix. Hence, here is a direct URL for download of the patched mcrun.pl: http://cvs.mcstas.org/cgi-bin/viewcvs.cgi/mcstas/mcrun.pl?revision=1.92&root=McStasStable Hope this helps, Peter -- ------------------------------------------------------------------- Peter Willendrup - Udviklingsingeni?r RIS? DTU Afdelingen for Materialeforskning Frederiksborgvej 399 DK-4000 Roskilde Tlf.: 4677 5862 Mobil.: 2125 4612 ------------------------------------------------------------------- On 24/09/2008, at 20.57, Peter Willendrup wrote: > Hello everyone, > > > Tom Chen has recently made me aware of a bug preventing him to do > optimization from > mcgui, which always selected --ncount=1e6. > > Further testing showed that both scans and --optim runs using both > mcgui and mcrun were > affected. > > Only Windows installations of McStas 1.12 are affected. > > To remedy the problem, please replace your c:\McStas\bin\mcrun.pl > with the attached version. > > An updated version of McStas 1.12 with this and other fixes will be > made available within a > few weeks. > > > Regards, > > Peter Willendrup > > -- > ------------------------------------------------------------------- > Peter Willendrup - Udviklingsingeni?r > > RIS? DTU > Afdelingen for Materialeforskning > Frederiksborgvej 399 > DK-4000 Roskilde > > Tlf.: 4677 5862 > Mobil.: 2125 4612 > ------------------------------------------------------------------- > > From peter.willendrup at risoe.dk Thu Sep 25 09:22:55 2008 From: peter.willendrup at risoe.dk (Peter Willendrup) Date: Thu, 25 Sep 2008 09:22:55 +0200 Subject: AW: [mcstas-users] Bug in mcrun/mcgui on Windows, plus fix In-Reply-To: <571A54BF6A74D7498BEF4C8D84E26B260367B9@FFWEXMC1.de.astrium.corp> References: <472BFC73-4FDE-47C4-B170-473F9602DF01@risoe.dk> <571A54BF6A74D7498BEF4C8D84E26B260367B9@FFWEXMC1.de.astrium.corp> Message-ID: <3E073DEA-307D-4F98-980A-5FFFAC5169CD@risoe.dk> Hello Berno, You are quite right - I should have done that or provided a direct link - have done that to mcstas-users now. :) Here, also a direct link for you: http://cvs.mcstas.org/cgi-bin/viewcvs.cgi/mcstas/mcrun.pl?revision=1.92&root=McStasStable Peter On 25/09/2008, at 08.54, Spiegelhalder, Berno wrote: > Hello Peter, > > Could you send please this file 'mcrun.pl' as a zip file? Some > firewalls may not let pass through files with such an ending. > > Thank you in advance; > > Regards, > > Berno > > -----Urspr?ngliche Nachricht----- > Von: mcstas-users-bounces at mcstas.org [mailto:mcstas-users-bounces at mcstas.org > ] Im Auftrag von Peter Willendrup > Gesendet: Mittwoch, 24. September 2008 20:57 > An: McStas users list at mcstas.org > Betreff: [mcstas-users] Bug in mcrun/mcgui on Windows, plus fix > > Hello everyone, > > > Tom Chen has recently made me aware of a bug preventing him to do > optimization from mcgui, which always selected --ncount=1e6. > > Further testing showed that both scans and --optim runs using both > mcgui and mcrun were affected. > > Only Windows installations of McStas 1.12 are affected. > > To remedy the problem, please replace your c:\McStas\bin\mcrun.pl > with the attached version. > > An updated version of McStas 1.12 with this and other fixes will be > made available within a few weeks. > > > Regards, > > Peter Willendrup > > -- > ------------------------------------------------------------------- > Peter Willendrup - Udviklingsingeni?r > > RIS? DTU > Afdelingen for Materialeforskning > Frederiksborgvej 399 > DK-4000 Roskilde > > Tlf.: 4677 5862 > Mobil.: 2125 4612 > ------------------------------------------------------------------- > > > This email (including any attachments) may contain confidential and/ > or privileged information or information otherwise protected from > disclosure. > If you are not the intended recipient, please notify the sender > immediately, do not copy this message or any attachments and do not > use it for any purpose or disclose its content to any person, but > delete this message and any attachments from your system. > Astrium disclaims any and all liability if this email transmission > was virus corrupted, altered or falsified. > ---------------------------------------------------------------------- > Astrium GmbH > Vorsitzender des Aufsichtsrates: Thomas S. M?ller - > Gesch?ftsf?hrung: Evert Dudok (Vorsitzender), Dr. Reinhold Lutz, > Pablo Salame Fischer > Sitz der Gesellschaft: M?nchen - Registergericht: Amtsgericht > M?nchen, HRB Nr. 107647 > > Weitere Informationen ?ber EADS Astrium unter www.astrium.eads.net > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users > > -- ------------------------------------------------------------------- Peter Willendrup - Udviklingsingeni?r RIS? DTU Afdelingen for Materialeforskning Frederiksborgvej 399 DK-4000 Roskilde Tlf.: 4677 5862 Mobil.: 2125 4612 -------------------------------------------------------------------