Automatic research script
Automatic research script
Hi,
I want to be able to enter an object list for automatic image control:
Object name, RA.Dec, no of filter"X" exposures, "X" filter exposure time,no of filter "Y" exposures,"Y" filter exposure time,no of filter "Z" exposures, "Z" filter exposure time,...etc.
Can the Telescope.List function be modified?
Thanks
Erik
I want to be able to enter an object list for automatic image control:
Object name, RA.Dec, no of filter"X" exposures, "X" filter exposure time,no of filter "Y" exposures,"Y" filter exposure time,no of filter "Z" exposures, "Z" filter exposure time,...etc.
Can the Telescope.List function be modified?
Thanks
Erik
Re: Automatic research script
Hi,
this task is done by other users, but they don't use the Telescope List. You need to create your own text database, then read that file in your script and use the data. If you write more information about your research I can give a better suggestion about the procedure and the script.
this task is done by other users, but they don't use the Telescope List. You need to create your own text database, then read that file in your script and use the data. If you write more information about your research I can give a better suggestion about the procedure and the script.
Re: Automatic research script
Thanks Fabio
Object name, RA.Dec,filter "X", no of filter"X" exposures, "X" filter exposure time,filter"Y",no of filter "Y" exposures,"Y" filter exposure time,filter"Z",no of filter "Z" exposures, "Z" filter exposure time,...etc.
Here is example of my list
"V2301 Oph" 18 00 35.5 +08 10 13.9,V,4,30,I,4,15,B,6,45
"EP Dra" 19 07 06.2 +69 08 44.0,V,4,30,I,4,30,B,5,60
"PGIR19brv" 21 09 25.53 +48 10 52.2,V,2,10,I,2,15,B,6,30
Where V,I and B are filter wheel positions
I am not sure how to read this text database in my script.
Thanks
Erik
Object name, RA.Dec,filter "X", no of filter"X" exposures, "X" filter exposure time,filter"Y",no of filter "Y" exposures,"Y" filter exposure time,filter"Z",no of filter "Z" exposures, "Z" filter exposure time,...etc.
Here is example of my list
"V2301 Oph" 18 00 35.5 +08 10 13.9,V,4,30,I,4,15,B,6,45
"EP Dra" 19 07 06.2 +69 08 44.0,V,4,30,I,4,30,B,5,60
"PGIR19brv" 21 09 25.53 +48 10 52.2,V,2,10,I,2,15,B,6,30
Where V,I and B are filter wheel positions
I am not sure how to read this text database in my script.
Thanks
Erik
Re: Automatic research script
I suggest to separate fields by spaces, it's much easier. For example:
then if you want to have a free format (any number of chars and spaces) here is a test script:
If instead you prefer a fixed text format, you can use the Mid function:
In any case be careful about the " -00 " declination.
To open the file use the command OpenText(filename).
Code: Select all
Name Ra Dec V I B
V2301 Oph 18 00 35.5 +08 10 13.9 4 30 4 15 6 45
EP Dra 19 07 06.2 +69 08 44.0 4 30 4 30 5 60
Code: Select all
s = "V2301 Oph 18 00 35.5 +08 10 13.9 4 30 4 15 6 45"
print s
print Parse(s, 4)
print Parse(s, 5)
print Parse(s, 6)
decl = SexagToDecim(Parse(s,4) , Parse(s,5) , Parse(s,6))
print decl
print DecToString(decl)
function Parse(line, v)
c1 = 13
c2 = Len(line)
res = ""
for i = c1 to c2
if line[i] = " " then continue
if line[i-1] = " " then v = v-1
if v = 0 then res = res + line[i]
next i
resNum = Val(res)
if res <> "" and resNum = 0 and res[1] = "-" then resNum = -1.0E-12
return resNum
end function
function SexagToDecim(d,m,s)
decim = Abs(d) + m/60 + s/3600
if d < 0 then decim = -decim
return decim
end function
If instead you prefer a fixed text format, you can use the Mid function:
Code: Select all
123456789012345678901234567890123456789012345678901234567890
Name Ra Dec V I B
V2301 Oph 18 00 35.5 +08 10 13.9 4 30 4 15 6 45
EP Dra 19 07 06.2 +69 08 44.0 4 30 4 30 5 60
RaH = Mid(s, 13, 2)
RaM = Mid(s, 16, 2)
etc..
To open the file use the command OpenText(filename).
Re: Automatic research script
Thanks Fabio for suggestions.
Erik
Erik