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
Workspace comment and title fields changed via python are not persistent when saved and reloaded #11386
Comments
http://trac.mantidproject.org/mantid/raw-attachment/ticket/10544/chk_WriteComments.py |
http://trac.mantidproject.org/mantid/raw-attachment/ticket/10544/chk_WriteTitle.py |
The save and load functions for MD workspaces are complete but the majority of other types (e.g SaveNexus, LoadNexusProcessed, etc) don't write/read comments and sometimes titles set in python. There doesn't appear to be a common base class as they all save or load files in different ways, so each function will probably need to be changed individually. |
Tests show that currently the title is preserved, but the comment isn't ws = Load(Filename="ENGINX00228061.nxs")
print "Original title'%s'" % (ws.getTitle())
print "Original comment'%s'" % (ws.getComment())
SaveNexus(ws,r"d:\data\test.nxs")
wsReloaded = Load(r"d:\data\test.nxs")
print "reloaded title'%s'" % (wsReloaded.getTitle())
print "reloaded comment'%s'" % (wsReloaded.getComment())
#edited
ws.setTitle("CustomTitle")
ws.setComment("CustomComment")
SaveNexus(ws,r"d:\data\test.nxs")
wsEdited = Load(r"d:\data\test.nxs")
print "edited title'%s'" % (wsEdited.getTitle())
print "edited comment'%s'" % (wsEdited.getComment()) ouptut
Comments are not used often at all, so closing this issue |
This issue was originally TRAC 10544
Using python, one can view and change the workspace comment and title fields. However upon saving the workspace with changes made to these fields and reloading the workspace, the added comments and title are not present. It appears that the corresponding workspace writers and/or readers for these fields are not present.
Two python script files are attached to illustrate these issues.
Keywords: Student
The text was updated successfully, but these errors were encountered: