Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALPulsar 7.1.1.1-8a6b96f
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
lalpulsar.lineFileParser.LineFileParser Class Reference

Detailed Description

LineFileParser

This class is taylored to work using the O3 - era line files. There are essentially two types of these files, their main difference being the number of columns.

Identified lines file:

  • frequency: Column containing the central frequency of the line.
  • left_wing: Column containing the frequency limit towards lower frequencies of the line as a width (central frequency - low frequency limit) Hz.
  • right_wing: Column containing the frequency limit towards higher frequencies of the line as a width (high frequency limit - central frequency) Hz.
  • first_harmonic: Column with the index of the first visible harmonic of the line.
  • last_harmonic: Column with the index of the last visible harmonic of the line.
  • comb_type: Column containing line type (0=single line, 1=comb, or 2=comb whose width scales with the harmonic number).
  • offset: Column with the frequency line off-set.

Unidentified lines file:

  • frequency: Column containing the central frequency of the line.

Definition at line 80 of file lineFileParser.py.

Public Member Functions

def __init__ (self)
 Read and expand line files into frequency intervals. More...
 
def parse_identified_lines_csv (self, lines_file, columns=None, extra_wing_Hz=0.0, genfromtxt_kwargs=None)
 Parse a csv file containing lines of known origin (Advanced LIGO format). More...
 
def parse_unidentified_lines_csv (self, lines_file, columns=None, extra_wing_Hz=0.0, genfromtxt_kwargs=None)
 Parse a csv file containing unidentified lines (Advanced LIGO format). More...
 

Data Fields

 lines_left_side
 
 lines_right_side
 

Static Public Attributes

dictionary default_genfromtxt_kwargs = {"delimiter": ",", "skip_header": 4}
 
dictionary identified_lines_keys
 
dictionary unidentified_lines_keys = {"frequency": 0}
 

Constructor & Destructor Documentation

◆ __init__()

def lalpulsar.lineFileParser.LineFileParser.__init__ (   self)

Read and expand line files into frequency intervals.

If multiple files are read, resulting interval are concatenated.

Intervals can be retrieved using the attributes lines_left_side and lines_right_side.

Definition at line 102 of file lineFileParser.py.

Member Function Documentation

◆ parse_identified_lines_csv()

def lalpulsar.lineFileParser.LineFileParser.parse_identified_lines_csv (   self,
  lines_file,
  columns = None,
  extra_wing_Hz = 0.0,
  genfromtxt_kwargs = None 
)

Parse a csv file containing lines of known origin (Advanced LIGO format).

Parameters
lines_filePath to csv format lines file.
columnsDictionary with header fields as key and the corresponding (0-based) column index as value. If None, default ordering specified in the class attribute will be used.
extra_wing_HzExtra wings to add at both sides of the resulting intervals, in Hz.
genfromtxt_kwargskwargs to be passed to numpy.genfromtxt. Default is delimiter=",", skip_header=4.

Definition at line 128 of file lineFileParser.py.

◆ parse_unidentified_lines_csv()

def lalpulsar.lineFileParser.LineFileParser.parse_unidentified_lines_csv (   self,
  lines_file,
  columns = None,
  extra_wing_Hz = 0.0,
  genfromtxt_kwargs = None 
)

Parse a csv file containing unidentified lines (Advanced LIGO format).

Parameters
lines_filePath to csv format lines file.
columnsDictionary with header fields as key and the corresponding (0-based) column index as value. If None, default ordering specified in the class attribute will be used.
extra_wing_HzExtra wings to add at both sides of the resulting intervals, in Hz.
genfromtxt_kwargskwargs to be passed to numpy.genfromtxt. Default is delimiter=",", skip_header=4.

Definition at line 155 of file lineFileParser.py.

Field Documentation

◆ default_genfromtxt_kwargs

dictionary lalpulsar.lineFileParser.LineFileParser.default_genfromtxt_kwargs = {"delimiter": ",", "skip_header": 4}
static

Definition at line 82 of file lineFileParser.py.

◆ identified_lines_keys

dictionary lalpulsar.lineFileParser.LineFileParser.identified_lines_keys
static
Initial value:
= {
"frequency": 0,
"left_wing": 5,
"right_wing": 6,
"first_harmonic": 3,
"last_harmonic": 4,
"comb_type": 1,
"offset": 2,
}

Definition at line 83 of file lineFileParser.py.

◆ unidentified_lines_keys

dictionary lalpulsar.lineFileParser.LineFileParser.unidentified_lines_keys = {"frequency": 0}
static

Definition at line 93 of file lineFileParser.py.

◆ lines_left_side

lalpulsar.lineFileParser.LineFileParser.lines_left_side

Definition at line 103 of file lineFileParser.py.

◆ lines_right_side

lalpulsar.lineFileParser.LineFileParser.lines_right_side

Definition at line 104 of file lineFileParser.py.