PyTSX: Imaging automation for TheSkyX using Python

TheSky X by Software Bisque is capable to control the camera, autoguider, focuser, and mount. And the program also accepts commands via the TCP socket. There arises the possibility to fully automate the imaging equipment with a single click!

Hence, I developed the automation program based on python 2.7. Python is used because it is portable and cross-platform. In windows, I recommend WinPython 2.7 for Windows.

This program will perform

1) finding home

2) slewing to a target

3) autofocus

4) autoguiding

5) imaging with various combinations of filter slots, bins, and exposure time

6) dithering between frames

7) flipping the mount if crossing the meridian

8) parking mount

9) sending notification to your mobile device after completion via Pushover App. Need to set Pushover key/token in the program:

    # Key/Token for Pushover notification (For more information, visit https://pushover.net/)

    PUSHOVER_USER="YOUR_USER_KEY"

    PUSHOVER_APP="YOUR_APP_TOKEN"

To run this program, simply type this single line in the command prompt:

python PyTSX.py RA=15.5 DEC=26.5 slot=0,4 bin=1,1 exp=300,300 n_frame=3,4 af_count=3 af_slot=1 af_bin=1 ag_exp=5 ag_delay=30 end_time=5:30

RA       = RA of the target object (hr : floating point).

DEC      = DEC of the target object (degree : floating point).

slot     = filter slots (integer). The first slot is 0. Several filter slots can be set. Use commas without whitespace to separate values.

bin      = bin option for each filter slot (integer). Use commas without whitespace to separate values.

exp      = exposure time for each filter slot (second : integer).  Use commas without whitespace to separate values.

n_frame  = number of frames for each filter slot (integer). Use commas without whitespace to separate values.

af_count = number of frames between autofocus routines (integer).

af_slot  = filter slot for autofocus (integer). The first slot is 0.

af_bin   = bin option for autofocus (integer).

ag_exp   = exposure time for the autoguider (second : integer).

ag_delay = delay after starting autoguiding (second : integer). This allows the guiding error to settle.

end_time = Time to end the program (hh:mm, 24hr format). The program will be terminated and the mount will be parked when passing the time. Remove this argument to ignore this limit.

For imaging various targets, simply put a series of commands in a batch file.
Prerequisites:
1) The mount is T-point-enabled
2) AtFocus2 is calibrated
3) Autoguider is calibrated
4) Auto dark or full calibration is enabled in autoguider. This will avoid picking up noise pixels as a guide star.
5) Camera temperature is set to the target temp.
The program is available here:
https://drive.google.com/drive/folders/0B3RSuv91xWggNmZuZnFzUi14Qzg?usp=sharing

Feel free to modify the code to suit your need. Let me know if you have any comment. Thank you.

Anat Ruangrassamee, Ph.D.
Bangkok, Thailand

Comments

  1. I have an opportunity to use this script with my TSX 10.5 with MyT mount. It works very well and let me leave the computer to do another activity. Do you have a plan to make it to support dual imaging scopes with dithering supported? I'm looking for that to utilize my imaging in a night.

    Thank you very much for your excellent scripts and your effort to do that open source.

    Pornchai POP

    ReplyDelete
    Replies
    1. Thanks for reporting me. Let me review the workflow when using two imaging rigs simultaneously. Hope that I can come up with something useful for your use case.

      Delete

Post a Comment

Popular posts from this blog

PnP Focus: The simplest-ever Arduino focus controller

iAstroHub: IoT for Astrophotography