[yt-users] changing the name of saved files

Stephen Skory s at skory.us
Fri Jul 8 05:55:19 PDT 2011


Elizabeth,

> I'd like to create a bunch of slices of the same field, but with different options (width, modifiers etc). Is it possible to change the file name yt saves the plots under so:
>
> GT_BTAccel_256AMR4_PeHeat_sf5_SNe_0301_Slice_z_PotentialField.png
>
>
> Doesn't get over-written with each one?

You can specify the prefix for the file name in the "save()" command:

pc.save("w_%1.3f_mod_%s_%s" % (width, modifier_string, fn))

which will get you something like
"w_0.05_mod_awesome_GT_BTAccel_256AMR4_PeHeat_sf5_SNe_0301_Slice_z_PotentialField.png"

Is this what you were looking for?

Good luck!

-- 
Stephen Skory
s at skory.us
http://stephenskory.com/
510.621.3687 (google voice)



More information about the yt-users mailing list