You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am trying to simulate a 3-dimensional magnetic disk (dot and or anti-dot type structure) lattice structure using Ubermag. I am mainly interested in stray field distribution. If it is a single magnetic disk, I can easily use:
However, this process gets cumbersome if I have multiple such disks or if I try to simulate a real SEM image of such an artificial lattice structure. Is it possible to write a code in such a way that Ubermag takes the initial magnetization configuration after reading an image file (.png,. jpeg or .bmp)?
I have attached a sample image here. The black/white part should be read as 'zero/Ms' magnetization, where Ms is the predefined magnetization value.
Thanks,
Debanjan
The text was updated successfully, but these errors were encountered:
Hi @DebanjanPolley ,
Ubermag (i.e. discretisedfield) does not have any functionality to directly create an initial state from an image. Two suggestions:
To simplify the particle function for multiple particles you could probably introduce a for-loop over all (x0, y0, r) tuples to avoid some code duplication.
When the configuration becomes more complex and you need the image you could use one of the image libaries available for Python (e.g. pillow) to read the image and convert it into a numpy array, which you can subsequently use (probably after a few small transformations such as adjusting the shape etc) to initialise value/norm as needed.
Hello,
I tried a solution as provided in some other thread. I have attached a simplified image and the corresponding data file (including the position and magnetization vector ). However, I fail to achieve the required spin configuration using a similar code. The idea is that the white portion of the image should have a large magnetization, and the black portion should have zero magnetization.
Hello,
I am trying to simulate a 3-dimensional magnetic disk (dot and or anti-dot type structure) lattice structure using Ubermag. I am mainly interested in stray field distribution. If it is a single magnetic disk, I can easily use:
However, this process gets cumbersome if I have multiple such disks or if I try to simulate a real SEM image of such an artificial lattice structure. Is it possible to write a code in such a way that Ubermag takes the initial magnetization configuration after reading an image file (.png,. jpeg or .bmp)?
I have attached a sample image here. The black/white part should be read as 'zero/Ms' magnetization, where Ms is the predefined magnetization value.
Thanks,
Debanjan
The text was updated successfully, but these errors were encountered: