write

marxs.visualization.threejsjson.write(fileobject, data, photons=None)[source] [edit on github]

Add metadata and write json for three.js to disk

Parameters:
fileobjectwriteable file-like object
datalist of dict or single dict

Output of xxx.plot(format='threejsjson') calls. This can either be a list of dictionaries or a single dictionary.

photonsastropy.table.Table or None

Some metadata is copied from a photon list, if available.