llg3d.post.m1_vs_time

Plot m1 vs time from one or more result files.

Use the llg3d.m1_vs_time command line tool to plot the average magnetization versus time from multiple result files:

$ llg3d.m1_vs_time -h
usage: llg3d.m1_vs_time [-h] [-i IMAGE_FILEPATH] [-s] files [files ...]

Plot m1 vs time from one or more result files.

positional arguments:
  files                 Path to the result files.

options:
  -h, --help            show this help message and exit
  -i IMAGE_FILEPATH, --image_filepath IMAGE_FILEPATH
                        Path to save the image (default: m1_vs_time.png)
  -s, --show            Display the plot (omit to disable display in non-
                        interactive runs). (default: False)

When calling the tool on a result files:

$ llg3d.m1_vs_time run_1100K.npz -i m1_vs_time.png
Processing file: run_1100K.npz
Written to m1_vs_time.png
Magnetization versus time for a single file

Now when calling the tool on a selection of result files:

$ llg3d.m1_vs_time run_*.npz -i m1_vs_time_multiple.png
Processing file: run_1000K.npz
Processing file: run_1100K.npz
Processing file: run_1200K.npz
Processing file: run_1300K.npz
Processing file: run_1350K.npz
Processing file: run_1375K.npz
Processing file: run_1390K.npz
Processing file: run_1400K.npz
Processing file: run_1410K.npz
Processing file: run_1450K.npz
Processing file: run_1500K.npz
Processing file: run_1550K.npz
Processing file: run_1700K.npz
Processing file: run_1900K.npz
Written to m1_vs_time_multiple.png
Magnetization versus time for multiple files

Functions

main()

Parse CLI arguments and call the plot function.

plot_m1_vs_time(*files[, image_filepath, show])

Plot the results from the given files.

plot_m1_vs_time(*files, image_filepath=None, show=False)[source]

Plot the results from the given files.

Parameters:
  • *files (Path) – Paths to the result files.

  • image_filepath (Path | str | None) – Path to the output image file. if None, the image will not be saved.

  • show (bool) – display the graph in a graphical window.

main()[source]

Parse CLI arguments and call the plot function.