CCDSoft 5
Events and stuff
Controlling
CCDSoft from an
external application like a VB script (or equivalent) is quite trivial.
There are many reasons as to why you would want to do this. And it is
quite simple.
For example. If you have a routine you perform before walking away
from CCDSoft while
imaging this routine can be accomplished with one single button press. This will
guarantee all of the settings are set exactly the way you want BEFORE you
begin imaging. More
often than not changes will be made to certain settings i.e. the initial
focus, telescope alignment, calibrating, and so on.
Frequently it seems that many walk
away from an imaging session and come back only to find that they didn't
save any of the images (ARRG!), they have a small cropped 20 minute
exposure rather than the full image (ARRG!), the wrong bin mode was used, and so
on.
A simple solution is to create custom scripts tailored to your every whim.
The advantage to writing your own custom script is you can use any settings
you like not someone else's and one script can handle a multitude of
operations.
A script can easily connect to the CCD camera, set the temperature,
enable/disable the "autosave" feature, pick the folder where the
images are saved, assign image prefix, disable/enable the save focus images,
enabling/disabling the saving of auto guider images, and on and on.
Because every feature available in
CCDSoft is exposed you
can accomplish anything you can think of!
The following is about as simple and trivial as it gets. This script
will set the state of CCDSoft's "AutoSave" feature. One script enables it
another disables it. Or if you choose you can prompt for the state easily
enough assuming a default value of On or Off accordingly. However,
this will require user intervention! With an input dialog comes
responsibility so there is no way to guarantee the user will pick the
correct state. Of course you can also display the state that has been chosen
as well. I prefer the on and off explicit options below.
Option Explicit
Dim Cam
Dim CCD
Set Cam = CreateObject("CCDSoft.Camera")
Set CCD = CreateObject("CCDSoft.RASSERVERAPP")
'------------------------------------------------------------
'Put/Get AutoSaveOn property
'------------------------------------------------------------
Cam.AutoSaveOn = 1
'End
The above text is saved as "AutosaveOn.VBS".
And of course the following code saved as "AutoSaveOff.VBS",
Option Explicit
Dim Cam
Dim CCD
Set Cam = CreateObject("CCDSoft.Camera")
Set CCD = CreateObject("CCDSoft.RASSERVERAPP")
CCD.SetVisible(1)
'------------------------------------------------------------
'Put/Get AutoSaveOn property
'------------------------------------------------------------
Cam.AutoSaveOn = 0
'End
Example two
Let's say you want to assign the image prefix. Easy enough!
Option Explicit
Dim Cam
Dim CCD
Dim Prefix
Set Cam = CreateObject("CCDSoft.Camera")
Set CCD = CreateObject("CCDSoft.RASSERVERAPP")
CCD.SetVisible(1)
Prefix = InputBox("Enter AutoSave Prefix ?", "AutoSave Prefix", "")
Cam.AutosavePrefix = Prefix
Events employed in CCDSoft are incredibly powerful. Although not as trivial as the
above simple scripting examples, by using
EVENTS
CCDSoft can accomplish custom tasks that were never even considered or are
simply not currently found in the software. And, with the inclusion of
Events in CCDSoft Orchestrate too has new life! Why? Because tasks that
Orchestrate lacks can be taken care of
as an Event in CCDSoft. Example automatic focus adjustment using
@Focus.
Example Event 1. An EVENT can query a weather instrument and stamp the wind speed,
barometric pressure, average wind speed, and temperature conveniently in
the FITS header.
Example Event 2. Computing the Air Mass based on
the telescope's position (altitude)
during the middle of the exposure and save it conveniently in the FITS
header conforming to the FITS standard. Great for photometry work!
Example Event 3. Shut down the entire observatory and all
other SB applications if
the wind speed becomes unfavorable.
Example 4. Take the older venerable (still
great CCD camera IMHO) SBIG
ST-6 CCD camera images and re-sample them
to be a square aspect ratio on the fly. A must for auto-mapping with the ST-6
CCD camera.
Example 5. Events can warn the user when they have
the sub frame on BEFORE taking a longer exposure. See
here for details. Software Bisque
offers this event for download. What about warning me when
Autosave is not enabled? Or Warn me when I have not selected the 1 by 1 no
binning
mode?
Yep no problem.
Following are third party links which offer either camera event plug-ins or
scripted operation or both.
The following are by no means endorsements for any products. However,
they show what can be done using CCDSoft's powerful features!
Note this is not an endorsement but simply an example of what
others have done and what they have to offer along these lines.
Do you have a link?
Let us know and it can be posted
here!
Events have given new life to
Orchestrate scripting software (indirectly) too. When
using Orchestrate to control CCDSoft events can occur that get around
limitations imposed by
Orchestrates' current command set. What could be better?
Well, wouldn't it be nice if
Orchestrate could also call an external script on its' own too.
The CCDSoft
help file lists all methods and properties available. Also
provided are examples on how to use them. Use the link Scripted
Operation to access them.
A more complete list of EVENTS is also
found in the above CCDSoft Help File.
|