Closed zkhodzhaev closed 3 years ago
@zkhodzhaev ,Hi, I'm also a beginner of ubermag. I have some suggestions for your question. First of all, I think you can use the for loop to read multiple files (on the premise that your read files should be named by regular numbers), but I haven't tried that before, so I'm not sure it works. For the second point, you can check whether d in your figure has been successfully defined as a field object. A field object should be similar to the one in the figure below.
If your d returns this type, then I think you just need to enter d.array
to return a numpy array. Hope to help you!
Thanks, I'll let you if it works.
Hi @zkhodzhaev, thank you for your question and for using Ubermag.
micromagneticdata
can help you if you obtained the ovf
files using Ubermag. For instance:import micromagneticdata as md
import discretisedfiels as df
data = md.Data(system.name)
drive = data[drive_number]
for field in drive:
field.write(filename)
However, if the files you want to read/write are not obtained by Ubermag, I would suggest looking at glob
(https://docs.python.org/3/library/glob.html). If you provide us with more details, I can give you more specific advice.
field.array
. Please note that the Field
object provides many common operations and convenience functions already. If you let me know what you want to calculate, I can provide further details.Thank you for your response @marijanbeg
I am trying to track skyrmion motion:
Is there a way to track a skyrmion using the Field
object? to see the trajectory of the motion, separately and multiple skyrmions at the time?
Thank @zkhodzhaev for the clarification. If you used mumax3 for generating files, then glob seems to be the best way forward.
In order to track the position of a skyrmion, you can have a look at our discussion with @code-whale (https://github.com/ubermag/help/issues/132). For tracking multiple skyrmions, there is no easy solution I am afraid.
Is there anything else we can help you with regarding this issue?
Thank you, I have other issues. I can open another ticket later.
My apologies, I referred to the wrong issue. This is the right one: https://github.com/ubermag/help/issues/122
I have 2 questions:
The website does not have this info: https://discretisedfield.readthedocs.io/en/latest/ipynb/field-read-write.html i tried this, but didn't work:
Thanks