From shu-yan.zhang at stfc.ac.uk Fri Jul 3 20:52:01 2009 From: shu-yan.zhang at stfc.ac.uk (Zhang, SY (Shu Yan)) Date: Fri, 3 Jul 2009 19:52:01 +0100 Subject: [mcstas-users] divergence monitor output Message-ID: Dear all I have question about the results from the Divergence_monitor Component. I want to find out the beam divergence. Is this the right monitor to use? If it is, which value in the output file shall I use as the maximum divergence? What do these values X0, dX, Y0 and dY from "mc_divmon_dat.statistics" mean? What are the meaning for the values from "mc_divmon_dat.values"? Best regards, Shu -- Scanned by iCritical. -------------- next part -------------- An HTML attachment was scrubbed... URL: From farhi at ill.fr Fri Jul 3 21:23:14 2009 From: farhi at ill.fr (Emmanuel FARHI) Date: Fri, 3 Jul 2009 21:23:14 +0200 (CEST) Subject: [mcstas-users] divergence monitor output In-Reply-To: References: Message-ID: <58721.193.49.43.124.1246648994.squirrel@195.83.126.3> Hello Shu, Any divergence monitor such as the Divergence_monitor() or the Monitor_nD(options="hdiv vdiv, all auto") will indeed produce a divergence map. Then the output files have lines: value: I I_err N statistics: X0 dX Y0 dY where I, I_err and N: are the values of the intensity (usually integrated flux), the error bar on this value, and the number of statistical MC events recorded on the detector (which is not the flux, but a non physical event count, only for computational purpose). X0 dX Y0 dY: are the center (mean value, 1st moment) and second moment (gaussian width) of the distributions. In your case, dX and dY will give you a gaussian width of the H and V divergence. X0 and Y0 should in principle be around zero if the monitor is well oriented. just do >> eval(mc_divmon_dat.statistics); [ dX dY ] Emmanuel. > Dear all > > I have question about the results from the Divergence_monitor Component. > I want to find out the beam divergence. Is this the right monitor to > use? If it is, which value in the output file shall I use as the maximum > divergence? What do these values X0, dX, Y0 and dY from > "mc_divmon_dat.statistics" mean? What are the meaning for the values > from "mc_divmon_dat.values"? > > Best regards, > Shu > > > > -- > Scanned by iCritical. > > _______________________________________________ > 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 shu-yan.zhang at stfc.ac.uk Mon Jul 6 13:56:39 2009 From: shu-yan.zhang at stfc.ac.uk (Zhang, SY (Shu Yan)) Date: Mon, 6 Jul 2009 12:56:39 +0100 Subject: [mcstas-users] divergence monitor output In-Reply-To: <58721.193.49.43.124.1246648994.squirrel@195.83.126.3> References: <58721.193.49.43.124.1246648994.squirrel@195.83.126.3> Message-ID: Dear Emmanuel Thank you very much for the information. Regarding the divergence output dX and dY, are they the full width half maximum or the c value in the Gaussian function? Many thanks for your reply!! Shu -----Original Message----- From: Emmanuel FARHI [mailto:farhi at ill.fr] Sent: 03 July 2009 20:23 To: McStas users list at mcstas.org Subject: Re: [mcstas-users] divergence monitor output Hello Shu, Any divergence monitor such as the Divergence_monitor() or the Monitor_nD(options="hdiv vdiv, all auto") will indeed produce a divergence map. Then the output files have lines: value: I I_err N statistics: X0 dX Y0 dY where I, I_err and N: are the values of the intensity (usually integrated flux), the error bar on this value, and the number of statistical MC events recorded on the detector (which is not the flux, but a non physical event count, only for computational purpose). X0 dX Y0 dY: are the center (mean value, 1st moment) and second moment (gaussian width) of the distributions. In your case, dX and dY will give you a gaussian width of the H and V divergence. X0 and Y0 should in principle be around zero if the monitor is well oriented. just do >> eval(mc_divmon_dat.statistics); [ dX dY ] Emmanuel. > Dear all > > I have question about the results from the Divergence_monitor > Component. > I want to find out the beam divergence. Is this the right monitor to > use? If it is, which value in the output file shall I use as the > maximum > divergence? What do these values X0, dX, Y0 and dY from > "mc_divmon_dat.statistics" mean? What are the meaning for the values > from "mc_divmon_dat.values"? > > Best regards, > Shu > > > > -- > Scanned by iCritical. > > _______________________________________________ > 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 -- Scanned by iCritical. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.jpg Type: image/jpeg Size: 2254 bytes Desc: image003.jpg URL: From farhi at ill.eu Mon Jul 6 15:33:26 2009 From: farhi at ill.eu (Emmanuel FARHI) Date: Mon, 06 Jul 2009 15:33:26 +0200 Subject: [mcstas-users] Open position at ILL: Simulation and data analysis Message-ID: <4A51FD26.8020005@ill.eu> An HTML attachment was scrubbed... URL: From lefmann at fys.ku.dk Tue Jul 7 13:44:30 2009 From: lefmann at fys.ku.dk (Kim Lefmann) Date: Tue, 7 Jul 2009 13:44:30 +0200 (CEST) Subject: [mcstas-users] divergence monitor output In-Reply-To: References: <58721.193.49.43.124.1246648994.squirrel@195.83.126.3> Message-ID: Dear Shu, Like the other "single-purpose" monitors, the divergence_monitor uses Gaussian sigma for the width (in fact, it calculates the standard deviation, which is just sigma for a Gaussian). best, Kim ----------------- Kim Lefmann Associate Professor (Lektor) Niels Bohr Institute University of Copenhagen Phone: +45 3532 0476 Mobile:+45 2925 0476 On Mon, 6 Jul 2009, Zhang, SY (Shu Yan) wrote: > Dear Emmanuel > > > > Thank you very much for the information. Regarding the divergence output > dX and dY, are they the full width half maximum or the c value in the > Gaussian function? > > > > > > > > Many thanks for your reply!! > > > > Shu > > -----Original Message----- > From: Emmanuel FARHI [mailto:farhi at ill.fr] > Sent: 03 July 2009 20:23 > To: McStas users list at mcstas.org > Subject: Re: [mcstas-users] divergence monitor output > > > > Hello Shu, > > > > Any divergence monitor such as the Divergence_monitor() or the > > Monitor_nD(options="hdiv vdiv, all auto") will indeed produce a > > divergence > > map. > > > > Then the output files have lines: > > value: I I_err N > > statistics: X0 dX Y0 dY > > where > > I, I_err and N: are the values of the intensity (usually integrated > > flux), > > the error bar on this value, and the number of statistical MC events > > recorded on the detector (which is not the flux, but a non physical > > event > > count, only for computational purpose). > > > > X0 dX Y0 dY: are the center (mean value, 1st moment) and second moment > > (gaussian width) of the distributions. In your case, dX and dY will give > > you a gaussian width of the H and V divergence. X0 and Y0 should in > > principle be around zero if the monitor is well oriented. > > just do > >>> eval(mc_divmon_dat.statistics); [ dX dY ] > > > > > > Emmanuel. > > > >> Dear all > >> > >> I have question about the results from the Divergence_monitor > >> Component. > >> I want to find out the beam divergence. Is this the right monitor to > >> use? If it is, which value in the output file shall I use as the > >> maximum > >> divergence? What do these values X0, dX, Y0 and dY from > >> "mc_divmon_dat.statistics" mean? What are the meaning for the values > >> from "mc_divmon_dat.values"? > >> > >> Best regards, > >> Shu > >> > >> > >> > >> -- > >> Scanned by iCritical. > >> > >> _______________________________________________ > >> 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 > > > > > -- > Scanned by iCritical. > From wokaoyan1981 at 126.com Tue Aug 18 13:22:25 2009 From: wokaoyan1981 at 126.com (wokaoyan1981) Date: Tue, 18 Aug 2009 19:22:25 +0800 (CST) Subject: [mcstas-users] intercomparison between McStas and SIMRES Message-ID: <24237569.876631250594545180.JavaMail.coremail@bj126app50.126.com> Hello colleagues, SIMRES, a new program for neutron ray-tracing simulations, is now available at http://neutron.ujf.cas.cz/restrax/. It?s capable of simulating any user-defined instrument layout such as strain diffractometer, three-axis spectrometer equipped with advanced components like focusing crystals (both mosaic and elastically deformed), radial collimators, benders. etc. In order to test reliability of the code, a strain scanner is simulated by SIMRES and McStas respectively. (See enclosure) The results show intensities and resolutions are distinct.(Peak reflectivity r0 for McStas is calculated by NOP). Will anyone explain the difference? Intensity / s-1 FWHM /? Deviation (84?) / ? SIMRES 10.980 0.71087 0.0074441 McStas 108.959 0.23471 -0.003 Best wishes, Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mcstas.instr Type: application/octet-stream Size: 3116 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: resolution.jpg Type: image/jpeg Size: 214218 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: simres.xml Type: text/xml Size: 14519 bytes Desc: not available URL: From J.A.J.James at open.ac.uk Tue Aug 18 13:49:43 2009 From: J.A.J.James at open.ac.uk (Jon James) Date: Tue, 18 Aug 2009 12:49:43 +0100 Subject: [mcstas-users] mcstas-users Digest, Vol 10, Issue 1 Message-ID: I am out of the office and without email access until 7th September. The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302). -------------- next part -------------- An HTML attachment was scrubbed... URL: From saroun at ujf.cas.cz Tue Aug 18 16:14:49 2009 From: saroun at ujf.cas.cz (Jan Saroun) Date: Tue, 18 Aug 2009 16:14:49 +0200 Subject: [mcstas-users] intercomparison between McStas and SIMRES In-Reply-To: <24237569.876631250594545180.JavaMail.coremail@bj126app50.126.com> References: <24237569.876631250594545180.JavaMail.coremail@bj126app50.126.com> Message-ID: <4A8AB759.8050307@ujf.cas.cz> Dear Tom, I am not an expert in using McStas, but I guess the McStas peak profile has been obtained by the BananaTheta monitor. If so, it is not the angular peak profile, which is measured by scanning the detector angle (and which is simulated by SIMRES). Instead, you only see the angular distribution of neutrons passing through the Soller lamellae in front of the PSD. Instead, you need to make a scan by the sample_out component angle in order to get equivalent results and (hopefully) the same peak profiles. With SIMRES, you can either simulate the resolution function (as you have done) or to make the THETA scan as suggested above. The results are nearly the same (in contrast to the simulation speeds). I was able to reproduce your results by both the methods. I am not worried about differences in absolute intensities at the moment, as there are many issues to be checked first (e.g. normalization of the resolution function or physical models used by the two programs for the monochromator and sample components). All the best, Jan wokaoyan1981 wrote: > > Hello colleagues, > > SIMRES, a new program for neutron ray-tracing simulations, is now > available at http://neutron.ujf.cas.cz/restrax/. It??s capable of > simulating any user-defined instrument layout such as strain > diffractometer, three-axis spectrometer equipped with advanced > components like focusing crystals (both mosaic and elastically > deformed), radial collimators, benders. etc. > > In order to test reliability of the code, a strain scanner is > simulated by SIMRES and McStas respectively. (See enclosure) The > results show intensities and resolutions are distinct.(Peak > reflectivity r0 for McStas is calculated by NOP). Will anyone explain > the difference? > > > > Intensity / s^-1 > > > > FWHM / ?? > > > > Deviation (84??) / ?? > > SIMRES > > > > 10.980 > > > > 0.71087 > > > > 0.0074441 > > McStas > > > > 108.959 > > > > 0.23471 > > > > -0.003 > > Best wishes, > > Tom > > -- ----------------------------------------- Dr Jan Saroun Nuclear Physics Institute Academy of Sciences of the Czech Republic 25068 Rez near Prague phone: 420-2-66173140 phone/fax: 420-2-20940141 mailto:saroun at ujf.cas.cz -------------- next part -------------- An HTML attachment was scrubbed... URL: From J.A.J.James at open.ac.uk Wed Aug 19 11:55:00 2009 From: J.A.J.James at open.ac.uk (Jon James) Date: Wed, 19 Aug 2009 10:55:00 +0100 Subject: [mcstas-users] mcstas-users Digest, Vol 10, Issue 2 Message-ID: I am out of the office and without email access until 7th September. The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302). -------------- next part -------------- An HTML attachment was scrubbed... URL: From pkwi at risoe.dtu.dk Wed Aug 19 16:18:56 2009 From: pkwi at risoe.dtu.dk (Peter Willendrup) Date: Wed, 19 Aug 2009 16:18:56 +0200 Subject: [mcstas-users] intercomparison between McStas and SIMRES In-Reply-To: <4A8AB759.8050307@ujf.cas.cz> References: <24237569.876631250594545180.JavaMail.coremail@bj126app50.126.com> <4A8AB759.8050307@ujf.cas.cz> Message-ID: <16EA321D-BE20-49F1-8303-9BEEB4F300A4@risoe.dtu.dk> Hello Tom, Jan, I agree with Jan, you need to perform a scan in 2\theta. I have modified Tom's instrument slightly - optimizing it slightly - and performed the proposed scan. Please find attached both the instrumentfile and the resulting peak profile. It now looks much more like your result from SIMRES, but a bit more broad. A closer study of SIMRES parameters in comparison to the McStas component parms will very likely resolve this discrepancy. As Jan also mentions, intensity agreement is a bit more complicated. :) Best regards, Peter Willendrup -- ------------------------------------------------------------------- Peter Willendrup - Development engineer RIS? DTU Materials Research Division Frederiksborgvej 399 DK-4000 Roskilde Tlf.: (+45) 4677 5862 Mobil.: (+45) 2125 4612 Fax.: (+45) 4766 5758 Email: pkwi at risoe.dtu.dk ------------------------------------------------------------------- On 18/08/2009, at 16.14, Jan Saroun wrote: > I am not an expert in using McStas, but I guess the McStas peak > profile has been obtained by the BananaTheta monitor. If so, it is > not the angular peak profile, which is measured by scanning the > detector angle (and which is simulated by SIMRES). Instead, you only > see the angular distribution of neutrons passing through the Soller > lamellae in front of the PSD. Instead, you need to make a scan by > the sample_out component angle in order to get equivalent results > and (hopefully) the same peak profiles. > > With SIMRES, you can either simulate the resolution function (as you > have done) or to make the THETA scan as suggested above. The results > are nearly the same (in contrast to the simulation speeds). I was > able to reproduce your results by both the methods. > > I am not worried about differences in absolute intensities at the > moment, as there are many issues to be checked first (e.g. > normalization of the resolution function or physical models used by > the two programs for the monochromator and sample components). -------------- next part -------------- A non-text attachment was scrubbed... Name: mcstas.instr Type: application/octet-stream Size: 3285 bytes Desc: not available URL: -------------- next part -------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: Scan.png Type: image/png Size: 14103 bytes Desc: not available URL: -------------- next part -------------- From saroun at ujf.cas.cz Wed Aug 19 17:46:54 2009 From: saroun at ujf.cas.cz (Jan Saroun) Date: Wed, 19 Aug 2009 17:46:54 +0200 Subject: [mcstas-users] intercomparison between McStas and SIMRES In-Reply-To: <16EA321D-BE20-49F1-8303-9BEEB4F300A4@risoe.dtu.dk> References: <24237569.876631250594545180.JavaMail.coremail@bj126app50.126.com> <4A8AB759.8050307@ujf.cas.cz> <16EA321D-BE20-49F1-8303-9BEEB4F300A4@risoe.dtu.dk> Message-ID: <4A8C1E6E.5030308@ujf.cas.cz> Hello Tom and Peter, I think the problem is the theta-scale. I suppose DTT on the Peter's result is the full scattering angle, while the data shown by Tom are on Bragg angle (=DTT/2) scale. If you correct for this, the two profiles are very close. Also the intensity scale is not MUCH different, we should check first the input data for the monochromator and sample in order to resolve this. I attach the curves simulated by SIMRES with the two methods I have mentioned earlier (theta-scan and resolution function). Regards, Jan Peter Willendrup wrote: > Hello Tom, Jan, > > > I agree with Jan, you need to perform a scan in 2\theta. I have > modified Tom's instrument slightly - optimizing it slightly - and > performed the proposed scan. Please find attached both the > instrumentfile and the resulting peak profile. It now looks much more > like your result from SIMRES, but a bit more broad. > > A closer study of SIMRES parameters in comparison to the McStas > component parms will very likely resolve this discrepancy. As Jan also > mentions, intensity agreement is a bit more complicated. :) > > > Best regards, > > Peter Willendrup -- ----------------------------------------- Dr Jan Saroun Nuclear Physics Institute Academy of Sciences of the Czech Republic 25068 Rez near Prague phone: 420-2-66173140 phone/fax: 420-2-20940141 mailto:saroun at ujf.cas.cz -------------- next part -------------- A non-text attachment was scrubbed... Name: tom_simres.png Type: image/png Size: 32184 bytes Desc: not available URL: From pkwi at risoe.dtu.dk Wed Aug 19 21:02:44 2009 From: pkwi at risoe.dtu.dk (Peter Willendrup) Date: Wed, 19 Aug 2009 21:02:44 +0200 Subject: [mcstas-users] intercomparison between McStas and SIMRES In-Reply-To: <4A8C1E6E.5030308@ujf.cas.cz> References: <24237569.876631250594545180.JavaMail.coremail@bj126app50.126.com> <4A8AB759.8050307@ujf.cas.cz> <16EA321D-BE20-49F1-8303-9BEEB4F300A4@risoe.dtu.dk> <4A8C1E6E.5030308@ujf.cas.cz> Message-ID: <48BEC3AA-90CA-4BF6-AE15-495232C2C267@risoe.dtu.dk> Hello again, You are absolutely right Jan, attached is a version of the graph parametrized by \delta\theta instead. The overall shape agrees quite well - possibly there is a sign difference in \delta\theta, the slight asymmetry in the side peaks seems opposite in the two graphs. Now for comparing intensity: The maximum reflectivity of the monochromator has been set to 0.265 in Tom's instrumentfile, I would think this is a fairly low value? And in regard to the sample parameters, we tend not to trust the listed F-squared in .laz input files too much. ( .lau ones can be generated in Crystallographica and are usually in better agreement with reality) Consequently, I think that given the circumstances the agreement is quite fair. Regards, Peter -------------- next part -------------- A non-text attachment was scrubbed... Name: Scan2.png Type: image/png Size: 14615 bytes Desc: not available URL: -------------- next part -------------- On 19/08/2009, at 17.46, Jan Saroun wrote: > Hello Tom and Peter, > > I think the problem is the theta-scale. I suppose DTT on the Peter's > result is the full scattering angle, while the data shown by Tom are > on Bragg angle (=DTT/2) scale. If you correct for this, the two > profiles are very close. Also the intensity scale is not MUCH > different, we should check first the input data for the > monochromator and sample in order to resolve this. I attach the > curves simulated by SIMRES with the two methods I have mentioned > earlier (theta-scan and resolution function). > > Regards, > Jan > > > Peter Willendrup wrote: >> Hello Tom, Jan, >> >> >> I agree with Jan, you need to perform a scan in 2\theta. I have >> modified Tom's instrument slightly - optimizing it slightly - and >> performed the proposed scan. Please find attached both the >> instrumentfile and the resulting peak profile. It now looks much >> more like your result from SIMRES, but a bit more broad. >> >> A closer study of SIMRES parameters in comparison to the McStas >> component parms will very likely resolve this discrepancy. As Jan >> also mentions, intensity agreement is a bit more complicated. :) >> >> >> Best regards, >> >> Peter Willendrup > > -- > ----------------------------------------- > Dr Jan Saroun Nuclear Physics Institute > Academy of Sciences of the Czech Republic > 25068 Rez near Prague > phone: 420-2-66173140 phone/fax: 420-2-20940141 > mailto:saroun at ujf.cas.cz > > > -- ------------------------------------------------------------------- Peter Willendrup - Development engineer RIS? DTU Materials Research Division Frederiksborgvej 399 DK-4000 Roskilde Tlf.: (+45) 4677 5862 Mobil.: (+45) 2125 4612 Fax.: (+45) 4766 5758 Email: pkwi at risoe.dtu.dk ------------------------------------------------------------------- From saroun at ujf.cas.cz Thu Aug 20 09:26:58 2009 From: saroun at ujf.cas.cz (Jan Saroun) Date: Thu, 20 Aug 2009 09:26:58 +0200 Subject: [mcstas-users] intercomparison between McStas and SIMRES In-Reply-To: <48BEC3AA-90CA-4BF6-AE15-495232C2C267@risoe.dtu.dk> References: <24237569.876631250594545180.JavaMail.coremail@bj126app50.126.com> <4A8AB759.8050307@ujf.cas.cz> <16EA321D-BE20-49F1-8303-9BEEB4F300A4@risoe.dtu.dk> <4A8C1E6E.5030308@ujf.cas.cz> <48BEC3AA-90CA-4BF6-AE15-495232C2C267@risoe.dtu.dk> Message-ID: <4A8CFAC2.4090207@ujf.cas.cz> Hello Peter, you are right, the signs of take-off angles where really different for the two configuration: (1,-1) for McStas and (-1,1) for Simres. Then also the details of the two peak profiles agree. Regards, Jan Peter Willendrup wrote: > Hello again, > > > You are absolutely right Jan, attached is a version of the graph > parametrized by \delta\theta instead. The overall shape agrees quite > well - possibly there is a sign difference in \delta\theta, the slight > asymmetry in the side peaks seems opposite in the two graphs. > > Now for comparing intensity: > > The maximum reflectivity of the monochromator has been set to 0.265 in > Tom's instrumentfile, I would think this is a fairly low value? > > And in regard to the sample parameters, we tend not to trust the > listed F-squared in .laz input files too much. ( .lau ones can be > generated in Crystallographica and are usually in better agreement > with reality) > > Consequently, I think that given the circumstances the agreement is > quite fair. > > Regards, > > Peter From begley at ill.fr Wed Aug 26 15:37:26 2009 From: begley at ill.fr (begley at ill.fr) Date: Wed, 26 Aug 2009 15:37:26 +0200 (CEST) Subject: [mcstas-users] Compiling Components Message-ID: <1775.172.17.44.99.1251293846.squirrel@mail.ill.fr> Hello everyone, I have written a custom component and am trying to get it to compile under McStas. I have found that running mcstas on a component file directly will not work, and the compiler expects another "DEFINE" block after the end of the code (this happens even when trying to "compile" existing components with this method.) I had written a stub instrument which contained a single instance of my new component, and compiling this instrument initially allowed me to compile the component. However, when I make changes to the component file these seem to be ignored by the compiler if it is run again in this fashion. I have searched to see if the old version of the code has been copied somewhere, but this does not seem to be the case. What is the most straightforward way to compile a new component under McStas? Thanks, Stephen Begley. From pkwi at risoe.dtu.dk Wed Aug 26 15:45:20 2009 From: pkwi at risoe.dtu.dk (Peter Willendrup) Date: Wed, 26 Aug 2009 15:45:20 +0200 Subject: [mcstas-users] Compiling Components In-Reply-To: <1775.172.17.44.99.1251293846.squirrel@mail.ill.fr> References: <1775.172.17.44.99.1251293846.squirrel@mail.ill.fr> Message-ID: <8492E51D-6DA5-4E04-990F-BBEAF21BDE38@risoe.dtu.dk> Hello Stephen, On 26/08/2009, at 15.37, begley at ill.fr wrote: > I had written a stub instrument which contained a single instance of > my > new component, and compiling this instrument initially allowed me to > compile the component. True - this is the way to work with components in McStas - to include them in instrumentfiles. - As described in the documentation, McStas includes code-generation and a big c-file is compiled from instrument and component parts. > However, when I make changes to the component file > these seem to be ignored by the compiler if it is run again in this > fashion. I have searched to see if the old version of the code has > been > copied somewhere, but this does not seem to be the case. > > What is the most straightforward way to compile a new component > under McStas? You _have_to_ recompile the instrumentfile including your (modified) component: If you are running McStas using mcrun on commandline, add the -c parameter. From mcgui, choose File->Compile Instrument. Best regards, Peter -- ------------------------------------------------------------------- Peter Willendrup - Development engineer RIS? DTU Materials Research Division Frederiksborgvej 399 DK-4000 Roskilde Tlf.: (+45) 4677 5862 Mobil.: (+45) 2125 4612 Fax.: (+45) 4766 5758 Email: pkwi at risoe.dtu.dk ------------------------------------------------------------------- From udby at fys.ku.dk Wed Aug 26 15:46:18 2009 From: udby at fys.ku.dk (Linda Udby) Date: Wed, 26 Aug 2009 15:46:18 +0200 (CEST) Subject: [mcstas-users] Compiling Components In-Reply-To: <1775.172.17.44.99.1251293846.squirrel@mail.ill.fr> References: <1775.172.17.44.99.1251293846.squirrel@mail.ill.fr> Message-ID: Hi Stephen, did you try mcrun -c instrumentfile to force compilation of the changed component? Linda On Wed, 26 Aug 2009, begley at ill.fr wrote: > Hello everyone, > I have written a custom component and am trying to get it > to compile under McStas. > > I have found that running mcstas on a component file directly will not > work, and the compiler expects another "DEFINE" block after the end of the > code (this happens even when trying to "compile" existing components with > this method.) > > I had written a stub instrument which contained a single instance of my > new component, and compiling this instrument initially allowed me to > compile the component. However, when I make changes to the component file > these seem to be ignored by the compiler if it is run again in this > fashion. I have searched to see if the old version of the code has been > copied somewhere, but this does not seem to be the case. > > What is the most straightforward way to compile a new component under McStas? > > Thanks, > > Stephen Begley. > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users > From begley at ill.fr Wed Aug 26 15:51:59 2009 From: begley at ill.fr (begley at ill.fr) Date: Wed, 26 Aug 2009 15:51:59 +0200 (CEST) Subject: [mcstas-users] Compiling Components In-Reply-To: <8492E51D-6DA5-4E04-990F-BBEAF21BDE38@risoe.dtu.dk> References: <1775.172.17.44.99.1251293846.squirrel@mail.ill.fr> <8492E51D-6DA5-4E04-990F-BBEAF21BDE38@risoe.dtu.dk> Message-ID: <1817.172.17.44.99.1251294719.squirrel@mail.ill.fr> Thank-you both, using the -c option with mcrun solved the problem. Stephen Begley.