! =================================================================== SubRoutine CFits (Nom,Lu,comment,Nc,Nl,Dx,Dy,Xd,Yd,iBP) ! =================================================================== ! Creation d'un fichier image au format FITS avec iBP bits par pixels ! apres effacement eventuel d'un fichier de meme nom deja present. ! =================================================================== character Nom*40,Comment*60, & & cType1*40,cType2*40, & ! unites des axes & cDate*10,cTime*11, & ! date et heure de creation & Label*20 ! commentaire associe aux erreurs integer*4 NAxis,NAxes(2),Lu,Nc,Nl, & iBP,iBlockSize,iDecimal,iStatus real*4 Dx,Dy,Xd,Yd Logical*1 Simple,Extend ! =================================================================== call DFITS (Nom) ! ecrasement du fichier precedent ! =================================================================== Simple = .True. ! conforme aux standards FITS Extend = .False. ! pas d'extensions apres les donnees NAxis = 2 ! geometrie NAxes(1) = Nc NAxes(2) = Nl cType1 = 'undefined' cType2 = 'undefined' iBlockSize = 1 ! BlockSize en Bytes iDecimal = 4 ! precision de l'affichage call Date_and_Time ( cDate,cTime ) cDate(9:10)= cDate(7:8) cDate(8:8) = ':' cDate(6:7) = cDate(5:6) cDate(5:5) = ':' cTime(7:11)= cTime(5:9) cTime(6:6) = ':' cTime(4:5) = cTime(3:4) cTime(3:3) = ':' ! =================================================================== Label = 'Init. file' iStatus = 0 iBlockSize = 2880 call ftInit(Lu,Nom,iBlockSize,iStatus) call PrintError(iStatus) Label = 'Primary keywords' iStatus = 0 ! iBp=-32 parametre d'entree call FTPHPR(Lu,Simple,iBP,NAxis,Naxes,0,1,Extend,iStatus) call PrintError(iStatus) Label = 'Put date' iStatus = 0 call ftPDat(Lu,iStatus) call PrintError(iStatus) Label = 'Put time' iStatus = 0 call ftPkyS(Lu,'TIME',cTime,'Created hour',iStatus) call PrintError(iStatus) Label = 'Put comment' call ftPCom(Lu,Comment,iStatus) call PrintError(iStatus) Label = 'Put Keyword' iStatus = 0 call ftPkyF (Lu,'CRVAL1',Xd,iDecimal, & 'Starting coordinate along axis 1',iStatus) call PrintError(iStatus) iStatus = 0 call ftPkyF (Lu,'CRVAL2',Yd,iDecimal, & 'Starting coordinate along axis 2',iStatus) call PrintError(iStatus) iStatus = 0 call ftPkyF (Lu,'CDELT1',Dx,iDecimal,'Step along axis 1',iStatus) call PrintError(iStatus) iStatus = 0 call ftPkyF (Lu,'CDELT2',Dy,iDecimal,'Step along axis 2',iStatus) call PrintError(iStatus) iStatus = 0 call ftPkyS (Lu,'CTYPE1',cType1,'Unit of axis 1',iStatus) call PrintError(iStatus) iStatus = 0 call ftPkyS (Lu,'CTYPE2',cType2,'Unit of axis 2',iStatus) call PrintError(iStatus) Label = 'Init. Header' iStatus = 0 call ftRDef (Lu,iStatus) call PrintError(iStatus) RETURN end ! ******************************************************************* ! *******************************************************************