10-Jun-1998

Status of study on Gam-Dra fluxes and related pointing errors
=============================================================

Author: H. Feuchtgruber


0) Introduction and Purpose

Purpose of this study has been to find possible reasons for the flux 
modulations, seen on the regular Gam-Dra key-wavelength observations via the
CAP analysis for CAL13 derivation. Here no CAP was applied, but just simple
IA scripts in order to reproduce these modulations in a fast way and by 
inspecting the product header and the AOCS files to get all relevant 
supplementary information to correlate with.
A first report on this study is given in REF. 1., compare also with the CAP
key-wavelength results from REF. 2.
 

1) Description of the available data

On top of the regular AOT06 key-wavelength observations all other AOTs on 
Gam-Dra were included in this data sample. All processing started from SPD 
level with latest grating wavelength calibration (incl. time dependencies) 
applied. The SPDs were retrieved from the archive, processed with pipeline V6.x.
Supplementary information was extracted per observation from the SPD header 
and the AOCS files and stored into IDL arrays:

- Revolution number	- Rollangle
- Mean startracker y	- Mean startracker z
- Guidestar number	- RA, DEC, corrected RA, corrected DEC
- V ISO			- Solar aspect angle
- AOT number		- Heliocentric correction

A total of 120 observations were carried out starting from REV24 to REV867. 
Every observation usually contains 16 passbands, including 2C', 4', 4A and 4D,
but not all observations (--> AOT02s) did contain all bands. Corrected 
pointings were not yet available for all observations, the period between 
REV450-REV620 was not yet processed with the respective pipeline version,
however during this period already the improved pointing was implemented in the
uplink. Therefore the corrected pointing should ideally be equal to the uplinked
pointing, differing only by numerical rounding errors.


2) Data processing

The observations are processed within IA by an IDL 3.6.1 script listed in 
appendix A and B. It mainly consists of:

	- Read in the files (SWSP* and AOCS*)
	- Initialize supplemental arrays
	- Extract the header information
	- Derive mean STR Y and STR Z
	- Update wavelength calibration (GET_GRAT_ANG, WAVE)
        (not quite correct for AOT01s, but reasonably accurate for this
         purpose)
	- DAAR
	- Flatfielding and sigma-clipping
	- Derive mean flux and STDEV of flux
	- Loop through all passbands
	- Loop through all files 
	- Store results

In case of no data being available within a passband, the derived flux values 
remained at 0. Due to some missing or corrupt (TM/TC, memory) lines, several 
checking steps in the script make sure that only useful data is selected for 
analysis. 
In order to get clear trends for fluxes, only one (!) CAL13 has been used
to process all the observations (CAL13_017, with entries for band 4A
and 4D to allow processing). A preliminary CAL25 for band 4A and CAL25_010 for
band 4D were used within RESPCAL. Otherwise, all calfiles and the TIMEDEP file
from OLP 7.0 are used during DAAR. 


3) Results

3.1 Fluxes in passbands

