<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_psd():
 """ Resamples advLIGO noise PSD to 4096 Hz """

    # psd has freq resolution = 1/3 with 6145 samples
    psd = np.loadtxt("ZERO_DET_high_P_PSD.txt")[:,1]
    down_factor = 3
    pad_size = int(np.ceil(float(psd.size)/down_factor)*down_factor - psd.size)
    psd_padded = np.append(psd, np.zeros(pad_size)*np.NaN)
    psd = sp.nanmean(psd_padded.reshape(-1,down_factor), axis=1)
    # now dF = 1
    # length of psd = 2048
    return psd