Some utils for working with python in a simple lab-like environment
Project description
pylabutils
pylabutils
is a small, experimental python package that aims to provide some
aid in the making of simple data analysis reports in a lighter, more ergonomic
and more streamlined manner.
It currently offers 5 main methods:
fit
: the process of defining a function and setting up the optimization method all in one line, with added functionalities for immediate graphical representation.read_data
: an easy way to read your data from most table-like files and have it stored in a convenientpandas.DataFrame
.tex_table
: prints your data into a fancy, common LaTeX table, with an added bit of customization included.multisort
: allows you to sort all of your data based on any of the variables stored, in case they don't all follow a monotonic progression.wdir
: a manager that yields a path, useful for when your data is stored externally.Interval
: a small class that lets you create Real number intervals, letting you check belongings using thein
operator.
They all do have detailed __doc__
attributes that explain all of their
arguments and keyword arguments, which you can view, and I encourage so,
by using either help(<method>)
or <method>.__doc__
.
There are, in addition, some "private" methods that can give some functionalities that are included in some of the "main" methods, but these are not really intended for active use and do not have a detailed description accompanying them.
There is at least one important issue to be noted, that is to be fixed. As
described in the relevant function's __doc__
: "[...] you cannot use arbitrary
constants or modules by reference in the function string, because of the way
eval()
works (it calls the scope inside a custom, private function, and the
modules or constants declared by the user are non-existent in that scope).
What this essentially means is that you are, until this issue is fixed,
restricted to the use of math
, numpy
as 'np' and scipy.constants
as 'scs' attributes, e.g. 'y = scs.R + {A} * np.exp(math.e + {B}*x)'
"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.