C+ C NAME: C smei_orb_read C PURPOSE: C Read orbital difference pattern C CATEGORY: C ucsd/camera/for/lib C CALLING SEQUENCE: subroutine smei_orb_read(cFile, nx, ny, orb_pattern) C INPUTS: C cFile*(*) character fully qualified Fits file name C OUTPUTS: C nx integer horizontal frame size C ny integer vertical frame size C orb_pattern(nx,ny) real pattern C INCLUDE: include 'filparts.h' include 'ftspar.h' include 'smei_frm_layout.h' C CALLS: C iGetLun, iFreeLun, say_fts, smei_frm_mode C FTNOPN, FTGKYS, FTGKYJ, FTGKYL, FTGISZ, FTGPVE, FTCLOS C PROCEDURE: C MODIFICATION HISTORY: C JUN-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu) C- character cFile*(*) integer nx integer ny real orb_pattern(*) character cSay*8 /'orb_read'/ save cSay character cSeverity /'E'/ character cStr*(FIL__LENGTH) logical anyf integer nAxes(2) character cPat*(*) integer TTime(2) double precision Version character cOrb_fts*50 save cOrb_fts character cMin_fts*50 save cMin_fts character cPat_fts*50 save cPat_fts integer nOrb_fts save nOrb_fts integer nMin_fts save nMin_fts double precision Version_fts save Version_fts cStr = cFile call Say(cSay,'I','#'//cStr,'difference pattern') iU = iGetLun(cFile) istat = 0 call FTNOPN(iU, cFile, FTS__READONLY, istat) if (istat .ne. 0) call say_fts(cSay,cSeverity,istat) call FTGKYS(iU, 'NAME', cOrb_fts, cStr, istat) if (istat .eq. 202) then ! For older patterns istat = 0 call FTGKYS(iU, 'ORB_NAME', cOrb_fts, cStr, istat) end if if (istat .ne. 0) call say_fts(cSay,cSeverity,istat) call FTGKYJ(iU, 'ORBIT', nOrb_fts, cStr, istat) if (istat .eq. 202) then ! For older patterns istat = 0 call FTGKYJ(iU, 'ORB_NUM', nOrb_fts, cStr, istat) end if if (istat .ne. 0) call say_fts(cSay,cSeverity,istat) call FTGKYS(iU, 'MIN_NAME', cMin_fts, cStr, istat) if (istat .ne. 0) call say_fts(cSay,cSeverity,istat) call FTGKYL(iU, 'MIN_ORB', nMin_fts, cStr, istat) if (istat .eq. 202) then ! For older patterns istat = 0 call FTGKYL(iU, 'MIN_NUM', nMin_fts, cStr, istat) end if if (istat .ne. 0) call say_fts(cSay,cSeverity,istat) call FTGKYS(iU, 'CAL_NAME', cPat_fts, cStr, istat) if (istat .ne. 0) call say_fts(cSay,cSeverity,istat) call FTGKYD(iU, 'SMEI_ORB', Version_fts, cStr, istat) if (istat .ne. 0) then Version_fts = 1.0d0 istat = 0 end if call FTGISZ(iU, 2, nAxes, istat) if (istat .ne. 0) call say_fts(cSay,cSeverity,istat) nx = nAxes(1) ny = nAxes(2) anyf = .FALSE. call FTGPVE(iU, 1, 1, nAxes(1)*nAxes(2), 0.0, orb_pattern, anyf, istat) if (istat .ne. 0) call say_fts(cSay,cSeverity,istat) call FTCLOS(iU, istat) ! Close pattern fts file if (istat .ne. 0) call say_fts(cSay,cSeverity,istat) iU = iFreeLun(iU) return C+ C NAME: C smei_orb_name C PURPOSE: C Pattern name of last pattern read with smei_orb_read C CATEGORY: C ucsd/camera/for/lib C CALLING SEQUENCE: entry smei_orb_name(cPat) C INPUTS: C (none) C OUTPUTS: C cPat*(*) character name of orbital pattern C PROCEDURE: C Entry point in smei_orb_read. C MODIFICATION HISTORY: C JUN-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu) C- cPat = cOrb_fts return C+ C NAME: C smei_orb_min_name C PURPOSE: C Name of minimum pattern from on which the orbital pattern C is based. C CATEGORY: C ucsd/camera/for/lib C CALLING SEQUENCE: entry smei_orb_min_name(cPat) C INPUTS: C (none) C OUTPUTS: C cPat*(*) character name of minimum pattern C PROCEDURE: C Entry point in smei_orb_read. C MODIFICATION HISTORY: C JUN-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu) C- cPat = cMin_fts return C+ C NAME: C smei_orb_cal_name C PURPOSE: C Name of closed shutter calibration pattern on which the C orbital pattern is based. C CATEGORY: C ucsd/camera/for/lib C CALLING SEQUENCE: entry smei_orb_cal_name(cPat) C INPUTS: C (none) C OUTPUTS: C cPat*(*) character name of calibration pattern C PROCEDURE: C Entry point in smei_orb_read. C MODIFICATION HISTORY: C JUN-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu) C- cPat = cPat_fts return C+ C NAME: C smei_orb_time C PURPOSE: C Time of orbital pattern. C CATEGORY: C ucsd/camera/for/lib C CALLING SEQUENCE: entry smei_orb_time(TTime) C INPUTS: C (none) C OUTPUTS: C TTime(2) integer time of calibration pattern C CALLS: C TimeSplit C PROCEDURE: C Entry point in smei_orb_read. C MODIFICATION HISTORY: C JUN-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu) C- call smei_Time2Split(0,cOrb_fts,TTime) return C+ C NAME: C smei_min_time C PURPOSE: C Time of minimum pattern. C CATEGORY: C ucsd/camera/for/lib C CALLING SEQUENCE: entry smei_orb_min_time(TTime) C INPUTS: C (none) C OUTPUTS: C TTime(2) integer time of minimum pattern C CALLS: C TimeSplit C PROCEDURE: C Entry point in smei_orb_read. C MODIFICATION HISTORY: C JUN-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu) C- call smei_Time2Split(0,cMin_fts,TTime) return C+ C NAME: C smei_cal_time C PURPOSE: C Time of calibration pattern. C CATEGORY: C ucsd/camera/for/lib C CALLING SEQUENCE: entry smei_orb_cal_time(TTime) C INPUTS: C (none) C OUTPUTS: C TTime(2) integer time of calibration pattern C CALLS: C TimeSplit C PROCEDURE: C Entry point in smei_orb_read. C MODIFICATION HISTORY: C JUN-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu) C- call smei_Time2Split(0,cPat_fts,TTime) return C+ C NAME: C smei_orb_number C PURPOSE: C Orbit number of orbital pattern. C CATEGORY: C ucsd/camera/for/lib C CALLING SEQUENCE: entry smei_orb_number(n) C INPUTS: C (none) C OUTPUTS: C n integer orbit number of orbital pattern C CALLS: C TimeSplit C PROCEDURE: C Entry point in smei_orb_read. C MODIFICATION HISTORY: C JUN-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu) C- n = nOrb_fts return C+ C NAME: C smei_orb_min_number C PURPOSE: C Orbit number of minimum pattern. C CATEGORY: C ucsd/camera/for/lib C CALLING SEQUENCE: entry smei_orb_min_number(n) C INPUTS: C (none) C OUTPUTS: C n integer orbit number of orbital pattern C CALLS: C TimeSplit C PROCEDURE: C Entry point in smei_orb_read. C MODIFICATION HISTORY: C JUN-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu) C- n = nMin_fts return C+ C NAME: C smei_orb_camera C PURPOSE: C Camera ID of orbital pattern. C CATEGORY: C ucsd/camera/for/lib C CALLING SEQUENCE: entry smei_orb_camera(icam) C INPUTS: C (none) C OUTPUTS: C icam integer camera ID of orbital pattern C PROCEDURE: C Entry point in smei_orb_read. C MODIFICATION HISTORY: C JUN-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu) C- read (cOrb_fts(2:2),'(I1.1)') icam return C+ C NAME: C smei_orb_version C PURPOSE: C Software version number of smei_orb C CATEGORY: C ucsd/camera/for/lib C CALLING SEQUENCE: entry smei_orb_version(Version) C INPUTS: C (none) C OUTPUTS: C Version double precision version number C PROCEDURE: C Entry point in smei_orb_read. C MODIFICATION HISTORY: C JAN-2008, Paul Hick (UCSD/CASS; pphick@ucsd.edu) C- Version = Version_fts return end