Here is my code, and the running result
Code: Select all
import clr ; clr.AddReference("SharpCap.Base") ; from SharpCap.Base.PropertyControls import CommonPropertyIDs;
import time
import os.path
import datetime
SharpCap.SelectedCamera.GetControl(CommonPropertyIDs.Exposure).Value = 10
p = r'C:\Users\owner\Desktop\SharpCap Captures'
for i in range(4):
fn = os.path.join(p, '{i}.fits'.format(i=i))
start = datetime.datetime.now().strftime('%H:%M:%S')
SharpCap.SelectedCamera.CaptureSingleFrameTo(fn)
end = datetime.datetime.now().strftime('%H:%M:%S')
print 'Capture', fn, 'from', start, 'to', end
Code: Select all
Capture C:\Users\owner\Desktop\SharpCap Captures\0.fits from 13:36:36 to 13:36:39
Capture C:\Users\owner\Desktop\SharpCap Captures\1.fits from 13:36:39 to 13:36:40
Capture C:\Users\owner\Desktop\SharpCap Captures\2.fits from 13:36:40 to 13:36:49
Capture C:\Users\owner\Desktop\SharpCap Captures\3.fits from 13:36:49 to 13:36:50
the 2nd one take 1 second, which doesn't make sense.
the 3rd one take about 10 second, which make sense.
the 4th one take 1 second, which doesn't make sense.
Then I take a look at those files, 0.fits and 1.fits are exact the same, 2.fits and 3.fits are the same.
It can be confirmed by looking at the header, the DATE-OBS (System Clock-Frame Grabbed) are the same.
I also tried add a time.sleep(4) in between but doesn't work.
My camera is ASI1600M Pro Cool, my SharpCap is 3.0.4008, I'm running on a Windows 10.
Thanks!