'Save' issues

27 views
Skip to first unread message

Samartha Channagiri

unread,
Dec 14, 2015, 9:58:39 AM12/14/15
to hyperspy-users
Hi All,

I am having issues saving processed EELS sectra on hyperspy. While using the syntax for this purpose cited on the website..."s.save('file.msa', encoding = 'utf8')".
When I try this for my file, I have a permanent asterisk mark in the place of line# on the left and no file is saved. Any advice appreciated!

Regards,
Samartha

Francisco de la Peña

unread,
Dec 14, 2015, 10:27:29 AM12/14/15
to hyperspy-users
Hi Samantha,

Thank you for reporting the issue. I have tried to reproduce the problem with the following code but it works for me. Can you check if it also works for you?

s = hs.signals.EELSSpectrum(np.arange(10))
s.save("test.msa", encoding = 'utf8')

Francisco

--
You received this message because you are subscribed to the Google Groups "hyperspy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hyperspy-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Samartha Channagiri

unread,
Dec 15, 2015, 10:09:28 AM12/15/15
to hyperspy-users
Hi Francisco,

Thanks for the reply and appreciate the help! It does work! I have one question though. Where is this file saved on the computer? It just says "The file was created" but I cannot find it anywhere on the pc.
Also, I tried specifying a pathway to the desktop to put it there "C:\Users..........test.msa", but again, the asterisk problem and it does not save anything the desktop. Would love it if tehre is a way to specifically save in a folder specified by me directly.

Regards,
Samartha 

Francisco de la Peña

unread,
Dec 15, 2015, 10:20:31 AM12/15/15
to hyperspy-users
Hi Samantha,

It saves the file in your working directory. You can get your working directory using this IPython magic %pwd   (it works in Linux, hopefully also in Windows).

In case that you're not doing this already, the easiest way to start HyperSpy is using the context menu entry "Start HyperSpy Notebook Here". See here. In this way you can easily set the working directory.

The "asterisk problem" probably indicates that the kernel has not yet finished running the command. Given that it is a very simple task, I bet that some permission problems are causing it. For example, you may be trying to write to a directory but you may not have permissions to write there.

Francisco
Reply all
Reply to author
Forward
0 new messages