Skip to content

Instantly share code, notes, and snippets.

@Kvieta1990
Created April 21, 2022 20:57
Show Gist options
  • Save Kvieta1990/3a0bf6ea4bcbafc170bfe486a6eb2e8f to your computer and use it in GitHub Desktop.
Save Kvieta1990/3a0bf6ea4bcbafc170bfe486a6eb2e8f to your computer and use it in GitHub Desktop.
Saving time filtered workspaces to file with specified meaningful name
output_dir = "."
for i in range(mtd[ws + '_filtered'].getNumberOfEntries()):
time_stamp = i * int(time_interval)
time_stamp = f"{time_stamp}"
file_out = os.path.join(output_dir, str(run) + "_" + time_stamp + ".xye")
wks_to_output = title + str(i + 1)
SaveFocusedXYE(InputWorkspace=wks_to_output,
Filename=file_out)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment