Hi Jos,
As wonderful as your scripts are, they can be hard to figure out! As you said, I commented out line 405 that removed the logs and I ran your other script to produce one of your First_dayslice_##_of_864 Workspaces. I then used Show History to get a simple script of what you’re actually doing to make that Workspace.
FilterByTime is working correctly (Cuts Ch_ID_Err from 2847 to 4 entries), but your monitor workspace isn’t filtered so retains the sample logs for the whole run. then on line 8 you use AppendSpectra.
mon_rebin has the logs for the whole run whereas 57582_900_1000 has the filtered logs. When they are Appended, the data from the second is added to the first but the output workspace just has the sample logs of the first InputWorkspace. This is why day_slices end up with sample logs from the whole run.
Below is this simple ‘Show History’ script where I’ve added in CopyLogs on line 7. This is giving the mon_rebin the filtered logs and so they survive AppendSpectra. Try Running this script and see if this is the solution you’re looking for. If so then I hope you can find a way to work this into your INTER_autoreduction script! This line leaves First_dayslice_10_of_864 at 95 kB with logs (4 kB without logs).
Load(Filename='C:\\Path\to\TRANS.nxs', OutputWorkspace='TRANS')
Load(Filename=r'\\isis.cclrc.ac.uk\inst$\ndxinter\instrument\data\cycle_19_3\INTER00057582.nxs', OutputWorkspace='57582', LoadMonitors=True)
FilterByTime(InputWorkspace='57582', OutputWorkspace='57582_filter', StartTime=900, StopTime=1000)
Scale(InputWorkspace='57582_monitors', OutputWorkspace='mon_slice', Factor=0.0011684333374906953)
Rebin(InputWorkspace='57582_filter', OutputWorkspace='57582_900_1000', Params='0,20,100000', PreserveEvents=False)
Rebin(InputWorkspace='mon_slice', OutputWorkspace='mon_rebin', Params='0,20,100000', PreserveEvents=False)
CopyLogs('57582_900_1000','mon_rebin','WipeExisting') # Replace mon_rebin logs with the filtered logs
AppendSpectra(InputWorkspace1='mon_rebin', InputWorkspace2='57582_900_1000', OutputWorkspace='57582_900_1000')
ReflectometryReductionOneAuto(InputWorkspace='57582_900_1000', ThetaIn=0.64981704415018859, WavelengthMin=1, WavelengthMax=17, FirstTransmissionRun='TRANS', MomentumTransferMin=0.0083852242849074519, MomentumTransferStep=0.014999999999999999, MomentumTransferMax=0.1425151372438889, ScaleFactor=1, OutputWorkspaceBinned='First_dayslice_10_of_864', OutputWorkspace='First_dayslice_10_of_864_unbinned', OutputWorkspaceWavelength='57582_900_1000_lam')