def write_data_sid(self, station, filename, log_type, apply_bema = True, extended = False, bema_wing = 6):
        iStation = self.get_station_index(station)
        # need extra information to create the header's SID file parameters if the exiting file is SuperSID
        if self.isSuperSID:
            self.sid_params['stationid'] = self.stations[iStation]
            self.sid_params['frequency'] = self.frequencies[iStation]

        # intermediate buffer to have 'raw' or 'filtered' data ( as in RAW/FILTERED)
        if log_type == RAW or apply_bema == False:
            tmp_data = self.data[iStation]
        else: # filtered
            tmp_data = SidFile.filter_buffer(self.data[iStation], self.LogInterval, bema_wing = bema_wing)
        # write file in SID format
        with open(filename, "wt") as fout:
            # generate header
            hdr = self.create_header(isSuperSid = False, log_type = log_type)
            print(hdr, file=fout, end="")
            # generate the "timestamp, data" serie i.e. data lines
            timestamp_format = SidFile._TIMESTAMP_EXTENDED if extended else SidFile._TIMESTAMP_STANDARD ###"%Y-%m-%d %H:%M:%S.%f" if extended else "%Y-%m-%d %H:%M:%S"
            for t_stamp, x in zip(self.timestamp, tmp_data):
                print("%s, %.15f" % (t_stamp.strftime(timestamp_format), x), file=fout)
Write in the file 'filename' the dataset of the given station using the SID format
dataset/ETHPy150Open ericgibert/supersid/supersid/sidfile.py/SidFile.write_data_sid