C+ C NAME: C print_star_pole_cen_xy_rm.f C PURPOSE: C Print out the star and pole x_y location on the original ASHI image, the lat lon center on the original image and the C rotation to get the star (usually Polaris) and the pole to the top of the new grid. C C CATEGORY: C I/O C CALLING SEQUENCE: C pr_star_pole_cen_xy_rm(JJ,NSTAR,NOBS,Iave,XCENP,YCENP,XCEN,YCEN,xOPpos,yOPpos,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 Iave integer Number of image distances relative to the center to provide a running mean, 1,2,3, etc. C XCENP (NSTAR,NOBS) real The X location of the star on the original ASHI image C YCENP (NSTAR,NOBS) real The Y location of the star on the original ASHI image C XCEN (NSTAR,NOBS) real The X location of the lat-lon center on the original ASHI image C YCEN (NSTAR,NOBS) real The Y location of the lat-lon center on the original ASHI image C xOPpos(NSTAR,NOBS) real The X-position of the pole on the original image from the ASHI latitude and the location of the star C yOPpos(NSTAR,NOBS) real The Y-position of the pole on the original image from the ASHI latitude and the location of the star C C OUTPUTS: C JJ integer Stellar value number 1 for Polaris, 2 for ????, etc C I integer The image number measured C XCENP (NSTAR,NOBS) real The X location of the star on the original ASHI image C YCENP (NSTAR,NOBS) real The Y location of the star on the original ASHI image C XCEN (NSTAR,NOBS) real The X location of the lat-lon center on the original ASHI image C YCEN (NSTAR,NOBS) real The Y location of the lat-lon center on the original ASHI image C xOPpos(NSTAR,NOBS) real The X-position of the pole on the original image from the ASHI latitude and the location of the star C yOPpos(NSTAR,NOBS) real The Y-position of the pole on the original image from the ASHI latitude and the location of the star C C FUNCTIONS/SUBROUTINES: C C MODIFICATION HISTORY: C October-2022, Bernard Jackson (UCSD) C- subroutine pr_star_pole_cen_xy_rm(JJ,NSTAR,NOBS,Iave,XCENP,YCENP,XCEN,YCEN,xOPpos,yOPpos) real xOPpos(NOBS), & yOPpos(NOBS) real XCENP (NSTAR,NOBS), & YCENP (NSTAR,NOBS), & XCEN (NSTAR,NOBS), & YCEN (NSTAR,NOBS) print*, ' ' print*, ' Into print_star_pole_cen_x-y_rm' C Print out max and min and the image rotation to put the north pole at the top in the original image do I=1,NOBS ANAVE = 0.0 xOPposrm = 0.0 yOPposrm = 0.0 XCENPrm = 0.0 YCENPrm = 0.0 XCENrm = 0.0 YCENrm = 0.0 do II=I-Iave,I+Iave ANAVE = ANAVE + 1.0 xOPposrm = xOPposrm + xOPpos(II) yOPposrm = yOPposrm + yOPpos(II) XCENPrm = XCENPrm + XCENP(JJ,II) YCENPrm = YCENPrm + YCENP(JJ,II) XCENrm = XCENrm + XCEN(JJ,II) YCENrm = YCENrm + YCEN(JJ,II) end do if(I.le.Iave.or.I.ge.NOBS-Iave) then xOPposrm = 0.0 yOPposrm = 0.0 XCENPrm = 0.0 YCENPrm = 0.0 XCENrm = 0.0 YCENrm = 0.0 else xOPposrm = xOPposrm/ANAVE yOPposrm = yOPposrm/ANAVE XCENPrm = XCENPrm/ANAVE YCENPrm = YCENPrm/ANAVE XCENrm = XCENrm/ANAVE YCENrm = YCENrm/ANAVE end if if(I.eq.1) print*,'Star Image Xvalrm Yvalrm PXvalrm PYvalrm XCENrm YCENrm ' write(*,'(I3,I8,8F8.2)')JJ,I,xOPposrm,yOPposrm,XCENPrm,YCENPrm,XCENrm,YCENrm C if(I.eq.10) stop end do print*, ' Out of print_star_pole_cen_x-y_rm' return end