Scripts - Why would you want to use scripts in Nebulosity? There are many reasons. Sometimes when you image you may forget to set something like gain and offset before capture. You can also set a delay for imaging so you can walk away and let things settle. You can preset all this even before you go out to image.
So, how do you use them? Simple, just enter the commands line by line. Remember that the times are in milliseconds (MS) so you need to enter times in ms. If you wanted to take a 5 minute shot then you would enter 300000ms instead of 300sec. Here’s an example of a script.
SetDirectory c:\documents and Settings\my documents\image processing\raw
SetName M51
SetColorFormat 1
SetAcqMode 0
SetGain 40
setoffset 90
Delay 15000
SetDuration 300000
Capture 1
The script commands are in bold. You just type or copy and past them in the scripting editor . I have programmed Neb to save the files on drive c then, documents and Settings folder\my documents folder\image processing folder\ raw folder.
The name is set to M51.
Color format is 1 (You will find the code settings in the Neb doc within Neb itself under Scripting – command list.)
Acquisition mode is 0.
Gain is set to 40.
Offset is 90. (The auto offset feature is not used when using scripting commands)
Delay is set for 15000ms. (15sec)
Duration is 300000ms (300sec or 5min).
Capture is 1. It’s going to take 1 shot.
Full list of Commands You can write scripts in any text editor (save in “ASCII text” format) or in Nebulosity’s built-in editor. Simply pull-down Create / Edit Script from the File menu. Here, you can start typing commands or load an existing script. When done, you’ll likely want to save your script (Save button) and then press Done. Standard Windows shortcuts for copy (Ctrl-C), cut (Ctrl-X), and Paste (Ctrl-V) work within the editor window. When you’re ready to execute the script, simply pull down Run Script from the File menu. Nebulosity will then first verify that it’s a valid script. Then, it will go through line by line, executing each command until it reaches the end of the file. As it does so, the Status bar will keep you apprised of what Nebulosity is currently doing. Pressing the Abort button will cancel the script at any time.
Note: Commands act just as if you were to do them in the GUI. So, if you’ve already set something in the GUI or if it is the default, there is no need to enter it in the script. For example, since the default is to have the CCD amplifier control enabled (so that the amp is off during exposure), there is no need to write “SetAmplifierControl 1” in every script you write.
Tip: Script files can contain extra spaces or blank lines if you want to make them look cleaner when writing them. Nebulosity will simply skip any extra spaces or lines it finds. Tip: If you want to place a “comment” to yourself in a script, simply put a “#” character at the beginning of the line. Nebulosity will ignore that whole line. For example:
# Script used to capture data on 10/22/05 SetName M51
...
Tip: You can execute scripts at startup by passing the script name as a command -line argument. For example “nebulosity script.neb” will automatically execute script.neb
Full Command List
The following is the list of commands recognized by Nebulosity. They are presented here capitalized to help show you the meaning of the command, but Nebulosity ignores the case of all commands. So, “SetName” is the same as “setname” and “SeTNAme”.
Each command must be placed on a separate line and each line must have a command and a parameter with at least one space between the command and the parameter. When the list shows the parameter to be N, it means a number should be provided as the parameter. When the list shows the parameter to be S, it means a string (aka text) should be provided as the parameter.
Capture Setup Commands These commands mirror the controls present in the Control Panel and several of the settings available in the Preferences menu.
SetName S - Sets the base filename to be S
SetDirectory S - Sets the capture directory to be S
SetGain N - Sets the camera gain to be N
SetOffset N - Sets the camera offset to be N
SetDuration N - Sets the exposure duration to N milliseconds
SetTimelapse N - Sets the time lapse to be N milliseconds
SetColorFormat N - Sets the color file format used when (and if) full-color images are written. 0: RGB FITS in ImagesPlus format. 1: RGB FITS in Maxim / AstroArt format. 2: 3 separate FITS files.
SetAcqMode N - Sets the color acquisition mode. 0: RAW or BW images. 1: RGB Optimize speed. 2: RGB Optimize quality.
Control Commands These commands control the capturing process itself and let you interact with the user.
Capture N - Captures a series with N images according to the current settings.
PromptOK S - Displays S on the screen and prompts the user to hit OK or Cancel. If OK is hit, the script continues. If Cancel is hit, the script is stopped.
Delay N - Pause execution for N milliseconds
SetBLevel N and SetWLevel N - Sets the B and W slider levels to N. If N = -1, auto-scaling is turned on.
Connect N - Connect to camera N
No camera = 1
Simulator = 2
Orion StarShoot = 3
SAC10 = 4
LE Webcam (LXUSB) = 5
LE webcam (parallel) = 6
Artemis 285 (Atik 16 HR) = 7
Artemis 285C (Atik 16 HRC) = 8
Artemis 429 (Atik 16) = 9
Artemis 429C (Atik 16C) = 10
Canon DIGIC II DSLRs = 11
Reserved = 12
Meade DSI= 13
Fishcamp Starfish = 14
Starlight Xpress SXV = 15
SBIG 16
CCD Labs Q8-HR = 17
The enumeration of the cameras on the Macintosh version is somewhat different.
No Camera = 0
Simulator = 1
Canon DSLR = 2
Fishcamp Starfish = 3
Meade DSI = 4
SBIG = 5
Starlight Xpress = 6
Listen N - Enable (1) or disable (0) listening to commands from the clipboard
Exit N - Wait N milliseconds and then exit the program
Advanced Camera Control Commands
These commands have the same function as the Advanced camera dialog box, allowing you to override the current settings shown in the dialog. See Section 6 (Camera Advanced Panel) for more details on each. If the camera is not capable of the command given in the script, the command is ignored.
SetAmpControl N - 1: Amplifier control is enabled and the CCD amp is off during exposures. 0: Amplifier control is disabled and the CCD amp is on during exposures.
SetHighSpeed N - 1: Enable high speed readout mode. 0: Disable high speed readout mode.
SetBinning N - 1: Enable binning. 0: Disable binning.
SetOversample N - 1: Enable CCD oversampling. 0: Disable CCD oversampling.
SetDoubleRead N - 1: Enable double-read mode. 0: Disable double-read mode