EBZ from e-mail by MDM TRACKING -------- SET_OFFSET.SRC is used to set the lower left coordinates of an extract of the MDI high resolution or full disk FOV. These yield a single entry in the pointing table (DEP side) which is used by all non-tracking campaigns. You have to look at the campaign source file (or on the ops summary page list of campaigns at http://www.lmsal.com/MDI/ops/opsdb_stuff/opsdb_active_by_addr.cam.html) to see what offset table entry is specified for which campaigns. Note that set_offset does NOT affect the extract coordinates for a tracking campaign, even if it is run in non-track mode. For more information on the MDI high res field of view and how to relate MDI pixels to disk position, go to the web page http://mdiwww.nascom.nasa.gov/hires/hires.html. SET_TRACKING.SRC is used to setup the tracking campaign parameters (on the IP side). This allows the extracted region to follow solar rotation, but the extract can also be stationary (non-track mode). The N/S lower-left is currently hardwired to start at 0,0 (but see below to override) and then you can specify the starting column for the E/W extract in the list of questions you are asked, which are: ask !LI0 "Number of minutes before shift (ie: 4)" ask !LI1 "Number of pixel to shift (ie: 1)" ask !LI2 "Column num to stop shifting (1024 minus extract) (ie: 520)" ask !LI3 "Starting Count (how long to delay before start tracking)" ask !LI4 "Starting Column for extract (0-1023) (ie: 0)" The first three questions are straightforward. The "Starting Count" question gives you the capability to start the campaign but to not start tracking for "N" minutes. The "Starting Column" allows you to start the E/W extract at the far left (column 0), or further west. *** This only sets up the x offset *** To set up a tracking campaign in non-track mode, the questions should be answered this way: Number of minutes before shift = 3000 Number of pixel to shift = 0 Column num to stop shifting = (1020 minus E/W extract size) Starting Count = 3001 Starting Column for extract = (col num to stop - 1) For the 700x700 extract ("t2") tracking campaign, we can set a y offset. To do this, we currently need to do a manual tcblock command. This must only be done AFTER the set_tracking procedure has been done. The hardwired command is currently: tcblock mbipldin 0x01B2 0x151F 0x0002 0x0000 0x0000 #iprl_track_extract ** This sets the y offset and must be done AFTER set_tracking procedure *** The calculation is as follows: Multiply 1024 * y offset Convert this number to hex (the resulting number is 5 digits) Take the first digit and put 3 zeros in front - this is the high word The last 4 digits are the low word Example: y offset = 160 1024*160 = 163840 dectohex 163840 = 28000 low word = 8000, high word = 0002 In the tcblock command, the last 2 parameters are 0xlow 0xhigh Examples: -------- (1) To set up for cam_hr_t2_ve_fe_me starting at the center of the high res FOV (x=160,y=160), to track as far west as possible. Script: Run q_set_tracking_v03 to set up x-coordinate in track mode: answer the following questions (the text is as it appears in execution of the control file). "Number of minutes before shift (ie: 4)".................... 4 "Number of pixel to shift (ie: 1)" ......................... 1 "Column num to stop shifting (1024 minus extract) (ie: 520)" 320 "Starting Count (typically number of min +1) (ie: 5)"....... 5 "Starting Column for extract (0-1023) (ie: 0)" ............. 160 . Afterwards, set the y coordinate to 160, by sending tcblock mbipldin 0x01B2 0x151F 0x0002 0x8000 0x0002 (This will overwrite the zero y-offset currently hardwired in in the q_set_tracking control file by the command.: tcblock mbipldin 0x01B2 0x151F 0x0002 0x0000 0x0000 (2) To set up for cam_hr_t2_ve_fe_me at the top of the high res FOV (x=145, y=320) at central meridian in non-track mode. . Set the x coord with q_set_tracking_v03 in the no-track option and answer the questions: "Number of minutes before shift (ie: 4)".................... 3000 "Number of pixel to shift (ie: 1)" ......................... 0 "Column num to stop shifting (1024 minus extract) (ie: 520)" 146 "Starting Count (typically number of min +1) (ie: 5)"....... 3001 "Starting Column for extract (0-1023) (ie: 0)" ............. 145 . Afterwards, set the y coordinate to 320, by sending tcblock mbipldin 0x01B2 0x151F 0x0002 0x0000 0x0005 (3) To set up for cam_hr_t2_ve_fe_me at the bottom of the high res FOV (y offset = 0). Script: run q_seq_tracking as usual with no tcblock command. The y offset defaults to 0. --------------------------------------------------------------------------- Notes: Use SET_OFFSET.SRC as the example on how to set the last two words. The two words are low, high of the 32 bit long word of the address (in general it's 1024*#ofLines + #ofColumns to get to the lower-left offset, but here only the y offset should be included so that the x offset - the starting column value from set_tracking - is not added twice). In the future, we may modify the SET_TRACKING routine to have an option to set the reference lower-left corner. Mon's suggests that parts of the SET_OFFSET.SRC code be copied into SET_TRACKING.SRC and that 2 more questions be added (the starting column question becomes semi-redundant, but DONT enter the same value twice because the two values are added together). To set the last 2 terms of the tcblock command using set_offset (the last 2 terms are the low word and the high word): long word = 1024 * line (y extract) + column (x extract) (x extract should be 0 since set_tracking sets it) high word = long word/65536 (this must be an integer so truncate it) low word = long word - high word * 65536 convert the low word and high word into hex and put a 0x in front of it (in the tcblock command, the high word is last and the low word is next to last) *The simple way of doing this calculation is to multiply 1024 * y offset and then convert to hex. The resulting number is 5 digits. Take the first digit, put 3 zeros in front of it and you have the high word. The last 4 digits are the low word. Example: y offset = 160: 1024*160 = 163840 dectohex 163840 = 28000 low word = 8000, high word = 0002