private static void initializePhiGrid() {
		
		// Defines the phis across the grid
		scalePhisHere = new ArrayList<ArrayList<Double>> ();
		
		int numGridLines = getNumGridlines();
		double scaleNormalizer = Math.pow(2, Settings.startLevel/2.0);
		double i1 = Settings.getMinimumRange();
		
		// Loop across the gridlines
		for (int x1Ind = 0; x1Ind < numGridLines; x1Ind++)
			{		
			
			ArrayList<Double> thesePhis = new ArrayList<Double> ();
			i1 += Settings.discretization;
			int[] i1RelevantIndices = findRelevantKIndices(i1, Settings.startLevel);
			int k1Max = i1RelevantIndices[1];
			int k1Min = i1RelevantIndices[0];
		
		
			// Cycle through relevant X1 translates for the line
			for (int k1Ind = k1Min; k1Ind < k1Max; k1Ind++) {
			
				double k1 = Transform.scalingTranslates.get(k1Ind);
				double Xi1 = Math.pow(2, Settings.startLevel) * i1 - k1;
				double phi1Here = Wavelet.getPhiAt(Xi1) * scaleNormalizer;
				thesePhis.add(phi1Here);
			
			}
			scalePhisHere.add(thesePhis);
		}
		
		if (Settings.waveletFlag) {
			
			wavePhisHere = new ArrayList<ArrayList<ArrayList<Double>>> ();
			wavePsisHere = new ArrayList<ArrayList<ArrayList<Double>>> ();
			
			// Loop through resolutions
			for (double j = Settings.startLevel; j <= Settings.stopLevel; j++){
				int waveInd = (int) Math.floor(j - Settings.startLevel);
				double waveNormalizer = Math.pow(2, j/2.0);
				
				ArrayList<ArrayList<Double>> jPhis = new ArrayList<ArrayList<Double>> ();
				ArrayList<ArrayList<Double>> jPsis = new ArrayList<ArrayList<Double>> ();
				
				// Loop through grid
				i1 = Settings.getMinimumRange();
				for (int x1Ind = 0; x1Ind < numGridLines; x1Ind++)
				{		
					ArrayList<Double> thesePhis = new ArrayList<Double> ();
					ArrayList<Double> thesePsis = new ArrayList<Double> ();
					i1 += Settings.discretization;
					int[] i1RelevantIndices = findRelevantKIndices(i1, j);
					int k1Max = i1RelevantIndices[1];
					int k1Min = i1RelevantIndices[0];
			
			
					// Cycle through relevant X1 translates for the line
					for (int k1Ind = k1Min; k1Ind < k1Max; k1Ind++) {
				
						double k1 = Transform.waveletTranslates.get(waveInd).get(k1Ind);
						double Xi1 = Math.pow(2, j) * i1 - k1;
						
						double phi1Here = Wavelet.getPhiAt(Xi1) * waveNormalizer;
						thesePhis.add(phi1Here);
						
						double psi1Here = Wavelet.getPsiAt(Xi1) * waveNormalizer;
						thesePsis.add(psi1Here);
				
					} // End cycling through relevant x1 translates
					jPhis.add(thesePhis);
					jPsis.add(thesePsis);
				} // End cycling through x1 grid
				wavePhisHere.add(jPhis);
				wavePsisHere.add(jPsis);
				
			} // End looping across resolutions
		} // End defining wavelet phis and psis

	}