Figure 1 gives all the derived fluxes within the passbands of the related 
AOT band versus revolution. Also the three Gam-Dra raster exercises in REV126,
REV368 and REV369 are included in this sample, clearly to be seen for example 
in band 1D. The flux modulations can clearly be seen in 2A,2B,2C,2C',3A,3C,
3D,3E,4A,4D. Band 4 and 4' have too low flux to provide a statement there. 
No related modulation of comparable amplitude can be seen in band 1. It should
be noted that a more accurate characterisation of the Gam-Dra fluxes for the 
actual flux calibration via the actual CAP is described in REF. 2., this study
focussed mainly on the investigation for the reason of the modulation.  
Fluxes are heavily affected by pointing inaccuracies, as can be seen in the
period before REV369, when significant pointing errors happened. Also the use
of different guidestars with different accuracies are suspect in introducing 
additional noise in the flux trends. The best explanation, however still not
proven so far, for the flux modulation is a systematic pointing error towards
Gam-Dra. Band 1 has basically 0 FPG offset, while all the other bands are offset
by 2"-3". This makes bands 2,3,4 sensitive to even small (~1") pointing errors,
as they are operated close to the edge of the flat top of the SWS beam profile.
Band 1 remains rather robust against pointing errors, being centered. 


3.2 Pointing   

The major source for the observed modulation in flux is thought to be some
systematic in absolute pointing. However no clear source for this error could 
be identified so far. Figure 2 gives the reconstructed pointings for the three
periods during the ISO mission with respect to the HIPPARCOS output as 
implemented in OLP V7.0 (CINSTRA, CINSTDEC keywords in SPD):

	- Before REV369 (no corrections in the uplink)
	- Between REV369 and REV452 (STR focal length correction only) 
	- After REV452 (STR focal length correction + improved sun model)

The STR focal length problem caused a pointing bias towards the guidestar,
increasing with distance of the guidestar from the center of the STR field of
view. It should be also noted that after REV452, when all above corrections 
were implemented in the uplink, the corrections in the downlink go to 0, as 
both involve the same algorithms. The offset of 0.3" in RA after REV369 is due
to the PGA cut off at 0.1 sec in time of RA. Figure 3 shows for all 
observations the position of the guidestar on the startracker field of view, 
the revolution and the guidestar number. 
The following sources of error which are not yet part of the ISO pointing 
reconstruction algorithm have been investigated:

a) Aberration of guidestars 
No correction done within OLP V7.0, therefore SCREW 359 has been raised.
The effect can cause errors up to +-1", depending on the ISO velocity 
perpendicular to the line of sight towards the guidestar and the location of
the guidestar with respect to the target.
 
b) Parallax of guidestars 
Only few nearby guidestars affected, where some are even too bright to be
selected. Largest error +-0.4" (see also appendix C) 

c) Proper motion  
Early in the mission (up to REV483, REF. 5) no correction was done for this in the 
uplink. After the problem has been discovered, the guidestar catalogue was 
cleaned such that stars with proper motion larger than 0.5" per year have been
removed and the catalogue was updated every 3 months with respect to the mid 
of every period (REF. 4). Therefore, early in the mission the error has been 
straight the proper motion since 1997, while later, the remaining error 
is: +-0.06" (see values below for the individual guidestars).

d) Quality of guidestars
The following guidestars were used during SWS Gam-Dra observations:

95358: Class D, RA=17 49 4.313, DEC=+50 46 51.21, HIP#87212,   
       Proper motion: -0.053,0.210
       Maximum bias error up to +-0.17" (REF. 3.)
       Hipparcos:
       RA  =  17 49 04.3355 difference = -0.3"
       DEC = +50 46 49.96   difference = +1.2"
       Parallax: 0.01503
       Proper motion: -0.05189,0.21815

95527: Class 1, RA=17 50 37.796, DEC=+51 14 31.72, HIP#87328,
       Proper motion: -0.029,0.042
       Maximum bias error up to +-0.73" (REF.3.)
       Hipparcos:
       RA  =  17 50 37.80  difference = -0.06"
       DEC = +51 14 31.5   difference = +0.22"
       Parallax: 0.00431
       Proper motion: -0.02425,0.03842

96906: Class 1, RA=18 0 49.807, DEC=+53 37 43.82, HIP#88212,
       Proper motion: -0.001,0.014
       Maximum bias error up to +-0.73" (REF.3.)
       Hipparcos:
       RA  =  18 00 49.81  difference = -0.045"
       DEC = +53 37 43.7   difference = +0.12"
       Parallax: 0.0031
       Proper motion: 0.00862,0.00486

97717: Class C, RA=18 6 53.474, DEC=+50 49 21.90, HIP#88732,
       Proper motion: -0.003,0.095
       Maximum bias error up to +-0.17" (REF. 3.)
       Hipparcos:
       RA  =  18 06 53.47  difference = -0.3"
       DEC = +50 49 21.4   difference = +0.5"
       Parallax: 0.00845
       Proper motion: 0.00473,0.09223

