-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathqualify.class
63 lines (52 loc) · 2.13 KB
/
qualify.class
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
! script for quality control.
! Usage:
! @ qualify redshift line
!---------------------------------------------------------------------
!
! Details:
! molecule can select HCN or HCO+ for the rest frequencies
! reference file is the name of the .fits file, but you need to lmv an output class format first
! if there is no reference .fits file, then please set it to none, then the code automatically
! recognises it and set window -100 100 accordingly.
! velocity_resolution_for_qualify is the velocity resolution for the baseline qualification
! weak_or_not: if .TRUE. then weak line, then do not set window using the CO data during the qualification
! but still set CO window in the last baseline subtraction step
! if .False. then strong line, then set window using the CO data both in qualification
! and in the last baseline subtraction step.
! ----------------------------------------------------------------------
! Important Note:
! ----------------------------------------------------------------------
! two folders are needed for the qualification : tagged, quality
! tagged will contain all the tagged (qualified) data.
! quality will contain all the plots of the qualification and the quality data of each spectrum.
!-----------------------------------------------------------------------
$ls *.jcmt > file.list
define integer nl
define double redshift restfreq HCNft HCOPft
define char*50 line
let redshift &1
let line &2
let HCNft 354505.476 ! MHz
let HCOPft 356734.288 ! MHz
if line.eq."HCN" then
let restfreq HCNft
else if line.eq."HCOP" then
let restfreq HCOPft
endif
compute nl lines file.list
define char*50 jcmtfile[nl]
accept * jcmtfile /column file.list
for k 1 to nl
file update 'jcmtfile[k]'
find
for i 1 to found
get idx%num[i]
modify freq 'restfreq/(1+redshift)'
update
next
next
compute nl lines file.list
for k 1 to nl
@ run 'line' 'redshift' 'jcmtfile[k]' none 20 .TRUE.
next
sic dele file.list