Abrir - RDU
Abrir - RDU
Abrir - RDU
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Apéndices 295<br />
subroutine downhill<br />
real*8 spec1(2e5,2),specobs(2e5,2),prex,spec5(2e5,1)<br />
real*8 desde,hasta,delta,lam,rlam,oldlam,diff,x,x1,x2<br />
,y1,y2,px,int4<br />
real*8 frad<br />
real found,ex<br />
character alpha*1<br />
character fname*40,path*12,file1*80<br />
common /comunes/<br />
spec2,lam13,vrot,points,ndesder13,nhastar13,<br />
np1,wspec,file<br />
real*8 spec2(2e5),lam13(2e5),vrot,vrad<br />
integer points<br />
integer ndesder13,nhastar13,np1,wspec<br />
character file*80<br />
save /comunes/<br />
real teff0,logg0,feh0,xita0<br />
real uobs,bobs,yobs integer n<br />
real*8 p0(4),p1(4),p2(4)<br />
real*8 p3(4),p4(4),p(5,4)<br />
real*8 y(5)<br />
real*8 zx(4)<br />
integer iterl<br />
real*8 ftol<br />
real*8 funk<br />
real*8 vrestim<br />
external funk<br />
prex=0.0005<br />
wspec=0<br />
write(*,*)<br />
write(*,*) file<br />
write(*,*) Reading observed spectra ”<br />
write(52,*)<br />
write(52,*) file<br />
write(52,*) Reading observed spectra ”<br />
!lee specobs<br />
file1=”datain///file<br />
open(1,file=file1,status=. o ld”)<br />
read(1,*) vrot,vrad<br />
write(*,*) ”First values should be vsini:”,vrot,”km/s and<br />
vrad:”,vrad,”km/s”<br />
write(52,*) ”First values should be vsini:”,vrot,”km/s and<br />
vrad:”,vrad,”km/s”<br />
if (vrot.gt.1000) then<br />
write(*,*) ”vrot out of limits”<br />
write(52,*) ”vrot out of limits”<br />
stop<br />
endif<br />
if ((vrad.gt.1000.).and.(vrad.ne.9999.)) then<br />
write(*,*) ”vrad out of limits”<br />
write(52,*) ”vrad out of limits”<br />
stop<br />
endif<br />
n=1<br />
frad=( (-vrad/299800.)+1)**-1<br />
do<br />
read(1,*,end=100) specobs(n,1),specobs(n,2) !lam,flux<br />
if (vrad.ne.9999.) then<br />
specobs(n,1)=specobs(n,1)*frad<br />
endif<br />
n=n+1<br />
enddo<br />
100close(1)<br />
points=n-1<br />
desde=specobs(1,1)<br />
hasta=specobs(points,1)<br />
delta=0.02<br />
!write(*,*) ”lambda ranges ”,desde, hasta<br />
write(*,*) Reading Stromgren u, b, y”<br />
write(52,*) Reading Stromgren u, b, y”<br />
open(10,file=”stromobs.dat”)<br />
read(10,*) uobs,bobs,yobs<br />
close(10)<br />
write(*,*) . O bserved spectra covers from ”,desde,”to ”,hasta<br />
write(*,*) ”Number of points = ”,points<br />
write(*,*) ”Stromgren u b y = ”,uobs,bobs,yobs<br />
write(52,*) . O bserved spectra covers from ”,desde,”to ”,hasta<br />
write(52,*) ”Number of points = ”,points<br />
write(52,*) ”Stromgren u b y = ”,uobs,bobs,yobs<br />
oldlam=specobs(1,1)<br />
open(47,file=”spec1.dat”)<br />
write(47,*) specobs(1,1),specobs(1,2)<br />
do i=2,points<br />
lam=specobs(i,1)<br />
int4=specobs(i,2)<br />
diff=abs(lam-oldlam)<br />
if (diff.gt.1) then<br />
do rlam=oldlam+0.02,lam-0.02,0.02<br />
write(47,*) rlam,9999.<br />
enddo<br />
endif<br />
write(47,*) lam,int4<br />
oldlam=lam<br />
enddo<br />
close(47)<br />
open(47,file=”spec1.dat”)<br />
i=1<br />
do<br />
read(47,*,end=260) spec1(i,1),spec1(i,2)<br />
i=i+1<br />
enddo<br />
260close(47)