[mcstas-users] logarithmic binning detector
Markus APPEL
appel at ill.fr
Thu Jan 22 09:27:03 CET 2026
Hi Rob,
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?
That should be simple with Monitor_nD and user variables (see section
9.8.7 of the Component Manual):
COMPONENT QMonitor = Monitor nD ( user1=log10(Q) , username1=”Log (Q)” ,
....)
Unless that's what you wanted to avoid for some reason.
Best,
Markus
On 21/01/2026 13:09, Robert Dalgliesh - STFC UKRI via mcstas-users wrote:
>
> Hi,
>
> If I want to create a new detector with logarithmic binning is there
> an easy way to export the x array?
>
> The way DETECTOR_OUT_1D works requires the binning scheme to be linear.
>
> I would like to define e.g. q bins
>
> 1e-3 to 1.0 with 8% binning so the bins are
>
> [a,ab,ab^2,….] where a=1e-3 and b=1.08.
>
> 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.
>
> 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.
>
> Obviously, I can write something that outputs the data and post
> process the x array but that’s not ideal.
>
> Rob
>
> ====================================================================
>
> If you receive this email outside working hours then please do not
> feel obliged to reply
>
> ====================================================================
>
> Dr. Robert Dalgliesh
>
> Small Angle Scattering Group Leader
>
> ISIS Neutron and Muon Source
> Science and Technology Facilities Council
> Building R3 1.29,
>
> Rutherford Appleton Laboratory,
> Harwell Campus,
>
> Didcot
> Oxfordshire,
>
> OX11 0QX.
>
> UK
>
> Tel: +44(0)1235-445687
>
> Email: Robert.dalgliesh at stfc.ac.uk
>
>
> _______________________________________________
> mcstas-users mailing list
> mcstas-users at mcstas.org
> https://mailman2.mcstas.org/mailman/listinfo/mcstas-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20260122/f27bc9ce/attachment-0001.htm>
More information about the mcstas-users
mailing list