sigpyproc.Header¶
-
class
sigpyproc.Header.Header(info)[source]¶ Bases:
dictContainer object to handle observation metadata.
Note
Attributes are mirrored as items and vice versa to facilitate cleaner code.
-
SPPHeader(back_compatible=True)[source]¶ Get Sigproc/sigpyproc format binary header.
- Parameters
back_compatible (bool) – Flag for returning Sigproc compatible header (legacy code)
- Returns
header in binary format
- Return type
str()
-
getDMdelays(dm, in_samples=True)[source]¶ For a given dispersion measure get the dispersive ISM delay for each frequency channel.
- Parameters
- Returns
delays for each channel (highest frequency first)
- Return type
-
makeInf(outfile=None)[source]¶ Make a presto format .inf file.
- Parameters
outfile (string) – a filename to write to.
- Returns
if outfile is unspecified .inf data is returned as string
- Return type
str()
-
mjdAfterNsamps(nsamps)[source]¶ Find the Modified Julian Date after nsamps have elapsed.
- Parameters
nsamps (int) – number of samples elapsed since start of observation.
- Returns
Modified Julian Date
- Return type
-
newHeader(update_dict=None)[source]¶ Create a new instance of
Headerfrom the current instance.- Parameters
update_dict (
dict()) – values to overide existing header values- Returns
new header information
- Return type
-
-
sigpyproc.Header.MJD_to_Gregorian(mjd)[source]¶ Convert Modified Julian Date to the Gregorian calender.
- Parameters
mjd – Modified Julian Date
- Returns
date and time
- Return type
tuple()ofstr()
-
sigpyproc.Header.dms_to_deg(deg, min_, sec)[source]¶ Convert (degrees, arcminutes, arcseconds) to degrees.