irfpy.mima.irfmom

IRF version (official version) of moment file reader.

Prepare the data file (contact to Futaana).

Setup .irfpyrc.

[mima]
moment_scan = /path/to/data/file

> from irfpy.mima import irfmom
> import datetime
> t0 = datetime.datetime(2010, 1, 1)
> t1 = datetime.datetime(2010, 1, 2)
> ns, vs, kTs, fs = irfmom.get_moment_data(t0, t1)
> tlist, nlist = ns.get_data()
> print(tlist[0])
2010-01-01 15:52:20
> print(nlist[0])
2.05347

Todo

Implement higher-level user interface.

Todo

Test is disabled so far. This is because of the data retrieval system related issue. (Quick & Dirty implementation here!)

class irfpy.mima.irfmom.MomentFile[source]

Bases: object

Represent a moment file, i.e. MomentsScan.ascii

It is for backend, which does not concern to users.

> mf = MomentFile()

get_data(t0, t1)[source]

Get the data between t0 and t1.

irfpy.mima.irfmom.get_moment_data(t0, t1)[source]

Return the moment data.

Returns

The moment data, as a tuple of four irfpy.util.timeseries.ScalarSeries objects (density, speed, temperature, flag).

irfpy.mima.irfmom.get_moment_array(t0, t1)[source]

Return the moment data as a numpy array.

Returns

The moment data as a numpy array

The data is organized as (N, 5) shaped array where N is the number of data. The five column is, time (in floating point time format of matplotlib), density, speed, temperature, and flag.