Script TheSkyX  Version 1.27
Public Types | Public Slots | Properties | List of all members
ccdsoftImage Class Reference

TheSkyX ccdsoftImage object. More...

Inheritance diagram for ccdsoftImage:

Public Types

enum  ccdsoftInventoryIndex {
  cdInventoryX, cdInventoryY, cdInventoryMagnitude, cdInventoryClass,
  cdInventoryFWHM, cdInventoryMajorAxis, cdInventoryMinorAxis, cdInventoryTheta,
  cdInventoryEllipticity
}
 Inventory Array Index.
 
enum  ccdsoftWCSIndex {
  cdWCSRA, cdWCSDec, cdWCSX, cdWCSY,
  cdWCSPositionError, cdWCSResidual, cdWCSCatalogID, cdActive
}
 WCS AutoAstrometry Array Index.
 
enum  ccdsoftAutoContrastMethod { cdAutoContrastUseAppSetting =-1, cdAutoContrastSBIG, cdAutoContrastBjorn, cdAutoContrastDSS100X }
 Autocontrast methods.
 
enum  ccdsoftBjornBackground {
  cdBgNone, cdBgWeak, cdBgMedium, cdBgStrong,
  cdBgVeryStrong
}
 Bjorn autocontrast background.
 
enum  ccdsoftBjornHighlight {
  cdHLNone, cdHLWeak, cdHLMedium, cdHLStrong,
  cdHLVeryStrong, cdHLAdaptive, cdHLPlanetary
}
 Bjorn autocontrast highlight.
 
enum  ccdsoftCoordinates { cdRA, cdDec }
 Coordinates index.
 
enum  ccdsoftSaveAs { cdGIF, cdBMP, cdJPG, cd48BitTIF }
 Convert image to a specific file format.
 

Public Slots

int Open ()
 This method opens the file with the specified Path(). More...
 
int Save ()
 This method saves the file. More...
 
int Close ()
 This method closes any file opened with the Open() method. More...
 
int AttachToActive ()
 This method attaches this image object to the active image in TheSkyX. More...
 
int ApplyBackgroundRange ()
 This method applys the Background and Range settings. More...
 
int New (int Width, int Height, int BitsPerPixel)
 This method create new, blank image. More...
 
int Zoom (int Numerator, int Denominator)
 This method zooms in or out on the image. More...
 
int SetActive ()
 This method makes this image active. More...
 
int AttachToActiveImager ()
 This method attaches this image to the most recently acquired Imager image. More...
 
int AttachToActiveAutoguider ()
 This method attaches this image to the most recently acquired Autoguider image. More...
 
Properties with Parameters

These properties take one or more parameters (and are technically methods). The set syntax is not necessarily identical to CCDSoft.

QVariant FITSKeyword (QString qsKeyword)
 Returns a value for the given keyword. More...
 
void setFITSKeyword (QString qsKeyword, QVariant value)
 Sets a value for the given keyword. More...
 
WCS Related Methods

These are FITS World Coordinate System (WCS) related methods.

int InsertWCS (int RedoExistingSolution=false)
 This method performs an image link, followed by an astrometry solution and populates the FITS header with the resulting WCS information. More...
 
int XYToRADec (double X, double Y)
 This method transforms an image pixel coordiante into an RA Dec. More...
 
int RADecToXY (double RA, double Dec)
 This method transforms RA Dec into a pixel coordinate. More...
 
QVariant WCSArray (int WCSIndex)
 This method returns the resultant stars used in the astrometric solution creating the WCS. More...
 
int ShowInventory ()
 This method inventories all the light sources found in the image. More...
 
QVariant InventoryArray (int InventoryIndex)
 This method returns the list of light source inventory item properties based on InventoryIndex. More...
 
QVariant FindInventoryAtRADec (double RA, double Dec)
 This method returns the light source properties near the given RA, Dec. More...
 
int MakeComparisonStarChart (QString &pVal)
 
Image Processing Related Methods

Those without hyperlinks are not (yet) implemented.

int AutoContrast (int Method, int Background, int Highlight)
 
int SaveAs (int Type, int Param=0)
 
int Resize (int NewWidth, int NewHeight)
 
int RepairColumn (int ColumnToFix)
 
int RemoveColdPixels (int ColdCriteria, int &Repaired)
 
int RemoveHotPixels (int HotCriteria, int &pRepaired)
 
double averagePixelValue ()
 This method returns the average pixel value by summing all pixel values and dividing by the total number of pixels. More...
 
QVariant scanLine (int i)
 This method returns a row (an array) of pixel data at the scanline with index i. More...
 
double XYToRADecResultRA ()
 Holds the RA result of calling the XYToRADec() method. More...
 
