@@ -142,7 +142,7 @@ def wr_dats(self, expanded, write_dir):
142142 # Get all the fields used to write the header
143143 # Assuming this method was called through wrsamp,
144144 # these will have already been checked in wrheader()
145- write_fields = self .get_write_fields ()
145+ _ , _ = self .get_write_fields ()
146146
147147 if expanded :
148148 # Using list of arrays e_d_signal
@@ -152,8 +152,10 @@ def wr_dats(self, expanded, write_dir):
152152 self .check_field ("d_signal" )
153153
154154 # Check the cohesion of the d_signal field against the other
155- # fields used to write the header
156- self .check_sig_cohesion (write_fields , expanded )
155+ # fields used to write the header. (Note that for historical
156+ # reasons, this doesn't actually check any of the optional
157+ # header fields.)
158+ self .check_sig_cohesion ([], expanded )
157159
158160 # Write each of the specified dat files
159161 self .wr_dat_files (expanded = expanded , write_dir = write_dir )
@@ -192,10 +194,8 @@ def check_sig_cohesion(self, write_fields, expanded):
192194 for ch in range (self .n_sig ):
193195 if len (self .e_d_signal [ch ]) != spf [ch ] * self .sig_len :
194196 raise ValueError (
195- "Length of channel "
196- + str (ch )
197- + "does not match samps_per_frame["
198- + str (ch + "]*sig_len" )
197+ f"Length of channel { ch } does not match "
198+ f"samps_per_frame[{ ch } ]*sig_len"
199199 )
200200
201201 # For each channel (if any), make sure the digital format has no values out of bounds
0 commit comments