-
Notifications
You must be signed in to change notification settings - Fork 3
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
Determine Spatially Resolved Magnetization #200
Comments
Hi @Ponsudana, thank you for your question. ODT files contain only spatially averaged magnetisation at all time steps. To obtain magnetisation values at all individual time steps, OMF files should be read -
@swapneelap has been working on some very nice functionalities for using |
Hello @Ponsudana and @marijanbeg, With the next ubermag release, it will be possible to obtain an import micromagneticdata as md
data = md.Data(system_name) # system_name is the name you gave to your system
drive = data[N] # N is the drive number in which you used TimeDriver
# Now, the magnetisation field at time_step at point can be accessed as:
mag_c = drive[time_step].to_xarray().sel(x=<c_x>, y=<c_y>, z=<c_z>, method=nearest) The values of import xarray as xr
collect_xr = []
for step in range(drive.n):
collect_xr.append(drive[step].to_xarray())
drive_xr = xr.concat(collect_xr, dim='t') # Collecting all DataArrays in one
mag_c_t = drive_xr.sel(x=<c_x>, y=<c_y>, z=<c_z>, method=nearest)
We are also working towards adding |
Hello Ubermag Team,
How can I determine the spatially resolved magnetization at each cell for the magnetization components at all timesteps?
When I time drive a system for 20 ns and saved the data at a timestep of 5 ps (n=4000), the ODT file containing magnetization values mx, my and mz for all timesteps is obtained.
Now, I wish to determine the spatially resolved magnetization at each cell and save it as an ODT file.
So, I have to read the magnetization from all ODT files (4000 files) and determine the spatially resolved magnetization at each cell.
If region is p1=(-80e-9, -80e-9, 0), p2=(80e-9, 80e-9, 1e-9) and cell is (1e-9, 1e-9, 1e-9), the number of cells are 160 * 160
Now how to write the code to determine spatially resolved magnetization (mxs, mys and mzs) and save it as an ODT file.
Thank you,
Regards,
Ponsudana
The text was updated successfully, but these errors were encountered: