Image storage with stage and magnetic field

18 views
Skip to first unread message

Claudio Beck

unread,
Feb 21, 2025, 11:47:44 AMFeb 21
to Boris Computational Spintronics
Hi Serban, I have a question regarding the saving of images. Currently I save the images as follows:
ns.saveimagefile(f "hysteresis_{field_direction}_shape_{shape_name}_angle_{angle}_.png").
And I would also like the name to contain the stage and the components of the magnetic field. Unfortunately, I am still a bit inexperienced with BORIS and would be very grateful for your help.

Many thanks in advance
Claudio Beck

Serban Lepadatu

unread,
Feb 23, 2025, 3:08:23 AMFeb 23
to Boris Computational Spintronics
Hi Claudio,

There is an in-built formatting specifier which BORIS recognizes for any output file, e.g. ns.saveimagefile("test_%sstep%_%Ha%.png"). Here %sstep% and %Ha% will be replaced by stage-step and applied field values when the file is saved.

see pg. 273 for a full example, this works as %dataname%, where dataname is any of the recognized  output data handles listed in the chapter starting on pg 263.

Regards,
Serban

Reply all
Reply to author
Forward
0 new messages