py4sci

Previous topic

checkpoint

Next topic

datfile

This Page

parameters

Note

Functions for opening, editing, and saving Langmuir input files.

Module author: Adam Gagorik <adam.gagorik@gmail.com>

class parameters.Parameter

Parameter(key, pytype, default, units, fmt)

default

Alias for field number 2

fmt

Alias for field number 4

key

Alias for field number 0

pytype

Alias for field number 1

units

Alias for field number 3

class parameters.Parameters(handle=None)[source]

A class to store Langmuir simulation parameters.

Create Parameters instance.

Parameters:handle (str) – filename or file object
>>> parm = lm.parameters.Parameters('out.parm')
set_defaults()[source]

Set parameters to default values.

>>> parm = lm.parameters.Parameters()
>>> parm.set_defaults()
load(handle)[source]

Load parameters from a file.

Parameters:handle (str) – filename or file object
>>> parm = lm.parameters.Parameters()
>>> parm.load('out.parm')
save(handle)[source]

Save parameters to a file.

Parameters:handle (str) – filename or file object
>>> parm = lm.parameters.Parameters()
>>> parm.save('sim.inp')
to_ndarray()[source]

Convert parameters to a numpy array.

to_series()[source]

Convert parameters to a pandas series.

to_dict()[source]

Convert to simple python dict.

parameters.load(handle)[source]

Create Parameters object from file.

Parameters:handle (str) – filename or file object
parameters.compare(parm1, parm2)[source]

Compare two Parameter objects.