-
Notifications
You must be signed in to change notification settings - Fork 0
/
nispesyerr.sh
36 lines (30 loc) · 858 Bytes
/
nispesyerr.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
#!/bin/bash
# Define the path to the input file
indir="/home/sathvik/nicer/PSR_B0531+21/1013010115/xti/event_cl"
infile="$indir/myspectrum.pha"
# Define the syserrfile parameter
syserrfile="CALDB"
# Run the niphasyserr command
niphasyserr infile="$infile" syserrfile="$syserrfile"
# Check the status of the niphasyserr command
if [ $? -eq 0 ]; then
echo "niphasyserr executed successfully for $infile with syserrfile $syserrfile."
else
echo "niphasyserr failed. Please check the input file and syserrfile."
exit 1
fi
# Run fplot to plot the graph
fplot "$infile" <<EOF
CHANNEL
SYS_ERR
-
/xs
scr white
r y 0 0.04
EOF
# Check the status of the fplot command
if [ $? -eq 0 ]; then
echo "Systematic error plot generated successfully for $infile."
else
echo "Plot generation failed. Please check the input file and fplot parameters."
fi