fosanalysis
A framework to evaluate distributed fiber optic sensor data
Loading...
Searching...
No Matches
misc.py File Reference

Go to the source code of this file.

Namespaces

namespace  fosanalysis
 Central package of fosanalysis.
 
namespace  fosanalysis.utils
 Contains utility modules with general pupose.
 
namespace  fosanalysis.utils.misc
 Contains miscellaneous standalone functions.
 

Functions

np.array fosanalysis.utils.misc.datetime_to_timestamp (np.array datetime_array)
 Converts an array of datetime entries to an array of Unix timestamps.
 
tuple fosanalysis.utils.misc.find_closest_value (np.array arr, float v)
 Returns index and value in arr, that is closest to the given v.
 
np.array fosanalysis.utils.misc.last_finite_index (np.array arr, int axis=-1)
 Returns an array with the indices of the most recent finite entry when traversing the arr along the specified axis.
 
np.array fosanalysis.utils.misc.nan_diff (np.array arr, int axis=-1)
 Calculate the difference to the previous finite entry.
 
np.array fosanalysis.utils.misc.nan_diff_1d (np.array arr)
 Calculate the difference to the previous finite entry.
 
tuple fosanalysis.utils.misc.next_finite_neighbor (np.array array, int index, bool to_left, int recurse=0)
 Find the next finite neighbor of the entry array[index].
 
 fosanalysis.utils.misc.np_to_python (data)
 Convert the given data to a Python built-in type.
 
np.array fosanalysis.utils.misc.timestamp_to_datetime (np.array timestamp_array)
 Converts an array of Unix timestamps to an array of datetime entries.