Readers
Collection of functions to read simulation data and other files needed by MIMBSimUtils.
-
Readers.readChemField(simid, t, indir, fieldname, gzipped=True, border=True)[source]
Read chemical field from file.
Parameters: |
- simid (str) – simulation identifier
- t (int) – time step
- indir (str) – path to data files
- fieldname (str) – name of the chemical field
- gzipped (bool) – data is gzipped (gzipped data is expected to be in indir/simid/)
- border (bool) – cut of border pixels
|
Returns: | numpy array with the levels of the chemical field at each position
|
-
Readers.readColorMap(filename)[source]
Read colormap from a file, formatted like: celltype r g b
Parameters: | filename (str) – file with the colormap |
Returns: | dictionary with cell type as keys and colors (r,g,b) as values. |
-
Readers.readSigma(simid, t, indir, gzipped=True, border=True)[source]
Read cell field (sigma) from file.
Parameters: |
- simid (str) – simulation identifier
- t (int) – time step
- indir (str) – path to data files
- gzipped (bool) – data is gzipped (gzipped data is expected to be in indir/simid/)
- border (bool) – cut of border pixels
|
Returns: | numpy array with cell id’s
|
-
Readers.readTau(simid, t, indir, gzipped=True, border=True)[source]
Read type field (tau) from file.
Parameters: |
- simid (str) – simulation identifier
- t (int) – time step
- indir (str) – path to data files
- gzipped (bool) – data is gzipped (gzipped data is expected to be in indir/simid/)
- border (bool) – cut of border pixels
|
Returns: | numpy array with cell types
|