Hello @ptrblck,
Thank you so much for this! I was able to modify the code appropriately to suit my 1D case and it seems to work quite nicely. Many thanks for your help. Really appreciate it.
Best Regards