Tags:
create new tag
view all tags

STANDARD

956-1024  = -68  # Boresight offset x in pixels 
1035-1024 = 11   # Boresight offset y in pixels 
7128 (118.8 deg) # Boresight Offset in Roll in arcmin (Same handedness as ROLL) 

# Camera 1 Offsets

constant x_offset = 56 (0x38);
constant y_offset = 3;

SHORTAT

fomra = 9.5            ;target RA
fomdec = 10.5          ;target declination
fomroll = 0.0          ;target roll
 
ra = fomra             ;set RA to same as fonextobsinfo above
dec = fomdec           ;ditto declination
roll = fomroll         ;ditto roll

/xrtposition ra=9.5,dec=10.5+2.0/60.0

NHK.PUT( ... 0, TO_UINT16(XRT_OFFSET_X), TO_UINT16(XRT_OFFSET_Y));
NHK.PUT( ... 1, TO_UINT16(BORESIGHT_OFFSET_X), TO_UINT16(BORESIGHT_OFFSET_Y));
NHK.PUT( ... 2, IMAGE_CENTRE_X, IMAGE_CENTRE_Y);

Debug Output (XRT OFFSETS)        0000 00d3 ff8c  ( 211, -116) 
Debug Output (BORESIGHT OFFSETS)  0001 ffbc 000b  ( -68,  11) 
Debug Output (CENTRES)            0002 048f 0397  (1167, 919)
  
SHORTATALT

fomra = 189.5          ;target RA
fomdec = -10.5         ;target declination
fomroll = 180.0        ;target roll
 
ra = fomra             ;set RA to same as fonextobsinfo above
dec = fomdec           ;ditto declination
roll = fomroll         ;ditto roll

/xrtposition ra=189.5,dec=-10.5+2.0/60.0

NHK.PUT( ... 0, TO_UINT16(XRT_OFFSET_X), TO_UINT16(XRT_OFFSET_Y));
NHK.PUT( ... 1, TO_UINT16(BORESIGHT_OFFSET_X), TO_UINT16(BORESIGHT_OFFSET_Y));
NHK.PUT( ... 2, IMAGE_CENTRE_X, IMAGE_CENTRE_Y);

Debug Output (XRT OFFSETS)        0000 ff2d 0074  (-211, 116)
Debug Output (BORESIGHT OFFSETS)  0001 ffbc 000b  ( -68,  11)      
Debug Output (CENTRES)            0002 02e9 047f  ( 745,1151)    

Info Reported by RTS about info sent to DPU

pkg=5c evt=f0 Debug Output                      0000 048f 0397  
pkg=5c evt=f0 Debug Output                      0001 048f 0397  
pkg=5c evt=f0 Debug Output                      0002 0000 0000 

produced by 

/inhkecho ... param1=0,param2=$ImgWdwCentPosX,param3=$ImgWdwCentPosY;
/inhkecho ... param1=1,param2=$EvtWdwCentPosX,param3=$EvtWdwCentPosY;
/inhkecho ... param1=2,param2=$DetWdwOrigPosX,param3=$DetWdwOrigPosY;

i.e. 

Image Window Centre    X,Y (0 -> 2047 (0x7ff) )
Event Window Centre    X,Y (0 -> 2047 (0x7ff) )
Detector Window Origin X,Y (0 ->  127  (0x7f)  - DOESN'T include h/w offset in 2*2 CCD units)

Info reported by Ada code

From REVISE_WINDOW_OFFSETS (all calls)

pkg=24 evt=f0 Debug Output                      0000 00d3 ff8c
pkg=24 evt=f0 Debug Output                      0001 ffbc 000b
pkg=24 evt=f0 Debug Output                      0003 0400 0400
pkg=24 evt=f0 Debug Output                      0007 008f ff97

produced by  

NHK.PUT( ... 0, TO_UINT16(SOURCE_OFFSET_X), TO_UINT16(SOURCE_OFFSET_Y));
NHK.PUT( ... 1, TO_UINT16(BORESIGHT_OFFSET_X), TO_UINT16(BORESIGHT_OFFSET_Y));
NHK.PUT( ... 3, ORIG_IMAGE_CENTRE_X, ORIG_IMAGE_CENTRE_Y);
NHK.PUT( ... 7, TO_UINT16(SHIFT_X), TO_UINT16(SHIFT_Y));

i.e.

Source Offset             X & Y  (0 -> 2047 (0x7ff) )
Boresight Offset          X & Y  (0 -> 2047 (0x7ff) )
Orig Centre               X & Y  (0 -> 2047 (0x7ff) )
Source + Boresight Offset X & Y  (0 -> 2047 (0x7ff) )

From REVISE_WINDOW_OFFSETS (Only XRTPOS processing)

pkg=24 evt=f0 Debug Output                      0005 0000 0000
pkg=24 evt=f0 Debug Output                      0006 0000 0000

produced by  

NHK.PUT( ... 5, XRT_COMMAND(4), XRT_COMMAND(5));
NHK.PUT( ... 6, XRT_COMMAND(8), XRT_COMMAND(9));

i.e. 

Image Window Centre    X,Y (0 -> 2047 (0x7ff) )
Event Window Centre    X,Y (0 -> 2047 (0x7ff) )

From SETUP_DET_LOAD_WINDOWS

pkg=24 evt=f0 Debug Output                      0004 0038 0003

produced by  

NHK.PUT( ... 4, CURRENT_EXPOSURE(DET_LOAD_WINDOW_ORIGIN_X) ,CURRENT_EXPOSURE(DET_LOAD_WINDOW_ORIGIN_Y) );

i.e.

Detector Window Origin X,Y (0 ->  255  (0xff) - DOES include h/w offset in CCD units)

From a Scott email

> We've been thinking about the best way to get the Genie centred on the source. I haven't looked in detail at the code yet, but one possibility would be to send u 2 XRT position commands per exposure. The first one would really be the offset between the actual and target positions. If we don't then get an XRT position, that would stand as the default. If we then do get an XRT position, then it would be sent again as an update to the 1st one. Would the DPU cope with that i.e. only use the last XRT Position command received before the end of the finding chart exposure?

The DPU applies the most recent XRT position estimate as long as it arrives within 300 seconds of the start of a given finding chart exposure. Images are always accumulated full frame since it's faster to store events than to window them. So the position estimate is applied at the end of finding chart exposures.

> NOTE: In this scheme, if we had to redo the finding chart on subsequent snapshots because of an interruption, we wouldn't get an XRT position, so the DPU would now see one XRT position message for that exposure (previously it wouldn't have had any), and that would just be the difference between actual and target. Again, can it cope?

