|
118 | 118 | # Record line
|
119 | 119 | _rx_record = re.compile(''.join(
|
120 | 120 | ["(?P<record_name>[-\w]+)/?(?P<n_seg>\d*)[ \t]+",
|
121 |
| - "(?P<n_sig>\d+)[ \t]*", |
122 |
| - "(?P<fs>\d*\.?\d*)/*(?P<counterfs>\d*\.?\d*)\(?(?P<base_counter>\d*\.?\d*)\)?[ \t]*", |
123 |
| - "(?P<sig_len>\d*)[ \t]*", |
| 121 | + "(?P<n_sig>\d+)[ \t]*(?P<fs>\d*\.?\d*)/*(?P<counter_freq>-?\d*\.?\d*)", |
| 122 | + "\(?(?P<base_counter>-?\d*\.?\d*)\)?[ \t]*(?P<sig_len>\d*)[ \t]*", |
124 | 123 | "(?P<base_time>\d{,2}:?\d{,2}:?\d{,2}\.?\d{,6})[ \t]*",
|
125 | 124 | "(?P<base_date>\d{,2}/?\d{,2}/?\d{,4})"])
|
126 | 125 | )
|
|
129 | 128 | _rx_signal = re.compile(''.join(
|
130 | 129 | ["(?P<file_name>~?[-\w]*\.?[\w]*)[ \t]+(?P<fmt>\d+)x?"
|
131 | 130 | "(?P<samps_per_frame>\d*):?(?P<skew>\d*)\+?(?P<byte_offset>\d*)[ \t]*",
|
132 |
| - "(?P<adc_gain>-?\d*\.?\d*e?[\+-]?\d*)\(?(?P<baseline>-?\d*)\)?/?(?P<units>[\w\^\-\?%]*)[ \t]*", |
133 |
| - "(?P<adc_res>\d*)[ \t]*(?P<adc_zero>-?\d*)[ \t]*(?P<init_value>-?\d*)[ \t]*", |
134 |
| - "(?P<checksum>-?\d*)[ \t]*(?P<block_size>\d*)[ \t]*(?P<sig_name>[\S]?[^\t\n\r\f\v]*)"]) |
| 131 | + "(?P<adc_gain>-?\d*\.?\d*e?[\+-]?\d*)\(?(?P<baseline>-?\d*)\)?", |
| 132 | + "/?(?P<units>[\w\^\-\?%]*)[ \t]*(?P<adc_res>\d*)[ \t]*", |
| 133 | + "(?P<adc_zero>-?\d*)[ \t]*(?P<init_value>-?\d*)[ \t]*(?P<checksum>-?\d*)", |
| 134 | + "[ \t]*(?P<block_size>\d*)[ \t]*(?P<sig_name>[\S]?[^\t\n\r\f\v]*)"]) |
135 | 135 | )
|
136 | 136 |
|
137 | 137 | # Segment line
|
@@ -458,6 +458,9 @@ def wr_header_file(self, rec_write_fields, sig_write_fields, write_dir):
|
458 | 458 | string_field[:4]))
|
459 | 459 |
|
460 | 460 | record_line += RECORD_SPECS.loc[field, 'delimiter'] + string_field
|
| 461 | + # The 'base_counter' field needs to be closed with ')' |
| 462 | + if field == 'base_counter': |
| 463 | + record_line += ')' |
461 | 464 |
|
462 | 465 | header_lines = [record_line]
|
463 | 466 |
|
|
0 commit comments