double XYToRADecResultDec ()
 Holds the Dec result of calling the XYToRADec() method. More...
 
double RADecToXYResultX ()
 Holds the X result of calling the RADecToXY() method. More...
 
double RADecToXYResultY ()
 Holds the Y result of calling the RADecToXY() method. More...
 
double mousePressPixelX ()
 The X pixel coordinate relative to this photo where the user last pressed the left mouse button. More...
 
double mousePressPixelY ()
 The Y pixel coordinate relative to this photo where the user last pressed the left mouse button. More...
 
double mouseDoubleClickPixelX ()
 The X pixel coordinate relative to this photo where the user last double clicked the left mouse button. More...
 
double mouseDoubleClickPixelY ()
 The Y pixel coordinate relative to this photo where the user last double clicked the left mouse button. More...
 

Properties

double JulianDay
 This property returns the date and time of the image as a Julian day. More...
 
QString Path
 This property contains the file path to the image. More...
 
int DetachOnClose
 This property determines if the window holding the image is deleted or not when this image is closed. More...
 
int Visible
 This property makes the image visible or not. More...
 
int DataPtr
 This property returns a pointer to the data bits of the image. More...
 
QVariant DataArray
 This property gets or sets the image data. More...
 
int WidthInPixels
 This property holds the width of the image in pixels. More...
 
int HeightInPixels
 This property holds the height of the image in pixels. More...
 
int ModifiedFlag
 This tell if the image has been modified or not. More...
 
int Background
 This property holds the image's background value for display purposes. More...
 
int Range
 This property holds the image's range value for display purposes. More...
 
int WindowTop
 This property holds top coordinate of the window holding the image. More...
 
int WindowLeft
 This property holds left coordinate of the window holding the image. More...
 
int WindowRight
 This property holds right coordinate of the window holding the image. More...
 
int WindowBottom
 This property holds bottom coordinate of the window holding the image. More...
 
WCS Related Properties

These are WCS related properties.

double NorthAngle
 This property holds the position angle of the image, only valid after a successful InsertWCS(). More...
 
double ScaleInArcsecondsPerPixel
 This property holds the image scale in arc-seconds per pixel. More...
 

Detailed Description

TheSkyX ccdsoftImage object.

The ccdsoftImage object allows scripted control of images, ususally acquired by cameras controlled by TheSkyX, in a way that closely matches the image scripting interface offered by CCDSoft.

Member Function Documentation

int ccdsoftImage::ApplyBackgroundRange ( )
slot

This method applys the Background and Range settings.

int ccdsoftImage::AttachToActive ( )
slot

This method attaches this image object to the active image in TheSkyX.

int ccdsoftImage::AttachToActiveAutoguider ( )
slot

This method attaches this image to the most recently acquired Autoguider image.

int ccdsoftImage::AttachToActiveImager ( )
slot

This method attaches this image to the most recently acquired Imager image.

double ccdsoftImage::averagePixelValue ( )
slot

This method returns the average pixel value by summing all pixel values and dividing by the total number of pixels.

It uses all available processors so it is fast. This method is not part of the CCDSoft standard image and was added in TheSkyX build 8382 (see Application.build).

int ccdsoftImage::Close ( )
slot

This method closes any file opened with the Open() method.

QVariant ccdsoftImage::FindInventoryAtRADec ( double  RA,
double  Dec 
)
slot

This method returns the light source properties near the given RA, Dec.

See also
ShowInventory
QVariant ccdsoftImage::FITSKeyword ( QString  qsKeyword)
slot

Returns a value for the given keyword.

int ccdsoftImage::InsertWCS ( int  RedoExistingSolution = false)
slot

This method performs an image link, followed by an astrometry solution and populates the FITS header with the resulting WCS information.

See also
ScaleInArcsecondsPerPixel
QVariant ccdsoftImage::InventoryArray ( int  InventoryIndex)
slot

This method returns the list of light source inventory item properties based on InventoryIndex.

See also
ShowInventory()
double ccdsoftImage::mouseDoubleClickPixelX ( )
slot

The X pixel coordinate relative to this photo where the user last double clicked the left mouse button.

double ccdsoftImage::mouseDoubleClickPixelY ( )
slot

The Y pixel coordinate relative to this photo where the user last double clicked the left mouse button.

double ccdsoftImage::mousePressPixelX ( )
slot

The X pixel coordinate relative to this photo where the user last pressed the left mouse button.

double ccdsoftImage::mousePressPixelY ( )
slot

The Y pixel coordinate relative to this photo where the user last pressed the left mouse button.

int ccdsoftImage::New ( int  Width,
int  Height,
int  BitsPerPixel 
)
slot

This method create new, blank image.

int ccdsoftImage::Open ( )
slot