It will apply whatever XRT window you send it within 300 seconds of a finding chart exposure. The DPU really trusts the ICU smile

> And finally, a question about the current ICU/DPU code implementation. Suppose we have started a finding chart and the ICU has sent u an XRT position command after receiving the info from the XRT. Suppose further that the exposure is briefly interrupted by the SAA (say for 2 minutes) and then it is restarted from scratch, but still in the same snapshot. As this is a new exposure, has the DPU then lost the info that was contained in the XRT position command? If so, then we have a bug in the current system, because the Genie will be off centre for the 2nd exposure but not for the first. If it does remember, how long will it remember and when does it clear it away.

If the delay is > 300s, then the DPU will ignore the XRT position. Unfortunately that number is not programmable, as it's the subject of Patch 7a0. We could modify the patch to increase it to say 1000 seconds.

Possible Algorithm

FONEXTOBSINFO

  1. Clear Source_Offset
  2. If AT
    1. If NEW_AT=TRUE or OLD_AT_OBSNBUM /= THIS_OBSNUM
      1. Clear XRTPOS existence flag
      2. OLD_AT_OBSNBUM = THIS_OBSNUM

SISCATTITUDE

  1. Wait until Config Loaded and Settled
  2. Source=Target (thus it becomes default)
  3. Determine Type of Exposure from flags left by GET_??_EXP
  4. Branch to appropriate one of 1) thru 6) below

1) FC 1st Exposure

  1. Believe XRT?
  2. If not
    1. Calc Source_Offset=Source-Actual (using modified version of PROCESS_XRTPOS)
    2. Go to Update Windows
  3. Start Timeout
  4. If XRTPOS comes before timeout
    1. Source=XRTPOS
    2. Store XRT position and flag existence
    3. Cancel Timeout
    4. Calc Source_Offset=Source-Actual
    5. Go To Update Windows
  5. On timeout
    1. Calc Source_Offset=Source-Actual
    2. Go To Update Windows

2) FC Restarted same snapshot

  1. No Action (1st attempt set up all offsets, so don't need to update DPU as windows will be now be setup by GET_FC_CONFIG)

3) FC Restarted next snapshot

  1. If XRTPOS was defined, Source=XRTPOS
  2. Calc Source_Offset=Source-Actual
  3. Go to Update Windows

4) AT Exposures

  1. If 1st exposure in snapshot
    1. If XRTPOS exists
      1. Source=XRTPOS
    2. Calc Source_Offset=Source-Actual
    3. Go To Update Windows

5) PT Exposures

  1. If 1st exposure in snapshot
    1. Calc Source_Offset=Source-Actual
    2. Go To Update Windows

6) SP Exposures

  1. Calc Source_Offset=Source-Actual
  2. Go To Update Windows

7) Update Windows

  1. Windows => Windows + Source_Offset + Boresight_Offset
  2. if condition 1), send Updated Windows to DPU
  3. Exit

GET_??_CONFIG

  1. Windows => Windows + Source_Offset + Boresight_Offset (note that Source_Offset will be set to zero for 1st snapshot exposure but will be updated to non-zero values in SISCATTITUDE by one of 1) thru 6) for use in subsequent exposures)

N.B. This all assumes 1) thru 6) finish before we send the mode command. As they have to happen whilst processing one SISCATTITUDE record once we are settled, and the exposure setup has to, at the very least, set up HV Cathode, they should!?

-- HowardHuckle - 30 Aug 2005

Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | More topic actions
Topic revision: r9 - 2006-04-26 - HowardHuckle
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback