EIT Software Listings

 

anal
obsolete
response
util

 

Previous Routine
Next Routine

 

Listing of $SSW/soho/eit/idl/util/eit_point.pro

 


;____________________________________________________________________

function eit_point, date, wave, bin=bin
;+ 
; EIT_POINT
; 
; Purpose - return EIT pointing = Sun center, for a specific date and
;           wavelength
;
; Inputs: date, wavelength (uses average if not defined)
; Option Inputs: bin - if set uses binning (default = 1)
; Output: XCEN, YCEN in coordinate system starting at (0,0)
; Usage:
;     xy = eit_point('23-dec-1996',195)
;     print,xy
;       505.130      514.410
;         
; Created: 17 Feb 1998. J. Newmark
; Modified: 23 Jul 1998 J. Newmark - completely redone
; Modified: 17 Aug 1998 J. Newmark - new fit
; Modified: 04 Dec 1998 J. Newmark - added pointing after recovery 
;                                  - added bin keyword
; Modified: 03 Feb 1999 J. Newmark - new fit
; Modified: 06 Aug 1999 J. Newmark - new fit
; Modified: 20 Oct 1999 J. Newmark - new fit
; Modified: 02 Feb 2000 J. Newmark - new fit
; Modified: 19 Sep 2000 J. Newmark - new fit
; Modified: 28 Nov 2000 J. Newmark - new fit
; Modified: 29 Nov 2001 F. Auchere - new fitting function : fourier series and handles arrays
;-

new_date = anytim2utc(date)
if n_elements(wave) eq 0 then wave = 0
if n_elements(bin) eq 0 then bin = 1

utc_repoint = anytim2utc('1996/04/16 23:30')
t_repoint = utc_repoint.mjd + 1.d-3*utc_repoint.time/86400.

; offpointed after ESRs, only full fov images
uesr2_s = anytim2utc('1997/11/20 06:57')
uesr2_e = anytim2utc('1997/11/20 14:45')
uesr3_s = anytim2utc('1998/03/04 12:51')
uesr3_e = anytim2utc('1998/03/04 23:03')
esr2_s = uesr2_s.mjd + 1.d-3*uesr2_s.time/86400.
esr2_e = uesr2_e.mjd + 1.d-3*uesr2_e.time/86400.
esr3_s = uesr3_s.mjd + 1.d-3*uesr3_s.time/86400.
esr3_e = uesr3_e.mjd + 1.d-3*uesr3_e.time/86400.

t_obs = new_date.mjd + 1.d-3*new_date.time/86400.
tx_obs = t_obs - (anytim2utc('01-jan-1996')).mjd
ty_obs = t_obs - t_repoint

eit_coord_fitparam, amplitude_x, phase_x, amplitude_y, phase_y, ext, ndaysx, ndaysy

nt_x = (tx_obs + ext)/(ndaysx + 2*ext)
nt_y = (ty_obs + ext)/(ndaysy + 2*ext)

;xcen calculation
xcen = replicate(amplitude_x[0], n_elements(nt_x))
for i = 1, n_elements(amplitude_x)-1 do xcen = xcen + amplitude_x[i]*2.0*cos(i*2.0*!pi*nt_x + phase_x[i-1])
if wave eq 304 or wave eq 171 then xcen = xcen + 0.5
xcen = long((xcen+0.005)*100.)/100.

;ycen calculation
ycen = fltarr(n_elements(nt_x))
offpoint = where((t_obs le t_repoint) or (t_obs gt esr2_s and t_obs le esr2_e) or (t_obs gt esr3_s and t_obs le esr3_e), count)
if count ge 1 then ycen[offpoint] = 587.9
nominal = where((t_obs gt t_repoint) and (t_obs lt esr2_s or t_obs gt esr2_e) and (t_obs lt esr3_s or t_obs gt esr3_e), count)
if count ge 1 then begin
  ycen[nominal] = amplitude_y[0]
  for i = 1, n_elements(amplitude_y)-1 do ycen[nominal] = ycen[nominal] + amplitude_y[i]*2.0*cos(i*2.0*!pi*nt_y[nominal] + phase_y[i-1])
endif
if wave eq 284 or wave eq 171 then ycen = ycen + 0.5
ycen = long((ycen+0.005)*100.)/100.

return, [[xcen], [ycen]]/bin

end


Web curator: Frédéric Auchère
Responsible NASA official: Joseph B. Gurman, Facility Scientist, Solar Data Analysis Center
joseph.b.gurman@gsfc.nasa.gov
+1 301 286-4767
NASA Goddard Space Flight Center
Solar Physics Branch / Code 682

Last revised: - Wed May 9 21:45:19 2007- F. Auchère