11. Python Reference¶
11.1. Subpackages¶
- 10. Block Library Reference
- 10.1. Submodules
- 10.2. bifrost.blocks.accumulate module
- 10.3. bifrost.blocks.audio module
- 10.4. bifrost.blocks.binary_io module
- 10.5. bifrost.blocks.convert_visibilities module
- 10.6. bifrost.blocks.copy module
- 10.7. bifrost.blocks.correlate module
- 10.8. bifrost.blocks.detect module
- 10.9. bifrost.blocks.fdmt module
- 10.10. bifrost.blocks.fft module
- 10.11. bifrost.blocks.fftshift module
- 10.12. bifrost.blocks.guppi_raw module
- 10.13. bifrost.blocks.print_header module
- 10.14. bifrost.blocks.psrdada module
- 10.15. bifrost.blocks.quantize module
- 10.16. bifrost.blocks.reduce module
- 10.17. bifrost.blocks.reverse module
- 10.18. bifrost.blocks.scrunch module
- 10.19. bifrost.blocks.serialize module
- 10.20. bifrost.blocks.sigproc module
- 10.21. bifrost.blocks.transpose module
- 10.22. bifrost.blocks.unpack module
- 10.23. bifrost.blocks.wav module
- 10.24. Module contents
- 11.1.1. bifrost.telemetry package
- 11.1.2. bifrost.views package
11.2. Submodules¶
11.3. bifrost.DataType module¶
i: signed integer u: unsigned integer f: floating point ci: complex signed integer cf: complex floating pointer
i4: 4-bit signed integer f16: 16-bit floating point ci4: 4+4-bit complex signed integer cf32: 32+32-bit complex floating point
- class bifrost.DataType.DataType(t=None)[source]¶
Bases:
object
- as_floating_point()[source]¶
Returns the smallest floating-point type that can represent all values that self can.
- property is_complex¶
- property is_floating_point¶
- property is_integer¶
- property is_real¶
- property is_signed¶
- property itemsize¶
- property itemsize_bits¶
11.4. bifrost.GPUArray module¶
11.5. bifrost.Space module¶
11.6. bifrost.address module¶
11.7. bifrost.affinity module¶
11.8. bifrost.block module¶
@package block This file defines a generic block class.
Right now the only possible block type is one of a simple transform which works on a span by span basis.
- class bifrost.block.CopyBlock(gulp_size=1048576)[source]¶
Bases:
bifrost.block.TransformBlock
Copies input ring’s data to the output ring
- class bifrost.block.DedisperseBlock(ring, core=- 1, gulp_size=4096)[source]¶
Bases:
object
This block calculates the dedispersion of sigproc-formatted data in a ring, and tags it in the headers
- class bifrost.block.FFTBlock(gulp_size)[source]¶
Bases:
bifrost.block.TransformBlock
Performs complex to complex 1D FFT on input ring data
- class bifrost.block.FoldBlock(bins, period=0.001, gulp_size=1048576, dispersion_measure=0, core=- 1)[source]¶
Bases:
bifrost.block.TransformBlock
This block folds a signal into a histogram
- calculate_bin_indices(tstart, tsamp, data_size)[source]¶
- Calculate the bin that each time sample should be
added to
@param[in] tstart Time of the first element (s) @param[in] tsamp Difference between the times of
consecutive elements (s)
@param[in] data_size Number of elements @return Which bin each sample is folded into
- calculate_delay(frequency, reference_frequency)[source]¶
Calculate the time delay because of frequency dispersion @param[in] frequency The current channel’s frequency(MHz) @param[in] reference_frequency The frequency of the
channel we will hold at zero time delay(MHz)
- class bifrost.block.IFFTBlock(gulp_size)[source]¶
Bases:
bifrost.block.TransformBlock
Performs complex to complex 1D IFFT on input ring data
- class bifrost.block.KurtosisBlock(gulp_size=1048576, core=- 1)[source]¶
Bases:
bifrost.block.TransformBlock
This block performs spectral kurtosis and cleaning on sigproc-formatted data in rings
- class bifrost.block.MultiAddBlock(*args, **kwargs)[source]¶
Bases:
bifrost.block.MultiTransformBlock
Block which adds two input rings
- ring_names = {'in_1': 'First input to add. List of floats', 'in_2': 'Second input to add. List of floats', 'out_sum': 'Result of add. List of floats.'}¶
- class bifrost.block.MultiTransformBlock[source]¶
Bases:
object
Defines functions and attributes for a block with multi input/output
- class bifrost.block.NumpyBlock(function, inputs=1, outputs=1)[source]¶
Bases:
bifrost.block.MultiTransformBlock
Perform an arbitrary N ndarray -> M ndarray numpy function Inside of a pipeline. This block will calculate all of the necessary information for Bifrost based on the passed function.
- calculate_output_headers(out_arrays)[source]¶
Generate headers based on numpy arrays @param[in] out_arrays The arrays to measure
- class bifrost.block.NumpySourceBlock(generator, outputs=1, grab_headers=False, changing=True)[source]¶
Bases:
bifrost.block.MultiTransformBlock
Simulate an incoming stream of data on a ring using an arbitrary generator. This block will calculate all of the necessary information for Bifrost based on the passed function.
- calculate_output_settings(arrays)[source]¶
Calculate the outgoing header settings based on the output arrays @param[in] arrays The arrays outputted by self.generator
- class bifrost.block.Pipeline(blocks)[source]¶
Bases:
object
Class which connects blocks linearly, with one ring between each block. Does this by creating one ring for each input/output ‘port’ of each block, and running data through the rings.
- class bifrost.block.SigprocReadBlock(filename, gulp_nframe=4096, core=- 1)[source]¶
Bases:
bifrost.block.SourceBlock
This block reads in a sigproc filterbank (.fil) file into a ring buffer
- class bifrost.block.SinkBlock(gulp_size=4096)[source]¶
Bases:
object
Defines the structure for a sink block
- class bifrost.block.SourceBlock(gulp_size=4096)[source]¶
Bases:
object
Defines the structure for a source block
- class bifrost.block.SplitterBlock(sections)[source]¶
Bases:
bifrost.block.MultiTransformBlock
Block which splits up a ring into two
- ring_names = {'in': 'Input to split. List of floats', 'out_1': 'Gets first share of the ring. List of floats', 'out_2': 'Gets second share of the ring. List of floats'}¶
- class bifrost.block.TestingBlock(test_array, complex_numbers=False)[source]¶
Bases:
bifrost.block.SourceBlock
Block for debugging purposes. Allows you to pass arbitrary N-dimensional arrays in initialization, which will be outputted into a ring buffer
- class bifrost.block.TransformBlock(gulp_size=4096)[source]¶
Bases:
object
Defines the structure for a transform block
- iterate_ring_write(output_ring, sequence_name='', sequence_time_tag=0, sequence_nringlet=1)[source]¶
Iterate through one output ring
- class bifrost.block.WaterfallBlock(ring, imagename, core=- 1, gulp_nframe=4096)[source]¶
Bases:
object
This block creates a waterfall block based on the data in a ring, and stores it in the headers
- class bifrost.block.WriteAsciiBlock(filename, gulp_size=1048576)[source]¶
Bases:
bifrost.block.SinkBlock
Copies input ring’s data into ascii format in a text file.
- class bifrost.block.WriteHeaderBlock(filename)[source]¶
Bases:
bifrost.block.SinkBlock
Prints the header of a ring to a file
- bifrost.block.insert_zeros_evenly(input_data, number_zeros)[source]¶
- Insert zeros evenly in input_data.
These zeros are distibuted evenly throughout the function, to help for binning of oddly shaped arrays.
@param[in] input_data 1D array to contain zeros. @param[out] number_zeros Number of zeros that need
to be added.
@returns input_data with extra zeros
11.9. bifrost.block_chainer module¶
- class bifrost.block_chainer.BlockChainer[source]¶
Bases:
object
Convenient tool for constructing linear chains of blocks and views
Examples:
bc = bf.BlockChainer() bc.blocks.read_sigproc("foo.fil", gulp_nframe=1) bc.blocks.copy('cuda') bc.views.split_axis('freq', 2, 'fine_freq') bc.views.merge_axes('freq', 'fine_freq') bc.blocks.copy('cuda_host') bc.custom(my_block)(arg1, arg2, ...) bc.blocks.write_sigproc() print(bc.last_block) # The last added block (this can also be set)
- property blocks¶
- property views¶
11.10. bifrost.core module¶
11.11. bifrost.device module¶
11.12. bifrost.dtype module¶
i: signed integer u: unsigned integer f: floating point ci: complex signed integer cu: complex unsigned integer cf: complex floating pointer
i4: 4-bit signed integer f16: 16-bit floating point ci4: 4+4-bit complex signed integer cf32: 32+32-bit complex floating point
11.13. bifrost.fdmt module¶
11.14. bifrost.fft module¶
11.15. bifrost.fir module¶
11.16. bifrost.guppi_raw module¶
GUPPI Raw format Headers:
Records are 80 chars, padded with spaces Keywords are truncated/padded with spaces to 8 chars “keyword1= <value>” String values are enclosed in single-quotes Numerical values typically not enclosed in quotes, but sometimes may be Final record is always ‘END’ + ‘ ‘*77
- Header keywords:
DIRECTIO: If present and non-zero, headers are padded to a 512-byte boundary NBITS: No. bits per real component (e.g., 4 => 4+4-bit complex values);
typical values: 8,4,2 (particularly 8)
BLOCSIZE: No. bytes per binary data block OBSNCHAN (or NCHAN?) NPOL: Single-pol if 1 else dual-pol OBSFREQ: Centre freq of data OBSBW: Bandwidth of data (may be negative to indicate high->low channel
ordering)
BACKEND: ‘GUPPI’ for guppi/BL data [CHAN_BW]
NTIME = BLOCSIZE * 8 // (2 * NPOL * NCHAN * NBITS)
- Binary data:
[chan][time][pol][complex]
11.17. bifrost.header_standard module¶
@package header_standard This file enforces a standard header for rings.
Required parameters:
(parameter type definition) nchans int “Number of frequency channels. 1+” nifs int “Number of separate IF channels. 1+” nbits int “Number of bits per value. 1+” fch1 float “Center frequency of first channel given in buffer (MHz). >0” foff float “Bandwidth of each channel (MHz). Negative values used for when
first channel specified has the largest frequency.”
tstart float “Time stamp in MJD of first sample (seconds). >0” tsamp float “Time interval between samples (seconds). >0”
Optional parameters (which some blocks require):
11.18. bifrost.libbifrost module¶
- class bifrost.libbifrost.BifrostObject(constructor, destructor, *args)[source]¶
Bases:
object
Base class for simple objects with create/destroy functions
- exception bifrost.libbifrost.EndOfDataStop[source]¶
Bases:
RuntimeError
This class is used as a Py3 StopIterator
In Python >3.7, reaching a StopIterator in a generator will raise a RuntimeError (so you can’t do ‘except StopIteration’ to catch it!) See PEP479 https://www.python.org/dev/peps/pep-0479/
11.19. bifrost.linalg module¶
- class bifrost.linalg.LinAlg[source]¶
Bases:
bifrost.libbifrost.BifrostObject
- matmul(alpha, a, b, beta, c)[source]¶
- Computes:
c = alpha*a.b + beta*c
- or if b is None:
c = alpha*a.a^H + beta*c
- or if a is None:
c = alpha*b^H.b + beta*c
where ‘.’ is matrix product and ‘^H’ is Hermitian transpose. Multi-dimensional semantics are the same as numpy.matmul:
The last two dims represent the matrix, and all other dims are used as batch dims to be matched or broadcast between a and b.
11.20. bifrost.map module¶
- bifrost.map.map(func_string, data, axis_names=None, shape=None, func_name=None, extra_code=None, block_shape=None, block_axes=None)[source]¶
Apply a function to a set of ndarrays.
- Parameters
func_string (str) – The function to apply to the arrays, as a string (see below for examples).
data (dict) – Map of string names to ndarrays or scalars.
axis_names (list) – List of string names by which each axis is referenced in func_string.
shape – The shape of the computation. If None, the broadcast shape of all data arrays is used.
func_name (str) – Name of the function, for debugging purposes.
extra_code (str) – Additional code to be included at global scope.
block_shape – The 2D shape of the thread block (y,x) with which the kernel is launched. This is a performance tuning parameter. If NULL, a heuristic is used to select the block shape. Changes to this parameter do _not_ require re-compilation of the kernel.
block_axes – List of axis indices (or names) specifying the 2 computation axes to which the thread block (y,x) is mapped. This is a performance tuning parameter. If NULL, a heuristic is used to select the block axes. Values may be negative for reverse indexing. Changes to this parameter _do_ require re-compilation of the kernel.
Note
Only GPU computation is currently supported.
Examples:
# Add two arrays together bf.map("c = a + b", {'c': c, 'a': a, 'b': b}) # Compute outer product of two arrays bf.map("c(i,j) = a(i) * b(j)", {'c': c, 'a': a, 'b': b}, axis_names=('i','j')) # Split the components of a complex array bf.map("a = c.real; b = c.imag", {'c': c, 'a': a, 'b': b}) # Raise an array to a scalar power bf.map("c = pow(a, p)", {'c': c, 'a': a, 'p': 2.0}) # Slice an array with a scalar index bf.map("c(i) = a(i,k)", {'c': c, 'a': a, 'k': 7}, ['i'], shape=c.shape)
11.21. bifrost.memory module¶
11.22. bifrost.ndarray module¶
- A np.ndarray subclass that adds support for different spaces and
bifrost-specific metadata.
TODO: Need backend support for broadcasting arrays TODO: Convert dtype of val in __setitem__ TODO: Some calls result in segfault with space=cuda (e.g., __getitem__
returning scalar).
- class bifrost.ndarray.BFArrayInfo(space, dtype, native, conjugated, ownbuffer=None)[source]¶
Bases:
object
- class bifrost.ndarray.ndarray(base=None, space=None, shape=None, dtype=None, buffer=None, offset=0, strides=None, native=None, conjugated=None)[source]¶
Bases:
numpy.ndarray
- byteswap(inplace=False)[source]¶
Swap the bytes of the array elements
Toggle between low-endian and big-endian data representation by returning a byteswapped array, optionally swapped in-place. Arrays of byte-strings are not swapped. The real and imaginary parts of a complex number are swapped individually.
- Parameters
inplace (bool, optional) – If
True
, swap bytes in-place, default isFalse
.- Returns
out – The byteswapped array. If inplace is
True
, this is a view to self.- Return type
Examples
>>> A = np.array([1, 256, 8755], dtype=np.int16) >>> list(map(hex, A)) ['0x1', '0x100', '0x2233'] >>> A.byteswap(inplace=True) array([ 256, 1, 13090], dtype=int16) >>> list(map(hex, A)) ['0x100', '0x1', '0x3322']
Arrays of byte-strings are not swapped
>>> A = np.array([b'ceg', b'fac']) >>> A.byteswap() array([b'ceg', b'fac'], dtype='|S3')
A.newbyteorder().byteswap()
produces an array with the same valuesbut different representation in memory
>>> A = np.array([1, 2, 3]) >>> A.view(np.uint8) array([1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0], dtype=uint8) >>> A.newbyteorder().byteswap(inplace=True) array([1, 2, 3]) >>> A.view(np.uint8) array([0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3], dtype=uint8)
- conj()[source]¶
Complex-conjugate all elements.
Refer to numpy.conjugate for full documentation.
See also
numpy.conjugate
equivalent function
- copy(order='C')[source]¶
Return a copy of the array.
- Parameters
order ({'C', 'F', 'A', 'K'}, optional) – Controls the memory layout of the copy. ‘C’ means C-order, ‘F’ means F-order, ‘A’ means ‘F’ if a is Fortran contiguous, ‘C’ otherwise. ‘K’ means match the layout of a as closely as possible. (Note that this function and
numpy.copy()
are very similar but have different default values for their order= arguments, and this function always passes sub-classes through.)
See also
numpy.copy
Similar function with different default behavior
numpy.copyto
Notes
This function is the preferred method for creating an array copy. The function
numpy.copy()
is similar, but it defaults to using order ‘K’, and will not pass sub-classes through by default.Examples
>>> x = np.array([[1,2,3],[4,5,6]], order='F')
>>> y = x.copy()
>>> x.fill(0)
>>> x array([[0, 0, 0], [0, 0, 0]])
>>> y array([[1, 2, 3], [4, 5, 6]])
>>> y.flags['C_CONTIGUOUS'] True
- tofile(fid, sep='', format='%s')[source]¶
Write array to a file as text or binary (default).
Data is always written in ‘C’ order, independent of the order of a. The data produced by this method can be recovered using the function fromfile().
- Parameters
fid (file or str or Path) –
An open file object, or a string containing a filename.
Changed in version 1.17.0: pathlib.Path objects are now accepted.
sep (str) – Separator between array items for text output. If “” (empty), a binary file is written, equivalent to
file.write(a.tobytes())
.format (str) – Format string for text file output. Each entry in the array is formatted to text by first converting it to the closest Python type, and then using “format” % item.
Notes
This is a convenience function for quick storage of array data. Information on endianness and precision is lost, so this method is not a good choice for files intended to archive data or transport data between machines with different endianness. Some of these problems can be overcome by outputting the data as text files, at the expense of speed and file size.
When fid is a file object, array contents are directly written to the file, bypassing the file object’s
write
method. As a result, tofile cannot be used with files objects supporting compression (e.g., GzipFile) or file-like objects that do not supportfileno()
(e.g., BytesIO).
- view([dtype][, type])[source]¶
New view of array with the same data.
Note
Passing None for
dtype
is different from omitting the parameter, since the former invokesdtype(None)
which is an alias fordtype('float_')
.- Parameters
dtype (data-type or ndarray sub-class, optional) – Data-type descriptor of the returned view, e.g., float32 or int16. Omitting it results in the view having the same data-type as a. This argument can also be specified as an ndarray sub-class, which then specifies the type of the returned object (this is equivalent to setting the
type
parameter).type (Python type, optional) – Type of the returned view, e.g., ndarray or matrix. Again, omission of the parameter results in type preservation.
Notes
a.view()
is used two different ways:a.view(some_dtype)
ora.view(dtype=some_dtype)
constructs a view of the array’s memory with a different data-type. This can cause a reinterpretation of the bytes of memory.a.view(ndarray_subclass)
ora.view(type=ndarray_subclass)
just returns an instance of ndarray_subclass that looks at the same array (same shape, dtype, etc.) This does not cause a reinterpretation of the memory.For
a.view(some_dtype)
, ifsome_dtype
has a different number of bytes per entry than the previous dtype (for example, converting a regular array to a structured array), then the behavior of the view cannot be predicted just from the superficial appearance ofa
(shown byprint(a)
). It also depends on exactly howa
is stored in memory. Therefore ifa
is C-ordered versus fortran-ordered, versus defined as a slice or transpose, etc., the view may give different results.Examples
>>> x = np.array([(1, 2)], dtype=[('a', np.int8), ('b', np.int8)])
Viewing array data using a different type and dtype:
>>> y = x.view(dtype=np.int16, type=np.matrix) >>> y matrix([[513]], dtype=int16) >>> print(type(y)) <class 'numpy.matrix'>
Creating a view on a structured array so it can be used in calculations
>>> x = np.array([(1, 2),(3,4)], dtype=[('a', np.int8), ('b', np.int8)]) >>> xv = x.view(dtype=np.int8).reshape(-1,2) >>> xv array([[1, 2], [3, 4]], dtype=int8) >>> xv.mean(0) array([2., 3.])
Making changes to the view changes the underlying array
>>> xv[0,1] = 20 >>> x array([(1, 20), (3, 4)], dtype=[('a', 'i1'), ('b', 'i1')])
Using a view to convert an array to a recarray:
>>> z = x.view(np.recarray) >>> z.a array([1, 3], dtype=int8)
Views share data:
>>> x[0] = (9, 10) >>> z[0] (9, 10)
Views that change the dtype size (bytes per entry) should normally be avoided on arrays defined by slices, transposes, fortran-ordering, etc.:
>>> x = np.array([[1,2,3],[4,5,6]], dtype=np.int16) >>> y = x[:, 0:2] >>> y array([[1, 2], [4, 5]], dtype=int16) >>> y.view(dtype=[('width', np.int16), ('length', np.int16)]) Traceback (most recent call last): ... ValueError: To change to a dtype of a different size, the array must be C-contiguous >>> z = y.copy() >>> z.view(dtype=[('width', np.int16), ('length', np.int16)]) array([[(1, 2)], [(4, 5)]], dtype=[('width', '<i2'), ('length', '<i2')])
11.23. bifrost.pipeline module¶
- class bifrost.pipeline.Block(irings, name=None, type_=None, **kwargs)[source]¶
Bases:
bifrost.pipeline.BlockScope
- define_output_nframes(input_nframes)[source]¶
Return output nframe for each output, given input_nframes.
- instance_counts = {}¶
- class bifrost.pipeline.BlockScope(name=None, gulp_nframe=None, buffer_nframe=None, buffer_factor=None, core=None, gpu=None, share_temp_storage=False, fuse=False)[source]¶
Bases:
object
- instance_count = 0¶
- class bifrost.pipeline.MultiTransformBlock(irings_, guarantee=True, *args, **kwargs)[source]¶
Bases:
bifrost.pipeline.Block
- define_input_overlap_nframe(iseqs)[source]¶
Return no. input frames that should overlap between successive spans for each input sequence.
- define_output_nframes(input_nframes)[source]¶
Return output nframe for each output, given input_nframes.
- class bifrost.pipeline.Pipeline(name=None, **kwargs)[source]¶
Bases:
bifrost.pipeline.BlockScope
- instance_count = 1¶
- class bifrost.pipeline.SinkBlock(iring, *args, **kwargs)[source]¶
- class bifrost.pipeline.SourceBlock(sourcenames, gulp_nframe, space=None, *args, **kwargs)[source]¶
Bases:
bifrost.pipeline.Block
- class bifrost.pipeline.TransformBlock(iring, *args, **kwargs)[source]¶
Bases:
bifrost.pipeline.MultiTransformBlock
- define_input_overlap_nframe(iseq)[source]¶
Return no. input frames that should overlap between successive spans.
- bifrost.pipeline.block_view(block, header_transform)[source]¶
View a block with modified output headers
Use this function to adjust the output headers of a ring on-the-fly, effectively producing a new ‘view’ of the block.
- Parameters
block (Block) – Input block.
header_transform (function) – A function f(hdr) -> new_hdr.
- Returns
A new block that acts as the old block but modifies its sequence headers on-the-fly.
11.24. bifrost.portaudio module¶
11.25. bifrost.proclog module¶
11.26. bifrost.psrdada module¶
11.27. bifrost.quantize module¶
11.28. bifrost.reduce module¶
11.29. bifrost.ring module¶
- class bifrost.ring.ReadSequence(ring, which='specific', name='', time_tag=None, other_obj=None, guarantee=True)[source]¶
Bases:
bifrost.ring.SequenceBase
- class bifrost.ring.ReadSpan(sequence, offset, size)[source]¶
Bases:
bifrost.ring.SpanBase
- class bifrost.ring.Ring(space='system', name=None, core=None)[source]¶
Bases:
bifrost.libbifrost.BifrostObject
- property core¶
- property name¶
- property space¶
- class bifrost.ring.SequenceBase(ring)[source]¶
Bases:
object
Python object for a ring’s sequence (data unit)
- property header¶
- property header_size¶
- property name¶
- property nringlet¶
- property ring¶
- property time_tag¶
- class bifrost.ring.SpanBase(ring, writeable)[source]¶
Bases:
object
- property data¶
- property nringlet¶
- property offset¶
- property ring¶
- property size¶
- property stride¶
- class bifrost.ring.WriteSequence(ring, name='', time_tag=- 1, header='', nringlet=1)[source]¶
Bases:
bifrost.ring.SequenceBase
11.30. bifrost.ring2 module¶
- class bifrost.ring2.ReadSequence(ring, which='specific', name='', time_tag=None, other_obj=None, guarantee=True, header_transform=None)[source]¶
Bases:
bifrost.ring2.SequenceBase
- property header¶
- class bifrost.ring2.ReadSpan(sequence, frame_offset, nframe)[source]¶
Bases:
bifrost.ring2.SpanBase
- property nframe_overwritten¶
- class bifrost.ring2.Ring(space='system', name=None, owner=None, core=None)[source]¶
Bases:
bifrost.libbifrost.BifrostObject
- property core¶
- instance_count = 0¶
- property name¶
- class bifrost.ring2.SequenceBase(ring)[source]¶
Bases:
object
Python object for a ring’s sequence (data unit)
- property header¶
- property header_size¶
- property name¶
- property nringlet¶
- property ring¶
- property tensor¶
- property time_tag¶
- class bifrost.ring2.SpanBase(ring, sequence, writeable)[source]¶
Bases:
object
- property data¶
- property dtype¶
- property frame_nbyte¶
- property frame_offset¶
- property nframe¶
- property ring¶
- property sequence¶
- property shape¶
- property strides¶
- property tensor¶
- class bifrost.ring2.WriteSequence(ring, header, gulp_nframe, buf_nframe)[source]¶
Bases:
bifrost.ring2.SequenceBase
- class bifrost.ring2.WriteSpan(ring, sequence, nframe, nonblocking=False)[source]¶
Bases:
bifrost.ring2.SpanBase
11.31. bifrost.romein module¶
11.32. bifrost.sigproc module¶
telescope_id: 0 (FAKE) machine_id: 0 (FAKE) data_type: 2 # Time-series data rawdatafile: <delete> source_name: <observer-specified> barycentric: 0 pulsarcentric: <delete> az_start: <delete> or <observer-specified> za_start: <delete> or <observer-specified> src_raj: <observer-specified> or <delete> src_dej: <observer-specified> or <delete> tstart: MJD of first sample tsamp: (secs) E.g., 0.5/(2400*24kHz=57.6MHz)=8.68055556ns nbits: 8 nsamples: No. time samples in file (“rarely used any more”) fch1: 58.776 MHz (center frequency) foff: MHz nchans: 1 nifs: 2 (pols) refdm: 0.0 [pc/cm^3] period: <delete> data: [time][pol][nbit] (General case: [time][if/pol][chan][nbit])
- class bifrost.sigproc.SigprocFile[source]¶
Bases:
bifrost.sigproc.SigprocSettings
Reads from or writes to a sigproc filterbank file
- class bifrost.sigproc.SigprocSettings[source]¶
Bases:
object
defines, reads, writes sigproc settings
11.33. bifrost.sigproc2 module¶
telescope_id: 0 (FAKE) machine_id: 0 (FAKE) data_type: 2 # Time-series data rawdatafile: <delete> source_name: <observer-specified> barycentric: 0 pulsarcentric: <delete> az_start: <delete> or <observer-specified> za_start: <delete> or <observer-specified> src_raj: <observer-specified> or <delete> src_dej: <observer-specified> or <delete> tstart: MJD of first sample tsamp: (secs) E.g., 0.5/(2400*24kHz=57.6MHz)=8.68055556ns nbits: 8 nsamples: No. time samples in file (“rarely used any more”) fch1: 58.776 MHz (center frequency) foff: MHz nchans: 1 nifs: 2 (pols) refdm: 0.0 [pc/cm^3] period: <delete> data: [time][pol][nbit] (General case: [time][if/pol][chan][nbit])
11.34. bifrost.temp_storage module¶
11.35. bifrost.transpose module¶
11.36. bifrost.udp_capture module¶
11.37. bifrost.udp_socket module¶
11.38. bifrost.udp_transmit module¶
11.39. bifrost.units module¶
11.40. bifrost.unpack module¶
11.41. Module contents¶
Bifrost pipeline processing library