source: trunk/DataCheck/Tools/get_visibility.sh@ 19846

Last change on this file since 19846 was 19740, checked in by Daniela Dorner, 5 years ago
added needed command lines for scheduler
  • Property svn:executable set to *
File size: 1.4 KB
Line 
1#!/bin/bash
2
3export LC_ALL="en_US.UTF-8"
4
5ra=$1
6dec=$2
7name=$3
8
9date=`date +%d-%m-%Y`
10
11echo $date": "$name
12echo "RA: "$ra" deg"
13echo "Dec: "$dec" deg"
14
15rah=`echo " $ra / 360.0 * 24.0 " | bc -l `
16echo "RA: "$rah" h"
17
18rahh=`echo $rah | cut -d. -f1`
19#echo "RA: "$rahh
20
21ram=`echo " ( $rah - $rahh )*60 " | bc -l`
22ramm=`echo $ram | cut -d. -f1`
23
24ras=`echo " ( $ram - $ramm ) * 60 " | bc -l`
25rass=`echo $ras | cut -d. -f1`
26rasr=`printf "%0.2f" $ras `
27
28echo "RA: "$rahh":"$ramm":"$rasr
29
30decdd=`echo $dec | cut -d. -f1`
31decm=`echo " ( $dec - $decdd )*60 " | bc -l`
32decmm=`echo $decm | cut -d. -f1`
33decs=`echo " ( $decm - $decmm )*60 " | bc -l`
34decsr=`printf "%0.2f" $decs `
35
36echo "Dec: "$decdd":"$decmm":"$decsr
37
38#if [ "$short"=="yes" ]
39#then
40# exit
41#fi
42
43link="http://tevcat.uchicago.edu/visplot.cgi?tname="$name"&ra="$rahh"%20"$ramm"%20"$rasr"&dec="$decdd"%20"$decmm"%20"$decsr"&lat=28.76&date="$date"&lon=-17.88&mode=1"
44
45firefox -new-window $link
46
47sleep 3
48
49winnum=`xwininfo -tree -root | grep TeVCat | grep -E -o '\ [0-9a-z]{9}\ '`
50screenshot=$HOME/Pictures/vis$name-auto.png
51import -window $winnum $screenshot
52echo "find a screenshot of the visibility at "$screenshot
53
54echo "to add the source: "
55echo " 1) in dimtrl: SCHEDULER/ADD_SOURCE $rah $dec $name"
56echo " 2) update schedule "
57echo " 3) in dimctrl: DRIVE_CONTROL/RELOAD_SOURCES"
58echo " or if data taking already started: "
59echo " in smartfact: controls -> interrupt -> reload-sources "
60
61
Note: See TracBrowser for help on using the repository browser.