fusionsc.export

Helpers for exporting calculation results (without requiring reimport)

Functions

exportTrace(trace, filename[, format, ...])

Exports a fieldline trace result (from the fsc.flt.trace function) to a file for third party code use.

Functions

fusionsc.export.exportTrace(trace: dict, filename: str, format: Literal[None, 'matlab', 'netcdf4', 'json'] | None = None, indent=None, allow_nan=True)

Exports a fieldline trace result (from the fsc.flt.trace function) to a file for third party code use.

Parameters:

  • trace: Tracing result

  • filename: Filename for the target file.

  • format: Format specifier. Must be “matlab”, “netcdf4”, “json”, or None (in which case the file format is inferred from the filename)

  • indent: JSON only - Whether to indent the file.

  • allow_nan: JSON only - whether to allow “inf” and “nan” (which are not json spec conformant) in the output.