C+ C NAME: C print_distcdiff.f C PURPOSE: C Interpolate the longitude of ASHI to use in a sidereal time determination C CATEGORY: C I/O C CALLING SEQUENCE: C call print_distcdiff(JJ,NSTAR,NOBS,NXYM,NVAL,distcx,distcy,XYDISTZ,XSMAX,NIMAX,XSMIN,NIMIX,YSMAX,NIMAY,YSMIN,NIMIY, C distxcmax,distxcmin,distycmax,distycmin,ROTA) 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 centroid locations C NXYM integer Maximum number of C NVAL integer Number of values near maximum or minimum C distcx real x pixel location of the image center according to Matthew C distcy real y pixel location of the image center according to Matthew C XYDISTZ(NSTAR,NOBS)real theoretical distance of the star to the zenith in pixels at this time C XSMAX(NXYM,NVAL) real X Value Maximums C NIMAX(NXYM,NVAL) integer X Value maximum associated images C XSMiN(NXYM,NVAL) real X Value Minimums C NIMIX(NXYM,NVAL) integer X Value minimum associated images C YSMAX(NXYM,NVAL) real Y Value Maximums C NIMAY(NXYM,NVAL) integer Y Value maximum associated images C YSMiN(NXYM,NVAL) real Y Value Minimums C NIMIY(NXYM,NVAL) integer Y Value minimum associated images C ROTA(NSTAR,NOBS) real Rotation of the original image to the Polaris position C C OUTPUTS: C distxcmax(NXYM,NVAL) real X max value differences from theoretical (deg*scale) C distxcmin(NXYM,NVAL) real X min value differences from theoretical (deg*scale) C distycmax(NXYM,NVAL) real Y max value differences from theoretical (deg*scale) C distycmin(NXYM,NVAL) real Y min value differences from theoretical (deg*scale) C C FUNCTIONS/SUBROUTINES: C C MODIFICATION HISTORY: C September-2022, Bernard Jackson (UCSD) C- subroutine print_distcdiff(JJ,NSTAR,NOBS,NXYM,NVAL,distcx,distcy,XYDISTZ,XSMAX,NIMAX,XSMIN,NIMIX,YSMAX,NIMAY, & YSMIN,NIMIY,distxcmax,distxcmin,distycmax,distycmin,ROTA) real XS1(NOBS), & YS1(NOBS), & XSMAX(NXYM,NVAL), & YSMAX(NXYM,NVAL), & XSMIN(NXYM,NVAL), & YSMIN(NXYM,NVAL) real distxcmax(NOBS), & distxcmin(NOBS), & distycmax(NOBS), & distycmin(NOBS) real XYDISTZ(NSTAR,NOBS), & ROTA(NSTAR,NOBS) integer NIMAX(NXYM,NVAL), & NIMAY(NXYM,NVAL), & NIMIX(NXYM,NVAL), & NIMIY(NXYM,NVAL) character cidentify*30 print*, ' ' print*, ' Into print_distcdiff' C Print out X Min Max if(JJ.eq.1) cidentify = 'Polaris' if(JJ.eq.2) cidentify = 'Beta Andomeda' if(JJ.eq.3) cidentify = 'Delta Capricornus' if(JJ.eq.4) cidentify = 'Epsilon Andomeda' if(JJ.eq.5) cidentify = 'Gamma Draco' if(JJ.eq.6) cidentify = 'Saturn' do I=1,NXYM do J=1,41 if(XSMAX(I,J).gt.1000.0) then if(J.eq.1) then print*, ' ' write(*,'(A,I4,A,I2,2X,A)') 'XMAX ',I,' IMAGE MAX X Rotation DRot Dcent-Th Star# =', JJ, cidentify end if II = NIMAX(I,J) DROTA = ROTA(JJ,II) - ROTA(JJ,II-1) distxcmax(II) = (xsmax(I,J)-distcx) - XYDISTZ(JJ,II) ! x distance difference from real image center to the theoretical image center write(*,'(4X,I5,I6,4F9.3)') J,NIMAX(I,J),XSMAX(I,J),ROTA(JJ,II),DROTA,distxcmax(II) end if end do end do do I=1,NXYM do J=1,41 if(XSMIN(I,J).lt.1000.0) then if(J.eq.1) then print*, ' ' write(*,'(A,I4,A,I2,2X,A)') 'XMIN ',I,' IMAGE MIN X Rotation DRot Dcent-Th Star# =', JJ, cidentify end if if(NIMIX(I,J).gt.5000.or.NIMIX(I,J).le.0) NIMIX(I,J) = 1 II = NIMIX(I,J) DROTA = ROTA(JJ,II) - ROTA(JJ,II-1) distxcmin(II) = (distcx-xsmin(I,J)) - XYDISTZ(JJ,II) ! x distance difference from real image center to the theoretical image center write(*,'(4X,I5,I6,4F9.3)') J,NIMIX(I,J),XSMIN(I,J),ROTA(JJ,II),DROTA,distxcmin(II) end if end do end do C Print out Y Min Max do I=1,NXYM do J=1,41 if(YSMAX(I,J).gt.1000.0) then if(J.eq.1) then print*, ' ' write(*,'(A,I4,A,I2,2X,A)') 'YMAX ',I,' IMAGE MAX Y Rotation DRot Dcent-Th Star# =', JJ, cidentify end if if(NIMAY(I,J).gt.5000.or.NIMAY(I,J).le.0) NIMAY(I,J) = 1 II = NIMAY(I,J) DROTA = ROTA(JJ,II) - ROTA(JJ,II-1) distycmax(II) = (ysmax(I,J)-distcy) - XYDISTZ(JJ,II) ! y distance difference from real image center to the theoretical image center write(*,'(4X,I5,I6,4F9.3)') J,NIMAY(I,J),YSMAX(I,J),ROTA(JJ,II),DROTA,distycmax(II) end if end do end do do I=1,NXYM do J=1,41 if(YSMIN(I,J).lt.1000.0) then if(J.eq.1) then print*, ' ' write(*,'(A,I4,A,I2,2X,A)') 'YMIN ',I,' IMAGE MIN Y Rotation DRot Dcent-Th Star# =', JJ, cidentify end if II = NIMIY(I,J) DROTA = ROTA(JJ,II) - ROTA(JJ,II-1) distycmin(II) = (distcy-ysmin(I,J)) - XYDISTZ(JJ,II) ! y distance difference from real image center to the theoretical image center write(*,'(4X,I5,I6,4F9.3)') J,NIMIY(I,J),YSMIN(I,J),ROTA(JJ,II),DROTA,distycmin(II) end if end do end do print*, ' Out of print_distcdiff' return end