Automated pictures using scripting gives different results than manual pictures

Scripts and programs to automate Astroart
Post Reply
Forum_2016
Posts: 219
Joined: 08 Dec 2018, 13:30

Automated pictures using scripting gives different results than manual pictures

Post by Forum_2016 »

I am taking a series of pictures at different exposures. The code can be found below.

The images I am obtaining are wildly different than the one taken manually. They are incredibly noisy and are not representative of the image being taken.

dir$ = "C:\Users\Desktop"

for timebase = 1 to 10
for time = 1 to 10
for i = 1 to 4
exposure$ = time*exp(-1*timebase)
Print "Taking a picture with an exposure of"+exposure$
f$ =
Camera.Start(exposure$)
Camera.Wait
Image.Rename(f$ + "_Image.fit")
Image.Save(dir$ + f$ + "_" + exposure$ + ".FIT")
next i
next time
next timebase

END

Any idea as to why this may be the case?

Forum_2016
Posts: 219
Joined: 08 Dec 2018, 13:30

Re: Automated pictures using scripting gives different results than manual pictures

Post by Forum_2016 »

Are you sure your formula is okay?
If I put it in Google calculator I get 0.00045399929 s exposure (assuming time and timebase are 10)
And what are you trying to achieve

Forum_2016
Posts: 219
Joined: 08 Dec 2018, 13:30

Re: Automated pictures using scripting gives different results than manual pictures

Post by Forum_2016 »

The script has several bugs, here is an improved version:

Code: Select all

dir$ = "C:\Temp"

for timeExp = 1 to 10
 for timeMul = 1 to 10
  for i = 1 to 4
   expo = timeMul * Exp(-1*timeExp)
   Print "Taking a picture with an exposure of "; expo
   Camera.Start(expo)
   Camera.Wait
   fileName$ = Str(i) + "_" + Str(expo) + ".fit"
   Image.Save(dir$ + "\" + fileName$)
  next i
 next timeMul
next timeExp
I suggest to close the image after saving.

Post Reply