def welch(timeseries, segmentlength, noverlap=None, **kwargs):
<EOL>freqs, psd_ = scipy.signal.welch(<EOL>timeseries.value,<EOL>noverlap=noverlap,<EOL>fs=timeseries.sample_rate.decompose().value,<EOL>nperseg=segmentlength,<EOL>**kwargs<EOL>)<EOL>unit = scale_timeseries_unit(<EOL>timeseries.unit,<EOL>kwargs.get('<STR_LIT>', '<STR_LIT>'),<EOL>)<EOL>return FrequencySeries(<EOL>psd_,<EOL>unit=unit,<EOL>frequencies=freqs,<EOL>name=timeseries.name,<EOL>epoch=timeseries.epoch,<EOL>channel=timeseries.channel,<EOL>)<EOL>
Calculate a PSD of this `TimeSeries` using Welch's method.