#This file contains the list of the scans (related to the telescope positioning). Various fields are needed and 
#they depend on the type of scan required. Any scan must be enumerated with a unique identifier. Fields must be
#separated by tabs.
# horizontal coordinates has just one possible format: +/-ddd.dddd
# right ascension permits three formats: ddd.dddd'd' or hh:mm:ss.sss'h' or dd:mm:ss.sss
# all other, included all type of offsets and spans permits two possible formats, sexagesimal or decimal: dd:mm:ss.sss or ddd.dddd'd' 
# all coordinates apart the offsets are range checked. 
# type At the moment this could be OTF, SIDEREAL, MOON and the special one OTFC
# any scan could be completed with user offsets, the offsets can be given providing the frame (-EQOFF,-HOROFF,-GALOFF) and two values that are
# the longitude and latitude in degrees. The longitude will be corrected for the cosine of latitude. Giving an offset in a frame will cause to offsets in other frames to be cleared.
# If the offset are not given it is intended to be zero.
#for OTF scans: 
#a) startLon (right ascension if EQ, azimuth if HOR, galactic longitude if GAL)
#b) targetName (any string is valid)
#b) startLat  (declination if frame is EQ, elevation if frame is HOR, galactic latitude if frame is GAL)
#c) stopLon 
#d) stopLat 
#e) frame (EQ,HOR,GAL)
#f) subscanframe (EQ,HOR,GAL)
#g) geomtry (LON,LAT,GC) 
#h) description (SS,CEN)
#i) direction (INC, DEC)
#l) duration (seconds)

#for OTFC scans (performs an OTF using a given center of the scan):
#a) centerScan gives the identifier of the scan that has to be adopted in order to compute the center of the scan. Any offset given in the centerScan will be ignored. 
#   The identifier must exist in the file and must be already defined
#b)	span span length of the scan
#c) frame (EQ, GAL) the center if taken from the center computer using the equatorial or galactic frame. Horizontal is not allowed.
#d) subscanFrame (EQ,GAL, HOR) the frame along which the scan is done
#e) geometry (LAT, LON)	constant latitude or constant longitude OTF. GC not allowed.
#e) direction (INC,DEC)
#f) duration duration of the scan in seconds 

#for SIDEREAL scans:
#a) sourceName
#b) frame (EQ,HOR,GAL)
#c) lon (degrees) (right ascension if EQ, azimuth if HOR, galactic longitude if GAL)
#d) lat (degrees) (declination if EQ, elevation if HOR, galactic latitude if GAL)
#e) [epoch] required only if frame is EQ. it could be 1950.0, 2000.0 or -1(coordinate is apparent)
#f) [pmRA] proper motion in right ascension in mas/year (milli seconds of arc year (tropical) if FK4 is used, per 
#	       year (julian) if Fk5 is used). dRA/dt*cos(DEC) is assumed. Not required.
#g) [pmDec] proper motion in declination in mas/year (milli seconds of arc per year (tropical) if FK4 is used, 
#    per year (julian) if Fk5 is used). Not required.
#h) [plx] parallax in milli arcseconds. Not required.
#i) [rvel] radial velocity in Km/sec ( positive value means the source is moving away). Not required.If given the frame is supposed to be BARY and the
#    definition is OPTICAL. It could be overriden by the switch "-RVEL"

#for SKYDIP scans: allows to perform a scan along elevation at a fixed azimuth allowing the calibration of the airmass, the scan will be done at 
# decreasing elevation positions
#a) directionScan gives the identifier of the scan that has to be adopted to compute the azimuth (direction) of the scan
#b) elevationLowerLimit 
#c) elevationUpperLimit   
#e) duration  duration of the scan in seconds 

#for PEAKER scans: allows to perform a scan along a given axis of the minor servo system. The scan will be executed on 
# the given source
#a) targetScan, gives the identifier of the target source(i.d. a defined SIDEREAL o MOON scan).  Any offset given in the centerScan will be ignored. 
#   The identifier must exist in the file and must be already defined 
#b) axis_identifier, identifier of the axis to be moved for the scan, it could be X,Y,Z or THETAY or SRP_TY,SRP_RY (for SRT) 
#c) range, span of the scan or total movment required by the scan along the given axis. The unit can vary according the axis,
#   for example if the axis is rotation the unit is arcseconds, mm in case of translation
#d) duration, duration of the scan in seconds 


#ID type startLon startLat stopLon stopLat frame subscanframe geometry description direction duration
1	OTF	mySource	165.7530324d	67.750017d	00:00:50	00:00:00	EQ	HOR	LAT	CEN	INC	60.0	-EQOFFS	0.455d	0.0d
2	OTF	otf	167.0	67.0	2.0d	0.0d	HOR	HOR	LAT	CEN	DEC	60.0

#ID type sourceName frame lon lat [epoch] [pmRa] [pmDec] [plx] [rvel]
#in that case the internal catalog is used.
3	SIDEREAL	epsi	-HOROFFS	0.245d	0.0d	-RVEL	33.12	BARY	OP
4	SIDEREAL	mySource	GAL	200.323232d	45.12211122d	-RVEL	112.223	LSRK	Z
6	SIDEREAL	Second	EQ	123.4343434d	12.43433343d	1950.0	100.1	67.4	12.4	13.1	-RVEL	112.223	LSRK	RD
8	SIDEREAL	epsi	-RVEL	12.223	LSRD	OP

#ID type
5	MOON	-EQOFFS	00:00:15.0	00:01:30.00

#ID	type	centerScan	span	frame	subscanFrame geometry	direction	duration
9	OTFC	3	2.0d	EQ	HOR	LAT	INC	15.0
10	OTFC	5	5.0d	EQ	HOR	LON	INC	30.0	-EQOFFS	0.5d	0.5d

11	SIDEREAL	3c123
12	SKYDIP	11	15.0d	90.0d	300.0	-HOROFFS	0.5d	0.0d

13	SIDEREAL	dr21
14	SKYDIP	13	15.0d	90.0d	300.0

#ID	type	center	axis	span	duration
15	PEAKER	8	Y	30	60.0
# do a scan on target 8, moving the Y axis for 30 mm in 1 minute 
16	PEAKER	3	X	7200	30.0
# do a scan on target 6, rotating the Y axis for 2 degrees in 30 seconds
