Previous topic

API Documentation

Next topic

pycrtools.core.harray

This Page

pycrtools.bfdata

BFDataReader(obsID[, datadir, ...]) Class to read in beamformed data
check_data_parameters(file, channels, samples) Checks if the first two blocks have a continuous sequence number.
getDir(filename, obsID)
get_all_parameters_new(obsid[, useFilename]) Get the most important observation parameters.
get_block(file[, channels, samples]) Get a lofar datablock from stokesI raw data format.
get_block_oldstyle(file[, channels, samples]) Get a lofar datablock from stokesI old raw dataformat.
get_block_rawvoltagedata(file, stations[, ...]) Get a lofar datablock from stokesI raw data format.
get_block_rawvoltagedata_old(file, stations) Get a lofar datablock from stokesI raw data format.
get_blockheader_raw_station_data(file, ...) Get the header of a raw station data block
get_data_size(channels, samples[, ...]) Get the size in bytes of a lofar data block.
get_parameters(obsid[, useFilename]) Get the most important observation parameters.
get_parameters_new(obsid[, useFilename]) Get the most important observation parameters.
get_rawvoltage_data(file, block, channels, ...) Get a lofar datablock from raw voltage complex data.
get_rawvoltage_data_new(file, block, ...[, ...]) Get a lofar datablock from raw voltage complex data.
get_sequence_number(file, block, channels, ...) Get a lofar datablock from stokesI raw data format.
get_stokes_data(file, block, channels, samples) Get a lofar datablock from stokes (I or IQUV) raw data format.
getpar(parameters, keyword)
partolist(par)
put_file_at_sequence(file, seq_nr, szD[, h5])
read_header_raw_station_data(file) Get the header of a raw station data file.
sb2freq(sb, clockfreq, filter)
sb2str(sb)
sbs2freq(sbs, clockfreq, filter, nrchannels)
class pycrtools.bfdata.BFDataReader(obsID, datadir=None, obsIDisParsetfilename=False)

Class to read in beamformed data

pycrtools.bfdata.check_data_parameters(file, channels, samples, nrstations=1, type='StokesI', h5=False)

Checks if the first two blocks have a continuous sequence number.

file opened data file channels nr of channels per subband samples nr of samples per subband type StokesI, I, StokesIQUV, IQUV or RawVoltage

pycrtools.bfdata.get_all_parameters_new(obsid, useFilename=False)

Get the most important observation parameters. Returns a dictionary with these parameters. obsid Observation id, f.e. L2010_08834 or D2009_16234. Only works on lofar cluster. useFilename If set to true, obsid is filename of the parset.

pycrtools.bfdata.get_block(file, channels=64, samples=3056)

Get a lofar datablock from stokesI raw data format. Returns a tuple of sequence number and data(channels,samples). Note that the internal data format is data(channels,samples|2).

file opened data file channels nr of channels per subband samples nr of samples per subband

pycrtools.bfdata.get_block_oldstyle(file, channels=64, samples=3056)

Get a lofar datablock from stokesI old raw dataformat. Returns a tuple of sequence number and data(channels,samples). Note that the internal data format is data(channels,samples|2).

pycrtools.bfdata.get_block_rawvoltagedata(file, stations, channels=64, samples=3056, npol=2)

Get a lofar datablock from stokesI raw data format. Returns a tuple of sequence number and data(channels,samples). Note that the internal data format is data(channels,samples|2).

pycrtools.bfdata.get_block_rawvoltagedata_old(file, stations, channels=64, samples=3056, npol=2)

Get a lofar datablock from stokesI raw data format. Returns a tuple of sequence number and data(channels,samples). Note that the internal data format is data(channels,samples|2).

pycrtools.bfdata.get_blockheader_raw_station_data(file, nrSamplesPerSubband, nrSubbands)

Get the header of a raw station data block returns (coarseDelayApplied,fineDelayRemainingAtBegin, fineDelayRemainingAfterEnd, time, flags)

pycrtools.bfdata.get_data_size(channels, samples, nrstations=1, type='StokesI', nrsubbands=1, h5=False)

Get the size in bytes of a lofar data block.

channels nr of channels per subband samples nr of samples per subband type StokesI or StokesIQUV

pycrtools.bfdata.get_parameters(obsid, useFilename=False)

Get the most important observation parameters. Returns a dictionary with these parameters. obsid Observation id, f.e. L2010_08834 or D2009_16234. Only works on lofar cluster. useFilename If set to true, obsid is filename of the parset.

pycrtools.bfdata.get_parameters_new(obsid, useFilename=False)

Get the most important observation parameters. Returns a dictionary with these parameters. obsid Observation id, f.e. L2010_08834 or D2009_16234. Only works on lofar cluster. useFilename If set to true, obsid is filename of the parset.

pycrtools.bfdata.get_rawvoltage_data(file, block, channels, samples, nrstations=1, nrpol=2, h5=False)

Get a lofar datablock from raw voltage complex data. Returns a array of data(stations,channels,samples,nrpol,(real,imag)).

file opened data file block which block to read, negative numbers mean the next block channels nr of channels per subband samples nr of samples per subband (This is the samples/block divided by integration length) nr stations Nr of stations in flysEye mode. nrpol Nr of polarisations

pycrtools.bfdata.get_rawvoltage_data_new(file, block, channels, samples, nrsubbands, nrstations=1, h5=False)

Get a lofar datablock from raw voltage complex data. Returns a array of data(stations,channels,samples,nrpol,(real,imag)).

file opened data file. There are different files for the X and Y polarisation. block which block to read, negative numbers mean the next block channels nr of channels per subband samples nr of samples per subband (This is the samples/block divided by integration length) nrsubbands Subbands in the file. At the moment this is the total number of subbands. nr stations Nr of stations in flysEye mode.

pycrtools.bfdata.get_sequence_number(file, block, channels, samples, nrstations=1, type='StokesI', nrsubbands=1, h5=False)

Get a lofar datablock from stokesI raw data format. Returns a tuple of sequence number and data(channels,samples). Note that the internal data format is data(channels,samples|2).

file opened data file block which block to read, negative numbers means just the first block channels nr of channels per subband samples nr of samples per subband type StokesI,I, StokesIQUV, IQUV or RawVoltage

pycrtools.bfdata.get_stokes_data(file, block, channels, samples, nrsubbands=1, type='StokesI', noSubbandAxis=False, h5=False)

Get a lofar datablock from stokes (I or IQUV) raw data format. Returns a array of data(nrstokes,channels,samples) (IncoherentStokes)

or data(samples,subbands,channels) (CoherentStokes,subbands>1)

file opened data file block which block to read, negative numbers mean the next block channels nr of channels per subband (Incoherent) or in file (Coherent = SBs*Channels) samples nr of samples per subband (This is the samples/block divided by integration length) nrsubbands Nr of subbands used for coherent data. type StokesI, I, StokesIQUV, IQUV, CoherentStokesI, CoherentStokesIQUV noSubbandAxis Only have one channels axis?

pycrtools.bfdata.read_header_raw_station_data(file)

Get the header of a raw station data file. Returns a tuple of (bitsPerSample,nrPolarizations,nrSubbands, nrSamplesPerSubband,station,sampleRate,subbandFrequencies,beamDirections, subbandToBeamMapping)