The differences between the ISO guidestar catalogue and the HIPPARCOS 
catalogue are mainly due to the fact that HIPPARCOS is J(1991.25) and the ISO 
catalogue is J(1997), but there are also small further differences, because
the ISO catalogue has been a sort of pre-release of the HIPPARCOS cat. by BdL
and was not updated to its final version. This results in slight differences
in proper motions and parallaxes.

It is quite obvious that a combination of the individual sources of pointing
errors listed above can cause the flux modulation as seen on Gam-Dra.

4) Open Problems

The reason for the fluxmodulation is not yet found, however the abolute 
pointing is suspect. Therefore once aberration, parallax and proper motion of
guidestars is available within the corrected pointing in the headers, together
with the guide star catalogue (in its different versions) and the actual used
coordinates of the guidestars per observation (for quality of guidestars, 
see REF. 3.) one can reassess the then improved reconstructed pointings. Also
still more correlations between the different extracted data entities could be
tested.


5) Further documents

	REF. 1: SWS Ground Segment Meeting 12-13 March 1998, Minutes 
        REF. 2: EOM, fluxcal document
        REF. 3: ISO: In-Orbit Calibration of the AOCS Sensors and Maximisation
                of Pointing Performance by A. J. Batten, C. A. Stephenson
        REF. 4: ISO: Parameter Estimation from Confirmation Star Data,
                C.A. Stephenson
        REF. 5: MOD/SMD/JF/RC/115


6) Figure captions

Figure 1: Fluxes off all passbands vs. revolutions divided by their median. Bands 4 and 4' have too low flux, therefore points fall already outside the scaling.

Figure 2: Reconstructed pointings of all SWS Gam-Dra observations from SPD V6.x headers relative to the Hipparcos position

