BoolArray | |
BoolVec | c++ standard template library (STL) vector of type ‘bool’ |
CRAverageSpectrumWorkSpace([parent, modulename]) | Workspace for mod::hCRAverageSpectrum. |
CRDatabaseWrite(filename, quality) | Write a quality entry calculated by CRQualityCheckAntenna to a database (currently a simple textfile) |
CRFitBaselineWorkSpace([parent, modulename]) | Workspace for hCRFitBaseline. |
CRMainWorkSpace([modulename]) | WorkSpace for global parameters. |
CRQualityCheck(limits[, datafile, ...]) | Do a basic quality check of raw time series data, looking for rms, mean and spikes. |
CRQualityCheckAntenna(dataarray[, ...]) | Do a basic quality check of raw time series data, looking for rms, mean and spikes and return a list of antennas which have failed the quality check and their statistical properties. |
CRWorkSpace([parent, modulename]) | This class holds the arrays and vectors used by the various analysis tasks. |
CRWorkSpace_default_doplot(self) | Make plots during processing to inspect data. |
CRWorkSpace_default_t0(self) | The cpu starting time of the processingin seconds, used for benchmarking. |
CRWorkSpace_default_verbose(self) | Print progress information during processing. |
CRsetWorkSpace(ws, modulename, **keywords) | Sets the workspace in a function if not defined already and initialize parameters. |
CheckParameterConformance(data, keys, limits) | Usage: |
ComplexArray | |
ComplexVec | c++ standard template library (STL) vector of type ‘complex’ |
CoordinateTypes | |
FFTWPlanManyDft | |
FFTWPlanManyDftC2r | |
FFTWPlanManyDftR2c | |
FloatArray | |
FloatVec | c++ standard template library (STL) vector of type ‘float’ |
IntArray | |
IntVec | c++ standard template library (STL) vector of type ‘int’ |
StringArray | |
StringVec | c++ standard template library (STL) vector of type ‘str’ |
TBB2Data | |
TBBData | |
TYPE | |
VecToString(self[, maxlen]) | see help of ‘hPrettyString’ |
Vec_add(vec1, val) | Provides the + operator for adding two vectors or a vector and a scalar. |
Vec_div(vec1, val) | Provides the / operator for dividing two vectors or a vector by a scalar. |
Vec_iadd(vec1, vec2) | Provides the += operator for adding two vectors in place. |
Vec_idiv(vec1, vec2) | Provides the /= operator for adding two vectors in place. |
Vec_imul(vec1, vec2) | Provides the *= operator for addig two vectors in place. |
Vec_isub(vec1, vec2) | Provides the -= operator for adding two vectors in place. |
Vec_mul(vec1, val) | Provides the * operator for multiplying two vectors or a vector and a scalar. |
Vec_neg(vec1) | Provides the - operator for a vector. |
Vec_pos(vec1) | Provides the + operator for a vector (which is its identity: +vec = vec). |
Vec_pow(vec1, val) | Provides the ** operator for raising a vector to a power. |
Vec_rdiv(vec1, val) | Provides the / operator for dividing two vectors or a vector by a scalar. |
Vec_rsub(vec1, val) | Provides the - operator for subtracting two vectors or a vector and a scalar. |
Vec_sub(vec1, val) | Provides the - operator for subtracting two vectors or a vector and a scalar. |
Vector([Type, size, fill, copy, properties]) | The basic Boost Python STL vector constructor takes no arguments and hence is a litte cumbersome to use. |
asList(val) | Usage: |
ashArray(val) | Usage: |
asharray(self) | Return the argument as an hArray, if possible, otherwise as list. |
asval(self) | Return the argument as a single value. |
asvec(self) | Return the argument as a vector, if possible, otherwise as list. |
atype | |
basetype((IntVec) -> <type >) | basetype(FloatArray) -> <type ‘float’> |
btype | str(object=’‘) -> string |
commonpath(l1, l2[, common]) | |
convert(fromvalue, totype) | Basis of a conversion routine, e.g. |
extendflat(self, l) | Appending all elements in a list of lists to a one-dimensional vector with a flat data structure (just 1D). |
fftw_flags | |
fftw_sign | |
get_filename(filename, ext) | Returns the folder name and its proper extention. |
go_class | Simple command to let the user start the current task by simply typing ‘go’. |
hArray([Type, dimensions, fill, name, copy, ...]) | Usage: |
hArrayRead(filename[, block, restorevar, ...]) | Usage: |
hArrayReadDictArray(dictionary, path[, ...]) | Recursively goes through a dict (of dicts) and replaces all placeholder (hFileContainer) with hArrays or Vectors read from disk. |
hArrayWriteDictArray(dictionary, path, prefix) | Recursively goes through a dict (of dicts) and replaces all values which are hArray with a placeholder and writes the array to disk. |
hArray_Find(self, operator[, threshold1, ...]) | Usage: |
hArray_Select(self, *args, **kwargs) | Usage: |
hArray_Set(self, value, *args, **kwargs) | Usage: |
hArray_array(self) | array.array() -> hArray(array.vec,properties=array) |
hArray_checksum(self) | array.checksum() -> Returns CRC32 checksum of a ‘list’ representation of the array |
hArray_copy_resize(self, ary) | Retrieve the first element of the currently selected slice from the stored vector. |
hArray_getHeader(self[, parameter_name]) | Usage: |
hArray_getSlicedArray(self, indexlist) | self[n1,n2,n3]-> return Element with these indices |
hArray_getinitargs(self) | Get arguments for hArray constructor. |
hArray_getitem(self, indexlist[, asvec]) | ary[n1,n2,n3]-> return Element with these indices |
hArray_getstate(self) | Get current state of hArray object for pickling. |
hArray_hasHeader(self[, parameter_name]) | Usage: |
hArray_list(self) | array.list() -> [x1,x2,x3, ...] |
hArray_mprint(self) | ary.mprint() - > print the array in matrix style |
hArray_new(self) | ary.new() -> new_array |
hArray_newreference(self) | array.newreference() -> copy of array referencing the same vector |
hArray_none(self) | array.none() -> None |
hArray_par | Parameter attribute. |
hArray_read(self, datafile, key[, block, ...]) | array.read(file,”Time”,block=-1) -> read key Data Array “Time” from file into array. |
hArray_repr(self[, maxlen]) | |
hArray_return_slice_end(val) | Reduces a slice to its end value |
hArray_return_slice_start(val) | Reduces a slice to its start value |
hArray_setHeader(self, **kwargs) | Usage: |
hArray_setPar(self, key, value) | array.setPar(“keyword”,value) -> array.par.keyword=value |
hArray_setUnit(self, *arg) | |
hArray_setitem(self, dims, fill) | vec[n1,n2,..] = [0,1,2] -> set slice of array to input vector/value |
hArray_setstate(self, state) | Restore state of hArray object for unpickling. |
hArray_toNumpy(self) | Returns a copy of the array as a numpy.ndarray object with the correct dimensions. |
hArray_toslice(self) | Usage: ary.toslice() -> slice(ary1,ary2,ary3) |
hArray_transpose(self[, ary]) | Usage: |
hArray_val(self) | ary.val() -> a : if length == 1 |
hArray_vec(self) | array.vec() -> Vector([x1,x2,x3, ...]) |
hArray_write(self, filename[, nblocks, ...]) | Usage: |
hArray_writeheader(self, filename[, ...]) | Usage: |
hCRAverageSpectrum(spectrum, datafile[, ws]) | Usage: |
hCRCalcBaseline(baseline, frequency, ...[, ws]) | hCRCalcBaseline(baseline, coeffs, frequency,ws=None, **keywords): |
hCRFitBaseline(coeffs, frequency, spectrum) | Function to fit a baseline using a polynomial function (fittype='POLY') or a basis spine fit to a spectrum while ignoring positive spikes in the fit (e.g., those coming from RFI = Radio Frequency Interference). |
hFileContainer(path, name[, vector]) | Dummy class to hold a filename where an hArray is stored. |
hNone2Value(none, defval) | Returns a default value if the the first input is the None object, otherwise return the value of the first argument. |
hPlot_plot(self[, xvalues, xerr, yerr, ...]) | Method of arrays. |
hSemiLogX(x, y, **args) | Total frustration avoid EDP64 crash on new Mac function |
hSemiLogXY(x, y, **args) | Total frustration avoid EDP64 crash on new Mac function |
hSemiLogY(x, y, **args) | Total frustration avoid EDP64 crash on new Mac function |
hSliceListElementToNormalValuesEnd(s, dim) | |
hSliceListElementToNormalValuesStart(s, dim) | |
hSliceToNormalValues(s, dim) | Returns a slice object where none and negative numbers are replaced by the appropriate integers, given a dimension (length) dim of the full slice. |
hVector_getinitargs(self) | Get arguments for hVector constructor. |
hVector_getstate(self) | Get current state of hVector object for pickling. |
hVector_list(self) | Retrieve the STL vector as a python list. |
hVector_repr(self[, maxlen]) | Returns a human readable string representation of the vector. |
hVector_setstate(self, state) | Restore state of hVector object for unpickling. |
hVector_val(self) | Retrieve the contents of the vector as python values: either as a single value, if the vector just contains a single value, or otherwise return a python list. |
hVector_vec(self) | Convenience method that allows one to treat hArrays and hVectors in the same way, i.e. |
hWEIGHTS | |
isVector(vec) | Returns true if the argument is one of the standard c++ vectors i.e. |
ishArray((array) -> True or False) | Returns true if the argument is one of the hArray arrays, i.e. |
listFiles(unix_style_filter) | Usage: |
multiply_list(l) | Multiplies all elements of a list with each other and returns the result. |
open(filename, *args, **kwargs) | Open a supported file type or fall back to Python built in open function. |
pathsplit(path) | This version, in contrast to the original version, permits trailing slashes in the pathname (in the event that it is a directory). |
plot_draw_class(*args, **kwargs) | Just calls plt.draw - can be used in place of plotfinish in tasks to just plot and do nothing fancy |
plotconst(xvalues, y) | Plot a constant line. |
plotfinish([name, plotpause, doplot, ...]) | Usage: |
readParfiles(parfile) | Open one or multipe parameter (i.e. |
relpath(p1, p2) | |
root_filename(filename[, extension]) | Will return a filename without the ending ”.pcr” |
t_class | Dummy base class which redefined the __repr__ object such that the user can call a function by simply typing the name of an instance without brackets. |
task(*args, **kwargs) | Usage: |
tdel(*args) | Deletes the parameters in the workspace of a task. |
tget_class | Usage: |
thelp_class | Usage: |
tinit_class | Class to let the user run the initialization part of a task. |
tlist_class | Class to let the user list the available tasks that can be loaded with tload. |
tload(name[, get, quiet]) | Loads a specific task as the current task, you you can start it with ‘go’ and set parameters with ‘par x=value’. |
tlog_class | Class to let the user list the log of recently run tasks, including execution times. |
tnorerun(name, version, *args, **kwargs) | Usage: |
tpar_class | Sets the parameters in the workspace of a task. |
tpars_class | Usage: |
tput_class | Usage: |
trerun(name, version, *args, **kwargs) | Usage: |
treset_class | Usage: |
trun(name, *args, **kwargs) | Usage: |
type2array((float) -> Vec(0)=[]) | Creates an array with elements of type ‘basetype’. |
type2vector((float) -> Vec(0)=[]) | Creates a vector with elements of type ‘basetype’. |
typename(btype) | basetype(float) -> “float” |
v | |
vtype | c++ standard template library (STL) vector of type ‘str’ |
ws | Workspace for hCRFitBaseline. |
Write a quality entry calculated by CRQualityCheckAntenna to a database (currently a simple textfile)
Do a basic quality check of raw time series data, looking for rms, mean and spikes and return a list of antennas which have failed the quality check and their statistical properties.
Usage:
>>> CRQualityCheckArray(dataarray,qualitycriteria=None,antennaID=0,
nsigma=-1,rmsfactor=2,meanfactor=7,
spikyness=7,spikeexcess=7,refblock=None,
verbose=True)
-> list of antennas failing the qualitycriteria limits
The data array is expected to be split into blocks (purely the dimension of the data array). The algorithm will then caclulate the minium RMS and mean of all the blocks and use that minimum as a reference value. If blocks deviate too much from these values, they are being flagged and returned.
Example:
>>> datafile=crfile(filename); nblocks=10
>>> dataarray=hArray(float,[nblocks,datafile["blocksize"]])
>>> datarray[...].read(datafile,"Fx",range(nblocks))
>>> qualitycriteria={"mean":(-15,15),"rms":(5,15),"spikyness":(-7,7),"spikeexcess":(-1,7)}
>>> flaglist=CRQualityCheck(dataarray,qualitycriteria=qualitycriteria,antennaID=0,nsigma=-1,rmsfactor=2,meanfactor=7,spikyness=20,spikeexcess=20,refblock=None,verbose=True)
Parameters:
tuples with limits thereof (lower, upper). Keywords currently implemented are mean, rms, spikyness (i.e. spikyness).
Example:
>>> qualitycriteria = {'mean':(-15,15), 'rms':(5,15), 'spikyness':(-7,7)}
normalize - If true subtract the mean from the data and divide by the rms.
antennaID - the ID of the current antenna (for output only)
date - Date of observation (for output only) - (GMT-)seconds since 1.1.1970 (standard UNIX)
datafile - to obtain date, time, antennaID from file directly (output only)
observatory - for output and archiving only
filename - for output and archiving only