VDIFFileWriter¶
-
class
baseband.vdif.base.
VDIFFileWriter
(fh_raw)[source] [edit on github]¶ Bases:
baseband.vlbi_base.base.VLBIFileBase
Simple writer for VDIF files.
Adds
write_frame
andwrite_frameset
methods to the basic VLBI binary file wrapper.Methods Summary
close
()write_frame
(data[, header])Write a single frame (header plus payload). write_frameset
(data[, header])Write a single frame set (headers plus payloads). Methods Documentation
-
close
() [edit on github]¶
-
write_frame
(data, header=None, **kwargs)[source] [edit on github]¶ Write a single frame (header plus payload).
Parameters: If an array, a
header
should be given, which will be used to get the information needed to encode the array, and to construct the VDIF frame.header :
VDIFHeader
Can instead give keyword arguments to construct a header. Ignored if
data
is aVDIFFrame
instance.**kwargs
If
header
is not given, these are used to initialize one.
-
write_frameset
(data, header=None, **kwargs)[source] [edit on github]¶ Write a single frame set (headers plus payloads).
Parameters: data :
ndarray
orVDIFFrameSet
If an array, a header should be given, which will be used to get the information needed to encode the array, and to construct the VDIF frame set.
header :
VDIFHeader
, list of sameCan instead give keyword arguments to construct a header. Ignored if
data
is aVDIFFrameSet
instance. If a list, should have a length matching the number of threads indata
; if a single header,thread_ids
corresponding to the number of threads are generated automatically.**kwargs
If
header
is not given, these are used to initialize one.
-