Printing the value in the CCD simulator and 'V' in aperture photometry tool

Scripts and programs to automate Astroart
Post Reply
hilays79
Posts: 3
Joined: 09 Dec 2019, 11:20

Printing the value in the CCD simulator and 'V' in aperture photometry tool

Post by hilays79 » 09 Dec 2019, 11:40

Hi. I'm writing a program for automation of maximising the counts while the CCD moves, for that I need to to input two numbers in a programming language (python), 'V' at the bottom of aperture photometry tool image, and Value at the bottom of the picture (counts of a pixel in the CCD tab). I can't seem to find a script which does it. For e.g. in the image I have attached I need the V=112401 and Value=21639 as printed by Astroart. Can help me with a script that does it?
Attachments
int.png

fabdev
Posts: 503
Joined: 03 Dec 2018, 21:43

Re: Printing the value in the CCD simulator and 'V' in aperture photometry tool

Post by fabdev » 09 Dec 2019, 12:10

Hi, the commands would be: Image.GetPixel(x,y) and Image.Stars.ADU(1) (after you have selected the star) but they have been added in Astroart 6, so in Astroart 4 the only way to do that is with a Plugin.
A plugin for Astroart 4 can be developed with the SDK 4.0 available at: http://www.msb-astroart.com/plug_en.htm (second link: AA_SDK4.zip)

hilays79
Posts: 3
Joined: 09 Dec 2019, 11:20

Re: Printing the value in the CCD simulator and 'V' in aperture photometry tool

Post by hilays79 » 10 Dec 2019, 08:57

Thanks Fabdev. The command Image.Stars.ADU(1) doesn't seem to perform the task desired by me. I used Tools->Aperture Photometry to open the second window. The command just gave me 0 counts as output instead of the desired value V.
Any help would be greatly appreciated.

fabdev
Posts: 503
Joined: 03 Dec 2018, 21:43

Re: Printing the value in the CCD simulator and 'V' in aperture photometry tool

Post by fabdev » 10 Dec 2019, 17:06

Hello, the star must be collected, so in the Aperture Photometry window (the Zoom window) just press ENTER with the keyboard to collect the star.
Actually you could collect the star directly on the image (left click), without using the zoom window. In this case configure the Aperture/Gap/Background in the Preferences and disable the option "Draw rings only when the image is zoomed" (and enable all "Draw" options).

A complete script could be:

Code: Select all

x = Image.Stars.X(1)
y = Image.Stars.Y(1)
peak = Image.GetPixel(x,y)
adu = Image.Stars.ADU(1)
print x ; y ; peak ; adu

Post Reply