Mira Pro Script
 Contents
 Tech Support
 About this Document
Working with Scripts in Mira
 Overview
 Working with Scripts
 Editing Scripts
 Running Scripts
 Script Manager
The Scripting Language
 Creating a Simple Script
 Comparison with C and C++
 Naming Conventions
 Protocol for Using Classes
 Creating Classes
 Master list of Script Classes
 Going Further with Lua
 Error Messages
  Compiler Error Messages
  Typical Compiler Messages
Script Classes
 Script Classes
 Master list of script classes
 Format of Reference Pages
 CApphot
  Class Description
  Data Members
  Initialization
   new
   delete
   Copy
  Operations
   GetImageParams
   Measure
   SetBgMethod
  Fetching Results
   X position
   Y position
   GetErrMsg
   GetStatusCode
   BgValue
   BgValueErr
   Mag
   MagError
   MagErrorT
   NetCount
   NetCountErr
   NetCountErrT
   SNR
   SNRT
 CArray
  Class Description
  Construction
   new
   delete
   Copy
  Operations
   Count
   Dot
   Empty
   Exists
   Get
   Init
   MaxIndex
   Remove
   Set
 CCentroid
  Class Description
  Construction
   new
   delete
  Accessors
   GetSample
   SetSample
   GetSign
   SetSign
   GetTracking
   SetTracking
   X
   Y
  Operations
   Calc
 CColorRef
  Class Description
  Construction
   new
   delete
  Accessors
   Get
  Operations
   Choose
   ChoosePal
   Invert
   ToGray
   Set
  Other Topics
   Visual Response Weighted Intensity
 CFile
  Class Description
  Construction
   new
   delete
  Operations
   Close
   FilePos
   Flush
   GetPath
   Open
   Printf
   Seek
   File Access Modes
 CFileDlg
  CFileDlg Class Description
  Construction
   new
   delete
  Operations
   Open
   Save
   Start
   Next
 CFindFiles
  CFindFiles::Class Description
  Construction
   new
   delete
  Operations
   Open
   Next
   Close
  Accessors
   GetPath
 CFwhm
  Class Description
  Construction
   new
   delete
  Accessors
   Bg
   Peak
   Fwhm
   X
   Y
   GetAutoCentroid
   SetAutoCentroid
   GetMaxRadius
   SetMaxRadius
   GetSample
   SetSample
   GetSign
   SetSign
   GetTracking
   SetTracking
  Operations
   Calc
 CImage
  Class Description
  Construction
   new
   delete
   Attach
   AttachFromList
   Copy
  General Methods
   Close
   Create
   Display
   GetImagePtr
   Open
   Save
   SaveAs
   SaveTo
  Coordinates
   GetAxisLabel
   GetImageScale
   GetImageScaleXy
   PtInside
   WcsIsEq
   WcsToXy
   XyToWcs
   XyToWcsStr
  Filtering Methods
   FiltBinomial
   FiltBlockAvg
   FiltBlockSum
   FiltClipHigh
   FiltClipLow
   FiltEllipse
   FiltGaussian
   FiltGradient
   FiltKernel
   FiltLaplacian
   FiltLine
   FiltMax
   FiltMedian
   FiltMin
   FiltPrewitt
   FiltRank
   FiltRotGrad
   FiltRect
   FiltSharpen
   FiltSobel
   FiltUnsharpMask
  Image Geometry
   Affine
   Crop
   Expand
   Hflip
   Imbed
   Reorient
   Rot90
   Rot180
   Rot270
   Rotate
   RotatePt
   Scale
   ScaleXy
   Shift
   Transpose
   Vflip
  Headers and Keywords
   KwdDelete
   KwdExists
   KwdGetDMS
   KwdGetHMS
   KwdGetNum
   KwdGetNumEx
   KwdGetSect
   KwdGetSectEx
   KwdGetStr
   KwdGetStrEx
   KwdGetVal
   KwdGetValEx
   KwdSetStr
   KwdSetBlank
   KwdSetBlankStr
   KwdSetBool
   KwdSetComment
   KwdSetDate
   KwdSetHistory
   KwdSetNum
   KwdSetSect
   KwdSetTime
   KwdSetVal
  Image Properties
   Axes
   Bytes
   Cols
   Darktime
   Datatype
   DatatypeStr
   Date
   DateStr
   DimEq
   Exptime
   Filter
   Gain
   ImageType
   IsColor
   IsInteger
   IsNumeric
   IsReal
   Object
   Path
   PixelBytes
   Pixels
   Rows
   Time
   TimeStr
  Measurements
   Angle
   AngleWcs
   AreaUnits
   CoordUnits
   Distance
   DistanceWcs
   DistanceWcsStr
   DistanceUnits
   PixGELE
   PixGE
  Math
   Abs
   Add
   AddNoise
   Addx
   Blend
   Blendx
   Byteswap
   Chs
   Div
   Divx
   Exp
   ExtractByte
   Log
   Log10
   Mod
   Modx
   Mul
   Mulx
   PolyFitDiv
   PolyFitSub
   PolyFitImage
   Pow
   Powa
   Powab
   Recip
   RgbExtract
   ScaleLinVal
   ScalePolyVal
   SetDatatype
   SetRegionVal
   SetVal
   Sqrt
   Sub
   Subx
   Val
   ValStr
   Xdiv
   Xsub
  Image Calibration
   ApplyPixelMask
   CreatePixelMask
   CreatePixelMaskHigh
   CreatePixelMaskLow
   DivFlatFrame
   DivFlatNorm
   SetMaskedValue
   SubBiasFrame
   SubBiasRef
   SubBiasVal
   SubBiasCol
   SubBiasRow
   SubDarkFrame
   SubDarkOpt
   SubDarkScaled
 CImageSet
  Class Description
  Construction
   new
   delete
   Copy
  Accessors
   Count
   GetImage
  Operations
   Append
   Insert
   Remove
   RemoveAt
   RemoveFirst
   RemoveLast
 CImageView
  Class Description
  Construction
   new
   delete
   Attach
   AttachFromList
   GetViewPtr
  Image Display Methods
   Append
   Display
   Insert
  Image Set Operations
   Count
   First
   GetImage
   GetImagePtr
   GetImageSet
   GetIndex
   Last
   Next
   Prev
   Remove
   SetIndex
   SwapNext
   SwapPrev
  Image Cursor
   GetCursorPos
   GetCursorRect
   GetCursorStyle
   SetCursorExtent
   SetCursorHeight
   SetCursorPos
   SetCursorPosWcs
   SetCursorRect
   SetCursorStyle
   SetCursorWidth
  Settings
   GetFlipFITS
   SetFlipFITS
   GetGraphSet
   GraphSet
   GetMeasureSet
   MeasureSet
   GetPlotAvgMode
   SetPlotAvgMode
   GetProcessSet
   ProcessSet
  Window Operations
   CenterAt
   CenterAtWcs
   GetZoom
   SetZoom
   Update
   UpdateAll
 CImCombine
  Class Definition
  Combining Images using Criteria
  Construction
   new
   delete
   Copy
   RestoreState
   SaveState
  Normalization
   SetRelRect
   SetNormMethod
   SetNormStat
   SetRect
  Control Options
   GetErrorMsg
   SetAdjustExptime
   SetRefImage
   SetTitle
   SetVerbose
  Weighted Means
   ContraMean
   GeometricMean
   KwdWeightedMean
   MaskedMean
   Mean
   Median
   Rank
   Sum
   WeightedMean
   YpMean
  Rejection Means
   AlphaClip
   MaxClip
   MmClip
   MtmSigmaClip
   RankClip
   SigmaClip
  Other Methods
   Max
   Min
   MmClipRange
   Range
   RgbMerge
   Sdev
 CLabels
  Class Description
  Construction
   new
   delete
   Attach
  Methods
   Add
   Preferences
 CMatrix
  Class Description
  Construction
   new
   delete
   Copy
  Operations
   Cols
   ColsUsed
   Count
   Dump
   Empty
   Exists
   Get
   GetRow
   Init
   Members
   Remove
   RemoveRow
   RowExists
   Rows
   RowsUsed
   Set
  Math Operations
   Normalize
   Volume
  Other Topics
   Working with Matrices
 CPlotView
  Class Description
  Construction
   new
   delete
   Attach
   GetWnd
   SetWnd
  Plot Series Methods
   GetIndex
   SetIndex
   CountSeries
   CountSeriesPoints
  Data Array Methods
   Add
   Count
   Empty
   FindPoint
   GetX
   GetY
   GetErrX
   GetErrY
   Remove
  Point Plotting Methods
   PlotPoints
   AddPoints
   AddSeries
  Matrix Plotting Methods
   PlotMatrix
   PlotMatrixRange
   AddMatrixRange
   PlotMatrixLine
   PlotMatrixRangeLine
   AddMatrixRangeLine
  Image Plotting Methods
   PlotImageCol
   PlotImageRow
   PlotCursorCol
   PlotCursorColAvg
   PlotCursorColRange
   PlotCursorRow
   PlotCursorRowAvg
   PlotCursorRowRange
 CPolynomial
  Class Description
  Construction
   new
   delete
   Copy
  Operations
   Count
   Empty
   Exists
   Get
   Init
   MaxOrder
   Remove
   Set
 CRect
  Class Description
  Construction
   new
   delete
  Accessors
   Get
   Set
   SetToImage
   Xmin
   SetXmin
   Xmax
   SetXmax
   Ymin
   SetYmin
   Ymax
   SetYmax
   Height
   Size
   Width
  Operations
   Inflate
   Intersection
   Normalize
   Offset
   PtInside
   PtInsideInt
   RectInside
   Union
 CRegistry
  Class Description
  Construction
   Open
   Close
   new
   delete
  Operations
   GetBool
   SetBool
   GetInt
   SetInt
   GetNum
   SetNum
   GetRgb
   SetRgb
   GetStr
   SetStr
   GetWnd
   SetWnd
 CSplitpath
  Class Description
  Construction
   new
   delete
  Accessors
   GetDir
   GetDrive
   GetExt
   GetExt2
   GetFilename
   GetFilenameExt
   GetFolder
   GetFolder2
   GetName
  Operations
   Merge
   SetDir
   SetDrive
   SetExt
   SetFilename
   SetFilenameExt
   SetFolder
   SetName
   SetPath
   SetSubdir
   Split
 CSet
  Class Definition
  Construction
   new
   delete
   Copy
  Operations
   Append
   Insert
   Remove
   RemoveFirst
   RemoveLast
   RemoveMember
  Accessors
   Count
   GetIndex
   GetMember
 CStats
  Class Description
  Construction
   new
   delete
  Initialization
   Init
   SetImage
   SetRect
  Accessors
   GetErrMsg
   GetRect
   GetImage
   GetStatsPtr
   GetStatus
  Operations
   AlphaClipMean
   ContraMean
   GeomMean
   Max
   MaxPix
   MaxClipMean
   Mean
   MeanSdev
   Median
   Min
   MinPix
   MinClipMean
   MinMaxClipMean
   MtmSigmaClipMean
   Rank
   RankClipMean
   Sdev
   SigmaClipMean
   YpMean
 CStrTok
  Class Description
  Construction
   new
   delete
  Operations
   Init
   SetDelimiter
   Next
 CTextView
  Class Description
  Construction
   new
   delete
   GetViewPtr
  Operations
   GetWordwrap
   Printf
   SetWordwrap
