-
Notifications
You must be signed in to change notification settings - Fork 0
/
match_master.sh
38 lines (36 loc) · 967 Bytes
/
match_master.sh
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
#!/usr/bin/env bash
set -euo pipefail
# $1 should be infield catalogue
# $2 should be continuum catalogue
# $3 should be moment2 catalogue
# $4 should be output catalogue
# $5 RA column of master catalogue
# $6 DEC column of master catalogue
topcat -stilts tmatch2 \
in1=$1 \
in2=$2 \
icmd2='keepcols "ra_corr dec_corr a b pa uuid elongation peak_flux local_rms snr snr_scint dS2 err_dS2 peak_flux2 local_rms2"' \
matcher=SkyEllipse \
params=60 \
values1="${5:-RA_tgss} ${6:-DEC_tgss} 0 0 0" \
values2="ra_corr dec_corr a b pa" \
join=all1 \
suffix1="" \
suffix2="" \
find=best \
out=tmp.vot
topcat -stilts tmatch2 \
in1=tmp.vot \
in2=$3 \
icmd2='keepcols "ra_corr dec_corr dS err_dS a b pa uuid snr"' \
matcher=SkyEllipse \
params=60 \
values1="${5:-RA_tgss} ${6:-DEC_tgss} 0 0 0" \
values2="ra_corr dec_corr a b pa" \
join=all1 \
suffix1="" \
suffix2="_moment2" \
find=best \
fixcols='all' \
out=$4
rm tmp.vot