From wildgrubercu at ornl.gov Wed Jul 10 21:33:19 2019 From: wildgrubercu at ornl.gov (Wildgruber, Christoph U.) Date: Wed, 10 Jul 2019 19:33:19 +0000 Subject: [mcstas-users] Multiple samples in a single mcstas instrument? Message-ID: Hi, I read the manual and somehow I think it could be done but I could not figure out how? So here is what I want to do: I have SANS instrument and want to compare it?s neutron optical performance for several pairs of sample models. To avoid using virtual sources and minimize the overall runtime I thought it might be possible to have a loop or something equivalent which runs the sample & detector part of the instrument multiple times for the same neutrons arriving at the sample position with a different scattering model. All other parameters in the sample are the same. Any suggestions? Thanks, Uli From erkn at fysik.dtu.dk Thu Jul 11 08:58:22 2019 From: erkn at fysik.dtu.dk (Erik B Knudsen) Date: Thu, 11 Jul 2019 08:58:22 +0200 Subject: [mcstas-users] Multiple samples in a single mcstas instrument? In-Reply-To: References: Message-ID: <74088882-6edb-c464-ddfe-e7ee8a8d3b79@fysik.dtu.dk> Dear Uli, It can be done if that is what you _really_ want to do, but I would not recommend it. The solution would be more complicated and likely error prone than using an intermediary MCPL-file. Also - you would have rewrite less of the instrument file that way. If you really want to do this here's a pseudocode solution for two samples that you could easily extend to more: You'd have to also set parameters for samples and decalre the variable samplec - but you knew that :-). COMPONENT a0 = Arm() AT(0,0,0) RELATIVE something EXTEND %{ samplec==0 %} SPLIT 2 COMPONENT a1 = Arm() AT(0,0,0) RELATIVE a0 EXTEND %{ samplec++; %} COMPONENT sans1 = Sans_SAMPLE(x=X,...) WHEN (samplec==1) AT(0,0,0) RELATIVE a1 COMPONENT sans2 = Sans_SAMPLE(y=Y,...) WHEN sample==2) AT(0,0,0) RELATIVE a1 COMPONENT det1 = PSD_monitor(filename="file1") WHEN(samplec==1) AT(0,0,L) RELATIVE a1 COMPONENT det2 = COPY(det1)(filename="file2") WHEN(samplec==2) AT(0,0,L) RELATIVE a2 cheers Erik On 10/07/2019 21:33, Wildgruber, Christoph U. wrote: > Hi, > > I read the manual and somehow I think it could be done but I could not > figure out how? > > So here is what I want to do: > > I have SANS instrument and want to compare it?s neutron optical performance > for several pairs of sample models. To avoid using virtual sources and minimize the > overall runtime I thought it might be possible to have a loop or something equivalent which > runs the sample & detector part of the instrument multiple times for the same neutrons > arriving at the sample position with a different scattering model. > All other parameters in the sample are the same. > > Any suggestions? > > Thanks, > > Uli > > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > https://mailman2.mcstas.org/mailman/listinfo/mcstas-users > -- Erik Bergb?ck Knudsen, Research Engineer | DTU | morituri NEXMAP, DTU Fysik, DK-2800 Kgs. Lyngby, Denmark |<>-<>| te phone: (+45) 2132 6655 |<>-<>| salutant From pkwi at fysik.dtu.dk Thu Jul 11 09:17:47 2019 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Thu, 11 Jul 2019 07:17:47 +0000 Subject: [mcstas-users] Multiple samples in a single mcstas instrument? In-Reply-To: <74088882-6edb-c464-ddfe-e7ee8a8d3b79@fysik.dtu.dk> References: <74088882-6edb-c464-ddfe-e7ee8a8d3b79@fysik.dtu.dk> Message-ID: Hi Uli, Erik managed to beat me to it! :-) I would do more or less the same: 1) SPLIT by a bigger amounts, e.g. samples * 10 (samples already allow SPLITS, and now you have a N of these) 2) partition the interval [0 1] corresponding to the number of samples and then rand01() in an EXTEND to randomly choose between them using a WHEN on each 3) One thing to remember: If getting the intensity ?right? i.e. the same as what you would get running each sample alone, I would then do a p *= nsamples; in an EXTEND. Cheers, Peter On 11 Jul 2019, at 08.58, Erik B Knudsen > wrote: Dear Uli, It can be done if that is what you _really_ want to do, but I would not recommend it. The solution would be more complicated and likely error prone than using an intermediary MCPL-file. Also - you would have rewrite less of the instrument file that way. If you really want to do this here's a pseudocode solution for two samples that you could easily extend to more: You'd have to also set parameters for samples and decalre the variable samplec - but you knew that :-). COMPONENT a0 = Arm() AT(0,0,0) RELATIVE something EXTEND %{ samplec==0 %} SPLIT 2 COMPONENT a1 = Arm() AT(0,0,0) RELATIVE a0 EXTEND %{ samplec++; %} COMPONENT sans1 = Sans_SAMPLE(x=X,...) WHEN (samplec==1) AT(0,0,0) RELATIVE a1 COMPONENT sans2 = Sans_SAMPLE(y=Y,...) WHEN sample==2) AT(0,0,0) RELATIVE a1 COMPONENT det1 = PSD_monitor(filename="file1") WHEN(samplec==1) AT(0,0,L) RELATIVE a1 COMPONENT det2 = COPY(det1)(filename="file2") WHEN(samplec==2) AT(0,0,L) RELATIVE a2 cheers Erik On 10/07/2019 21:33, Wildgruber, Christoph U. wrote: Hi, I read the manual and somehow I think it could be done but I could not figure out how? So here is what I want to do: I have SANS instrument and want to compare it?s neutron optical performance for several pairs of sample models. To avoid using virtual sources and minimize the overall runtime I thought it might be possible to have a loop or something equivalent which runs the sample & detector part of the instrument multiple times for the same neutrons arriving at the sample position with a different scattering model. All other parameters in the sample are the same. Any suggestions? Thanks, Uli _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org https://mailman2.mcstas.org/mailman/listinfo/mcstas-users -- Erik Bergb?ck Knudsen, Research Engineer | DTU | morituri NEXMAP, DTU Fysik, DK-2800 Kgs. Lyngby, Denmark |<>-<>| te phone: (+45) 2132 6655 |<>-<>| salutant _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org https://mailman2.mcstas.org/mailman/listinfo/mcstas-users Peter Kj?r Willendrup Forskningsingeni?r, Specialkonsulent N?stformand for DTU Fysik LSU DTU Physics [cid:b6339554-7f28-441d-9f31-5944f811397c at win.dtu.dk] Technical University of Denmark [cid:e108e480-fcab-46e2-9531-b38165079572 at win.dtu.dk] Department of Physics Fysikvej Building 307 DK-2800 Kongens Lyngby Direct +45 2125 4612 Mobil +45 2125 4612 Fax +45 4593 2399 pkwi at fysik.dtu.dk -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 58 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 1055 bytes Desc: image002.gif URL: From wildgrubercu at ornl.gov Thu Jul 11 14:21:43 2019 From: wildgrubercu at ornl.gov (Wildgruber, Christoph U.) Date: Thu, 11 Jul 2019 12:21:43 +0000 Subject: [mcstas-users] [EXTERNAL] Re: Multiple samples in a single mcstas instrument? In-Reply-To: References: <74088882-6edb-c464-ddfe-e7ee8a8d3b79@fysik.dtu.dk> Message-ID: <2013A013-565B-4FC0-A577-BAE8F148366C@ornl.gov> Dear Peter & Erik, Thanks so much for the confirmation that it can be done and the ?how to?. I am determined to try it at some point I am taking your implicit warnings serious :-) I also have to look into how my fully loaded mpi-cluster would deal with reading the intermediary neutron source simultaneously from many processors? maybe a RAM disk on each node would work? Thanks again, Uli [I sent that again because I didn?t to mcstas-user!] On 11 Jul 2019, at 03:17, Peter Kj?r Willendrup > wrote: Hi Uli, Erik managed to beat me to it! :-) I would do more or less the same: 1) SPLIT by a bigger amounts, e.g. samples * 10 (samples already allow SPLITS, and now you have a N of these) 2) partition the interval [0 1] corresponding to the number of samples and then rand01() in an EXTEND to randomly choose between them using a WHEN on each 3) One thing to remember: If getting the intensity ?right? i.e. the same as what you would get running each sample alone, I would then do a p *= nsamples; in an EXTEND. Cheers, Peter On 11 Jul 2019, at 08.58, Erik B Knudsen > wrote: Dear Uli, It can be done if that is what you _really_ want to do, but I would not recommend it. The solution would be more complicated and likely error prone than using an intermediary MCPL-file. Also - you would have rewrite less of the instrument file that way. If you really want to do this here's a pseudocode solution for two samples that you could easily extend to more: You'd have to also set parameters for samples and decalre the variable samplec - but you knew that :-). COMPONENT a0 = Arm() AT(0,0,0) RELATIVE something EXTEND %{ samplec==0 %} SPLIT 2 COMPONENT a1 = Arm() AT(0,0,0) RELATIVE a0 EXTEND %{ samplec++; %} COMPONENT sans1 = Sans_SAMPLE(x=X,...) WHEN (samplec==1) AT(0,0,0) RELATIVE a1 COMPONENT sans2 = Sans_SAMPLE(y=Y,...) WHEN sample==2) AT(0,0,0) RELATIVE a1 COMPONENT det1 = PSD_monitor(filename="file1") WHEN(samplec==1) AT(0,0,L) RELATIVE a1 COMPONENT det2 = COPY(det1)(filename="file2") WHEN(samplec==2) AT(0,0,L) RELATIVE a2 cheers Erik On 10/07/2019 21:33, Wildgruber, Christoph U. wrote: Hi, I read the manual and somehow I think it could be done but I could not figure out how? So here is what I want to do: I have SANS instrument and want to compare it?s neutron optical performance for several pairs of sample models. To avoid using virtual sources and minimize the overall runtime I thought it might be possible to have a loop or something equivalent which runs the sample & detector part of the instrument multiple times for the same neutrons arriving at the sample position with a different scattering model. All other parameters in the sample are the same. Any suggestions? Thanks, Uli _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org https://mailman2.mcstas.org/mailman/listinfo/mcstas-users -- Erik Bergb?ck Knudsen, Research Engineer | DTU | morituri NEXMAP, DTU Fysik, DK-2800 Kgs. Lyngby, Denmark |<>-<>| te phone: (+45) 2132 6655 |<>-<>| salutant _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org https://mailman2.mcstas.org/mailman/listinfo/mcstas-users Peter Kj?r Willendrup Forskningsingeni?r, Specialkonsulent N?stformand for DTU Fysik LSU DTU Physics Technical University of Denmark Department of Physics Fysikvej Building 307 DK-2800 Kongens Lyngby Direct +45 2125 4612 Mobil +45 2125 4612 Fax +45 4593 2399 pkwi at fysik.dtu.dk -------------- next part -------------- An HTML attachment was scrubbed... URL: From wildgrubercu at ornl.gov Thu Jul 11 19:57:31 2019 From: wildgrubercu at ornl.gov (Wildgruber, Christoph U.) Date: Thu, 11 Jul 2019 17:57:31 +0000 Subject: [mcstas-users] [EXTERNAL] Multiple samples in a single mcstas instrument? In-Reply-To: References: <74088882-6edb-c464-ddfe-e7ee8a8d3b79@fysik.dtu.dk> Message-ID: <460601F4-54AA-49CE-980B-CC2CA6AAA54D@ornl.gov> Hi again, so I did try the basic ?SPLIT 2? approach but I end up with an unexpected compile time error (RHEL 7, mcstas 2.5, mpi enabled)? I must be missing something really basic? Here is the result: ============== Setting environment: MCSTAS_OVERRIDE= /usr/local/mcstas/2.5/tools/Python/mcgui/../mccodelib/../../.. MCSTAS_CFLAGS_OVERRIDE= -g -O2 -lm MCSTAS_CC_OVERRIDE= gcc MCSTAS_MPICC_OVERRIDE= mpicc mcrun -c BER_SANS_guide_elliptical_optimize_2.1.instr -n0 INFO: No output directory specified (--dir) INFO: Using directory: "BER_SANS_guide_elliptical_optimize_2.1_20190711_134948" INFO: Regenerating c-file: BER_SANS_guide_elliptical_optimize_2.1.c Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:246. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:258. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:266. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:274. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:284. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:294. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:304. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:314. Info: 'PSD_monitor_rad' is a contributed component. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:321. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:328. Info: 'SANSQMonitor' is a contributed component. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:338. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:347. McStas: 12 Errors encountered during parse of BER_SANS_guide_elliptical_optimize_2.1.instr. compile thread done I attach the instr file in case you get a chance to try to compile it? So what is going on? Thanks so much, Uli -------------- next part -------------- A non-text attachment was scrubbed... Name: SANS_test.instr Type: application/octet-stream Size: 16125 bytes Desc: SANS_test.instr URL: From erkn at fysik.dtu.dk Thu Jul 11 20:23:24 2019 From: erkn at fysik.dtu.dk (Erik B Knudsen) Date: Thu, 11 Jul 2019 20:23:24 +0200 Subject: [mcstas-users] [EXTERNAL] Multiple samples in a single mcstas instrument? In-Reply-To: <460601F4-54AA-49CE-980B-CC2CA6AAA54D@ornl.gov> References: <74088882-6edb-c464-ddfe-e7ee8a8d3b79@fysik.dtu.dk> <460601F4-54AA-49CE-980B-CC2CA6AAA54D@ornl.gov> Message-ID: Dear Christoph, In your instrument file there are two missing ; (line 186 and 194), a switched %} line 187, and a double '==' where it should say '=' (line 187). Some of these were due to me being a bit too fast of the mark this morning, so sorry for that. The attached version has these things fixed - I can't test it completely since I lack your SANS-component but it should get you a bit further. Good Luck! cheers Erik On 11/07/2019 19:57, Wildgruber, Christoph U. wrote: > Hi again, > > so I did try the basic ?SPLIT 2? approach but I end up with an unexpected compile time error (RHEL 7, mcstas 2.5, mpi enabled)? > I must be missing something really basic? > > Here is the result: > ============== > > Setting environment: > MCSTAS_OVERRIDE= > /usr/local/mcstas/2.5/tools/Python/mcgui/../mccodelib/../../.. > > MCSTAS_CFLAGS_OVERRIDE= > -g -O2 -lm > > MCSTAS_CC_OVERRIDE= > gcc > > MCSTAS_MPICC_OVERRIDE= > mpicc > > mcrun -c BER_SANS_guide_elliptical_optimize_2.1.instr -n0 > > INFO: No output directory specified (--dir) > INFO: Using directory: "BER_SANS_guide_elliptical_optimize_2.1_20190711_134948" > INFO: Regenerating c-file: BER_SANS_guide_elliptical_optimize_2.1.c > Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:246. > Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:258. > Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:266. > Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:274. > Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:284. > Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:294. > Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:304. > Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:314. > Info: 'PSD_monitor_rad' is a contributed component. > Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:321. > Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:328. > Info: 'SANSQMonitor' is a contributed component. > Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:338. > Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:347. > McStas: 12 Errors encountered during parse of BER_SANS_guide_elliptical_optimize_2.1.instr. > compile thread done > > > I attach the instr file in case you get a chance to try to compile it? > > So what is going on? > > > Thanks so much, > > > Uli > -- Erik Bergb?ck Knudsen, Research Engineer | DTU | morituri NEXMAP, DTU Fysik, DK-2800 Kgs. Lyngby, Denmark |<>-<>| te phone: (+45) 2132 6655 |<>-<>| salutant -------------- next part -------------- /********************************************************************************************************************************************** * * Basic SANS * * Trying to implement Erik Knudsens / Peter Willendrups suggestions * ********************************************************************************************************************************************* */ DEFINE INSTRUMENT BER_Sans_optimize(lambda_max = 9.418, opticsStart = 0.843, apt_0_size = 0.0801, guide_0_Start = 1.026, guide_0_End = 2.331, guide_0_size_1 = 0.0331, guide_0_size_2 = 0.0507, guide_0_m = 6.223, apt_1_size = 0.0724, guide_1_Start = 2.389, guide_1_End = 14.001, guide_1_size = 0.0469, guide_1_f1 = 2.298, guide_1_f2 = 1857.7, guide_1_m = 3.04, apt_2_size = 0.2838, guide_2_Start = 14.35, guide_2_End = 29.21, guide_2_size = 0.108, guide_2_f1 = 3590.2, guide_2_f2 = 1.506, guide_2_m = 6.549, apt_3_size = 0.0930, sample_pos = 30.0, sample_size = 0.01, detector_pos = 33.0) DECLARE %{ double taperLength; double lambda_min; double guide_1_length, guide_2_length, SD; double detectorRadius = 1.0; double E_low, E_high; double apt_0_width, apt_0_height, apt_1_width, apt_1_height, apt_2_width, apt_2_height, apt_3_width, apt_3_height; double apt_0_pos, apt_1_pos, apt_2_pos, apt_3_pos; double sample_n; %} INITIALIZE %{ // until otherwise required I use the smallest lambda_min conceivable... // ========================================================================= lambda_min = (detector_pos * lambda_max - 3956.0 / 15.0) / detector_pos; if (lambda_min < 0.1) lambda_min = 0.1; taperLength = guide_0_End - guide_0_Start; guide_1_length = guide_1_End - guide_1_Start; guide_2_length = guide_2_End - guide_2_Start; SD = detector_pos - sample_pos; E_low = (9.045 / lambda_max) * (9.045 / lambda_max); E_high = (9.045 / lambda_min) * (9.045 / lambda_min); apt_0_width = apt_0_height = apt_0_size; apt_0_pos = opticsStart; apt_1_width = apt_1_height = apt_1_size; apt_1_pos = guide_0_End + 0.001; apt_2_width = apt_2_height = apt_2_size; apt_2_pos = guide_1_End + 0.001; apt_3_width = apt_3_height = apt_3_size; apt_3_pos = guide_2_End + 0.001; %} TRACE COMPONENT origin = Progress_bar() AT (0, 0, 0) ABSOLUTE COMPONENT arm_source = Arm( ) AT (0, 0, 0) RELATIVE origin // Pin hole configuration: source 'focus' on sample... // (source focussing on rectangle!) // =================================================== COMPONENT Source = SNS_source_mod(filename = "/home/cwl/McStas_projects/BER_SANS/source_rot_t3m-25_sp.dat", radius = 0.015, dist = guide_1_Start, focus_xw = 1.01 * apt_0_width, focus_yh = 1.01 * apt_0_height, Emin = E_low, Emax = E_high, Anorm = 0.000707) AT (0,0,0) RELATIVE origin // Aperture at entrance to straight tapered section... // ================================================================= COMPONENT Apt_0 = Slit(xwidth = apt_0_width, yheight = apt_0_height) AT (0, 0, apt_0_pos) RELATIVE origin // Tapered guide... // ========================================================================================================================= COMPONENT taperedGuide = Guide(w1 = guide_0_size_1, h1 = guide_0_size_1, w2 = guide_0_size_2, h2 = guide_0_size_2, l = taperLength, m = guide_0_m) AT (0, 0, guide_0_Start) RELATIVE origin // Aperture at entrance to focusing section... // ================================================================= COMPONENT Apt_1 = Slit(xwidth = apt_1_width, yheight = apt_1_height) AT (0, 0, apt_1_pos) RELATIVE origin // 1st half of elliptical guide... // =================================================================================================================== COMPONENT focussingGuide_1 = Guide_tapering(option = "elliptical", w1 = guide_1_size, h1 = guide_1_size, l = guide_1_length, linw = guide_1_f1, loutw = guide_1_f2, linh = guide_1_f1, louth = guide_1_f2, mx = guide_1_m, my = guide_1_m) AT (0, 0, guide_1_Start) RELATIVE origin // Aperture at center to focusing section... // ================================================================= COMPONENT Apt_2 = Slit(xwidth = apt_2_width, yheight = apt_2_height) AT (0, 0, apt_2_pos) RELATIVE origin //COMPONENT guide_center_psd = PSD_monitor(nx = 127, ny = 127, // filename = "Guide_center.dat", // xwidth = 1.05 * apt_width_2, yheight = 1.05 * apt_height_2, // //xwidth = 0.06, yheight = 0.06, // restore_neutron = 1) //AT (0, 0, apt_pos_2 + 0.001) RELATIVE origin // 2nd half of elliptical guide... // =============================== COMPONENT focussingGuide_2 = Guide_tapering(option = "elliptical", w1 = guide_2_size, h1 = guide_2_size, l = guide_2_length, linw = guide_2_f1, loutw = guide_2_f2, linh = guide_2_f1, louth = guide_2_f2, mx = guide_2_m, my = guide_2_m) AT (0, 0, guide_2_Start) RELATIVE origin COMPONENT Apt_3 = Slit(xwidth = apt_3_width, yheight = apt_3_height) AT (0, 0, apt_3_pos) RELATIVE origin // Monitor beam divergence at sample position... // (we want the sensitive area be identical to the sample area!) // ============================================================= COMPONENT sample_Div = Divergence_monitor(nh = 127, nv = 127, filename = "Sample_divergence.dat", xwidth = sample_size, yheight = sample_size, maxdiv_h = 0.25, maxdiv_v = 0.25, restore_neutron = 1) AT (0, 0, sample_pos - 0.01) RELATIVE origin COMPONENT sample_Div_2 = Divergence_monitor(nh = 127, nv = 127, filename = "Sample_divergence_2.dat", xwidth = sample_size, yheight = sample_size, maxdiv_h = 2.5, maxdiv_v = 2.5, restore_neutron = 1) AT (0, 0, sample_pos - 0.009) RELATIVE origin COMPONENT sample_apt = Slit(xwidth = sample_size, yheight = sample_size) AT (0, 0, sample_pos - 0.008) RELATIVE origin COMPONENT sample_psd = PSD_monitor(nx = 127, ny = 127, filename = "Sample_psd.dat", xwidth = 1.05 * sample_size, yheight = 1.05 * sample_size, restore_neutron = 1) AT (0, 0, sample_pos - 0.007) RELATIVE origin // Multiple samples... // =================== COMPONENT a0 = Arm() AT (0, 0, sample_pos) RELATIVE origin EXTEND %{ sample_n = 0; %} COMPONENT a1 = Arm() AT (0, 0, 0) RELATIVE a0 EXTEND %{ sample_n++; %} // sample: flatline_1.dat // ===================================================================================================== COMPONENT GK_MD_sim_1 = SANSCurve(DeltaRho = 1.0e-14, Volume = 1000.0, Concentration = 0.01, AbsorptionCrosssection = 0.0, xwidth = sample_size, yheight = sample_size, zdepth = 0.005, SampleToDetectorDistance = SD, DetectorRadius = 1.0, FileWithCurve = "/home/cwl/McStas_projects/BER_SANS/BER_SANS_optimize_elliptical_discrimination/samples/flatLine_1.dat") WHEN (sample_n == 1) AT (0, 0, 0) RELATIVE a1 // sample: 1_Apo_Guanylate_kinase_theoretical_SANS.dat // ===================================================================================================== COMPONENT GK_MD_sim_2 = SANSCurve(DeltaRho = 1.0e-14, Volume = 1000.0, Concentration = 0.01, AbsorptionCrosssection = 0.0, xwidth = sample_size, yheight = sample_size, zdepth = 0.005, SampleToDetectorDistance = SD, DetectorRadius = 1.0, FileWithCurve = "/home/cwl/McStas_projects/BER_SANS/BER_SANS_optimize_elliptical_discrimination/samples/1_Apo_Guanylate_kinase_theoretical_SANS.dat") WHEN (sample_n == 2) AT (0, 0, 0) RELATIVE a1 // single 2D detector #1 at 'detector_pos'... // ========================================== COMPONENT psd_monitor_1 = PSD_monitor(nx = 127, ny = 127, filename = "PSD_mon_1.dat", xwidth = detectorRadius, yheight = detectorRadius, restore_neutron = 1) WHEN (sample_n == 1) AT (0, 0, (detector_pos - sample_pos)) RELATIVE a1 // single 2D detector #2 at 'detector_pos'... // ========================================== COMPONENT psd_monitor_2 = PSD_monitor(nx = 127, ny = 127, filename = "PSD_mon_2.dat", xwidth = detectorRadius, yheight = detectorRadius, restore_neutron = 1) WHEN (sample_n == 2) AT (0, 0, (detector_pos - sample_pos)) RELATIVE a1 // wavlength monitor #1... // ======================= COMPONENT l_monitor_1 = L_monitor(nL = 257, filename = "L_mon_1.dat", xwidth = detectorRadius, yheight = detectorRadius, Lmin = lambda_min - 0.5 * (lambda_max - lambda_min), Lmax = lambda_max + 0.5 * (lambda_max - lambda_min), restore_neutron = 1) WHEN (sample_n == 1) AT (0, 0, (detector_pos - sample_pos + 0.001)) RELATIVE a1 // wavlength monitor #2... // ======================= COMPONENT l_monitor_2 = L_monitor(nL = 257, filename = "L_mon_2.dat", xwidth = detectorRadius, yheight = detectorRadius, Lmin = lambda_min - 0.5 * (lambda_max - lambda_min), Lmax = lambda_max + 0.5 * (lambda_max - lambda_min), restore_neutron = 1) WHEN (sample_n == 2) AT (0, 0, (detector_pos - sample_pos + 0.001)) RELATIVE a1 // energy monitor #1... // ==================== COMPONENT E_monitor_1 = E_monitor(nE = 257, filename = "E_mon_1.dat", xwidth = detectorRadius, yheight = detectorRadius, Emin = E_low - 0.5 * (E_high - E_low), Emax = E_high + 0.5 * (E_high - E_low), restore_neutron = 1) WHEN (sample_n == 1) AT (0, 0, (detector_pos - sample_pos + 0.002)) RELATIVE a1 // energy monitor #2... // ==================== COMPONENT E_monitor_2 = E_monitor(nE = 257, filename = "E_mon_2.dat", xwidth = detectorRadius, yheight = detectorRadius, Emin = E_low - 0.5 * (E_high - E_low), Emax = E_high + 0.5 * (E_high - E_low), restore_neutron = 1) WHEN (sample_n == 2) AT (0, 0, (detector_pos - sample_pos + 0.002)) RELATIVE a1 // radial monitor #1 (1D detector)... // (don't try to use 'restore_neutron'!) // ===================================== COMPONENT psd_monitor_rad_1 = PSD_monitor_rad(rmax = detectorRadius, nr = 257, filename = "PSD_rad_1.dat", filename_av = "PSD_rad_av_1.dat") WHEN (sample_n == 1) AT (0, 0, (detector_pos -sample_pos + 0.003)) RELATIVE a1 // radial monitor #2 (1D detector)... // (don't try to use 'restore_neutron'!) // ===================================== COMPONENT psd_monitor_rad_2 = PSD_monitor_rad(rmax = detectorRadius, nr = 257, filename = "PSD_rad_2.dat", filename_av = "PSD_rad_av_2.dat") WHEN (sample_n == 2) AT (0, 0, (detector_pos - sample_pos + 0.003)) RELATIVE a1 // q monitor #1... // =============== COMPONENT sansqmonitor_1 = SANSQMonitor(LambdaMin = 1.9, RFilename = "RDetector_1", qFilename = "QDetector_1", NumberOfBins = 1025, RadiusDetector = detectorRadius, DistanceFromSample = SD, restore_neutron = 0) WHEN (sample_n == 1) AT (0, 0, (detector_pos - sample_pos + 0.004)) RELATIVE a1 // q monitor #2... // =============== COMPONENT sansqmonitor_2 = SANSQMonitor(LambdaMin = 1.9, RFilename = "RDetector_2", qFilename = "QDetector_2", NumberOfBins = 1025, RadiusDetector = detectorRadius, DistanceFromSample = SD, restore_neutron = 0) WHEN (sample_n == 2) AT (0, 0, (detector_pos - sample_pos + 0.004)) RELATIVE a1 FINALLY %{ %} END From wildgrubercu at ornl.gov Thu Jul 11 20:28:18 2019 From: wildgrubercu at ornl.gov (Wildgruber, Christoph U.) Date: Thu, 11 Jul 2019 18:28:18 +0000 Subject: [mcstas-users] [EXTERNAL] Multiple samples in a single mcstas instrument? In-Reply-To: References: <74088882-6edb-c464-ddfe-e7ee8a8d3b79@fysik.dtu.dk> <460601F4-54AA-49CE-980B-CC2CA6AAA54D@ornl.gov> Message-ID: <97A73B33-F917-4945-AEB3-7C67FC92F4A1@ornl.gov> Hi Erik, thanks for the immediate response, I?ll give it a try right away? The error message threw me off... Thanks, again Uli On 11 Jul 2019, at 14:23, Erik B Knudsen > wrote: Dear Christoph, In your instrument file there are two missing ; (line 186 and 194), a switched %} line 187, and a double '==' where it should say '=' (line 187). Some of these were due to me being a bit too fast of the mark this morning, so sorry for that. The attached version has these things fixed - I can't test it completely since I lack your SANS-component but it should get you a bit further. Good Luck! cheers Erik On 11/07/2019 19:57, Wildgruber, Christoph U. wrote: Hi again, so I did try the basic ?SPLIT 2? approach but I end up with an unexpected compile time error (RHEL 7, mcstas 2.5, mpi enabled)? I must be missing something really basic? Here is the result: ============== Setting environment: MCSTAS_OVERRIDE= /usr/local/mcstas/2.5/tools/Python/mcgui/../mccodelib/../../.. MCSTAS_CFLAGS_OVERRIDE= -g -O2 -lm MCSTAS_CC_OVERRIDE= gcc MCSTAS_MPICC_OVERRIDE= mpicc mcrun -c BER_SANS_guide_elliptical_optimize_2.1.instr -n0 INFO: No output directory specified (--dir) INFO: Using directory: "BER_SANS_guide_elliptical_optimize_2.1_20190711_134948" INFO: Regenerating c-file: BER_SANS_guide_elliptical_optimize_2.1.c Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:246. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:258. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:266. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:274. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:284. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:294. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:304. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:314. Info: 'PSD_monitor_rad' is a contributed component. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:321. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:328. Info: 'SANSQMonitor' is a contributed component. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:338. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:347. McStas: 12 Errors encountered during parse of BER_SANS_guide_elliptical_optimize_2.1.instr. compile thread done I attach the instr file in case you get a chance to try to compile it? So what is going on? Thanks so much, Uli -- Erik Bergb?ck Knudsen, Research Engineer | DTU | morituri NEXMAP, DTU Fysik, DK-2800 Kgs. Lyngby, Denmark |<>-<>| te phone: (+45) 2132 6655 |<>-<>| salutant -------------- next part -------------- An HTML attachment was scrubbed... URL: From prashants at barc.gov.in Fri Jul 12 07:22:01 2019 From: prashants at barc.gov.in (prashants at barc.gov.in) Date: Fri, 12 Jul 2019 10:52:01 +0530 Subject: [mcstas-users] Regarding gamma simulations in mcstas Message-ID: Hi Team, I have recently started using Mcstas. I want to know if we can simulate the Gamma emitted due to neutron interaction with different materials. Thanks and regards, Prashant Singh From wildgrubercu at ornl.gov Fri Jul 12 14:21:12 2019 From: wildgrubercu at ornl.gov (Wildgruber, Christoph U.) Date: Fri, 12 Jul 2019 12:21:12 +0000 Subject: [mcstas-users] [EXTERNAL] Multiple samples in a single mcstas instrument? In-Reply-To: <97A73B33-F917-4945-AEB3-7C67FC92F4A1@ornl.gov> References: <74088882-6edb-c464-ddfe-e7ee8a8d3b79@fysik.dtu.dk> <460601F4-54AA-49CE-980B-CC2CA6AAA54D@ornl.gov> <97A73B33-F917-4945-AEB3-7C67FC92F4A1@ornl.gov> Message-ID: <55A5B0EA-BF84-437D-BFD1-A2F20DD8D98E@ornl.gov> Hi Erik & Peter, it is working really well and I?d say it is pretty efficient :-) The only other thing I had to do was to move two function definition from SANSCurve inot the instrument to avoid ?redefinition? complaints from the compiler. All I need to do now is to make sure the output is valid? Thanks again for your help, Uli On 11 Jul 2019, at 14:28, Wildgruber, Christoph U. > wrote: Hi Erik, thanks for the immediate response, I?ll give it a try right away? The error message threw me off... Thanks, again Uli On 11 Jul 2019, at 14:23, Erik B Knudsen > wrote: Dear Christoph, In your instrument file there are two missing ; (line 186 and 194), a switched %} line 187, and a double '==' where it should say '=' (line 187). Some of these were due to me being a bit too fast of the mark this morning, so sorry for that. The attached version has these things fixed - I can't test it completely since I lack your SANS-component but it should get you a bit further. Good Luck! cheers Erik On 11/07/2019 19:57, Wildgruber, Christoph U. wrote: Hi again, so I did try the basic ?SPLIT 2? approach but I end up with an unexpected compile time error (RHEL 7, mcstas 2.5, mpi enabled)? I must be missing something really basic? Here is the result: ============== Setting environment: MCSTAS_OVERRIDE= /usr/local/mcstas/2.5/tools/Python/mcgui/../mccodelib/../../.. MCSTAS_CFLAGS_OVERRIDE= -g -O2 -lm MCSTAS_CC_OVERRIDE= gcc MCSTAS_MPICC_OVERRIDE= mpicc mcrun -c BER_SANS_guide_elliptical_optimize_2.1.instr -n0 INFO: No output directory specified (--dir) INFO: Using directory: "BER_SANS_guide_elliptical_optimize_2.1_20190711_134948" INFO: Regenerating c-file: BER_SANS_guide_elliptical_optimize_2.1.c Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:246. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:258. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:266. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:274. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:284. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:294. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:304. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:314. Info: 'PSD_monitor_rad' is a contributed component. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:321. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:328. Info: 'SANSQMonitor' is a contributed component. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:338. Reference to undefined component instance a1 at line BER_SANS_guide_elliptical_optimize_2.1.instr:347. McStas: 12 Errors encountered during parse of BER_SANS_guide_elliptical_optimize_2.1.instr. compile thread done I attach the instr file in case you get a chance to try to compile it? So what is going on? Thanks so much, Uli -- Erik Bergb?ck Knudsen, Research Engineer | DTU | morituri NEXMAP, DTU Fysik, DK-2800 Kgs. Lyngby, Denmark |<>-<>| te phone: (+45) 2132 6655 |<>-<>| salutant -------------- next part -------------- An HTML attachment was scrubbed... URL: From erkn at fysik.dtu.dk Fri Jul 12 15:26:02 2019 From: erkn at fysik.dtu.dk (Erik B Knudsen) Date: Fri, 12 Jul 2019 15:26:02 +0200 Subject: [mcstas-users] [EXTERNAL] Multiple samples in a single mcstas instrument? In-Reply-To: <55A5B0EA-BF84-437D-BFD1-A2F20DD8D98E@ornl.gov> References: <74088882-6edb-c464-ddfe-e7ee8a8d3b79@fysik.dtu.dk> <460601F4-54AA-49CE-980B-CC2CA6AAA54D@ornl.gov> <97A73B33-F917-4945-AEB3-7C67FC92F4A1@ornl.gov> <55A5B0EA-BF84-437D-BFD1-A2F20DD8D98E@ornl.gov> Message-ID: <8077a937-3767-0ef1-8aad-37a34e80ea8e@fysik.dtu.dk> Hi Uli, Excellent! Great news. Always happy to help! When it all works and you are satisfied with it - please consider contributing your instrument file to the project. It might help other users 8-). cheers Erik On 12/07/2019 14:21, Wildgruber, Christoph U. wrote: > Hi Erik & Peter, > > it is working really well and I?d say it is pretty efficient :-) > The only other thing I had to do was to move two function definition > from SANSCurve inot the > instrument to avoid ?redefinition? complaints from the compiler. > All I need to do now is to make sure the output is valid? > > Thanks again for your help, > > Uli > > >> On 11 Jul 2019, at 14:28, Wildgruber, Christoph U. >> > wrote: >> >> Hi Erik, >> >> thanks for the immediate response, I?ll give it a try right away? >> The error message threw me off... >> >> Thanks, again >> >> Uli >> >> >>> On 11 Jul 2019, at 14:23, Erik B Knudsen >> > wrote: >>> >>> Dear Christoph, >>> >>> In your instrument file there are two missing ; (line 186 and 194), a >>> switched %} line 187, and a double '==' where it should say '=' (line >>> 187). Some of these were due to me being a bit too fast of the mark this >>> morning, so sorry for that. The attached version has these things fixed >>> - I can't test it completely since I lack your SANS-component but it >>> should get you a bit further. Good Luck! >>> >>> cheers >>> Erik >>> >>> >>> On 11/07/2019 19:57, Wildgruber, Christoph U. wrote: >>>> Hi again, >>>> >>>> so I did try the basic ?SPLIT 2? approach but I end up with an >>>> unexpected compile time error (RHEL 7, mcstas 2.5, mpi enabled)? >>>> I must be missing something really basic? >>>> >>>> Here is the result: >>>> ============== >>>> >>>> Setting environment: >>>> MCSTAS_OVERRIDE= >>>> /usr/local/mcstas/2.5/tools/Python/mcgui/../mccodelib/../../.. >>>> >>>> MCSTAS_CFLAGS_OVERRIDE= >>>> -g -O2 -lm? >>>> >>>> MCSTAS_CC_OVERRIDE= >>>> gcc >>>> >>>> MCSTAS_MPICC_OVERRIDE= >>>> mpicc >>>> >>>> mcrun -c BER_SANS_guide_elliptical_optimize_2.1.instr -n0? >>>> >>>> INFO: No output directory specified (--dir) >>>> INFO: Using directory: >>>> "BER_SANS_guide_elliptical_optimize_2.1_20190711_134948" >>>> INFO: Regenerating c-file: BER_SANS_guide_elliptical_optimize_2.1.c >>>> Reference to undefined component instance a1 at line >>>> BER_SANS_guide_elliptical_optimize_2.1.instr:246. >>>> Reference to undefined component instance a1 at line >>>> BER_SANS_guide_elliptical_optimize_2.1.instr:258. >>>> Reference to undefined component instance a1 at line >>>> BER_SANS_guide_elliptical_optimize_2.1.instr:266. >>>> Reference to undefined component instance a1 at line >>>> BER_SANS_guide_elliptical_optimize_2.1.instr:274. >>>> Reference to undefined component instance a1 at line >>>> BER_SANS_guide_elliptical_optimize_2.1.instr:284. >>>> Reference to undefined component instance a1 at line >>>> BER_SANS_guide_elliptical_optimize_2.1.instr:294. >>>> Reference to undefined component instance a1 at line >>>> BER_SANS_guide_elliptical_optimize_2.1.instr:304. >>>> Reference to undefined component instance a1 at line >>>> BER_SANS_guide_elliptical_optimize_2.1.instr:314. >>>> Info: ???'PSD_monitor_rad' is a contributed component. >>>> Reference to undefined component instance a1 at line >>>> BER_SANS_guide_elliptical_optimize_2.1.instr:321. >>>> Reference to undefined component instance a1 at line >>>> BER_SANS_guide_elliptical_optimize_2.1.instr:328. >>>> Info: ???'SANSQMonitor' is a contributed component. >>>> Reference to undefined component instance a1 at line >>>> BER_SANS_guide_elliptical_optimize_2.1.instr:338. >>>> Reference to undefined component instance a1 at line >>>> BER_SANS_guide_elliptical_optimize_2.1.instr:347. >>>> McStas: 12 Errors encountered during parse of >>>> BER_SANS_guide_elliptical_optimize_2.1.instr. >>>> compile thread done >>>> >>>> >>>> I attach the instr file in case you get a chance to try to compile it? >>>> >>>> So what is going on? >>>> >>>> >>>> Thanks so much, >>>> >>>> >>>> Uli >>>> >>> >>> --? >>> Erik Bergb?ck Knudsen, Research Engineer ????????| DTU | morituri >>> NEXMAP, DTU Fysik, DK-2800 Kgs. Lyngby, Denmark ?|<>-<>| ???te >>> phone: (+45) 2132 6655 ??????????????????????????|<>-<>| salutant >>> >> > -- Erik Bergb?ck Knudsen, Research Engineer | DTU | morituri NEXMAP, DTU Fysik, DK-2800 Kgs. Lyngby, Denmark |<>-<>| te phone: (+45) 2132 6655 |<>-<>| salutant From wildgrubercu at ornl.gov Fri Jul 12 15:34:17 2019 From: wildgrubercu at ornl.gov (Wildgruber, Christoph U.) Date: Fri, 12 Jul 2019 13:34:17 +0000 Subject: [mcstas-users] [EXTERNAL] Multiple samples in a single mcstas instrument? In-Reply-To: <8077a937-3767-0ef1-8aad-37a34e80ea8e@fysik.dtu.dk> References: <74088882-6edb-c464-ddfe-e7ee8a8d3b79@fysik.dtu.dk> <460601F4-54AA-49CE-980B-CC2CA6AAA54D@ornl.gov> <97A73B33-F917-4945-AEB3-7C67FC92F4A1@ornl.gov> <55A5B0EA-BF84-437D-BFD1-A2F20DD8D98E@ornl.gov> <8077a937-3767-0ef1-8aad-37a34e80ea8e@fysik.dtu.dk> Message-ID: <3A85A927-3D2B-411A-B562-332457537B5E@ornl.gov> I?ll do that once I convinced myself that it is mostly doing what I think it should :-) Uli > On 12 Jul 2019, at 09:26, Erik B Knudsen wrote: > > Hi Uli, > Excellent! Great news. Always happy to help! > When it all works and you are satisfied with it - please consider > contributing your instrument file to the project. It might help other > users 8-). > > cheers > Erik > > On 12/07/2019 14:21, Wildgruber, Christoph U. wrote: >> Hi Erik & Peter, >> >> it is working really well and I?d say it is pretty efficient :-) >> The only other thing I had to do was to move two function definition >> from SANSCurve inot the >> instrument to avoid ?redefinition? complaints from the compiler. >> All I need to do now is to make sure the output is valid? >> >> Thanks again for your help, >> >> Uli >> >> >>> On 11 Jul 2019, at 14:28, Wildgruber, Christoph U. >>> > wrote: >>> >>> Hi Erik, >>> >>> thanks for the immediate response, I?ll give it a try right away? >>> The error message threw me off... >>> >>> Thanks, again >>> >>> Uli >>> >>> >>>> On 11 Jul 2019, at 14:23, Erik B Knudsen >>> > wrote: >>>> >>>> Dear Christoph, >>>> >>>> In your instrument file there are two missing ; (line 186 and 194), a >>>> switched %} line 187, and a double '==' where it should say '=' (line >>>> 187). Some of these were due to me being a bit too fast of the mark this >>>> morning, so sorry for that. The attached version has these things fixed >>>> - I can't test it completely since I lack your SANS-component but it >>>> should get you a bit further. Good Luck! >>>> >>>> cheers >>>> Erik >>>> >>>> >>>> On 11/07/2019 19:57, Wildgruber, Christoph U. wrote: >>>>> Hi again, >>>>> >>>>> so I did try the basic ?SPLIT 2? approach but I end up with an >>>>> unexpected compile time error (RHEL 7, mcstas 2.5, mpi enabled)? >>>>> I must be missing something really basic? >>>>> >>>>> Here is the result: >>>>> ============== >>>>> >>>>> Setting environment: >>>>> MCSTAS_OVERRIDE= >>>>> /usr/local/mcstas/2.5/tools/Python/mcgui/../mccodelib/../../.. >>>>> >>>>> MCSTAS_CFLAGS_OVERRIDE= >>>>> -g -O2 -lm >>>>> >>>>> MCSTAS_CC_OVERRIDE= >>>>> gcc >>>>> >>>>> MCSTAS_MPICC_OVERRIDE= >>>>> mpicc >>>>> >>>>> mcrun -c BER_SANS_guide_elliptical_optimize_2.1.instr -n0 >>>>> >>>>> INFO: No output directory specified (--dir) >>>>> INFO: Using directory: >>>>> "BER_SANS_guide_elliptical_optimize_2.1_20190711_134948" >>>>> INFO: Regenerating c-file: BER_SANS_guide_elliptical_optimize_2.1.c >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:246. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:258. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:266. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:274. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:284. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:294. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:304. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:314. >>>>> Info: 'PSD_monitor_rad' is a contributed component. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:321. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:328. >>>>> Info: 'SANSQMonitor' is a contributed component. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:338. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:347. >>>>> McStas: 12 Errors encountered during parse of >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr. >>>>> compile thread done >>>>> >>>>> >>>>> I attach the instr file in case you get a chance to try to compile it? >>>>> >>>>> So what is going on? >>>>> >>>>> >>>>> Thanks so much, >>>>> >>>>> >>>>> Uli >>>>> >>>> >>>> -- >>>> Erik Bergb?ck Knudsen, Research Engineer | DTU | morituri >>>> NEXMAP, DTU Fysik, DK-2800 Kgs. Lyngby, Denmark |<>-<>| te >>>> phone: (+45) 2132 6655 |<>-<>| salutant >>>> >>> >> > > -- > Erik Bergb?ck Knudsen, Research Engineer | DTU | morituri > NEXMAP, DTU Fysik, DK-2800 Kgs. Lyngby, Denmark |<>-<>| te > phone: (+45) 2132 6655 |<>-<>| salutant From wildgrubercu at ornl.gov Mon Jul 15 20:29:25 2019 From: wildgrubercu at ornl.gov (Wildgruber, Christoph U.) Date: Mon, 15 Jul 2019 18:29:25 +0000 Subject: [mcstas-users] [EXTERNAL] Multiple samples in a single mcstas instrument? In-Reply-To: <8077a937-3767-0ef1-8aad-37a34e80ea8e@fysik.dtu.dk> References: <74088882-6edb-c464-ddfe-e7ee8a8d3b79@fysik.dtu.dk> <460601F4-54AA-49CE-980B-CC2CA6AAA54D@ornl.gov> <97A73B33-F917-4945-AEB3-7C67FC92F4A1@ornl.gov> <55A5B0EA-BF84-437D-BFD1-A2F20DD8D98E@ornl.gov> <8077a937-3767-0ef1-8aad-37a34e80ea8e@fysik.dtu.dk> Message-ID: Hi again, so here is a little update? To get my instrument with multiple instances of SANSCurve.comp (attached) compiled I had to - or at least thats what I thought - move the functions ?CountLines? and ?LoadCurve? into the main body of the instr(ument) file (attached). However despite the uneventful execution of the code only the first of the five I(q) data sets was used to simulate a SANS curve. Being suspicious about my understanding of how ?split? should/would work I cloned SANSCurve.comp and used SANSCurve_1.comp ? SANSCurve_5.comp. Again the code ran without problems but still ignored all but the first I(q) data I specified. At this point I started to wonder if there is a problem with the scope of the variables - especially ?Q? and ?I? - as defined in SANSCurve. After renaming ?I? to ?I-1? ? ?I-5? and ?Q? to ?Q-1 ? Q-5? in my SANSCurve Clones I got the desired results. I consulted the manual (and Lee Robertson :-) but still could not figure out how I should modifiy my instrument and/or SANSCurve.comp. I suspect there is a right way to do it and I am curious how that would look like. Any ideas/suggestions? Thanks so much, Uli > On 12 Jul 2019, at 09:26, Erik B Knudsen wrote: > > Hi Uli, > Excellent! Great news. Always happy to help! > When it all works and you are satisfied with it - please consider > contributing your instrument file to the project. It might help other > users 8-). > > cheers > Erik > > On 12/07/2019 14:21, Wildgruber, Christoph U. wrote: >> Hi Erik & Peter, >> >> it is working really well and I?d say it is pretty efficient :-) >> The only other thing I had to do was to move two function definition >> from SANSCurve inot the >> instrument to avoid ?redefinition? complaints from the compiler. >> All I need to do now is to make sure the output is valid? >> >> Thanks again for your help, >> >> Uli >> >> >>> On 11 Jul 2019, at 14:28, Wildgruber, Christoph U. >>> > wrote: >>> >>> Hi Erik, >>> >>> thanks for the immediate response, I?ll give it a try right away? >>> The error message threw me off... >>> >>> Thanks, again >>> >>> Uli >>> >>> >>>> On 11 Jul 2019, at 14:23, Erik B Knudsen >>> > wrote: >>>> >>>> Dear Christoph, >>>> >>>> In your instrument file there are two missing ; (line 186 and 194), a >>>> switched %} line 187, and a double '==' where it should say '=' (line >>>> 187). Some of these were due to me being a bit too fast of the mark this >>>> morning, so sorry for that. The attached version has these things fixed >>>> - I can't test it completely since I lack your SANS-component but it >>>> should get you a bit further. Good Luck! >>>> >>>> cheers >>>> Erik >>>> >>>> >>>> On 11/07/2019 19:57, Wildgruber, Christoph U. wrote: >>>>> Hi again, >>>>> >>>>> so I did try the basic ?SPLIT 2? approach but I end up with an >>>>> unexpected compile time error (RHEL 7, mcstas 2.5, mpi enabled)? >>>>> I must be missing something really basic? >>>>> >>>>> Here is the result: >>>>> ============== >>>>> >>>>> Setting environment: >>>>> MCSTAS_OVERRIDE= >>>>> /usr/local/mcstas/2.5/tools/Python/mcgui/../mccodelib/../../.. >>>>> >>>>> MCSTAS_CFLAGS_OVERRIDE= >>>>> -g -O2 -lm >>>>> >>>>> MCSTAS_CC_OVERRIDE= >>>>> gcc >>>>> >>>>> MCSTAS_MPICC_OVERRIDE= >>>>> mpicc >>>>> >>>>> mcrun -c BER_SANS_guide_elliptical_optimize_2.1.instr -n0 >>>>> >>>>> INFO: No output directory specified (--dir) >>>>> INFO: Using directory: >>>>> "BER_SANS_guide_elliptical_optimize_2.1_20190711_134948" >>>>> INFO: Regenerating c-file: BER_SANS_guide_elliptical_optimize_2.1.c >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:246. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:258. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:266. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:274. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:284. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:294. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:304. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:314. >>>>> Info: 'PSD_monitor_rad' is a contributed component. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:321. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:328. >>>>> Info: 'SANSQMonitor' is a contributed component. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:338. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:347. >>>>> McStas: 12 Errors encountered during parse of >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr. >>>>> compile thread done >>>>> >>>>> >>>>> I attach the instr file in case you get a chance to try to compile it? >>>>> >>>>> So what is going on? >>>>> >>>>> >>>>> Thanks so much, >>>>> >>>>> >>>>> Uli >>>>> >>>> >>>> -- >>>> Erik Bergb?ck Knudsen, Research Engineer | DTU | morituri >>>> NEXMAP, DTU Fysik, DK-2800 Kgs. Lyngby, Denmark |<>-<>| te >>>> phone: (+45) 2132 6655 |<>-<>| salutant >>>> >>> >> > > -- > Erik Bergb?ck Knudsen, Research Engineer | DTU | morituri > NEXMAP, DTU Fysik, DK-2800 Kgs. Lyngby, Denmark |<>-<>| te > phone: (+45) 2132 6655 |<>-<>| salutant -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SANSCurve.comp Type: application/octet-stream Size: 6035 bytes Desc: SANSCurve.comp URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: BER_SANS.instr Type: application/octet-stream Size: 18434 bytes Desc: BER_SANS.instr URL: From pkwi at fysik.dtu.dk Tue Jul 16 09:36:38 2019 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Tue, 16 Jul 2019 07:36:38 +0000 Subject: [mcstas-users] [EXTERNAL] Multiple samples in a single mcstas instrument? In-Reply-To: References: <74088882-6edb-c464-ddfe-e7ee8a8d3b79@fysik.dtu.dk> <460601F4-54AA-49CE-980B-CC2CA6AAA54D@ornl.gov> <97A73B33-F917-4945-AEB3-7C67FC92F4A1@ornl.gov> <55A5B0EA-BF84-437D-BFD1-A2F20DD8D98E@ornl.gov> <8077a937-3767-0ef1-8aad-37a34e80ea8e@fysik.dtu.dk> Message-ID: <94627548-BA7F-483C-A6BC-5ABEF0F42EC4@fysik.dtu.dk> Hi Uli, I am afraid you have done this the ?right? way in the sense that indeed, all of the SASmodels functions have the same name? (In fact, the way they are used from the component is by means of a hack, simply a compiler #define clause, hence requiring a recompile of one wants to use a different model?) We are thinking of ways of doing this better, but haven?t exactly settled on the ?right? way just yet. Cheers, Peter On 15 Jul 2019, at 20.29, Wildgruber, Christoph U. > wrote: Hi again, so here is a little update? To get my instrument with multiple instances of SANSCurve.comp (attached) compiled I had to - or at least thats what I thought - move the functions ?CountLines? and ?LoadCurve? into the main body of the instr(ument) file (attached). However despite the uneventful execution of the code only the first of the five I(q) data sets was used to simulate a SANS curve. Being suspicious about my understanding of how ?split? should/would work I cloned SANSCurve.comp and used SANSCurve_1.comp ? SANSCurve_5.comp. Again the code ran without problems but still ignored all but the first I(q) data I specified. At this point I started to wonder if there is a problem with the scope of the variables - especially ?Q? and ?I? - as defined in SANSCurve. After renaming ?I? to ?I-1? ? ?I-5? and ?Q? to ?Q-1 ? Q-5? in my SANSCurve Clones I got the desired results. I consulted the manual (and Lee Robertson :-) but still could not figure out how I should modifiy my instrument and/or SANSCurve.comp. I suspect there is a right way to do it and I am curious how that would look like. Any ideas/suggestions? Thanks so much, Uli > On 12 Jul 2019, at 09:26, Erik B Knudsen > wrote: > > Hi Uli, > Excellent! Great news. Always happy to help! > When it all works and you are satisfied with it - please consider > contributing your instrument file to the project. It might help other > users 8-). > > cheers > Erik > > On 12/07/2019 14:21, Wildgruber, Christoph U. wrote: >> Hi Erik & Peter, >> >> it is working really well and I?d say it is pretty efficient :-) >> The only other thing I had to do was to move two function definition >> from SANSCurve inot the >> instrument to avoid ?redefinition? complaints from the compiler. >> All I need to do now is to make sure the output is valid? >> >> Thanks again for your help, >> >> Uli >> >> >>> On 11 Jul 2019, at 14:28, Wildgruber, Christoph U. >>> > wrote: >>> >>> Hi Erik, >>> >>> thanks for the immediate response, I?ll give it a try right away? >>> The error message threw me off... >>> >>> Thanks, again >>> >>> Uli >>> >>> >>>> On 11 Jul 2019, at 14:23, Erik B Knudsen >>>> > wrote: >>>> >>>> Dear Christoph, >>>> >>>> In your instrument file there are two missing ; (line 186 and 194), a >>>> switched %} line 187, and a double '==' where it should say '=' (line >>>> 187). Some of these were due to me being a bit too fast of the mark this >>>> morning, so sorry for that. The attached version has these things fixed >>>> - I can't test it completely since I lack your SANS-component but it >>>> should get you a bit further. Good Luck! >>>> >>>> cheers >>>> Erik >>>> >>>> >>>> On 11/07/2019 19:57, Wildgruber, Christoph U. wrote: >>>>> Hi again, >>>>> >>>>> so I did try the basic ?SPLIT 2? approach but I end up with an >>>>> unexpected compile time error (RHEL 7, mcstas 2.5, mpi enabled)? >>>>> I must be missing something really basic? >>>>> >>>>> Here is the result: >>>>> ============== >>>>> >>>>> Setting environment: >>>>> MCSTAS_OVERRIDE= >>>>> /usr/local/mcstas/2.5/tools/Python/mcgui/../mccodelib/../../.. >>>>> >>>>> MCSTAS_CFLAGS_OVERRIDE= >>>>> -g -O2 -lm >>>>> >>>>> MCSTAS_CC_OVERRIDE= >>>>> gcc >>>>> >>>>> MCSTAS_MPICC_OVERRIDE= >>>>> mpicc >>>>> >>>>> mcrun -c BER_SANS_guide_elliptical_optimize_2.1.instr -n0 >>>>> >>>>> INFO: No output directory specified (--dir) >>>>> INFO: Using directory: >>>>> "BER_SANS_guide_elliptical_optimize_2.1_20190711_134948" >>>>> INFO: Regenerating c-file: BER_SANS_guide_elliptical_optimize_2.1.c >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:246. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:258. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:266. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:274. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:284. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:294. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:304. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:314. >>>>> Info: 'PSD_monitor_rad' is a contributed component. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:321. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:328. >>>>> Info: 'SANSQMonitor' is a contributed component. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:338. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:347. >>>>> McStas: 12 Errors encountered during parse of >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr. >>>>> compile thread done >>>>> >>>>> >>>>> I attach the instr file in case you get a chance to try to compile it? >>>>> >>>>> So what is going on? >>>>> >>>>> >>>>> Thanks so much, >>>>> >>>>> >>>>> Uli >>>>> >>>> >>>> -- >>>> Erik Bergb?ck Knudsen, Research Engineer | DTU | morituri >>>> NEXMAP, DTU Fysik, DK-2800 Kgs. Lyngby, Denmark |<>-<>| te >>>> phone: (+45) 2132 6655 |<>-<>| salutant >>>> >>> >> > > -- > Erik Bergb?ck Knudsen, Research Engineer | DTU | morituri > NEXMAP, DTU Fysik, DK-2800 Kgs. Lyngby, Denmark |<>-<>| te > phone: (+45) 2132 6655 |<>-<>| salutant Peter Kj?r Willendrup Forskningsingeni?r, Specialkonsulent N?stformand for DTU Fysik LSU DTU Physics [cid:b6339554-7f28-441d-9f31-5944f811397c at win.dtu.dk] Technical University of Denmark [cid:e108e480-fcab-46e2-9531-b38165079572 at win.dtu.dk] Department of Physics Fysikvej Building 307 DK-2800 Kongens Lyngby Direct +45 2125 4612 Mobil +45 2125 4612 Fax +45 4593 2399 pkwi at fysik.dtu.dk -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 58 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 1055 bytes Desc: image002.gif URL: From wildgrubercu at ornl.gov Tue Jul 16 14:14:41 2019 From: wildgrubercu at ornl.gov (Wildgruber, Christoph U.) Date: Tue, 16 Jul 2019 12:14:41 +0000 Subject: [mcstas-users] [EXTERNAL] Multiple samples in a single mcstas instrument? In-Reply-To: <94627548-BA7F-483C-A6BC-5ABEF0F42EC4@fysik.dtu.dk> References: <74088882-6edb-c464-ddfe-e7ee8a8d3b79@fysik.dtu.dk> <460601F4-54AA-49CE-980B-CC2CA6AAA54D@ornl.gov> <97A73B33-F917-4945-AEB3-7C67FC92F4A1@ornl.gov> <55A5B0EA-BF84-437D-BFD1-A2F20DD8D98E@ornl.gov> <8077a937-3767-0ef1-8aad-37a34e80ea8e@fysik.dtu.dk> <94627548-BA7F-483C-A6BC-5ABEF0F42EC4@fysik.dtu.dk> Message-ID: <3A83C546-B9AB-4D08-90EE-2F6A132624EC@ornl.gov> Hi Peter, while I am not used to be told ?I am doing things the right way" I take it :-) This is still the best way to do it at the moment and I am sure I?ll hear about from you guys once there is an "official right way?... Thanks so much, Uli On 16 Jul 2019, at 03:36, Peter Kj?r Willendrup > wrote: Hi Uli, I am afraid you have done this the ?right? way in the sense that indeed, all of the SASmodels functions have the same name? (In fact, the way they are used from the component is by means of a hack, simply a compiler #define clause, hence requiring a recompile of one wants to use a different model?) We are thinking of ways of doing this better, but haven?t exactly settled on the ?right? way just yet. Cheers, Peter On 15 Jul 2019, at 20.29, Wildgruber, Christoph U. > wrote: Hi again, so here is a little update? To get my instrument with multiple instances of SANSCurve.comp (attached) compiled I had to - or at least thats what I thought - move the functions ?CountLines? and ?LoadCurve? into the main body of the instr(ument) file (attached). However despite the uneventful execution of the code only the first of the five I(q) data sets was used to simulate a SANS curve. Being suspicious about my understanding of how ?split? should/would work I cloned SANSCurve.comp and used SANSCurve_1.comp ? SANSCurve_5.comp. Again the code ran without problems but still ignored all but the first I(q) data I specified. At this point I started to wonder if there is a problem with the scope of the variables - especially ?Q? and ?I? - as defined in SANSCurve. After renaming ?I? to ?I-1? ? ?I-5? and ?Q? to ?Q-1 ? Q-5? in my SANSCurve Clones I got the desired results. I consulted the manual (and Lee Robertson :-) but still could not figure out how I should modifiy my instrument and/or SANSCurve.comp. I suspect there is a right way to do it and I am curious how that would look like. Any ideas/suggestions? Thanks so much, Uli > On 12 Jul 2019, at 09:26, Erik B Knudsen > wrote: > > Hi Uli, > Excellent! Great news. Always happy to help! > When it all works and you are satisfied with it - please consider > contributing your instrument file to the project. It might help other > users 8-). > > cheers > Erik > > On 12/07/2019 14:21, Wildgruber, Christoph U. wrote: >> Hi Erik & Peter, >> >> it is working really well and I?d say it is pretty efficient :-) >> The only other thing I had to do was to move two function definition >> from SANSCurve inot the >> instrument to avoid ?redefinition? complaints from the compiler. >> All I need to do now is to make sure the output is valid? >> >> Thanks again for your help, >> >> Uli >> >> >>> On 11 Jul 2019, at 14:28, Wildgruber, Christoph U. >>> > wrote: >>> >>> Hi Erik, >>> >>> thanks for the immediate response, I?ll give it a try right away? >>> The error message threw me off... >>> >>> Thanks, again >>> >>> Uli >>> >>> >>>> On 11 Jul 2019, at 14:23, Erik B Knudsen >>>> > wrote: >>>> >>>> Dear Christoph, >>>> >>>> In your instrument file there are two missing ; (line 186 and 194), a >>>> switched %} line 187, and a double '==' where it should say '=' (line >>>> 187). Some of these were due to me being a bit too fast of the mark this >>>> morning, so sorry for that. The attached version has these things fixed >>>> - I can't test it completely since I lack your SANS-component but it >>>> should get you a bit further. Good Luck! >>>> >>>> cheers >>>> Erik >>>> >>>> >>>> On 11/07/2019 19:57, Wildgruber, Christoph U. wrote: >>>>> Hi again, >>>>> >>>>> so I did try the basic ?SPLIT 2? approach but I end up with an >>>>> unexpected compile time error (RHEL 7, mcstas 2.5, mpi enabled)? >>>>> I must be missing something really basic? >>>>> >>>>> Here is the result: >>>>> ============== >>>>> >>>>> Setting environment: >>>>> MCSTAS_OVERRIDE= >>>>> /usr/local/mcstas/2.5/tools/Python/mcgui/../mccodelib/../../.. >>>>> >>>>> MCSTAS_CFLAGS_OVERRIDE= >>>>> -g -O2 -lm >>>>> >>>>> MCSTAS_CC_OVERRIDE= >>>>> gcc >>>>> >>>>> MCSTAS_MPICC_OVERRIDE= >>>>> mpicc >>>>> >>>>> mcrun -c BER_SANS_guide_elliptical_optimize_2.1.instr -n0 >>>>> >>>>> INFO: No output directory specified (--dir) >>>>> INFO: Using directory: >>>>> "BER_SANS_guide_elliptical_optimize_2.1_20190711_134948" >>>>> INFO: Regenerating c-file: BER_SANS_guide_elliptical_optimize_2.1.c >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:246. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:258. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:266. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:274. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:284. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:294. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:304. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:314. >>>>> Info: 'PSD_monitor_rad' is a contributed component. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:321. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:328. >>>>> Info: 'SANSQMonitor' is a contributed component. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:338. >>>>> Reference to undefined component instance a1 at line >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr:347. >>>>> McStas: 12 Errors encountered during parse of >>>>> BER_SANS_guide_elliptical_optimize_2.1.instr. >>>>> compile thread done >>>>> >>>>> >>>>> I attach the instr file in case you get a chance to try to compile it? >>>>> >>>>> So what is going on? >>>>> >>>>> >>>>> Thanks so much, >>>>> >>>>> >>>>> Uli >>>>> >>>> >>>> -- >>>> Erik Bergb?ck Knudsen, Research Engineer | DTU | morituri >>>> NEXMAP, DTU Fysik, DK-2800 Kgs. Lyngby, Denmark |<>-<>| te >>>> phone: (+45) 2132 6655 |<>-<>| salutant >>>> >>> >> > > -- > Erik Bergb?ck Knudsen, Research Engineer | DTU | morituri > NEXMAP, DTU Fysik, DK-2800 Kgs. Lyngby, Denmark |<>-<>| te > phone: (+45) 2132 6655 |<>-<>| salutant Peter Kj?r Willendrup Forskningsingeni?r, Specialkonsulent N?stformand for DTU Fysik LSU DTU Physics Technical University of Denmark Department of Physics Fysikvej Building 307 DK-2800 Kongens Lyngby Direct +45 2125 4612 Mobil +45 2125 4612 Fax +45 4593 2399 pkwi at fysik.dtu.dk -------------- next part -------------- An HTML attachment was scrubbed... URL: From Peter.Link at frm2.tum.de Thu Jul 18 13:24:55 2019 From: Peter.Link at frm2.tum.de (Peter Link) Date: Thu, 18 Jul 2019 13:24:55 +0200 Subject: [mcstas-users] curved guide Message-ID: <4a60b7c3-1d26-1e25-bf33-c57f70c70f6c@frm2.tum.de> Dear friends, just to avoid some double developpment: to my knowlegde there are the following components or ways to simulate a standard curved neutron guide: Bender; allows for different reflectivities on top/bottom inside outside; can have multiple channels; but behaves geometrically as straight guide element (mcdisplay, coordinates of subsequent elements) Guide_curved; only one reflectivity definition for all sides, geometrically correct definition polygon of Guide_gravity elements; allows for a polygonal approximation only, has numerous options Having a number of truly curved guides in my simulations I would prefer to have a component, which has the possibilities as it has Bender or Guide_gravity but is a geomentrical correct implementation of truly curved guide. If someone has done this or can tell me where I have overseen it, I would be grateful. Bets regards Peter -- Dr. Peter Link Leiter Neutronenoptik Technische Universit?t M?nchen Heinz Maier-Leibnitz Zentrum (MLZ) Lichtenbergstr. 1 85747 Garching Tel.: +49 (0)89 289 14622 Fax: +49 (0) 89 289 11694 From Christoph.Frommen at ife.no Thu Jul 18 14:07:28 2019 From: Christoph.Frommen at ife.no (Christoph Frommen) Date: Thu, 18 Jul 2019 12:07:28 +0000 Subject: [mcstas-users] curved guide In-Reply-To: <4a60b7c3-1d26-1e25-bf33-c57f70c70f6c@frm2.tum.de> References: <4a60b7c3-1d26-1e25-bf33-c57f70c70f6c@frm2.tum.de> Message-ID: <91733314a70444bbbd8710e4a14aeaff@kj-exch-06.ad.ife.no> Dear Peter, I usually try to model curved guides realistically, meaning with a "short section approximation" of individual straight segments each having a certain gap between each other. I am following a procedure described in by V.M. Pusenkov et all in "Nucl. Instrum. Meth. A 492 (2002) 105-116". Below is an example for one segment of a multichannel guide (3 channels) with 2.5 mm walls in between. You can still have different m coatings since it is a gravity_guide. You could use the COPY statement to generate the necessary number of those segments. ------------------------------------------------------------ *gLength: [m] length of individual guide pieces *gGap: [m] gap between guide pieces *gReflect0: guide reflectivity *gQc: [AA-1] critical wave vector *gAlpha : [deg] slope of reflectivity curve *gW, gH : [m] guide entrance/exit widths/heights *R_curv_m : [m] radius of curvature for bent guide section component bent_section_1 = Guide_gravity(w1=gW, w2=gW, h1=gH, h2=gH, l=gLength, R0=gReflect0, Qc=gQc, alpha=gAlpha, m=2, nslit=3, d=0.0025) at (0, 0, gGap+gLength) relative previous rotated (0, gLength/R_curve_m*180.0/PI, 0) relative previous --------------------------------------------------------------- Maybe someone has a more elegant solution? Best regards Christoph -----Original Message----- From: mcstas-users On Behalf Of Peter Link Sent: 18 July 2019 13:25 To: mcstas-users at mcstas.org Subject: [mcstas-users] curved guide Dear friends, just to avoid some double developpment: to my knowlegde there are the following components or ways to simulate a standard curved neutron guide: Bender; allows for different reflectivities on top/bottom inside outside; can have multiple channels; but behaves geometrically as straight guide element (mcdisplay, coordinates of subsequent elements) Guide_curved; only one reflectivity definition for all sides, geometrically correct definition polygon of Guide_gravity elements; allows for a polygonal approximation only, has numerous options Having a number of truly curved guides in my simulations I would prefer to have a component, which has the possibilities as it has Bender or Guide_gravity but is a geomentrical correct implementation of truly curved guide. If someone has done this or can tell me where I have overseen it, I would be grateful. Bets regards Peter -- Dr. Peter Link Leiter Neutronenoptik Technische Universit?t M?nchen Heinz Maier-Leibnitz Zentrum (MLZ) Lichtenbergstr. 1 85747 Garching Tel.: +49 (0)89 289 14622 Fax: +49 (0) 89 289 11694 _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org https://mailman2.mcstas.org/mailman/listinfo/mcstas-users From Peter.Link at frm2.tum.de Thu Jul 18 14:12:53 2019 From: Peter.Link at frm2.tum.de (Peter Link) Date: Thu, 18 Jul 2019 14:12:53 +0200 Subject: [mcstas-users] curved guide In-Reply-To: <91733314a70444bbbd8710e4a14aeaff@kj-exch-06.ad.ife.no> References: <4a60b7c3-1d26-1e25-bf33-c57f70c70f6c@frm2.tum.de> <91733314a70444bbbd8710e4a14aeaff@kj-exch-06.ad.ife.no> Message-ID: Hi Christoph, this is just the point: I'm producing real neutron guide elements, which are "truly curved" 2m long pieces of glass, which are really bent on radii between 30m and several thousands of m. Usually I use the same approx. as you, but I'm thinking about a more realistic way to simulate my guides. Best regards Peter Am 18.07.2019 um 14:07 schrieb Christoph Frommen: > Dear Peter, > > I usually try to model curved guides realistically, meaning with a "short section approximation" of individual straight segments each having a certain gap between each other. > I am following a procedure described in by V.M. Pusenkov et all in "Nucl. Instrum. Meth. A 492 (2002) 105-116". > > Below is an example for one segment of a multichannel guide (3 channels) with 2.5 mm walls in between. You can still have different m coatings since it is a gravity_guide. You could use the COPY statement to generate the necessary number of those segments. > > ------------------------------------------------------------ > *gLength: [m] length of individual guide pieces > *gGap: [m] gap between guide pieces > *gReflect0: guide reflectivity > *gQc: [AA-1] critical wave vector > *gAlpha : [deg] slope of reflectivity curve > *gW, gH : [m] guide entrance/exit widths/heights > *R_curv_m : [m] radius of curvature for bent guide section > > component bent_section_1 = Guide_gravity(w1=gW, w2=gW, h1=gH, h2=gH, l=gLength, > R0=gReflect0, Qc=gQc, alpha=gAlpha, > m=2, nslit=3, d=0.0025) at (0, 0, gGap+gLength) > relative previous rotated (0, gLength/R_curve_m*180.0/PI, 0) relative previous > --------------------------------------------------------------- > > Maybe someone has a more elegant solution? > > > Best regards > Christoph > > -----Original Message----- > From: mcstas-users On Behalf Of Peter Link > Sent: 18 July 2019 13:25 > To: mcstas-users at mcstas.org > Subject: [mcstas-users] curved guide > > Dear friends, > > just to avoid some double developpment: to my knowlegde there are the following components or ways to simulate a standard curved neutron guide: > > Bender; allows for different reflectivities on top/bottom inside outside; can have multiple channels; but behaves geometrically as straight guide element (mcdisplay, coordinates of subsequent elements) > > Guide_curved; only one reflectivity definition for all sides, geometrically correct definition > > polygon of Guide_gravity elements; allows for a polygonal approximation only, has numerous options > > Having a number of truly curved guides in my simulations I would prefer to have a component, which has the possibilities as it has Bender or Guide_gravity but is a geomentrical correct implementation of truly curved guide. If someone has done this or can tell me where I have overseen it, I would be grateful. > > Bets regards > > Peter > > > -- > Dr. Peter Link > Leiter Neutronenoptik > Technische Universit?t M?nchen > Heinz Maier-Leibnitz Zentrum (MLZ) > > Lichtenbergstr. 1 > 85747 Garching > > Tel.: +49 (0)89 289 14622 > Fax: +49 (0) 89 289 11694 > > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > https://mailman2.mcstas.org/mailman/listinfo/mcstas-users -- Dr. Peter Link Leiter Neutronenoptik Technische Universit?t M?nchen Heinz Maier-Leibnitz Zentrum (MLZ) Lichtenbergstr. 1 85747 Garching Tel.: +49 (0)89 289 14622 Fax: +49 (0) 89 289 11694 From pwillendrup at gmail.com Thu Jul 18 14:33:37 2019 From: pwillendrup at gmail.com (Peter Willendrup) Date: Thu, 18 Jul 2019 14:33:37 +0200 Subject: [mcstas-users] curved guide In-Reply-To: References: <4a60b7c3-1d26-1e25-bf33-c57f70c70f6c@frm2.tum.de> <91733314a70444bbbd8710e4a14aeaff@kj-exch-06.ad.ife.no> Message-ID: <334312AD-558D-4EA3-A450-2D5488D20AF8@gmail.com> Hi Peter, I believe the situation is close to what you sketched - apart from the availability of Guide_four_side from PSI (and its even more complex siblings with 2 or 10 layers), which does however have a slightly complex interface to master. - Comes with an example instrument though? Otherwise, as I understand the problem, the easiest alternatives would indeed be to either 1) Modify Guide_gravity with curvature (non-trivial if not to be implemented like Bender) 2) Modify Guide_curved with multiple, independent reflectivities (and live with the fact that this then doesn?t include gravity) There is also a further approximative solution to use Elliptical_guide_gravity (which adds a transverse component to gravity to implement the curvature), but this has a linear appearance in mcdisplay as well? Cheers, Peter > On 18 Jul 2019, at 14.12, Peter Link wrote: > > Hi Christoph, > > this is just the point: I'm producing real neutron guide elements, which are "truly curved" 2m long pieces of glass, which are really bent on radii between 30m and several thousands of m. Usually I use the same approx. as you, but I'm thinking about a more realistic way to simulate my guides. > > Best regards > > Peter > > Am 18.07.2019 um 14:07 schrieb Christoph Frommen: >> Dear Peter, >> >> I usually try to model curved guides realistically, meaning with a "short section approximation" of individual straight segments each having a certain gap between each other. >> I am following a procedure described in by V.M. Pusenkov et all in "Nucl. Instrum. Meth. A 492 (2002) 105-116". >> >> Below is an example for one segment of a multichannel guide (3 channels) with 2.5 mm walls in between. You can still have different m coatings since it is a gravity_guide. You could use the COPY statement to generate the necessary number of those segments. >> >> ------------------------------------------------------------ >> *gLength: [m] length of individual guide pieces >> *gGap: [m] gap between guide pieces >> *gReflect0: guide reflectivity >> *gQc: [AA-1] critical wave vector >> *gAlpha : [deg] slope of reflectivity curve >> *gW, gH : [m] guide entrance/exit widths/heights >> *R_curv_m : [m] radius of curvature for bent guide section >> >> component bent_section_1 = Guide_gravity(w1=gW, w2=gW, h1=gH, h2=gH, l=gLength, >> R0=gReflect0, Qc=gQc, alpha=gAlpha, >> m=2, nslit=3, d=0.0025) at (0, 0, gGap+gLength) >> relative previous rotated (0, gLength/R_curve_m*180.0/PI, 0) relative previous >> --------------------------------------------------------------- >> >> Maybe someone has a more elegant solution? >> >> >> Best regards >> Christoph >> >> -----Original Message----- >> From: mcstas-users On Behalf Of Peter Link >> Sent: 18 July 2019 13:25 >> To: mcstas-users at mcstas.org >> Subject: [mcstas-users] curved guide >> >> Dear friends, >> >> just to avoid some double developpment: to my knowlegde there are the following components or ways to simulate a standard curved neutron guide: >> >> Bender; allows for different reflectivities on top/bottom inside outside; can have multiple channels; but behaves geometrically as straight guide element (mcdisplay, coordinates of subsequent elements) >> >> Guide_curved; only one reflectivity definition for all sides, geometrically correct definition >> >> polygon of Guide_gravity elements; allows for a polygonal approximation only, has numerous options >> >> Having a number of truly curved guides in my simulations I would prefer to have a component, which has the possibilities as it has Bender or Guide_gravity but is a geomentrical correct implementation of truly curved guide. If someone has done this or can tell me where I have overseen it, I would be grateful. >> >> Bets regards >> >> Peter >> >> >> -- >> Dr. Peter Link >> Leiter Neutronenoptik >> Technische Universit?t M?nchen >> Heinz Maier-Leibnitz Zentrum (MLZ) >> >> Lichtenbergstr. 1 >> 85747 Garching >> >> Tel.: +49 (0)89 289 14622 >> Fax: +49 (0) 89 289 11694 >> >> _______________________________________________ >> mcstas-users mailing list >> mcstas-users at mcstas.org >> https://mailman2.mcstas.org/mailman/listinfo/mcstas-users > > -- > Dr. Peter Link > Leiter Neutronenoptik > Technische Universit?t M?nchen > Heinz Maier-Leibnitz Zentrum (MLZ) > > Lichtenbergstr. 1 > 85747 Garching > > Tel.: +49 (0)89 289 14622 > Fax: +49 (0) 89 289 11694 > > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > https://mailman2.mcstas.org/mailman/listinfo/mcstas-users Best regards / Mvh Peter Willendrup pwillendrup at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.jackson at esss.se Fri Jul 19 13:10:02 2019 From: andrew.jackson at esss.se (Andrew Jackson) Date: Fri, 19 Jul 2019 11:10:02 +0000 Subject: [mcstas-users] curved guide In-Reply-To: <4a60b7c3-1d26-1e25-bf33-c57f70c70f6c@frm2.tum.de> References: <4a60b7c3-1d26-1e25-bf33-c57f70c70f6c@frm2.tum.de> Message-ID: Hi Peter We (Richard Heenan and I) have a component that we use for the LoKI benders (attached) which was a modification of the Pol_bender component to allow us to have it bending downwards/upwards and still have functional gravity. This allows for different reflectivities and is truly curved as well as giving a curved representation in the model. You can find our LoKI model on bitbucket (link below) if you want to see how we use it. https://bitbucket.org/essloki/loki-mcstas-master/src/master/ Cheers Andrew ______________________________________ Andrew Jackson Neutron Instruments Division European Spallation Source, Box 176, SE-221 00 Lund, Sweden Phone: +46 72 179 2015 ?On 2019-07-18, 13:28, "mcstas-users on behalf of Peter Link" wrote: Dear friends, just to avoid some double developpment: to my knowlegde there are the following components or ways to simulate a standard curved neutron guide: Bender; allows for different reflectivities on top/bottom inside outside; can have multiple channels; but behaves geometrically as straight guide element (mcdisplay, coordinates of subsequent elements) Guide_curved; only one reflectivity definition for all sides, geometrically correct definition polygon of Guide_gravity elements; allows for a polygonal approximation only, has numerous options Having a number of truly curved guides in my simulations I would prefer to have a component, which has the possibilities as it has Bender or Guide_gravity but is a geomentrical correct implementation of truly curved guide. If someone has done this or can tell me where I have overseen it, I would be grateful. Bets regards Peter -- Dr. Peter Link Leiter Neutronenoptik Technische Universit?t M?nchen Heinz Maier-Leibnitz Zentrum (MLZ) Lichtenbergstr. 1 85747 Garching Tel.: +49 (0)89 289 14622 Fax: +49 (0) 89 289 11694 _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org https://mailman2.mcstas.org/mailman/listinfo/mcstas-users -------------- next part -------------- A non-text attachment was scrubbed... Name: Vertical_Bender.comp Type: application/octet-stream Size: 22600 bytes Desc: Vertical_Bender.comp URL: From Peter.Link at frm2.tum.de Fri Jul 19 13:16:10 2019 From: Peter.Link at frm2.tum.de (Peter Link) Date: Fri, 19 Jul 2019 13:16:10 +0200 Subject: [mcstas-users] curved guide In-Reply-To: References: <4a60b7c3-1d26-1e25-bf33-c57f70c70f6c@frm2.tum.de> Message-ID: <441a4961-c066-ca40-6588-706eb92e208d@frm2.tum.de> Hi Andrew and Richard, this may be exactly, what I'm looking for, thanks a lot! Cheers Peter Am 19.07.2019 um 13:10 schrieb Andrew Jackson: > Hi Peter > > We (Richard Heenan and I) have a component that we use for the LoKI benders (attached) which was a modification of the Pol_bender component to allow us to have it bending downwards/upwards and still have functional gravity. This allows for different reflectivities and is truly curved as well as giving a curved representation in the model. > > You can find our LoKI model on bitbucket (link below) if you want to see how we use it. > > https://bitbucket.org/essloki/loki-mcstas-master/src/master/ > > Cheers > Andrew > ______________________________________ > Andrew Jackson > Neutron Instruments Division > European Spallation Source, Box 176, SE-221 00 Lund, Sweden > > Phone: +46 72 179 2015 > > ?On 2019-07-18, 13:28, "mcstas-users on behalf of Peter Link" wrote: > > Dear friends, > > just to avoid some double developpment: to my knowlegde there are the > following components or ways to simulate a standard curved neutron guide: > > Bender; allows for different reflectivities on top/bottom inside > outside; can have multiple channels; but behaves geometrically as > straight guide element (mcdisplay, coordinates of subsequent elements) > > Guide_curved; only one reflectivity definition for all sides, > geometrically correct definition > > polygon of Guide_gravity elements; allows for a polygonal approximation > only, has numerous options > > Having a number of truly curved guides in my simulations I would prefer > to have a component, which has the possibilities as it has Bender or > Guide_gravity but is a geomentrical correct implementation of truly > curved guide. If someone has done this or can tell me where I have > overseen it, I would be grateful. > > Bets regards > > Peter > > > -- > Dr. Peter Link > Leiter Neutronenoptik > Technische Universit?t M?nchen > Heinz Maier-Leibnitz Zentrum (MLZ) > > Lichtenbergstr. 1 > 85747 Garching > > Tel.: +49 (0)89 289 14622 > Fax: +49 (0) 89 289 11694 > > _______________________________________________ > mcstas-users mailing list > mcstas-users at mcstas.org > https://mailman2.mcstas.org/mailman/listinfo/mcstas-users > > -- Dr. Peter Link Leiter Neutronenoptik Technische Universit?t M?nchen Heinz Maier-Leibnitz Zentrum (MLZ) Lichtenbergstr. 1 85747 Garching Tel.: +49 (0)89 289 14622 Fax: +49 (0) 89 289 11694 From pkwi at fysik.dtu.dk Fri Jul 19 14:06:21 2019 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Fri, 19 Jul 2019 12:06:21 +0000 Subject: [mcstas-users] curved guide In-Reply-To: References: <4a60b7c3-1d26-1e25-bf33-c57f70c70f6c@frm2.tum.de> Message-ID: Hi Andrew, Excellent, thanks for that! Unfortunately it seems several mailservers around either distrusts .comp attachments or your git URL from below - I got excessive bouncing from the mailinglist? I therefore respond here without the component and having inserted some underscores in the below url for scrambling? :-) I hope it is OK that I have uploaded your component to the ?McStas share? at http://www.mcstas.org/download/share/ ? - If you want I can also put a copy in the McStas repo toward the next release which should happen later this summer/fall? Cheers, Peter On 19 Jul 2019, at 13.10, Andrew Jackson > wrote: Hi Peter We (Richard Heenan and I) have a component that we use for the LoKI benders (attached) which was a modification of the Pol_bender component to allow us to have it bending downwards/upwards and still have functional gravity. This allows for different reflectivities and is truly curved as well as giving a curved representation in the model. You can find our LoKI model on bitbucket (link below) if you want to see how we use it. https_://_bitbucket.org_/essloki/loki-mcstas-master/src/master/_ Cheers Andrew ______________________________________ Andrew Jackson Neutron Instruments Division European Spallation Source, Box 176, SE-221 00 Lund, Sweden Phone: +46 72 179 2015 ?On 2019-07-18, 13:28, "mcstas-users on behalf of Peter Link" on behalf of Peter.Link at frm2.tum.de> wrote: Dear friends, just to avoid some double developpment: to my knowlegde there are the following components or ways to simulate a standard curved neutron guide: Bender; allows for different reflectivities on top/bottom inside outside; can have multiple channels; but behaves geometrically as straight guide element (mcdisplay, coordinates of subsequent elements) Guide_curved; only one reflectivity definition for all sides, geometrically correct definition polygon of Guide_gravity elements; allows for a polygonal approximation only, has numerous options Having a number of truly curved guides in my simulations I would prefer to have a component, which has the possibilities as it has Bender or Guide_gravity but is a geomentrical correct implementation of truly curved guide. If someone has done this or can tell me where I have overseen it, I would be grateful. Bets regards Peter -- Dr. Peter Link Leiter Neutronenoptik Technische Universit?t M?nchen Heinz Maier-Leibnitz Zentrum (MLZ) Lichtenbergstr. 1 85747 Garching Tel.: +49 (0)89 289 14622 Fax: +49 (0) 89 289 11694 _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org https://mailman2.mcstas.org/mailman/listinfo/mcstas-users _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org https://mailman2.mcstas.org/mailman/listinfo/mcstas-users Peter Kj?r Willendrup Forskningsingeni?r, Specialkonsulent N?stformand for DTU Fysik LSU DTU Physics [cid:b6339554-7f28-441d-9f31-5944f811397c at win.dtu.dk] Technical University of Denmark [cid:e108e480-fcab-46e2-9531-b38165079572 at win.dtu.dk] Department of Physics Fysikvej Building 307 DK-2800 Kongens Lyngby Direct +45 2125 4612 Mobil +45 2125 4612 Fax +45 4593 2399 pkwi at fysik.dtu.dk -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 58 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 1055 bytes Desc: image002.gif URL: From pkwi at fysik.dtu.dk Fri Jul 19 14:28:13 2019 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Fri, 19 Jul 2019 12:28:13 +0000 Subject: [mcstas-users] curved guide In-Reply-To: References: <4a60b7c3-1d26-1e25-bf33-c57f70c70f6c@frm2.tum.de> Message-ID: (This is a resend - have re-enabled everyone who are on gmail, to allow you to receive mcstas-users messages again? Sorry to everyone else for the double-post) Hi Andrew, Excellent, thanks for that! Unfortunately it seems several mailservers around either distrusts .comp attachments or your git URL from below - I got excessive bouncing from the mailinglist? I therefore respond here without the component and having inserted some underscores in the below url for scrambling? :-) I hope it is OK that I have uploaded your component to the ?McStas share? at http://www.mcstas.org/download/share/ ? - If you want I can also put a copy in the McStas repo toward the next release which should happen later this summer/fall? Cheers, Peter On 19 Jul 2019, at 13.10, Andrew Jackson > wrote: Hi Peter We (Richard Heenan and I) have a component that we use for the LoKI benders (attached) which was a modification of the Pol_bender component to allow us to have it bending downwards/upwards and still have functional gravity. This allows for different reflectivities and is truly curved as well as giving a curved representation in the model. You can find our LoKI model on bitbucket (link below) if you want to see how we use it. https_://_bitbucket.org_/essloki/loki-mcstas-master/src/master/_ Cheers Andrew ______________________________________ Andrew Jackson Neutron Instruments Division European Spallation Source, Box 176, SE-221 00 Lund, Sweden Phone: +46 72 179 2015 ?On 2019-07-18, 13:28, "mcstas-users on behalf of Peter Link" on behalf of Peter.Link at frm2.tum.de> wrote: Dear friends, just to avoid some double developpment: to my knowlegde there are the following components or ways to simulate a standard curved neutron guide: Bender; allows for different reflectivities on top/bottom inside outside; can have multiple channels; but behaves geometrically as straight guide element (mcdisplay, coordinates of subsequent elements) Guide_curved; only one reflectivity definition for all sides, geometrically correct definition polygon of Guide_gravity elements; allows for a polygonal approximation only, has numerous options Having a number of truly curved guides in my simulations I would prefer to have a component, which has the possibilities as it has Bender or Guide_gravity but is a geomentrical correct implementation of truly curved guide. If someone has done this or can tell me where I have overseen it, I would be grateful. Bets regards Peter -- Dr. Peter Link Leiter Neutronenoptik Technische Universit?t M?nchen Heinz Maier-Leibnitz Zentrum (MLZ) Lichtenbergstr. 1 85747 Garching Tel.: +49 (0)89 289 14622 Fax: +49 (0) 89 289 11694 _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org https://mailman2.mcstas.org/mailman/listinfo/mcstas-users _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org https://mailman2.mcstas.org/mailman/listinfo/mcstas-users Peter Kj?r Willendrup Forskningsingeni?r, Specialkonsulent N?stformand for DTU Fysik LSU DTU Physics [cid:b6339554-7f28-441d-9f31-5944f811397c at win.dtu.dk] Technical University of Denmark [cid:e108e480-fcab-46e2-9531-b38165079572 at win.dtu.dk] Department of Physics Fysikvej Building 307 DK-2800 Kongens Lyngby Direct +45 2125 4612 Mobil +45 2125 4612 Fax +45 4593 2399 pkwi at fysik.dtu.dk -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 58 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 1055 bytes Desc: image002.gif URL: From wildgrubercu at ornl.gov Fri Jul 19 17:18:56 2019 From: wildgrubercu at ornl.gov (Wildgruber, Christoph U.) Date: Fri, 19 Jul 2019 15:18:56 +0000 Subject: [mcstas-users] mcstas 2.5 mpirun problem Message-ID: <75C0E545-A8AB-4DC9-981A-08EBF6087DB7@ornl.gov> Hi, I am having a problen (mpi-) running mcstas 2.5 on centos 7.? with more than 1 node. It looks like every node tries to create the target directory wether I start from mcgui or use the mcrun command in the terminal. The location of the output directory does not seem to matter. I am using mpich on a newly installed OS and don?t remember having had that problem before. The 2.5 manual mentions new options but I did not find anything wrt this problem. What am I missing? Thanks, Uli From pkwi at fysik.dtu.dk Sat Jul 20 07:38:14 2019 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Sat, 20 Jul 2019 05:38:14 +0000 Subject: [mcstas-users] mcstas 2.5 mpirun problem In-Reply-To: <75C0E545-A8AB-4DC9-981A-08EBF6087DB7@ornl.gov> References: <75C0E545-A8AB-4DC9-981A-08EBF6087DB7@ornl.gov> Message-ID: Hi Uli, As a matter of fact not a lot changed in our mpi-implementation: - There is only the mother-process to do things like pick up parameters or mkdir etc. So the most probable situation is that the binary was in fact not mpi-capable when launched through mpirun. The easiest way to check is through ./instrument.out ./ILL_IN4.out --help ILL_IN4 (ILL_IN4.instr) instrument simulation, generated with McStas 2.5 - Dec. 12, 2018 (Dec. 12, 2018) Usage: ./ILL_IN4.out [options] [parm=value ...] Options are: -s SEED --seed=SEED Set random seed (must be != 0) -n COUNT --ncount=COUNT Set number of neutrons to simulate. -d DIR --dir=DIR Put all data files in directory DIR. -t --trace Enable trace of neutrons through instrument. -g --gravitation Enable gravitation for all trajectories. --no-output-files Do not write any data files. -h --help Show this help message. -i --info Detailed instrument information. --format=FORMAT Output data files using FORMAT=MCSTAS This instrument has been compiled with MPI support. ? etc. The above line will not be present in case the instrument is not compiled with MPI. The only thing that comes to mind in terms of changes is that our two mcrun variants differ in how one specifies to compile with mpi, in the sense that Perl: mcrun.pl -c --mpi is enough Python: mcrun -c --mpi=some_integer (i.e. --mpi needs a. value) (For the full list of differences, see https://github.com/McStasMcXtrace/McCode/wiki/mcrun-variants---table-overview From the (python) gui, the easiest is to use ?MPI (recompile)? from the run dialogue. Also remember that if you inadvertently make a change in the .instr code, then a save and exiting mcgui, the automatic recompile (since now the .instr code is newer than the .c code) may do a non-mpi compile for you. Finally, our recommended ?standard? MPI to use is OpenMPI, but MPICH should be just as good. Hope this helps, otherwise write again - but expect some delay as I now started my summer vacation. ;-) Cheers, Peter On 19 Jul 2019, at 17.18, Wildgruber, Christoph U. > wrote: Hi, I am having a problen (mpi-) running mcstas 2.5 on centos 7.? with more than 1 node. It looks like every node tries to create the target directory wether I start from mcgui or use the mcrun command in the terminal. The location of the output directory does not seem to matter. I am using mpich on a newly installed OS and don?t remember having had that problem before. The 2.5 manual mentions new options but I did not find anything wrt this problem. What am I missing? Thanks, Uli _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org https://mailman2.mcstas.org/mailman/listinfo/mcstas-users Peter Kj?r Willendrup Forskningsingeni?r, Specialkonsulent N?stformand for DTU Fysik LSU DTU Physics [cid:b6339554-7f28-441d-9f31-5944f811397c at win.dtu.dk] Technical University of Denmark [cid:e108e480-fcab-46e2-9531-b38165079572 at win.dtu.dk] Department of Physics Fysikvej Building 307 DK-2800 Kongens Lyngby Direct +45 2125 4612 Mobil +45 2125 4612 Fax +45 4593 2399 pkwi at fysik.dtu.dk -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 58 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 1055 bytes Desc: image002.gif URL: From pkwi at fysik.dtu.dk Mon Aug 12 09:59:06 2019 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Mon, 12 Aug 2019 07:59:06 +0000 Subject: [mcstas-users] McStas tutorial in connection with ICANS XXIII Message-ID: <1379D48C-F56D-4954-9E70-9D950A1FA575@fysik.dtu.dk> Dear all, The 23rd ICANS meeting takes place in Chattanooga TN on October 13th-18th. It is likely followed by a 2-day McStas tutorial at ORNL. If you have interest in participating in these events, please register through https://conference.sns.gov/event/138/overview - deadline is August 15th! Best, Peter Willendrup Peter Kj?r Willendrup Forskningsingeni?r, Specialkonsulent N?stformand for DTU Fysik LSU DTU Physics [cid:b6339554-7f28-441d-9f31-5944f811397c at win.dtu.dk] Technical University of Denmark [cid:e108e480-fcab-46e2-9531-b38165079572 at win.dtu.dk] Department of Physics Fysikvej Building 307 DK-2800 Kongens Lyngby Direct +45 2125 4612 Mobil +45 2125 4612 Fax +45 4593 2399 pkwi at fysik.dtu.dk -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 58 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 1055 bytes Desc: image002.gif URL: