chaosmagpy.data_utils.save_shcfile

chaosmagpy.data_utils.save_shcfile(time, coeffs, order=None, filepath=None, nmin=None, nmax=None, leap_year=None, header=None)[source]

Save Gauss coefficients as SHC-file.

Parameters:
timefloat, list, ndarray, shape (n,)

Time of model coeffcients in modified Julian date.

coeffsndarray, shape (N,) or (n, N)

Gauss coefficients as vector or array. The first dimension of the array must be equal to the length n of the given time.

orderint, optional (defaults to 1)

Order of the piecewise polynomial with which the coefficients are parameterized in time (breaks are given by time[::order]).

filepathstr, optional

Filepath and name of the output file. Defaults to the current working directory and filename model.shc.

nminint, optional

Minimum spherical harmonic degree (defaults to 1). This will remove first values from coeffs if greater than 1.

nmaxint, optional

Maximum spherical harmonic degree (defaults to degree compatible with number of coeffcients, otherwise coeffcients are truncated).

leap_year{True, False}, optional

Take leap years for decimal year conversion into account (defaults to True).

headerstr, optional

Optional header at beginning of file. Defaults to an empty string.