This method opens the file with the specified Path().

int ccdsoftImage::RADecToXY ( double  RA,
double  Dec 
)
slot

This method transforms RA Dec into a pixel coordinate.

The result is held in RADecToXYResultX() and RADecToXYResultY().

See also
InsertWCS()
RADecToXYResultX()
RADecToXYResultY()
double ccdsoftImage::RADecToXYResultX ( )
slot

Holds the X result of calling the RADecToXY() method.

double ccdsoftImage::RADecToXYResultY ( )
slot

Holds the Y result of calling the RADecToXY() method.

int ccdsoftImage::Save ( )
slot

This method saves the file.

See also
Path
QVariant ccdsoftImage::scanLine ( int  i)
slot

This method returns a row (an array) of pixel data at the scanline with index i.

The first scanline is at index 0, the last scanline is at index HeightInPixels()-1. The first pixel value of the returned array is indexed by 0, the last pixel value of the returned array is indexed by WidthInPixels()-1. This method provides a less memory intensive way to read the image data compared to DataArray(). This method is not part of the CCDSoft standard image and was added in TheSkyX build 8362 (see Application.build).

int ccdsoftImage::SetActive ( )
inlineslot

This method makes this image active.

void ccdsoftImage::setFITSKeyword ( QString  qsKeyword,
QVariant  value 
)
slot

Sets a value for the given keyword.

int ccdsoftImage::ShowInventory ( )
slot

This method inventories all the light sources found in the image.

It is automatically called internally by InsertWCS(), but can be called independently here.

See also
InventoryArray()
QVariant ccdsoftImage::WCSArray ( int  WCSIndex)
slot

This method returns the resultant stars used in the astrometric solution creating the WCS.

See also
InsertWCS()
int ccdsoftImage::XYToRADec ( double  X,
double  Y 
)
slot

This method transforms an image pixel coordiante into an RA Dec.

The result is held in XYToRADecResultRA() and XYToRADecResultDec().

See also
InsertWCS()
XYToRADecResultRA()
XYToRADecResultDec()
double ccdsoftImage::XYToRADecResultDec ( )
slot

Holds the Dec result of calling the XYToRADec() method.

double ccdsoftImage::XYToRADecResultRA ( )
slot

Holds the RA result of calling the XYToRADec() method.

int ccdsoftImage::Zoom ( int  Numerator,
int  Denominator 
)
slot

This method zooms in or out on the image.

Property Documentation

int ccdsoftImage::Background
readwrite

This property holds the image's background value for display purposes.

QVariant ccdsoftImage::DataArray
readwrite

This property gets or sets the image data.

Warning the method is very memory intensive and not necessarily fast. The array is a one dimensional array of data of all the pixel values organized by width, end to end. For example, if the width is 800 and height is 400, the first 800 values of the array is the first row of pixels of the image, the next 800 values of the array is the second row of pixels and so on - the array holds 400 sets of 800 rows or 320000 total pixel values.

See also
scanLine()
int ccdsoftImage::DataPtr
read

This property returns a pointer to the data bits of the image.

int ccdsoftImage::DetachOnClose
readwrite

This property determines if the window holding the image is deleted or not when this image is closed.

If DetachOnClose() is 1, the window remains open even after this image object is closed or leaves scope. If DetachOnClose() is 0, the window holding and the image live and die as a unit.

int ccdsoftImage::HeightInPixels
read

This property holds the height of the image in pixels.

double ccdsoftImage::JulianDay
read

This property returns the date and time of the image as a Julian day.

int ccdsoftImage::ModifiedFlag
readwrite

This tell if the image has been modified or not.

double ccdsoftImage::NorthAngle
read

This property holds the position angle of the image, only valid after a successful InsertWCS().

QString ccdsoftImage::Path
readwrite

This property contains the file path to the image.

int ccdsoftImage::Range
readwrite

This property holds the image's range value for display purposes.

double ccdsoftImage::ScaleInArcsecondsPerPixel
readwrite

This property holds the image scale in arc-seconds per pixel.

It must be set accordingly before calling InsertWCS().

int ccdsoftImage::Visible
readwrite

This property makes the image visible or not.

int ccdsoftImage::WidthInPixels
read

This property holds the width of the image in pixels.

int ccdsoftImage::WindowBottom
read

This property holds bottom coordinate of the window holding the image.

int ccdsoftImage::WindowLeft
readwrite

This property holds left coordinate of the window holding the image.

int ccdsoftImage::WindowRight
read

This property holds right coordinate of the window holding the image.

int ccdsoftImage::WindowTop
readwrite

This property holds top coordinate of the window holding the image.

ScriptTheSkyX Examples
(C) Software Bisque, Inc. All rights reserved.