|
def | __init__ (self) |
|
def | initVar (self) |
|
def | initUI (self) |
|
def | startThread (self) |
|
def | stopThread (self) |
|
def | gotData (self, theTxt) |
|
def | loadSet (self) |
|
def | drawChart (self, cType, tScn) |
|
def | getBigPmap (self) |
|
def | drawNE (self, cType, tScn) |
|
def | drawElAz (self, cType, tScn) |
|
def | drawArrow (self, theScn, x1, y1, x2, y2, theCol, theFont, lbl, pos) |
|
def | drawRefStars (self, cType, tScn) |
|
def | skyMousePress (self, theText) |
|
def | sciMousePress (self, theText) |
|
def | GsxMousePress (self, theText) |
|
def | GdxMousePress (self, theText) |
|
def | HsxMousePress (self, theText) |
|
def | HdxMousePress (self, theText) |
|
def | PsxMousePress (self, theText) |
|
def | PdxMousePress (self, theText) |
|
def | bigMousePress (self, theText) |
|
def | shutdown (self) |
|
def | __init__ (self) |
|
def | initVar (self) |
|
def | initUI (self) |
|
def | startThread (self) |
|
def | stopThread (self) |
|
def | gotData (self, theTxt) |
|
def | loadSet (self) |
|
def | drawChart (self, cType, tScn) |
|
def | getBigPmap (self) |
|
def | drawNE (self, cType, tScn) |
|
def | drawElAz (self, cType, tScn) |
|
def | drawArrow (self, theScn, x1, y1, x2, y2, theCol, theFont, lbl, pos) |
|
def | drawRefStars (self, cType, tScn) |
|
def | skyMousePress (self, theText) |
|
def | sciMousePress (self, theText) |
|
def | GsxMousePress (self, theText) |
|
def | GdxMousePress (self, theText) |
|
def | HsxMousePress (self, theText) |
|
def | HdxMousePress (self, theText) |
|
def | PsxMousePress (self, theText) |
|
def | PdxMousePress (self, theText) |
|
def | bigMousePress (self, theText) |
|
def | shutdown (self) |
|
def VizLN.AppWin.drawChart |
( |
|
self, |
|
|
|
cType, |
|
|
|
tScn |
|
) |
| |
Draws and annotates the specified type of chart (cType) in the
supplied graphicsscene (tScn). The variable cType is one of:
cType = "Sky","Sci","Gsx","Gdx","Hsx","Hdx","Psx", or "Pdx"
The variable tScn is one of:
tScn = skyScn, sciScn, GsxScn, GdxScn, HsxScn, HdxScn, PsxScn, PdxScn, or bigScn
The routine does the following:
- clears tScn to prevent buildup of elements
- adds the appropriate rotated / scaled PixMap
- calls addArrows to add NE and Az/El arrows
Depending on cType, the code also puts the following onscreen:
- Circles and boxes (black) representing FoV of GWS, HWS, science
- Circles for catalog stars (Green for GWS, Blue for HWS)
- Shapes indicating pupils in the HWS Metapupil
Note that if tScn is bigScn, the routine must check self.whichBig to
determine what to do (self.whichBig takes on the same values as cType).
def VizLN.AppWin.drawChart |
( |
|
self, |
|
|
|
cType, |
|
|
|
tScn |
|
) |
| |
Draws and annotates the specified type of chart (cType) in the
supplied graphicsscene (tScn). The variable cType is one of:
cType = "Sky","Sci","Gsx","Gdx","Hsx","Hdx","Psx", or "Pdx"
The variable tScn is one of:
tScn = skyScn, sciScn, GsxScn, GdxScn, HsxScn, HdxScn, PsxScn, PdxScn, or bigScn
The routine does the following:
- clears tScn to prevent buildup of elements
- adds the appropriate rotated / scaled PixMap
- calls addArrows to add NE and Az/El arrows
Depending on cType, the code also puts the following onscreen:
- Circles and boxes (black) representing FoV of GWS, HWS, science
- Circles for catalog stars (Green for GWS, Blue for HWS)
- Shapes indicating pupils in the HWS Metapupil
Note that if tScn is bigScn, the routine must check self.whichBig to
determine what to do (self.whichBig takes on the same values as cType).
def VizLN.AppWin.drawElAz |
( |
|
self, |
|
|
|
cType, |
|
|
|
tScn |
|
) |
| |
Draws Elevation and Azimuth arrows in the specified chart type (cType, which
can be "Sky","Sci","Gsx","Gdx","Hsx","Hdx","Psx", or "Pdx"). Note
that this may target the Big window, so we have to check if tScn = self.bigScn.
The routine simply calls the needed utility routines in LNA with vectors
corresponding to El and Az, and then calls DrawArrow to do the honours.
Note that we call Slit2Sky explicitly for the sky box, and that the "standard"
meaning of NiA, and EiA actually correspond to El and Az, since we set are looking
out the slit and use 0 deg and 270 deg to calculate.
def VizLN.AppWin.drawElAz |
( |
|
self, |
|
|
|
cType, |
|
|
|
tScn |
|
) |
| |
Draws Elevation and Azimuth arrows in the specified chart type (cType, which
can be "Sky","Sci","Gsx","Gdx","Hsx","Hdx","Psx", or "Pdx"). Note
that this may target the Big window, so we have to check if tScn = self.bigScn.
The routine simply calls the needed utility routines in LNA with vectors
corresponding to El and Az, and then calls DrawArrow to do the honours.
Note that we call Slit2Sky explicitly for the sky box, and that the "standard"
meaning of NiA, and EiA actually correspond to El and Az, since we set are looking
out the slit and use 0 deg and 270 deg to calculate.
def VizLN.AppWin.drawNE |
( |
|
self, |
|
|
|
cType, |
|
|
|
tScn |
|
) |
| |
Draws North and East arrows in the specified chart type (cType, which
can be "Sky","Sci","Gsx","Gdx","Hsx","Hdx","Psx", or "Pdx"). Note
that this may target the Big window, so we have to check if tScn = self.bigScn.
The routine depends on the previous call to CalcAllSky with vectors corresponding
to North and East, and then calls DrawArrow to do the honours
def VizLN.AppWin.drawNE |
( |
|
self, |
|
|
|
cType, |
|
|
|
tScn |
|
) |
| |
Draws North and East arrows in the specified chart type (cType, which
can be "Sky","Sci","Gsx","Gdx","Hsx","Hdx","Psx", or "Pdx"). Note
that this may target the Big window, so we have to check if tScn = self.bigScn.
The routine depends on the previous call to CalcAllSky with vectors corresponding
to North and East, and then calls DrawArrow to do the honours
def VizLN.AppWin.drawRefStars |
( |
|
self, |
|
|
|
cType, |
|
|
|
tScn |
|
) |
| |
Draw circles and labels for the reference stars. We (currently)
only do this in the BIG window, so tScn will always be self.bigScn.
The variable cType indicates what type of view we are dealing with.
In this instance, cType = "Sky","Gsx","Gdx","Psx", or "Pdx" since
the other views don't show reference stars (in focus).
We use the arrays self.hNam, self.hPA, self.hSep for the HWS stars
and self.gNam, self.gPA, self.gSep for the GWS. Note that we have
self.NiA (GWS/input coord) and self.NpA (Pcam coord) as vectors
which point North!
def VizLN.AppWin.drawRefStars |
( |
|
self, |
|
|
|
cType, |
|
|
|
tScn |
|
) |
| |
Draw circles and labels for the reference stars. We (currently)
only do this in the BIG window, so tScn will always be self.bigScn.
The variable cType indicates what type of view we are dealing with.
In this instance, cType = "Sky","Gsx","Gdx","Psx", or "Pdx" since
the other views don't show reference stars (in focus).
We use the arrays self.hNam, self.hPA, self.hSep for the HWS stars
and self.gNam, self.gPA, self.gSep for the GWS. Note that we have
self.NiA (GWS/input coord) and self.NpA (Pcam coord) as vectors
which point North!
def VizLN.AppWin.loadSet |
( |
|
self | ) |
|
Loads a catalog / finder chart / FITS file set. The default
behaviour is to use the FITS file to generate Pixmaps for the
various views. If the FITS file is not present, the program
fetches it (thanks to code from ChartMaker).
The routine makes multiple PIL images tailored to each type of
display. For example, the GWS and PCam images have to be
y-flipped to reverse the "parity" of the image. It also
produces smaller images for the smaller units (i.e. science).
We use the superior interpolation of PIL compared to previous
versions, which used genPixMap and QPixmaps. This routine
produces:
self.skyPIL - Full sky image in normal orientation
self.gwsPIL - Cropped and Y-flipped
self.pcmPIL - Cropped and Y-flipped
self.sciPIL - Cropped only
PIL has the additional virtue of NOT scaling the result after
rotation (a big headache otherwise). Instead, it offers a flag
to expand (or not) the image.
Note: The catalog and FITS files must have the same file root,
and the catalog must be .cat and the FITS file .fits. The
FITS file should be in the sub-folder FITS of the catalog's
folder (standard Com-4 organization).
NOTE: The program assumes North is up and East to the left!
def VizLN.AppWin.loadSet |
( |
|
self | ) |
|
Loads a catalog / finder chart / FITS file set. The default
behaviour is to use the FITS file to generate Pixmaps for the
various views. If the FITS file is not present, the program
fetches it (thanks to code from ChartMaker).
The routine makes multiple PIL images tailored to each type of
display. For example, the GWS and PCam images have to be
y-flipped to reverse the "parity" of the image. It also
produces smaller images for the smaller units (i.e. science).
We use the superior interpolation of PIL compared to previous
versions, which used genPixMap and QPixmaps. This routine
produces:
self.skyPIL - Full sky image in normal orientation
self.gwsPIL - Cropped and Y-flipped
self.pcmPIL - Cropped and Y-flipped
self.sciPIL - Cropped only
PIL has the additional virtue of NOT scaling the result after
rotation (a big headache otherwise). Instead, it offers a flag
to expand (or not) the image.
Note: The catalog and FITS files must have the same file root,
and the catalog must be .cat and the FITS file .fits. The
FITS file should be in the sub-folder FITS of the catalog's
folder (standard Com-4 organization).
NOTE: The program assumes North is up and East to the left!