-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcommands.txt
executable file
·88 lines (56 loc) · 3.31 KB
/
commands.txt
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Data reduction
# 1) get all series_* files
# 2) check xz files with xz -t series_*.tar.xz for corrupt files.
# put filenames in corrupt_files.txt
# 3) rename all files to series_12345_12345.tar.xz
# 4) untar all series files for NGC6334 from 14597 - 14955
# use script:
# bash untar.sh STARTING_scanID ENDING_scanID
for file in series_14[5-9][0-9][0-9]_*;
do [[ "$file" =~ series_14([0-9]{3})_.* && ${BASH_REMATCH[1]}
-ge 596 && ${BASH_REMATCH[1]} -le 955 && -e "$file" ]] &&
tar xf "$file";done
# to untar specific files (say udp_* files)
tar xf series_13772_13775.tar.xz --wildcards --no-anchored 'udp*'
# Take the newly formed udp_xxxx.dat files and make a udp.txt file
for f in udp*;do ../gusto-corr/udp-file $f >> udp.txt;done
# if adding new UDP data to the DB, delete the previous incomplete set to avoid duplicates
use gustoDBlp
DROP MEASUREMENT udpPointing
python3 writeRADEC.py udp.txt
# PS map data reduction script
for i in `seq 6589 4 6782`;do python3 ../coadd_glob.py "ACS3_SRC_0$i*DEV4*" "ACS3_REF_0`echo $i-1|bc`*DEV4*";done
# make a movie
# make and use a palette to avoid coloring artifacts
ffmpeg -r 2 -i NGC3603-%02d.png -i palette.png -lavfi paletteuse test.gif
ffmpeg -r 2 -f image2 -s 640x480 -i NGC3603-%02d.png -vcodec libx264 -crf 25 -pix_fmt yuv420p test.mp4
# make a 7x7 plot (uncomment thumbnails in coadd_glob
# tile 1x7 then tile 7x1 to rotate tiles 90 degrees
montage NGC3603-*.png -tile 1x7 -trim -mode Concatenate miff:- | montage - -geometry +0+0 -tile 7x1 result.png
# remote shell to spectrometer
ssh -oKexAlgorithms=diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-dss root@192.168.1.201
# kill Mac OS tftpd and start tftpd-hpa
~/bin/tftpdctl.sh stop
sudo /opt/local/sbin/tftpd -L -c -s /private/tftpboot/
fswatch -or ./out.spec |xargs -n1 -I{} ./plot.sh
HEADER MESSAGE
=================== ===================
Byte 0 1 2 3 4 0 1 2 3 4
#ACS power CMD LEN DEV ON
s.send(b'\x0e\x00\x00\x00\x88\x05\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00')
#Setup CMD LEN DEV LAG FTP
s.send(b'\x0e\x00\x00\x00\x81\x05\x00\x00\x00\x00\x8f\x03\x00\x00\x00\x00\x00\x00')
#Integration time CMD LEN DEV (--32bit int--)
s.send(b'\x0e\x00\x00\x00\x82\x05\x00\x00\x00\x00\x40\x42\x0f\x00\x00\x00\x00\x00')
#set output path CMD LEN 1 9 2 . 1 6 8 . 1 . 2 0
s.send(b'\x17\x00\x00\x00\x91\x0e\x00\x00\x00\x31\x39\x32\x2e\x31\x36\x38\x2e\x31\x2e\x32\x30\x00\x00\x00\x00\x00\x00')
#set output filename CMD LEN f i l e n a m e
s.send(b'\x13\x00\x00\x00\x90\x0a\x00\x00\x00\x66\x69\x6c\x65\x6e\x61\x6d\x65\x00\x00\x00\x00\x00\x00')
#AUTO CAL CMD LEN DEV NUM
s.send(b'\x0e\x00\x00\x00\x87\x05\x00\x00\x00\x01\x14\x00\x00\x00\x00\x00\x00\x00')
#TRIGGER CMD LEN DEV
s.send(b'\x0e\x00\x00\x00\x83\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
#READ OUTPUT CMD LEN DEV
s.send(b'\x0e\x00\x00\x00\x06\x05\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00')
#REBOOT CMD LEN
s.send(b'\x0e\x00\x00\x00\xa1\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')