C+ C NAME: C smei_frm_ped_mean C PURPOSE: C Set mean reference pedestal C CALLING SEQUENCE: function smei_frm_ped_mean(cframe) C INPUTS: C cframe character*(*) frame name C (contains time and camer number) include 'filparts.h' C CALLS: C iSetFileSpec, iGetFileSpec, smei_Time2Split C Time2YMD, Time2Delta, Time2Day, Time2DHMS, Say C cFlt2Str C PROCEDURE: C Currently the mean pedestal is calculated from a linear C trend with time based on 5 years of data. C RESTRICTIONS: C MODIFICATION HISTORY: C NOV-2008, Paul Hick (UCSD/CASS; pphick@ucsd.edu) C- character cframe*(*) integer tt(2) integer camera character cSay*12 /'frm_ped_mean'/ character cFlt2Str*14 character cStr*(FIL__LENGTH) integer t0(4) /2003,02,02,0/ real a(3) / 998.0, 1008.0, 1046.0/ ! ped@2003/02/02 real b(3) /-0.00344,0.00392,0.01835/ ! change per day integer uu(2) integer hms(4) i = iSetFileSpec(cframe) i = iGetFileSpec(FIL__NAME,FIL__NAME,cStr) read (cStr(2:2),'(I1)') camera ! Camera number call smei_Time2Split(0,cStr,tt) ! Time of frame call Time2YMD ( 1,uu,t0(1),t0(2),t0(3))! Time Origin call Time2Delta(tt,uu,uu) ! Difference with time origin call Time2Day ( 0,uu,dd) ! Difference in days smei_frm_ped_mean = a(camera)+b(camera)*dd call Time2DHMS(tt,hms) ! At the beginning of each hour if (hms(2)*60+hms(3) .lt. 4) & call Say(cSay,'I',cStr, & 'mean pedestal is '//cFlt2Str(smei_frm_ped_mean,2)) return end