XMM-Newton SAS Home Page
XMM-Newton Science Analysis System


rotdet2sky (rotdet2sky-0.16.1) [xmmsas_20230412_1735-21.0.0]


Algorithm


 1. Read in parameters
 2. Open input FOV template image. 
 3. Extract coordinate keywords from input FOV template image.
 4. Open input DEC coordinate image to be rotated.
 5. Cast the observation in DET coords thusly:

    do i=1,imgpix_X
       do ii=1,imgpix_Y
          if(input(i,ii) .ne. 0) then
             x = alpha - i*cos(theta) + ii*sin(theta)
             y = beta + ii*cos(theta) + i*sin(theta)
             ix = nint(x)
             iy = nint(y)
             if((ix .ge. 1) .and. (ix .le. 900) .and. &
                  (iy .ge. 1) .and. (iy .le. 900)) then
                rotarr(ix,iy) = rotarr(ix,iy) + input(i,ii)
                n = n + 1
                rn = rn + input(i,ii)
             endif
          endif
       enddo
    enddo
 6. Apply a mask if selected. 
 7. Open output SKY image file.
 8. Transfer input template image coord attributes to new file.
 9. write rotarr above to PRIMARY header of output SKY image file.
10. Close files.



XMM-Newton SOC -- 2023-04-16