<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def GetDetectorPSD(detectorName, LIGO3FLAG=0):
 """ GetDetectorPSD - function to return the PSD of the detector described by 	detectorName. 	detectorName - Name of required GW IFO. Can be 'H1', 'L1', 'V1', 'I1', or 'K1'. 	LIGO3FLAG - Set to 1 to use LIGO3 PSD instead of aLIGO PSD for H1, L1 and I1 detectors. 	Returns PSD - the noise PSD for the detector described by detectorName. Sarah Gossan 2012. Last updated 02/18/14. """


    # H1, L1 or I1 - use aLIGO ZERODET_HIGHP configuration (fLow = 9Hz)
    # Noise curve is super complicated so just load in PSD file for now
    if detectorName == 'H1' or detectorName == 'L1' or detectorName == 'I1':
        if LIGO3FLAG:
            # Read in PSD
            PSD = np.loadtxt('LIGO3_PSD.txt')
        else:
            # Read in PSD
            PSD = np.loadtxt('ZERO_DET_high_P_PSD.txt')
	# Only want second column of file
        PSD = PSD[:,1]
    # V1 - use analytical expression for AdVirgo (fLow = 10Hz)
    elif detectorName == 'V1':
        # Use analytical expression from arXiv:1202.4031v2
	x = np.linspace(0,N_fd-1,num=N_fd)*dF/300.
        x[0] = x[1] # Not going to use f=0Hz component anyway, but this stops 
		    # the log fn complaining
	x = np.log(x)
	xSq = x*x
     	asd = 1.259e-24*(0.07*np.exp(-0.142 - 1.437*x + 0.407*xSq) + \
                         3.1*np.exp(-0.466 - 1.043*x - 0.548*xSq) + \
                         0.4*np.exp(-0.304 + 2.896*x - 0.293*xSq) + \
                         0.09*np.exp(1.466 + 3.722*x - 0.984*xSq))
        PSD = asd**2 
    # K1 - use analytical expression for KAGRA (fLow = 10Hz) 
    elif detectorName == 'K1':
	# Use analytical expression from arXiv:1202.4031v2
	x = np.linspace(0,N_fd-1,num=N_fd)*dF/300.
        x[0] = x[1] # Not going to use f=0Hz component anyway, but this stops 
                    # the log fn complaining
        x = np.log(x)
        xSq = x*x
	asd = 6.499e-25*(9.72e-9*np.exp(-1.43 - 9.88*x - 0.23*xSq) + \
		    	 1.17*np.exp(0.14 - 3.10*x - 0.26*xSq) + \
			 1.70*np.exp(0.14 + 1.09*x - 0.013*xSq) + \
			 1.25*np.exp(0.071 + 2.83*x - 4.91*xSq))
        PSD = asd**2
          
    return PSD