MEX/VEX IMA background data as proxy of SEP

MEX/VEX IMA bacground data is made routinely at

class irfpy.imacommon.background.DataCenterBackground(pathname, name='IMA bakground (generic)')[source]

Bases: irfpy.util.datacenter.BaseDataCenter

Data center for MEX/VEX IMA background


  • cache_size – Size of the ring cache.

  • name – The name of the

  • copy – Boolean if the returned data is to be deep-copied (True) or reference (False). It is good to return the data after the copy, since then the data is always original. Returning reference is possibly faster, while there are side effect that the post-processing will destroy the original data. Therefore, it is recommended to set True always. The copy value can be overwritten by each method as necessity.


Search the data files, returning a list of data file.

This method searches the data files under the base_folder. This method should return a list / tuple of the data file name (usually a full path).

This method is called only once when __init__() was called.


A list / tuple of the data file. It should be full path (or relative path from the current path), and sorted from earlier data to later data.


Start time should be guessed for each file.

A guessed start time should be returned. It is OK if it is very approximate, but the orders of the guessed-start and the exact-start should be identical. This method must be very fast, because it is called for all the files in the data base (i.e. all the files retuned by search_files() method).

A practical suggestion for implementation is to guess the time from the filename.


filename – A string, filename.


An approximate, guessed start time of the file

Return type



Reading a single file.


From filename load the data and re-format it.

class irfpy.imacommon.background.Database(datapath)[source]

Bases: object

A data base.

Assumes the files are downloaded locally.


datapath – Path to the data (locally downloaded)


Background level data.

This is a loaded and concatenated background level data, a irfpy.util.timeseries.ScalarSeries instance.

get_background_level(t0, t1)[source]

Return the background level.

load_background_files(t0, t1)[source]