<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Aptos;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Aptos",sans-serif;
        mso-ligatures:standardcontextual;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        mso-ligatures:standardcontextual;
        mso-fareast-language:EN-US;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Aptos",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-GB" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi Markus,<o:p></o:p></p>
<p class="MsoNormal">I can’t use the built in q monitors because they don’t take account of time-of-flight.<o:p></o:p></p>
<p class="MsoNormal">I’m writing monitors that essentially perform a TOF data reduction in mcstas to remove the step where you have to push the data through e.g. Mantid.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This route is much more efficient as it doesn’t result in large event mode files but relies on you not using the fact that mcstas inherently knows the direction of travel and wavelength of the neutron.
<o:p></o:p></p>
<p class="MsoNormal">The downside is that you run into this sort of problem and you have to do a bunch of geometry calculations to work out where pixels are in real space.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">That being said I can possibly use the output routines from monitor_nd….<o:p></o:p></p>
<p class="MsoNormal">I’ll take a look<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks for the reply<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Rob<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-family:"Calibri",sans-serif;mso-ligatures:none;mso-fareast-language:EN-GB">From:</span></b><span lang="EN-US" style="font-family:"Calibri",sans-serif;mso-ligatures:none;mso-fareast-language:EN-GB"> Markus
 APPEL <appel@ill.fr> <br>
<b>Sent:</b> 22 January 2026 08:27<br>
<b>To:</b> Dalgliesh, Robert (STFC,RAL,ISIS) <robert.dalgliesh@stfc.ac.uk>; mcstas-users@mcstas.org<br>
<b>Subject:</b> Re: [mcstas-users] logarithmic binning detector<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi Rob,<br>
not sure if it's what you want to achieve, but would it not be easier to monitor log10(Q) with limits from -3 to 0 and 90 linear bins?<br>
That should be simple with Monitor_nD and user variables (see section 9.8.7 of the Component Manual):<br>
<span style="font-family:"Courier New"">COMPONENT QMonitor = Monitor nD ( user1=log10(Q) , username1=”Log (Q)” , ....)</span><br>
<br>
Unless that's what you wanted to avoid for some reason.<br>
<br>
Best,<br>
Markus<br>
<br>
On 21/01/2026 13:09, Robert Dalgliesh - STFC UKRI via mcstas-users wrote:<span style="font-size:12.0pt;mso-ligatures:none;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal">If I want to create a new detector with logarithmic binning is there an easy way to export the x array?<o:p></o:p></p>
<p class="MsoNormal">The way DETECTOR_OUT_1D works requires the binning scheme to be linear.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I would like to define e.g. q bins<o:p></o:p></p>
<p class="MsoNormal">1e-3 to 1.0 with 8% binning so the bins are <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">[a,ab,ab^2,….] where a=1e-3 and b=1.08.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Working out which bin to put data into is straightforward in the same way as linear bins but data output isn’t, due to the constraints of the function above.<o:p></o:p></p>
<p class="MsoNormal">In addition, the read function for mcstas plotting would need modification so I guess it will mean an additional function is required unless I’ve missed something.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Obviously, I can write something that outputs the data and post process the x array but that’s not ideal.
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Rob<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;mso-ligatures:none;mso-fareast-language:EN-GB">====================================================================</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;mso-ligatures:none;mso-fareast-language:EN-GB">If you receive this email outside working hours then please do not feel obliged to reply</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;mso-ligatures:none;mso-fareast-language:EN-GB">====================================================================</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;mso-ligatures:none;mso-fareast-language:EN-GB">Dr. Robert Dalgliesh</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;mso-ligatures:none;mso-fareast-language:EN-GB">Small Angle Scattering Group Leader</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#333333;background:white;mso-ligatures:none;mso-fareast-language:EN-GB">ISIS Neutron and Muon Source</span><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#333333;mso-ligatures:none;mso-fareast-language:EN-GB"><br>
<span style="background:white">Science and Technology Facilities Council</span><br>
<span style="background:white">Building R3 1.29, </span></span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#333333;background:white;mso-ligatures:none;mso-fareast-language:EN-GB">Rutherford Appleton Laboratory​​</span><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#333333;mso-ligatures:none;mso-fareast-language:EN-GB">,<br>
<span style="background:white">​Harwell Campus, </span></span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#333333;background:white;mso-ligatures:none;mso-fareast-language:EN-GB">Didcot</span><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#333333;mso-ligatures:none;mso-fareast-language:EN-GB"><br>
<span style="background:white">​Oxfordshire, </span></span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#333333;background:white;mso-ligatures:none;mso-fareast-language:EN-GB">OX11 0QX.  </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#333333;background:white;mso-ligatures:none;mso-fareast-language:EN-GB">UK</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#333333;background:white;mso-ligatures:none;mso-fareast-language:EN-GB">Tel: +44(0)1235-445687</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#333333;background:white;mso-ligatures:none;mso-fareast-language:EN-GB">Email:
<a href="mailto:Robert.dalgliesh@stfc.ac.uk">Robert.dalgliesh@stfc.ac.uk</a></span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt;mso-ligatures:none;mso-fareast-language:EN-GB"><br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>mcstas-users mailing list<o:p></o:p></pre>
<pre><a href="mailto:mcstas-users@mcstas.org">mcstas-users@mcstas.org</a><o:p></o:p></pre>
<pre><a href="https://mailman2.mcstas.org/mailman/listinfo/mcstas-users">https://mailman2.mcstas.org/mailman/listinfo/mcstas-users</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><span style="font-size:12.0pt;mso-ligatures:none;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
</div>
</body>
</html>