-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlinefitter.f
More file actions
executable file
·64 lines (46 loc) · 1.35 KB
/
linefitter.f
File metadata and controls
executable file
·64 lines (46 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
c given lists of object numbers, spec1d files, and spectral features,
c fit lines.
program linefitter
include 'specarray.h'
parameter (NMAXLINES=50)
real wave(NWAVEMAX),spec(NWAVEMAX),espec(NWAVEMAX)
real wrest(NMAXLINES)
character fname*160,sname*200
fitrad = 30.
wmaxoffset = 10.
contrad = 120.
ifoptextract=0
90 continue
write(*,'("linelist: ",$)')
read(*,'(a)') fname
open(10,file=fname,status='old',err=100)
100 continue
write(*,'("list of object numbers: ",$)')
read(*,'(a)') fname
open(2,file=fname,status='old',err=100)
110 continue
write(*,'("list of 1-d spectra: ",$)')
read(*,'(a)') fname
open(3,file=fname,status='old',err=110)
c read lines from linelist
nlines=1
200 continue
read(10,*,err=210,end=210) wrest(nlines)
nlines=nlines+1
go to 200
210 continue
nlines=nlines-1
write(*,*) "Read ", nlines," wavelengths"
close(10)
nobj=1
300 continue
c loop through objects
read(2,*,err=666,end=666) iobjno
read(2,'(a)',err=666,end=666) sname
call read1dspec(sname,ifoptextract,np,wave,spec,espec,ifer)
if (ifer .ne. 0) then
write(*,*) "Error getting spectrum for ",iobjno
go to 300
end if
do i=1,nlines
end do