Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CloneWorkspace doesn't copy logs #9778

Closed
mantid-builder opened this issue Feb 7, 2014 · 1 comment
Closed

CloneWorkspace doesn't copy logs #9778

mantid-builder opened this issue Feb 7, 2014 · 1 comment
Assignees
Labels
Framework Issues and pull requests related to components in the Framework
Milestone

Comments

@mantid-builder
Copy link
Collaborator

Original Reporter: Keith Brown

After cloning a workspace I've discovered that the logs are shared between the original and the clone, so altering the original also affects the clone.

I was running this script when I discovered this.

def correct_logs(ws):
    ws_log_names = mtd[ws].getRun().keys()
    if 'stheta' in ws_log_names and not 'theta' in ws_log_names:
        #create a copy of the original
        CloneWorkspace(InputWorkspace=ws,OutputWorkspace=ws+"_clone")
        RenameLog(Workspace=ws,OriginalLogName='stheta',NewLogName='theta')
    else:
        print "Nothing to correct."
correct_logs('POLREF00008481')

To reproduce
Load POLREF00008481.nxs and check the sample logs for "stheta" and note that 'theta' doesn't exist, then run the script. Check the sample logs again on both POLREF00008481 and POLREF00008481_clone for stheta. It won't be present on either and theta will be present instead.

The way it should work is that the original should have been altered and have theta rather than 'stheta', while the clone should remain untouched and contain 'stheta' but not 'theta'

@mantid-builder
Copy link
Collaborator Author

This issue was originally trac ticket 8935

@mantid-builder mantid-builder added the Framework Issues and pull requests related to components in the Framework label Jun 3, 2015
@mantid-builder mantid-builder added this to the Release 3.4 milestone Jun 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework Issues and pull requests related to components in the Framework
Projects
None yet
Development

No branches or pull requests

2 participants