Loading live_config.json +1 −1 Original line number Diff line number Diff line { "Cycle": "2025-2_11A_CAL", "SampleEnvironment": "MAG", "SampleEnvironment": "PAC", "OverwriteUserJsonFile": "Y", "ConfigFile": { "PAC": "PAC_default.json", Loading reduce_PG3_live_post_proc.py +16 −10 Original line number Diff line number Diff line Loading @@ -85,10 +85,13 @@ else: except: raise Exception("Failed in proton charge normalization.") # simpleapi.LoadNexus( # Filename="/SNS/PG3/shared/livereduce/tmp/proc_tmp.nxs", # OutputWorkspace="pproc_in" # ) simpleapi.SaveNexus( InputWorkspace=input, Filename=f"/SNS/PG3/shared/livereduce/tmp/pproc_zyp_tmp.nxs") simpleapi.LoadNexus( Filename="/SNS/PG3/shared/livereduce/tmp/pproc_zyp_tmp.nxs", OutputWorkspace="pproc_in" ) try: simpleapi.PDLoadCharacterizations( Loading @@ -96,7 +99,7 @@ else: OutputWorkspace='characterizations' ) simpleapi.PDDetermineCharacterizations( InputWorkspace=input, InputWorkspace="pproc_in", Characterizations='characterizations', ReductionProperties='__pd_reduction_properties' ) Loading Loading @@ -138,13 +141,13 @@ else: can = getRunId(manager, 'container') with open( "/SNS/PG3/shared/livereduce/tmp/alignandfocuspowder.json", "/SNS/PG3/shared/livereduce/tmp/alignandfocuspowder_zyp.json", "w" ) as f: json.dump(processingParams, f, indent=4) if can is not None and not simpleapi.mtd.doesExist(can): with open("/SNS/PG3/shared/livereduce/tmp/can.name", "w") as f: with open("/SNS/PG3/shared/livereduce/tmp/can_zyp.name", "w") as f: f.write(can) mantid.logger.information("processing container '%s'" % can) subprocess.run( Loading Loading @@ -174,6 +177,9 @@ else: if can is not None: simpleapi.SaveNexus( InputWorkspace=output, Filename=f"/SNS/PG3/shared/livereduce/tmp/output_{can}_test.nxs") try: simpleapi.RebinToWorkspace( WorkspaceToRebin=can, Loading Loading @@ -201,7 +207,7 @@ else: van = getRunId(manager, 'vanadium') if van is not None and not simpleapi.mtd.doesExist(van): with open("/SNS/PG3/shared/livereduce/tmp/van.name", "w") as f: with open("/SNS/PG3/shared/livereduce/tmp/van_zyp.name", "w") as f: f.write(van) mantid.logger.information("processing vanadium '%s'" % van) subprocess.run( Loading @@ -224,7 +230,7 @@ else: ) vanback = getRunId(manager, 'vanadium_background') with open("/SNS/PG3/shared/livereduce/tmp/vanback.name", "w") as f: with open("/SNS/PG3/shared/livereduce/tmp/vanback_zyp.name", "w") as f: f.write(vanback) if vanback is not None: mantid.logger.information( Loading reduce_PG3_live_proc.py +16 −11 Original line number Diff line number Diff line Loading @@ -18,8 +18,13 @@ except: # noqa E722 run_num = None sam_id = None num_events = input.getNumberEvents() if not (all([run_num, sam_id, ipts]) and num_events > 0): if not all([run_num, sam_id, ipts]): mantid.logger.information("Live proc run number unavailable.") else: mantid.logger.information("Live data not available.") simpleapi.CreateSampleWorkspace(OutputWorkspace=output) else: # -----> Config: Read in the config file Loading Loading @@ -82,18 +87,18 @@ else: except: # noqa raise Exception("Characterization determination failed.") # simpleapi.SaveNexus( # InputWorkspace=input, # Filename=f"/SNS/PG3/shared/livereduce/tmp/proc_tmp.nxs") # # simpleapi.LoadNexus( # Filename=f"/SNS/PG3/shared/livereduce/tmp/proc_tmp.nxs", # OutputWorkspace="proc_in" # ) simpleapi.SaveNexus( InputWorkspace=input, Filename=f"/SNS/PG3/shared/livereduce/tmp/proc_zyp_tmp.nxs") simpleapi.LoadNexus( Filename=f"/SNS/PG3/shared/livereduce/tmp/proc_zyp_tmp.nxs", OutputWorkspace="proc_in" ) try: simpleapi.PDDetermineCharacterizations( InputWorkspace=input, InputWorkspace="proc_in", Characterizations='characterizations', ReductionProperties='__pd_reduction_properties' ) Loading Loading
live_config.json +1 −1 Original line number Diff line number Diff line { "Cycle": "2025-2_11A_CAL", "SampleEnvironment": "MAG", "SampleEnvironment": "PAC", "OverwriteUserJsonFile": "Y", "ConfigFile": { "PAC": "PAC_default.json", Loading
reduce_PG3_live_post_proc.py +16 −10 Original line number Diff line number Diff line Loading @@ -85,10 +85,13 @@ else: except: raise Exception("Failed in proton charge normalization.") # simpleapi.LoadNexus( # Filename="/SNS/PG3/shared/livereduce/tmp/proc_tmp.nxs", # OutputWorkspace="pproc_in" # ) simpleapi.SaveNexus( InputWorkspace=input, Filename=f"/SNS/PG3/shared/livereduce/tmp/pproc_zyp_tmp.nxs") simpleapi.LoadNexus( Filename="/SNS/PG3/shared/livereduce/tmp/pproc_zyp_tmp.nxs", OutputWorkspace="pproc_in" ) try: simpleapi.PDLoadCharacterizations( Loading @@ -96,7 +99,7 @@ else: OutputWorkspace='characterizations' ) simpleapi.PDDetermineCharacterizations( InputWorkspace=input, InputWorkspace="pproc_in", Characterizations='characterizations', ReductionProperties='__pd_reduction_properties' ) Loading Loading @@ -138,13 +141,13 @@ else: can = getRunId(manager, 'container') with open( "/SNS/PG3/shared/livereduce/tmp/alignandfocuspowder.json", "/SNS/PG3/shared/livereduce/tmp/alignandfocuspowder_zyp.json", "w" ) as f: json.dump(processingParams, f, indent=4) if can is not None and not simpleapi.mtd.doesExist(can): with open("/SNS/PG3/shared/livereduce/tmp/can.name", "w") as f: with open("/SNS/PG3/shared/livereduce/tmp/can_zyp.name", "w") as f: f.write(can) mantid.logger.information("processing container '%s'" % can) subprocess.run( Loading Loading @@ -174,6 +177,9 @@ else: if can is not None: simpleapi.SaveNexus( InputWorkspace=output, Filename=f"/SNS/PG3/shared/livereduce/tmp/output_{can}_test.nxs") try: simpleapi.RebinToWorkspace( WorkspaceToRebin=can, Loading Loading @@ -201,7 +207,7 @@ else: van = getRunId(manager, 'vanadium') if van is not None and not simpleapi.mtd.doesExist(van): with open("/SNS/PG3/shared/livereduce/tmp/van.name", "w") as f: with open("/SNS/PG3/shared/livereduce/tmp/van_zyp.name", "w") as f: f.write(van) mantid.logger.information("processing vanadium '%s'" % van) subprocess.run( Loading @@ -224,7 +230,7 @@ else: ) vanback = getRunId(manager, 'vanadium_background') with open("/SNS/PG3/shared/livereduce/tmp/vanback.name", "w") as f: with open("/SNS/PG3/shared/livereduce/tmp/vanback_zyp.name", "w") as f: f.write(vanback) if vanback is not None: mantid.logger.information( Loading
reduce_PG3_live_proc.py +16 −11 Original line number Diff line number Diff line Loading @@ -18,8 +18,13 @@ except: # noqa E722 run_num = None sam_id = None num_events = input.getNumberEvents() if not (all([run_num, sam_id, ipts]) and num_events > 0): if not all([run_num, sam_id, ipts]): mantid.logger.information("Live proc run number unavailable.") else: mantid.logger.information("Live data not available.") simpleapi.CreateSampleWorkspace(OutputWorkspace=output) else: # -----> Config: Read in the config file Loading Loading @@ -82,18 +87,18 @@ else: except: # noqa raise Exception("Characterization determination failed.") # simpleapi.SaveNexus( # InputWorkspace=input, # Filename=f"/SNS/PG3/shared/livereduce/tmp/proc_tmp.nxs") # # simpleapi.LoadNexus( # Filename=f"/SNS/PG3/shared/livereduce/tmp/proc_tmp.nxs", # OutputWorkspace="proc_in" # ) simpleapi.SaveNexus( InputWorkspace=input, Filename=f"/SNS/PG3/shared/livereduce/tmp/proc_zyp_tmp.nxs") simpleapi.LoadNexus( Filename=f"/SNS/PG3/shared/livereduce/tmp/proc_zyp_tmp.nxs", OutputWorkspace="proc_in" ) try: simpleapi.PDDetermineCharacterizations( InputWorkspace=input, InputWorkspace="proc_in", Characterizations='characterizations', ReductionProperties='__pd_reduction_properties' ) Loading