Previous topic

pycrtools.dedispersion

Next topic

pycrtools.geomag

This Page

pycrtools.footprint

BoolArray
BoolVec c++ standard template library (STL) vector of type ‘bool’
CRAverageSpectrumWorkSpace([parent, modulename]) Workspace for mod::hCRAverageSpectrum.
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.
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
footprintForCRdata(datafile, cr_efield[, ...])
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).
plotFootprint(datafile[, footprintValues, ...]) Plot an antenna layout based on ‘datafile’, with optional footprint values on top (e.g.
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.
pycrtools.footprint.plotFootprint(datafile, footprintValues=, []dotsize=200.0, pdfPlot=False)

Plot an antenna layout based on ‘datafile’, with optional footprint values on top (e.g. pulse heights, signal power, etc.) In: datafile: the output of an IO.open(filename) call. This is needed for the call to [“RelativeAntennaPositions”].

footprintValues: list or array of values per antenna. Normalization is done below.

Can be modified to not do the plotting but return relevant arrays instead.