Date, Time, and Angle Functions
 Angles (degrees)
  DegToDms
  DmsToDeg
  FormatAngle
  FormatDmsStr
  ParseDegrees
  ParseDms
 Time (hours)
  HrToHms
  HmsToHr
  FormatTime
  FormatHmsStr
  ParseHours
  ParseHms
 Dates
  CalcHJD
  CalcJD
  CalcMJD
  FormatDate
  FormatYmdStr
  ParseYmd
  ParseJD
  JDtoDateTime
 Calculations
  CalcAirmass
  CalcHJD
  CalcJD
  CalcLST
  CalcMJD
  CalcSphAngle
  DayOfWeek
Boolean Math Functions
 Overview
 Operations
  AND
  OR
  XOR
  NOT
  NAND
  NOR
  BitTest
 Conversions
  Decimal to Hexadecimal
  Hexadecimal to Decimal
  Hexadecimal to Binary
  Binary to Hexadeximal
  Decimal to Binary
  Binary to Decimal
  Trim leading 0's
Dialog Functions
 GetAbortRetryIgnore
 GetChoice
 GetFileName
 GetItem
 GetItemStr
 GetNumber
 GetRetryCancel
 GetString
 GetText
 GetTrueFalse
 GetValue
 GetYesNo
 GetYesNoCancel
Text Formatting Functions
 CreateTextWindow
 MsgBox
 Msg
 Msg2
 Printf
 Sprintf
 Wprintf
Miscellaneous Functions
 AbbrevPath
 Assert
 Beep
 DatatypeToStr
 Exit
 GetFileList
 GetFileOpenDlgTitle
 GetFileSaveDlgTitle
 GetFolder
 GetKeyState
 GetMathErrVal
 GetMathErrValStr
 GetViewportSize
 Include
 SetFileOpenDlgTitle
 SetFileSaveDlgTitle
 SetMathErrVal
 SetResampleParams
 StrToDatatype
Data Structures
 CSet class
 CArray class
 CMatrix class
 Working with Matrices
 ClassLibInfo
 ResampleParams
Special Values
 nil
 true
 false
Interface to Mira
 Mira Data Types
 Image Sets
 Image Cursor
 Pixel Mask File
 Glossary of Terms
Coordinate Systems
 Image Coordinate System
 Pixel Coordinate Definition
 Subpixel Coordinate Definition
 World Coordinate System
 Angle Measurement Definition
 Image Display Orientation
 FITS Image Orientation
Sample Scripts
 Examples
 Listing Image Information
 User-Defined Filter Kernel
 An Improved Filter Kernel Script