ptypy.utils.misc#
Miscellaneous utility functions with little dependencies from other modules
This file is part of the PTYPY package.
- copyright:
Copyright 2014 by the PTYPY team, see AUTHORS.
- license:
see LICENSE for details.
Functions
|
Helper function for finding all subclasses of a base class. |
|
Makes path absolute and create all sub directories if needed. |
|
|
|
Calculate electron wavelength based on energy in keV: |
|
Generates 1d numpy array with 2 entries generated from multiple inputs (tuples, arrays, scalars). |
|
Generates 1d numpy array with 3 entries generated from multiple inputs (tuples, arrays, scalars). |
|
|
|
This function should be used for checking if an object is of string type |
|
Convert photon energy in keV to wavelength (in vacuum) in meters. |
|
Convert photon energy in keV to wavelength (in vacuum) in nanometers. |
|
Convert wavelength in meters to photon energy in keV. |
|
Convert wavelength in nanometers to photon energy in keV. |
|
Converts a str that is supposed to represent a numpy index expression into an index expression |
|
Transforms numpy array A of strings to |
|
Generates an index list from string input s |
|
Makes path absolute and unique |
Classes
|
Basic table implemented using numpy.recarray Ideally subclassed to be used with faster or more flexible databases. |