C+ C NAME: C print_cent_rot.f C PURPOSE: C print_the center and rotation of each ASHI image C CATEGORY: C I/O C CALLING SEQUENCE: C print_cent_rot(JJ,NSTAR,NOBS,xOPpos,distcx,yOPpos,distcy,XCENP,DXCENP,YCENP,DYCENP,ROTA) C C INPUTS: C JJ integer Stellar value number 1 for Polaris, 2 for ????, etc C NSTAR integer Total number of stars possible C NOBS integer Number of star images used C XCENP (NSTAR,NOBS) real New x center of the image in pixels C DXCENP(NSTAR,NOBS) real Change in new x center from the beginning image in pixels C YCENP (NSTAR,NOBS) real New y center of the image in pixels C DYCENP(NSTAR,NOBS) real Change in new y center from the beginning image in pixels C ROTA (NSTAR,NOBS) real Rotation of the original image to the Polaris position C C OUTPUTS: C JJ integer Stellar value number 1 for Polaris, 2 for ????, etc C XCENP (NSTAR,NOBS) real New x center of the image in pixels C DXCENP(NSTAR,NOBS) real Change in new x center from the beginning image in pixels C YCENP (NSTAR,NOBS) real New y center of the image in pixels C DYCENP(NSTAR,NOBS) real Change in new y center from the beginning image in pixels C ROTA (NSTAR,NOBS) real Rotation of the original image to the Polaris position C C FUNCTIONS/SUBROUTINES: C C MODIFICATION HISTORY: C September-2022, Bernard Jackson (UCSD) C- subroutine print_cent_rot(JJ,NSTAR,NOBS,xOPpos,distcx,yOPpos,distcy,XCENP,DXCENP,YCENP,DYCENP,ROTA) real XS1 (NOBS), & YS1 (NOBS) real xOPpos(NSTAR,NOBS), & yOPpos(NSTAR,NOBS) real XCENP (NSTAR,NOBS), & DXCENP(NSTAR,NOBS), & YCENP (NSTAR,NOBS), & DYCENP(NSTAR,NOBS), & ROTA (NSTAR,NOBS) print*, ' ' print*, ' Into print_distcdiff' C Print out new image center and the image rotation to put the north pole at the top AI = 0.0 dxsxopt = 0.0 dysyopt = 0.0 Inn = 0 Is = 0 Ie = 0 Iw = 0 do I=1,NOBS AI = AI + 1.0 dxsxop = xOPpos(JJ,I) - distcx dysyop = yOPpos(JJ,I) - distcy xOPpost = xOPpost + xOPpos(JJ,I) yOPpost = yOPpost + yOPpos(JJ,I) dxsxopt = dxsxopt + dxsxop dysyopt = dysyopt + dysyop if(ROTA(JJ,I).gt.355.0.or.ROTA(JJ,I).lt.5.0) then C write(*,'(A,I2,I5,2F8.1,F6.1,1X,2F8.1,F6.1,F8.2)')'XS,XOP,YS,YOP North',JJ,I,xOPpos(JJ,I),distcx,dxsxop, C & yOPpos(JJ,I),distcy,dysyop,ROTA(JJ,I) write(*,'(A,I2,I5,F7.1,F8.3,45X,F7.2)')'North',JJ,I,yOPpos(JJ,I),XCENP(JJ,I),ROTA(JJ,I) end if if(ROTA(JJ,I).gt.175.0.and.ROTA(JJ,I).lt.185.0) then C write(*,'(A,I2,I5,2F8.1,F6.1,1X,2F8.1,F6.1,F8.2)')'XS,XOP,YS,YOP South',JJ,I,xOPpos(JJ,I),distcx,dxsxop, C & yOPpos(JJ,I),distcy,dysyop,ROTA(JJ,I) write(*,'(A,I2,I5,15X,F7.1,F8.3,30X,F7.2)')'South',JJ,I,yOPpos(JJ,I),-YCENP(JJ,I),ROTA(JJ,I) end if if(ROTA(JJ,I).gt.265.0.and.ROTA(JJ,I).lt.275.0) then C write(*,'(A,I2,I5,2F8.1,F6.1,1X,2F8.1,F6.1,F8.2)')'XS,XOP,YS,YOP East ',JJ,I,xOPpos(JJ,I),distcx,dxsxop, C & yOPpos(JJ,I),distcy,dysyop,ROTA(JJ,I) write(*,'(A,I2,I5,30X,F7.1,F8.3,15X,F7.2)')'East ',JJ,I,xOPpos(JJ,I),-XCENP(JJ,I),ROTA(JJ,I) end if if(ROTA(JJ,I).gt.85.0.and.ROTA(JJ,I).lt.95.0) then C write(*,'(A,I2,I5,2F8.1,F6.1,1X,2F8.1,F6.1,F9.2)')'XS,XOP,YS,YOP West ',JJ,I,xOPpos(JJ,I),distcx,dxsxop, C & yOPpos(JJ,I),distcy,dysyop,ROTA(JJ,I) write(*,'(A,I2,I5,45X,F7.1,F8.3,F7.2)')'West ',JJ,I,xOPpos(JJ,I),YCENP(JJ,I),ROTA(JJ,I) end if C write(*,'(A,I5,I5,5F9.3)')'JJ,I,X,DX,Y,DY,Rot',JJ,I,XCENP(JJ,I),DXCENP(JJ,I),YCENP(JJ,I),DYCENP(JJ,I),ROTA(JJ,I) end do xOPpost = xOPpost/AI yOPpost = yOPpost/AI dxsxopt = dxsxopt/AI dysyopt = dxsxopt/AI print*,' ' print*,'Average values of new pole locations and changes' write(*,'(A,I5,5X,2F9.2,F5.2,2X,2F9.2,F5.2)')'JJ,XS,XOP,YS,YOP ',JJ,xOPpost,distcx,dxsxopt,yOPpost,distcy,dysyopt print*, ' Out of print_cent_rot' return end