RESCALE: The rescale program converts data from one timescale to another. In other words, rescale can take data that has a scale of every three minutes, and modify it to have a scale of every one minute. There are two files to this program: rescale.pro and rescaleinput.txt. rescale.pro is the program itself, and rescaleinput.txt is an input file, in which information is stored to be used by the program. To use this program, you must first put the required information in the input file. Open rescaleinput.txt. It should look like this: file1: format1: day,month,year,hour,mint,sec,a,b,c beginline1: time of beginline1 must be <= then time of beginline2 endline1: time of endline1 must be >= then time of endline2 file2: format2: year,month,day,hour,mint,sec beginline2: endline2: outputfile: Lines 1,3,5,7,9,11,13,15, and 17 are just headers; the program doesn't read them. You will have to fill in the information for lines 2,4,6,8,10,12,14,16, and 18. Line 2: The filename and path of the file with the data you want to be rescaled. It should look something like this: /home/f03/yourname/gsmdata.txt Line 4: The IDL format code for the data. Each row of data has several pieces of data: the time, and the x,y,z coordinates. The time consists of day, month, year, hour, minute, and second. Each element is a seperate piece of data that is read by the program. Format codes tell the program what characters to read as data, and which characters are not data. There the three different format codes that need to be used for this program: iN an integer value, N is the number of character positions for the given integer fN.M a floating point value, any number with a decimal point, N is the total number of character positions for the number, including the decimal point and negative sign. M is the number of character positions after the decimal point, don't use it if different rows of data have different numbers of decimals. Nx a non-data point. N is the number of character positions to be skipped. Each format code should be separated by a comma, and the whole thing should be in parentheses. Example: 25-12-2004/08:22:36.264 -2355.1236 23203.8 -225790.99 25-12-2004/09:22:36.264 -4346.3688 20387.444 -225790 25-12-2004/10:22:36.264 -6383.56 17225.85 -225790.34 25-12-2004/11:22:36.264 -8374.5688 14863.8326 -225790.63 (i2,1x,i2,1x,i4,1x,i2,1x,i2,1x,f6.3,f15,f15,f15) *note the last three codes are f15 instead of f9.4 because different entries have different numbers of decimal places, and the program can read spaces as long as the number you are trying to read is within the format code. Line 6: The first line with data on it. Press F11 to see line numbers in KWrite. The entry here should look like: 1 Line 8: The last line with data on it. Should look like: 214 Line 10: The filename and path of the file with the data that has the new timescale. Should look like: /home/f03/yourname/solarwinddata.txt Line 12: The format code for the data. Note that you only need to read the time. Should look like: (i4,2x,i2,2x,i2,2x,i2,2x,i2,2x,i2) Line 14: The first line with data on it. Note that the time needs to be greater than the time of the first entry of the file which will be rescaled. Should look like: 2 Line 16: The last line with data on it. Note that the time needs to be less than the time of the last entry of the file which will be rescaled. Should look like: 715 Line 18: The name of the file you want the rescaled data saved to. Don't name it something you don't want overwritten. Should look like: rescaleddata.txt Once the input file is ready, save it. Open a terminal program and start IDL by typing IDL. Run the rescale program by typing rescale. The output file should be saved to your home directory.