-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmove_foc_shoot.js
42 lines (34 loc) · 1.45 KB
/
move_foc_shoot.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* Java Script */
//
// Move through the focus range taking pictures as you go.
// There is some INI variable voodoo required to name the files appropriatey.
//
// Written for Andrew Lindsay
//
// Ken Sturrock
// 30May2020
//Make a note of the old autosave formula
oldASFormula = ccdsoftCamera.PropStr("m_csCustomFileNameLight")
// Move the focuser from where we are to the maximum limit.
ccdsoftCamera.focMoveOut(ccdsoftCamera.focMaximumLimit - ccdsoftCamera.focPosition)
while (ccdsoftCamera.focPosition > ccdsoftCamera.focMinimumLimit)
//
// Do a loop until we hit the minimum position
//
{
RunJavaScriptOutput.writeLine ("Current Position: " + ccdsoftCamera.focPosition)
ccdsoftCamera.Asynchronous = false; // We are going to wait for it
ccdsoftCamera.ExposureTime = 1; // Set the exposure time
ccdsoftCamera.AutoSaveOn = true; // Keep the image
ccdsoftCamera.ImageReduction = 0; // Don't do autodark
ccdsoftCamera.Frame = 1; // It's a light frame
ccdsoftCamera.Subframe = false; // Not a subframe
ccdsoftCamera.Delay = 1; // Set delay to one second
//Set the autosave name to show the filter position
ccdsoftCamera.setPropStr("m_csCustomFileNameLight", "_" + ccdsoftCamera.focPosition + "_")
ccdsoftCamera.TakeImage();
// Adjust this to the step size that you want
ccdsoftCamera.focMoveIn(1000);
}
//Restore the old autosave formula.
ccdsoftCamera.setPropStr("m_csCustomFileNameLight", oldASFormula)