NutMEG.plotter package

Submodules

NutMEG.plotter.growthparams module

class NutMEG.plotter.growthparams.growthparams(fig=None)

Bases: NutMEG.plotter.plotter_setup.nutfig

addlinearplot(ax, xrange, yrange, label='', color=None, ls='-')

Add one linear plot to the axis ax.

colorpicker(cs='default')
linearplot(ax=None, xvals=[[]], yvals=[[]], labels=[], colors=[], cs='default', show=False, ls=['-'])

plot the list of list values on a linear plot on the axis given. If no axis is passed, uses the whole figure.

NutMEG.plotter.habitabilitymap module

class NutMEG.plotter.habitabilitymap.habitabilitymap(fig=None)

Bases: NutMEG.plotter.plotter_setup.nutfig

add_map_plot(ax=None, xvals=[], yvals=[], zvals=[], labels=['', '', ''], show=False, save='', colorbar=True)

pass 1D lists of the x y and z coordinates of the proposed map. This map will then be placed onto ax, or if you have no ax preference will take up the whole figure.

If you pass colorbar as true, one will be generated in a seperate matplotlib figure.

if you pass save, the Figure and/or colorbar will be saved to the filename given, colorbar will have the prefix cb_. Please do include the file extension.

mapcolorbarh(zvals, zlabel, save='')

Produce a horzontal colorbar on a new canvas with the zvals and label passed.

mapdata_orgloc(xIDs, yIDs, zname)

for the OrgIDs and LocIDs passed, this finds the value of the zname parameter in the database corresponding to each.

NutMEG.plotter.plotter_setup module

class NutMEG.plotter.plotter_setup.nutfig(fig=None, figsize=5, 7)

Bases: object

Class for setting up plotting in NutMEG. Will end up doing data retrieval as well using the ecosystem_dbhelper

static denormalise(val, maxval, minval)

Take a value val which sho be ‘denormalised’ from between 0 and 1 to between maxval and minval.

static extract_param_db_OrgLoc(OrgIDs, LocID, param)

Fetch a specific parameter from a simulation, using the relevant OrgID and LocIDs as passed. If the param is ‘FinBM’ or ‘PeakGR’ this returns the final value from that simulation OR if the simulation failed, a volume of 1e-18 and growth rate of 0 is returned. If its one of the others, this returns the full list of results.

static extract_param_db_Sim(SimID, param)

Fetch a specific parameter from a simulation, using its ID as passed. If the param is ‘FinBM’ or ‘PeakGR’ this returns the final value from that simulation, if its one of the others, this returns the full list of results

fig = None
static normalise(vals)

Take the list vals, and return it normalised between 0 and 1.

static printcheck()

Checker method to see summary table. Probably isn’t needed because you could just use ecosystem_dbhelper

Module contents