Figure 3: Guidestar positions for all Gam-Dra observations on startracker field of view. The differnt guidestars (see legend for ISO guidestar numbers) are marked with different symbols together with the revolution in which they are used. Appendix A Listing of script to analyse all the Gam-Dra observations: ============================================================== ; initialize and read all the filenames ; do not forget to setup for AOT band 4A ; path1='dkb100:[fgb.data.gamdra]' path2=path1 string='' aocsname=strarr(2000) openr,in,path1+'listing1.txt',/get_lun i=0 while ( not ( eof( in ) ) ) do begin readf,in,format='(a)',string if (strmid(string,0,4) eq 'AOCS') then begin aocsname(i)=strmid(string,0,17) i=i+1 endif endwhile close,in swspname=strarr(2000) openr,in,path2+'listing2.txt',/get_lun i=0 while ( not ( eof( in ) ) ) do begin readf,in,format='(a)',string if (strmid(string,0,4) eq 'SWSP') then begin SWSPname(i)=strmid(string,0,17) i=i+1 endif endwhile close,in aocsname=aocsname(where(aocsname ne '')) swspname=swspname(where(swspname ne '')) if n_elements(swspname) ne n_elements(aocsname) then stop restore,'cal23.idl' cal13=readcal(13,cal='[.b4ext]CAL13_017_EXT4.FITS') cal13.data(7).aot_band='2C' cal13.data(13).aot_band='4' ; adapt shifted key_wavelengths for 4A and 4D cal13.data(14).key_wavelength=14.13 cal13.data(15).key_wavelength=24.268 lineflux=fltarr(n_elements(swspname),16) result=fltarr(n_elements(swspname),16,2) roll=fltarr(n_elements(swspname)) rev=fltarr(n_elements(swspname)) guidestar=fltarr(n_elements(swspname)) aotnum=strarr(n_elements(swspname)) ra=fltarr(n_elements(swspname)) dec=fltarr(n_elements(swspname)) cra=fltarr(n_elements(swspname)) cdec=fltarr(n_elements(swspname)) solas=fltarr(n_elements(swspname)) trefhel2=fltarr(n_elements(swspname)) viso=fltarr(n_elements(swspname)) stry=fltarr(n_elements(swspname)) strz=fltarr(n_elements(swspname)) restore,'dkb100:[fgb.data.gamdra]colguideforgamdra.idl' sc=180.*60*60/!pi plot,indgen(14400)-7200.,indgen(10800)-5400.,/nodata,$ tit='Guidestar Positions on STR for Gam-Dra Observations',$ xtit='arcsec',ytit='arcsec',charsize=1.5,charthick=2.,xst=1,yst=1 ; do it now for all revolutions available for i=0,n_elements(swspname)-1 do begin $ header=rd_fitsfile_hdr(path2+swspname(i)) a=read_fits_key(header,'INSTROLL',r,comment) roll(i)=float(r) rev(i)=float(strmid(swspname(i),4,3)) a=read_fits_key(header,'ATTGUIDE',r,comment) guidestar(i)=float(r) a=read_fits_key(header,'EOHAAOTN',r,comment) aotnum(i)=r a=read_fits_key(header,'ATTRA',r,comment) ra(i)=float(r) a=read_fits_key(header,'ATTDEC',r,comment) dec(i)=float(r) a=read_fits_key(header,'CINSTRA',r,comment) cra(i)=float(r) a=read_fits_key(header,'CINSTDEC',r,comment) cdec(i)=float(r) a=read_fits_key(header,'ATTSAANG',r,comment) solas(i)=float(r) a=read_fits_key(header,'TREFHEL2',r,comment) trefhel2(i)=float(r) a=read_fits_key(header,'TREFDOP2',r,comment) viso(i)=float(r) aocs=read_faocs(path1+aocsname(i)) ind=where(colguide eq guidestar(i)) plots,mean(float(aocs.data.stry/839825.)*sc),$ mean(float(aocs.data.strz/839825.)*sc),psym=4,col=ind(0)*70+40,$ symsize=2.,thick=5. xyouts,mean(float(aocs.data.stry/839825.)*sc)-20,$ mean(float(aocs.data.strz/839825.)*sc)+60,$ strmid(strtrim(string(fix(rev(i))),2),0,3),charsize=1. xyouts,mean(float(aocs.data.stry/839825.)*sc)-300,$ mean(float(aocs.data.strz/839825.)*sc)-150,$ strmid(strtrim(string(roll(i)),2),0,5),charsize=1. stry(i)=mean(float(aocs.data.stry/839825.)*sc) strz(i)=mean(float(aocs.data.strz/839825.)*sc) print,rev(i),roll(i),guidestar(i) spd=read_fspd(path2+swspname(i)) spd=get_grat_ang(spd) spd=wave(spd,cal23=c23) aar=daar(spd,cal13='[.b4ext]CAL13_017_EXT4.FITS') ; do it for all lines in that revolution if is_aar(aar) then begin $ for j=0,15 do begin $ upper=cal13.data(j).key_wavelength+cal13.data(j).passband/2 lower=cal13.data(j).key_wavelength-cal13.data(j).passband/2 ind=where(aar.data.wave ge lower and aar.data.wave le upper) ; do it only if data points exist for that line, because not all lines were ; done in all revolutions if n_elements(ind) ge 10 then begin $ ; cut out your line and do some standard processing cutaar,aar,test,lower,upper,strtrim(cal13.data(j).aot_band,2) test=sws_flatfield(test,lines=0,/noplot,aot_band=cal13.data(j).aot_band) test=sigclip(test,sig=3,lines=0,nit=4,res=1800,$ aot_band=cal13.data(j).aot_band,/noplot) cutaar,test,test,lower,upper,strtrim(cal13.data(j).aot_band,2) ; derive the flux and store all results of interest in the variables ; lineflux and result ; i = revolutions, j = bands lineflux(i,j) = mean(test.data.flux) result(i,j,0) = stdev(test.data.flux) do some output control print,lineflux(i,j) endif ; enough points in passband endfor ; all key_wavelength of a file endif; a valid AAR endfor ; all files ; save your results in a file save,file='dkb100:[fgb.data.gamdra]allrollangles.idl',rev,roll,aotnum,ra,dec,$ stry,strz,guidestar,$ cra,cdec,solas,trefhel2 save,file='dkb100:[fgb.data.gamdra]resultsfor_17.idl',lineflux,result !p.charsize=1.5 legend,strtrim(string(long(colguide)),2),col=indgen(4)*70+40,$ psym=[4,4,4,4],/hori !p.charsize=1. end ============================================================== Appendix B Code for CUTAAR, called by main script: ============================================================== pro cutaar,inst,outst,lmin,lmax,aotband if aotband ne '' then begin $ aotband=strupcase(aotband) band=['1A','1B','1D','1E','2A','2B','2C','3A','3C','3D','3E','4','5A','5B', $ '5C','5D','6','4A','4D'] ord =[4,3,3,2,2,1,1,2,2,1,1,1,3,2,2,1,1,2,1] slit=[1,1,2,2,2,2,3,1,2,2,3,3,1,1,2,2,3,1,2] deth=[12,12,12,12,24,24,24,36,36,36,36,48,49,49,49,49,51,48,48] detl=[1,1,1,1,13,13,13,25,25,25,25,37,49,49,49,49,51,37,37] ind=where(band(*) eq aotband) dummy1=ord(ind) dummy2=slit(ind) dummy3=detl(ind) dummy4=deth(ind) index=where(inst.data.wave ge lmin and $ inst.data.wave le lmax and $ byte(inst.data.flag) eq (dummy1(0)*32) and $ test_status(inst.data.status,aper=dummy2(0)) eq 1 and $ inst.data.det le dummy4(0) and inst.data.det ge dummy3(0)) endif else begin $ index=where(inst.data.wave ge lmin and $ inst.data.wave le lmax and $ (byte(inst.data.flag) and 1) ne 1 and $ (byte(inst.data.flag) and 2) ne 2 and $ (byte(inst.data.flag) and 16) ne 16) endelse if n_elements(index) gt 1 then $ outst=define_aar(header=inst.header,length=n_elements(index),$ data=inst.data(index)) else outst=0 end =================================================================== Appendix C Mail from A. Schuetz to Craig Stephenson: ========================================= Alain Sch=FCtz 05/29/98 02:56 PM To: Craig Stephenson/vilspa/ESA@ESA cc: Alan Batten/vilspa/ESA@ESA Subject: Re: ISO pointing errors (Document link not converted) Dear Craig, Concerning the stellar aberration, you are right: is not taken into account in our S/W. The differential in aberration between the requested pointing direction and the direction of the guide star is also correct: at most 0.9 arcsecs if the guide star is 2.5 degrees away from the instrument optical axis. Proper motion: After the decision was taken to update the star catalogue on a regular basis (every 3monyhs) the effect of the proper motion can be neglected. But this not true before. In addition we had problems with the first version of the star catalogue (list of suspect TDT's available to SOC).. Parallax: according to text books the nearest star (and hence the highest parallax) is Proxima Centauri with a parallax of 0.762 arcsecs. However its visual magnitude is 11.05 , too faint to be observed. The next nearest star is Alfa Centauri with a parallax of 0.745 arcsecs but with a magnitude of -0.01 too bright !!! The nearest star in the visual range 2 to 8.5 has a parallax of 0.400 Hence the error due to the parallax is not greater than 0.4 arcseconds. What could be done is to reconstitute the pointing direction from the intended pointing direction, the star position taken from the Tycho output catalogue, corrected for proper motion, parallax and aberration at the time of observation, and the commanded star position within the STR field-of-view. Best regards ===========================