Last Update: 09.01.2007 *To do tracking of level 1.8 MDI data *This was first required to do exactly the same tracking fro already tracked Doppler tiles. So this process first reads the 'fastrack.*.map' files, describing how the tracking was done, from given directories, of already fastracked data at MPS, and extracts the details required to create 'mapfiles'. MPS /data/seismo1/schunker/STANFORD/ unix> source ~CM/script/soi_exe.setup unix> emacs push_script -> make sure the arguments DIR and OUT are as you want: -> DIR: where to look for files to read -> OUT: where to put the mapfiles -> check the "echo" commands at the bottom that they contain the correct directories for Stanford output -> OUTPUT: $OUT/mapfile* unix> scp $OUT/mapfile* schunker@solarport.stanford.edu:/scr20/schunker/somewhere/here ->Copy the mapfiles to Stanford unix> ssh gizon@sonar.stanford.edu -> go to Stanford to run the fastrack *Now we have all the mapfiles to run fastrack.c at Stanford STANFORD unix> cd /scr20/schunker/somewhere/here/ unix> emacs /scr20/schunker/somewhere/here/track_script -> find track_script and make sure it searches in the correct directory for the mapfiles unix> track_script -> run track_script, does the fastracking using -> every mapfile in the directory, takes about -> 48 hours to do full set of data, one every minute. -> OUTPUT: tracked datacubes in a specified directory What WE get fastracking to do: DESCRIPTION fastrack extracts from a series of solar images multiple regions fixed in co-moving frames at a set of initially specified heliographic coordinates. (specified by the user by giving heliogrpahic latitude and longitude of central point as well as size of the region). The tracked regions are of a common specified size, and the same map projection is used, only the central point varying (which happens to track the longitude and latitude.) Depending on the nature of the tracking, the heliographic coordinates of the map centers will be continuously adjusted as functions of time, matching the specified coordinates only at the start. If a tracking matching the Carrington rate is selected, the heliographic coordinates of all map locations will, by definition, remain fixed. If images are missing from the input data series or other- wise rejected, fastrack will linearly interpolate in time across the gaps in the mapped output. (Missing images at the end points result in continuation backward or forward from the first or last valid map.) Partial input images may produce missing values in the mapped images. !!!!!!SO WHY DO MY FASTRACKED CUBES HAVE ZERO IMAGES??? !!!!!!! The input data series is normally assumned to be continuous, so if an image selection range is made (...,series:XXX[I- J],sel:[M-N]) the first selector (M)is assumed to apply only to the first data set (I) and the last selector (N)to apply only to the last data set (J); all intervening images are accepted. The -c flag forces the image selection to apply independently to each data set in the series. The images are tracked at the Carrington rate. The coefficients of the sin^2(latitude) expansion of rotation minus Carrington rotation (urad/sec) are specified. Default values are from Snodgrass 82/84, but these can be changed and some alternate options are given in the comments of fastrack.c Snodgrass values are: a0 Float -0.02893 a2 Float -0.3441 a4 Float -0.5037 THE PARAMETERS in = input files, the dataset is assumed to include in its ancillary data the parameters required for heliographic mapping, namely the observation time and heliographic location. out = output files bckgn = we DO NOT subtract an average image (necessary only for Doppler calculations lat = latitude of centre of region for tracking lon = longitude (or list of) for the centre of region for tracking map = "Postels" although there are many options for mapping, again refer to the comments of fastrack.c scale = 0.125, which is the scaling of the pixels (degrees/pixel) at a location appropriate for the selected mapping option; a 0.0 value implies autoscaling to best scale of image. cols = 128. (width of image in pixels) but these are easily changed rows = 128. (height of image in pixels) but these are easily changed map_pa = 0.000000, used to change the direction of heliographic North from vertical in the output image. radius = 0.000000 a0 = -0.028930 a2 = -0.344100 a4 = -0.503700 merid_v = 0.000000, is the meridional velocity xc = nan0xf0000000 yc = nan0xf0000000 OTHER TRACKING OPTIONS The -l flag sets a "lagrangian" tracking option, forcing the tracking to be at the differential rotation appropriate to the instantaneous latitude for each point in the region, rather than at a common rate for the whole region. The -n option "turns off" tracking in the sense that the images are tracked at minus the Carrington rate. There is no correction for observer motion in the latitudinal direc- tion, so this is not quite the same as mapping to fixed heliocentric coordinates. The -z flag directs the output maps to be organized in polar coordinates, with azimuthal angle the most rapidly varying coordinate, (columns) and radial distance from the map center the next (rows). The length of the angle dimension in that case will not be a power of 2 unless set by the cols value. If the verbose option (-v) is set, one line of history information will be produced per input image. The mapped data sets are placed in one or more 3-dimensional FITS files, with time (image serial number) the most slowly varying axis. CALCULATE ANGLE FROM DISK CENTRE * I have no idea why fastrack.c does not leave the OBS_L0 and OBS_B0 parameters of raw MDI data headers in the fastracked cube headers. It would render soho_ephem redundant. MPS !!!!!!!!this is all becuase I had a lot of trouble extracting only the numbers - I would appreciate someone coming up with a way to grab the string of only the numbers!!!!!!!!!! which would then result in the following few steps being redundant unix> soho_ephem_script reads in all the files in all the directories in directory /net/seismo1/export/data/seismo/gizon/tape1 or /net/seismo1/export/data/seismo/gizon/tape2 and outputs to /data/seismo1/schunker/STANFORD/soho_ephem_temp1 filename and T_OBS (the middle time of the data cube) unix> soho_ephem_script2 reads in /data/seismo1/schunker/STANFORD/soho_ephem_temp1 outputs T_OBS to /data/seismo1/schunker/STANFORD/soho_ephem_tape1 unix> soho_ephem_script3 reads in /data/seismo1/schunker/STANFORD/soho_ephem_tape1 and outputs only the time (not replicating others already done) to file /data/seismo1/schunker/STANFORD/soho_ephem_tape1_fin Now (finally) have a list of all the times to calculate soho_ephem for. unix> scp /data/seismo1/schunker/STANFORD/soho_ephem_tape1_fin schunker@solarport.stanford.edu:~/. (tape1 and tape2 are necessary) STANFORD unix> soho_ephem_main_script Takes as input /home/schunker/soho_ephem_tape2_fin and for each time in the file calculates "soho_ephem" and then outputs OBS_DIST (au L0 (deg B0 (deg VR (m/s) VN (m/s) VW (m/s) Carr Rot to /home/schunker/ephemeris_tape2 unix> scp /home/schunker/ephemeris_tape2 schunker@ssh.mps.mpg.de:/data/seismo1/schunker/STANFORD/. MPS unix> extract_ephemeris_time_script Extracts the time from /data/seismo1/schunker/STANFORD/ephemeris_tape2 and puts them in a list. IDL> string_matching.pro Reads in /data/seismo1/schunker/STANFORD/ephemeris_tape2 to get L0 and B0. Reads in /data/seismo1/schunker/STANFORD/final_dates_tape2.txt Outputs the L0 and B0 and date based on matching the i's in the list of each file to /data/seismo1/schunker/STANFORD/tape2_date_L0_B0.dat Now if we know the central L0, B0 and we have a map of the longitude and latitude we can calculate the heliocentric angle using Cosine(heliocentric angle)=Cosine(latitude-B0)*Cosine(longitude-L0) The following is saved for posterity, but pointless: IDL> disk_position.pro For all the files, in all the directories in data/seismo1/gizon/tape2/ extracts the latitude (hg_lat) and longitude (hg_long) and T_OBS Reads in /data/seismo1/schunker/STANFORD/tape2_date_L0_B0.dat and then matches T_OBS to this list. !!! Note that TAI and UT time are not the same! They differ by seconds, so when extracting strings, only match up to the hour (seconds may also change the minutes). This seems to be fine. Calculate hg_lat-b0 and hg_lon-l0 for latitude and longitude respectively, and then the resulting angle to disk centre as seen by SOHO-MDI. Write to /data/seismo1/schunker/STANFORD/angle_tape2/angle_to_disk_centre_tape1_"+filename+".dat" date, hg_lat, hg_lon, l0, b0, angle to disk centre (degrees) -->