minor update of self-test
neatening up

removed categories from Datamat
made some minor improvements(?) to str()
added pad_vector function to create uniformly shaped vector with a window around some center point
fixed incorrect shape of new data field for annotate when take_first=True
pad_vector now supports masked_array

- expanded documentation of pad_vector
- fixed examples/testcode of snip_string
minor: VectorFactory accepts empty parameters

added doc to VectorFactory and disabled non-working doctests in rest of file
minor doc updates
added .settings to ignore
Merge branch 'majormerge'

Straight-forward - just bringing all the changes from the merge with
niklas' onto the master branch.

Conflicts:
	.gitignore
Merge branch 'master' of https://github.com/nwilming/ocupy

I don't understand what I am commenting here. I just pulled from original master.
a few doc changes
using ma.ones rather than ma.empty
split join() into join() and join_full() to remove 'minimal_subset'
argument.
added a expand_boolean_subindex()

allows mapping a boolean index of a sub-set of an original array back
to that array. Also added capability of returning the necessary
subsetting index array from the DataMat.by_field() function to allow use
of this expand...() function to map indices into subsets of DataMats
back to the original DataMat: very useful for filtering of a DataMat
that requires by-field calculation and therefore cannot be done at the
level of the whole DataMat directly.
working on flattening

added all_same to utils, made formatting changes, nothing major.
Merge remote branch 'nwilmingmaster/master'

Conflicts:
	ocupy/datamat.py
cleanup from merge

just removed duplicate import and a debug print line.
fixed wiping out of masked values in VectorFactory

Recent change to DataMat meant that all fields going through the
VectorFactory were being passed through 'asarray' which forces a masked
array to a normal ndarray, obliterating the mask. I have changed this
now to use 'asanyarray' which will preserve any subclasses of ndarray,
and thereby also preserve the mask of a masked array.
added flatten() and some utils from heartFelt mods

- moved ma_nans() to ocupy utils for general usage (was in
  heartFelt.utils)
- added copy_empty() method to DataMat to allow copying structure
  without fields
- added rename_field() convenience function
- added the add_average_field() function from heartdatamat, allowing
  easy way of reducing hierarchical fields in a DataMat to single metric
  for each element (ie, derived_bpm (which is an array for each DataMat
  element) to mean_derived_bpm which has a single number for each
  element)
- added the flatten(dm) function which unravels a hierarchical DataMat
  to a flat structure (fixmats were flat, heartdatamats are
  hierarchical) - this is a precursor to loading into pandas dataframes
  of doing customised sample-based (as opposed to trial/element-based)
  merging
added align_vector() and minor other changes

+ added an align_vector() function which is very similar to pad_vector
(and based thereupon) to make two vectors identical lengths, padding if
necessary
+ moved factorise_field() from datamat_tools (which is now empty and
deleted) to utils module
+ add_average_field() no longer requires span_start_idx or span_end_idx
to be present in the DataMat, but will use them if they are
+ added a get_short_function_name to pretty-up presentation of functions
esp. for storing as a variable