Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 3703)
+++ trunk/MagicSoft/Mars/Changelog	(revision 3704)
@@ -18,4 +18,17 @@
 
                                                  -*-*- END OF LINE -*-*-
+ 2004/04/10: Thomas Bretz
+
+   * mastro/MAstroCatalog.[h,cc], mastro/MAstroCamera.[h,cc]:
+     - added comments
+
+   * macros/starfield.C:
+     - added
+
+   * mastro/Makefile, mastro/AstroLinkDef.h
+     - added MAstroCamera
+
+
+
  2004/04/09: Markus Gaug
 
@@ -41,4 +54,5 @@
    * manalysis/MGeomApply.cc
      - added average pixels in the way like it is done in MCalibrationCam
+
 
 
Index: trunk/MagicSoft/Mars/mastro/AstroLinkDef.h
===================================================================
--- trunk/MagicSoft/Mars/mastro/AstroLinkDef.h	(revision 3703)
+++ trunk/MagicSoft/Mars/mastro/AstroLinkDef.h	(revision 3704)
@@ -10,5 +10,5 @@
 #pragma link C++ class MAstroSky2Local+;
 #pragma link C++ class MAstroCatalog+;
-//#pragma link C++ class MAstroCamera+;
+#pragma link C++ class MAstroCamera+;
 
 #pragma link C++ class MObservatory+;
Index: trunk/MagicSoft/Mars/mastro/MAstroCamera.cc
===================================================================
--- trunk/MagicSoft/Mars/mastro/MAstroCamera.cc	(revision 3703)
+++ trunk/MagicSoft/Mars/mastro/MAstroCamera.cc	(revision 3704)
@@ -33,4 +33,18 @@
 // PRELIMINARY!!
 //
+// The caluclation of the position of the reflection in the camera is
+// done by:
+//   - Rotation of the star-field such that the camera is looking into
+//     the pointing direction
+//   - Calculation of the reflected star-light vector by calling
+//     MGeomMirror::GetReflection (which returns the point at which
+//     the vector hits the camera plain)
+//   - Depending on the draw-option you get each reflected point, the
+//     reflection on a virtual ideal mirror or the reflection on each
+//     individual mirror
+//
+// GUI: You can use the the cursor keys to change the pointing position
+//      and plus/minus to change the time by a quarter of an hour.
+//
 /////////////////////////////////////////////////////////////////////////////
 #include "MAstroCamera.h"
@@ -58,4 +72,8 @@
 
 // --------------------------------------------------------------------------
+//
+// Create a virtual MGeomMirror which is in the center of the coordinate
+// system and has a normal vector in z-direction.
+//
 MAstroCamera::MAstroCamera() : fGeom(0), fMirrors(0)
 {
@@ -65,4 +83,7 @@
 
 // --------------------------------------------------------------------------
+//
+// Delete fGeom, fMirrors and the virtual 0-Mirror fMirror0
+//
 MAstroCamera::~MAstroCamera()
 {
@@ -76,8 +97,15 @@
 
 // --------------------------------------------------------------------------
+//
+// Set a list of mirrors. The Mirrors must be of type MGeomMirror and
+// stored in a TClonesArray
+//
 void MAstroCamera::SetMirrors(TClonesArray &arr)
 {
     if (arr.GetClass()!=MGeomMirror::Class())
+    {
+        cout << "ERROR - TClonesArray doesn't contain objects of type MGeomMirror... ignored." << endl;
         return;
+    }
 
     const Int_t n = arr.GetSize();
@@ -94,4 +122,7 @@
 
 // --------------------------------------------------------------------------
+//
+// Set the camera geometry. The MGeomCam object is cloned.
+//
 void MAstroCamera::SetGeom(const MGeomCam &cam)
 {
@@ -103,4 +134,7 @@
 
 // --------------------------------------------------------------------------
+//
+// Convert To Pad coordinates (see MAstroCatalog)
+//
 Int_t MAstroCamera::ConvertToPad(const TVector3 &w, TVector2 &v) const
 {
@@ -124,4 +158,7 @@
 
 // --------------------------------------------------------------------------
+//
+// Find an object with a given name in the list of primitives of this pad.
+//
 TObject *FindObjectInPad(const char *name, TVirtualPad *pad)
 {
@@ -152,5 +189,11 @@
 //
 //  '*' Draw the mean of the reflections on all mirrors
-//  '.' Draw a dot for the reflection on each mirror
+//  '.' Draw a dot for the reflection on each individual mirror
+//  'h' To create a TH2D of the star-light which is displayed
+//  'c' Use the underlaying MHCamera as histogram
+//  '0' Draw the reflection on a virtual perfect mirror
+//
+// If the Pad contains an object MHCamera of type MHCamera it is used.
+// Otherwise a new object is created.
 //
 void MAstroCamera::AddPrimitives(TString o)
@@ -165,4 +208,5 @@
         o = "*.";
 
+    const Bool_t hasnull = o.Contains("0", TString::kIgnoreCase);
     const Bool_t hashist = o.Contains("h", TString::kIgnoreCase);
     const Bool_t hasmean = o.Contains("*", TString::kIgnoreCase);
@@ -257,6 +301,13 @@
         // transform meters into millimeters (camera display works with mm)
         mean *= 1./num;
-
         DrawStar(mean(0), mean(1), *radec, !hasmean, Form("x=%.1fmm y=%.1fmm", mean(0), mean(1)));
+
+        if (hasnull)
+        {
+            TVector3 star(*radec);
+            star *= rot;
+            const TVector3 spot = fMirror0->GetReflection(star, fGeom->GetCameraDist())*1000;
+            DrawStar(spot(0), spot(1), *radec, !hasmean, Form("x=%.1fmm y=%.1fmm", mean(0), mean(1)));
+        }
     }
 }
Index: trunk/MagicSoft/Mars/mastro/MAstroCamera.h
===================================================================
--- trunk/MagicSoft/Mars/mastro/MAstroCamera.h	(revision 3703)
+++ trunk/MagicSoft/Mars/mastro/MAstroCamera.h	(revision 3704)
@@ -33,5 +33,5 @@
     void SetGeom(const MGeomCam &cam);
 
-    ClassDef(MAstroCamera, 1)
+    ClassDef(MAstroCamera, 1) // Display class to display stars on the camera
 };
 
Index: trunk/MagicSoft/Mars/mastro/MAstroCatalog.cc
===================================================================
--- trunk/MagicSoft/Mars/mastro/MAstroCatalog.cc	(revision 3703)
+++ trunk/MagicSoft/Mars/mastro/MAstroCatalog.cc	(revision 3704)
@@ -25,8 +25,53 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-//   MAstroCatalog
-//
-//  THIS IMPLEMENTATION IS PRELIMINARY AND WILL BE MERGED WITH
-//  SOME PARTS OF THE DRIVE SOFTWARE SOON!
+// MAstroCatalog
+//
+// THIS IMPLEMENTATION IS PRELIMINARY AND WILL BE MERGED WITH
+// SOME PARTS OF THE DRIVE SOFTWARE SOON!
+//
+// To display a starfiield you must have a supported catalog, then do:
+//
+//    MTime time;
+//    // Time for which to get the picture
+//    time.Set(2004, 2, 28, 20, 14, 7);
+//    // Current observatory
+//    MObservatory magic1;
+//    // Right Ascension [h] and declination [deg] of source
+//    // Currently 'perfect' pointing is assumed
+//    const Double_t ra  = MAstro::Hms2Rad(5, 34, 31.9);
+//    const Double_t dec = MAstro::Dms2Rad(22, 0, 52.0);
+//    MAstroCatalog stars;
+//    // Magnitude up to which the stars are loaded from the catalog
+//    stars.SetLimMag(6);
+//    // Radius of FOV around the source position to load the stars
+//    stars.SetRadiusFOV(3);
+//    // Source position
+//    stars.SetRaDec(ra, dec);
+//    // Catalog to load (here: Bright Star Catalog V5)
+//    stars.ReadBSC("bsc5.dat");
+//    // Obersavatory and time to also get local coordinate information
+//    stars.SetObservatory(magic1);
+//    stars.SetTime(time);
+//    // Enable interactive GUI
+//    stars.SetGuiActive();
+//    //Clone the catalog due to the validity range of the instance
+//    TObject *o = stars.Clone();
+//    o->SetBit(kCanDelete);
+//    o->Draw();
+//
+//  If no time and/or Obervatory location is given no local coordinate
+//  information is displayed.
+//
+//  The conversion from sky coordinates to local coordinates is done using
+//  MAstroSky2Local which does a simple rotation of the coordinate system.
+//  This is inaccurate in the order of 30arcsec due to ignorance of all
+//  astrometrical corrections (nutation, precission, abberation, ...)
+//
+//  GUI: If the gui is interactive you can use the cursor keys to change
+//       the position you are looking at and with plus/minus you
+//       can (un)zoom the FOV (Field Of View)
+//
+//  ToDo:
+//   - replace MVetcor3 by a more convinient class. Maybe use TExMap, too.
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -48,5 +93,4 @@
 #include <TRotation.h>
 #include <TPaveText.h>
-#include <TStopwatch.h>
 
 #include "MLog.h"
@@ -58,84 +102,22 @@
 #include "MObservatory.h"
 
+#undef DEBUG
+//#define DEBUG
+
+#ifdef DEBUG
+#include <TStopwatch.h>
+#endif
+
 ClassImp(MVector3);
 ClassImp(MAstroCatalog);
 
 using namespace std;
-/*
-class MRotation : public TRotation
-{
-public:
-    MRotation(Double_t gmst, const MObservatory &obs) : TRotation(1, 0, 0, 0, -1, 0, 0, 0, 1)
-    {
-        RotateZ(gmst + obs.GetElong());
-        RotateY(obs.GetPhi()-TMath::Pi()/2);
-        RotateZ(TMath::Pi());
-    }
-    MRotation(const MTime &t, const MObservatory &obs) : TRotation(1, 0, 0, 0, -1, 0, 0, 0, 1)
-    {
-        RotateZ(t.GetGmst() + obs.GetElong());
-        RotateY(obs.GetPhi()-TMath::Pi()/2);
-        RotateZ(TMath::Pi());
-    }
-};
-*/
-/*
-MVector3 MVector3::GetZdAz(const MObservatory &obs, Double_t gmst) const
-{
-    if (!fType==kIsRaDec)
-        return MVector3();
-
-    MVector3 v(*this);
-    v *= MAstroSky2Local(gmst, obs);
-
-    return v;
-
-     // ------ Using vectors -------
-     // v(1) = -v(1);                     //  phi -->      -phi
-     // v.RotateZ(gmst + obs.GetElong()); // -phi --> alpha-phi
-     // v.RotateY(obs.GetPhi()-TMath::Pi()/2);
-     // v.RotateZ(TMath::Pi());
-
-     // ------ The same using slalib, tested in the drive system -------
-     // const Double_t alpha = slaGmst(mjd) + obs.GetElong();
-     // Double_t el;
-     // slaDe2h(fAlpha-ra, dec, obs.GetPhi(), &az, &el);
-     // zd = TMath::Pi()/2-el;
-}
-
-MVector3 MVector3::GetZdAz(const MTime &time, MObservatory &obs) const
-{
-    return GetZdAz(obs, time.GetGmst());
-}
-
-MVector3 MVector3::GetRaDec(const MObservatory &obs, Double_t gmst) const
-{
-    if (!fType==kIsZdAz)
-        return MVector3();
-
-    MVector3 v(*this);
-    v *= MAstroSky2Local(gmst, obs).Inverse();
-
-    return v;
-
-     // ------ Using vectors -------
-     // v.RotateZ(-TMath::Pi());
-     // v.RotateY(TMath::Pi()/2-obs.GetPhi());
-     // v.RotateZ(-gmst - obs.GetElong()); // alpha-phi --> -phi
-     // v(1) = -v(1);                      //      -phi -->  phi
-
-     // ------ The same using slalib, tested in the drive system -------
-     // const Double_t alpha = slaGmst(mjd) + obs.GetElong();
-     // Double_t el;
-     // slaDe2h(fAlpha-ra, dec, obs.GetPhi(), &az, &el);
-     // zd = TMath::Pi()/2-el;
-}
-
-MVector3 MVector3::GetRaDec(const MTime &time, MObservatory &obs) const
-{
-    return GetRaDec(obs, time.GetGmst());
-}
-*/
-// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+//
+//  Default Constructor. Set Default values:
+//   fLimMag    = 99
+//   fRadiusFOV = 90
+//
 MAstroCatalog::MAstroCatalog() : fLimMag(99), fRadiusFOV(90), fToolTip(0), fObservatory(0), fTime(0)
 {
@@ -145,4 +127,8 @@
 
 // --------------------------------------------------------------------------
+//
+// Destructor. Delete fTime, fObservatory. Disconnect signal. delete tooltip.
+// Delete Map with gui primitives
+//
 MAstroCatalog::~MAstroCatalog()
 {
@@ -168,4 +154,7 @@
 
 // --------------------------------------------------------------------------
+//
+// Snippet to for reading ctalog files.
+//
 TString MAstroCatalog::FindToken(TString &line, Char_t tok)
 {
@@ -184,4 +173,7 @@
 
 // --------------------------------------------------------------------------
+//
+// return int correspoding to TSubString
+//
 Int_t MAstroCatalog::atoi(const TSubString &sub)
 {
@@ -190,4 +182,7 @@
 
 // --------------------------------------------------------------------------
+//
+// return float correspoding to TSubString
+//
 Float_t MAstroCatalog::atof(const TSubString &sub)
 {
@@ -196,4 +191,7 @@
 
 // --------------------------------------------------------------------------
+//
+// return int correspoding to TString
+//
 Int_t MAstroCatalog::atoi(const TString &s)
 {
@@ -202,4 +200,7 @@
 
 // --------------------------------------------------------------------------
+//
+// return float correspoding to TString
+//
 Float_t MAstroCatalog::atof(const TString &s)
 {
@@ -208,4 +209,9 @@
 
 // --------------------------------------------------------------------------
+//
+// Read from a xephem catalog, set bit kHasChahanged.
+// Already read data is not deleted. To delete the stored data call
+// Delete().
+//
 Int_t MAstroCatalog::ReadXephem(TString catalog)
 {
@@ -295,4 +301,9 @@
 
 // --------------------------------------------------------------------------
+//
+// Read from a NGC2000 catalog. set bit kHasChanged
+// Already read data is not deleted. To delete the stored data call
+// Delete().
+//
 Int_t MAstroCatalog::ReadNGC2000(TString catalog)
 {
@@ -365,4 +376,9 @@
 
 // --------------------------------------------------------------------------
+//
+// Read from a Bright Star Catalog catalog. set bit kHasChanged
+// Already read data is not deleted. To delete the stored data call
+// Delete().
+//
 Int_t MAstroCatalog::ReadBSC(TString catalog)
 {
@@ -437,4 +453,8 @@
 
 // --------------------------------------------------------------------------
+//
+// Set Range of pad. If something has changed create and draw new primitives.
+// Paint all gui primitives.
+//
 void MAstroCatalog::Paint(Option_t *o)
 {
@@ -448,4 +468,12 @@
 
 // --------------------------------------------------------------------------
+//
+// Draw a black marker at the position of the star. Create a corresponding
+// tooltip with the coordinates.
+// x, y: Pad Coordinates to draw star
+// v: Sky position (Ra/Dec) of the star
+// transparent: Draw marker or tooltip only
+// txt: additional tooltip text
+//
 void MAstroCatalog::DrawStar(Double_t x, Double_t y, const TVector3 &v, Bool_t transparent, const char *txt)
 {
@@ -467,4 +495,7 @@
 
 // --------------------------------------------------------------------------
+//
+// Set pad as modified.
+//
 void MAstroCatalog::Update(Bool_t upd)
 {
@@ -481,5 +512,5 @@
 //
 // Set the observation time. Necessary to use local coordinate
-// system.
+// system. The MTime object is cloned.
 //
 void MAstroCatalog::SetTime(const MTime &time)
@@ -493,5 +524,5 @@
 //
 // Set the observatory location. Necessary to use local coordinate
-// system.
+// system. The MObservatory object is cloned.
 //
 void MAstroCatalog::SetObservatory(const MObservatory &obs)
@@ -532,4 +563,9 @@
 
 // --------------------------------------------------------------------------
+//
+// Convert theta/phi coordinates of v by TRotation into new coordinate
+// system and convert the coordinated to pad by ConvertToPad.
+// The result is retunred in v.
+//
 Int_t MAstroCatalog::Convert(const TRotation &rot, TVector2 &v) const
 {
@@ -542,4 +578,8 @@
 
 // --------------------------------------------------------------------------
+//
+// Draw a line from v to v+(dx,dy) using Convert/ConvertToPad to get the
+// corresponding pad coordinates.
+//
 Bool_t MAstroCatalog::DrawLine(const TVector2 &v, Double_t dx, Double_t dy, const TRotation &rot, Int_t type)
 {
@@ -577,13 +617,18 @@
 // Use "local" draw option to align the display to the local
 // coordinate system instead of the sky coordinate system.
+// dx, dy are arrays storing recuresively all touched points
+// stepx, stepy are the step-size of the current grid.
 //
 void MAstroCatalog::Draw(const TVector2 &v0, const TRotation &rot, TArrayI &dx, TArrayI &dy, Int_t stepx, Int_t stepy, Int_t type)
 {
+    // Calculate the end point
     const TVector2 v1 = v0 + TVector2(dx[0]*TMath::DegToRad(), dy[0]*TMath::DegToRad());
 
+    // Check whether the point has already been touched.
     Int_t idx[] = {1, 1, 1, 1};
 
     Int_t dirs[4][2] = { {0, stepy}, {stepx, 0}, {0, -stepy}, {-stepx, 0} };
 
+    // Check for ambiguities.
     for (int i=0; i<dx.GetSize(); i++)
     {
@@ -625,4 +670,11 @@
 
 // --------------------------------------------------------------------------
+//
+// Draw a grid recursively around the point v0 (either Ra/Dec or Zd/Az)
+// The points in the grid are converted by a TRotation and CovertToPad
+// to pad coordinates. The type arguemnts is neccessary to create the
+// correct tooltip (Ra/Dec, Zd/Az) at the grid-points.
+// From the pointing position the step-size of teh gris is caluclated.
+//
 void MAstroCatalog::DrawGrid(const TVector3 &v0, const TRotation &rot, Int_t type)
 {
@@ -705,4 +757,6 @@
     const Bool_t enable = fTime && fObservatory;
 
+    // If sky coordinate view is requested get rotation matrix and
+    // draw corresponding sky-grid and if possible local grid
     if (!local)
     {
@@ -717,7 +771,10 @@
         }
 
+        // Return the correct rotation matrix
         return trans;
     }
 
+    // If local coordinate view is requested get rotation matrix and
+    // draw corresponding sky-grid and if possible local grid
     if (local && enable)
     {
@@ -729,4 +786,5 @@
         DrawGrid(rot*fRaDec, trans,     2);
 
+        // Return the correct rotation matrix
         return trans*rot;
     }
@@ -736,4 +794,7 @@
 
 // --------------------------------------------------------------------------
+//
+// Create the title for the pad.
+//
 TString MAstroCatalog::GetPadTitle() const
 {
@@ -833,4 +894,9 @@
 
 // --------------------------------------------------------------------------
+//
+// Do nothing if 'same' option given.
+// Otherwise set pad-range such that x- and y- coordinates have the same
+// step-size
+//
 void MAstroCatalog::SetRangePad(Option_t *o)
 {
@@ -851,4 +917,11 @@
 
 // --------------------------------------------------------------------------
+//
+// First delete all gui elements.
+// Set the correct range of the pad.
+// Create all gui primitives
+// If "this" is not in the current pad add it to the current pad.
+// Reset vit kHasChanged
+//
 void MAstroCatalog::DrawPrimitives(Option_t *o)
 {
@@ -857,9 +930,13 @@
     SetRangePad(o);
 
+#ifdef DEBUG
     TStopwatch clk;
     clk.Start();
+#endif DEBUG
     AddPrimitives(o);
+#ifdef DEBUG
     clk.Stop();
     clk.Print();
+#endif DEBUG
 
     // Append to a possible second pad
@@ -871,4 +948,7 @@
 
 // --------------------------------------------------------------------------
+//
+// Call Paint() of all gui elements
+//
 void MAstroCatalog::PaintMap()
 {
@@ -880,4 +960,9 @@
 
 // --------------------------------------------------------------------------
+//
+// Append "this" to current pad
+// set bit kHasChanged to recreate all gui elements
+// Connect signal
+//
 void MAstroCatalog::Draw(Option_t *o)
 {
@@ -887,6 +972,5 @@
     // If contents have not previously changed make sure that
     // all primitives are recreated.
-    if (!TestBit(kHasChanged))
-        DrawPrimitives(o);
+    SetBit(kHasChanged);
 
     // Connect all TCanvas::ProcessedEvent to this->EventInfo
@@ -896,10 +980,4 @@
                                "MAstroCatalog", this,
                                "EventInfo(Int_t,Int_t,Int_t,TObject*)");
-
-    // Do this instead of fListG.Draw, because
-    // TCollection overwrites Draw
-    // Would be nice, but doesn't work because the single
-    // graphical object are not handled by TPad anymore...
-    //    fListG.AppendPad();
 }
 
@@ -944,4 +1022,5 @@
         return;
 
+    // Handle some gui events
     switch (event)
     {
@@ -963,4 +1042,7 @@
 
 // --------------------------------------------------------------------------
+//
+// Handle keyboard events.
+//
 void MAstroCatalog::ExecuteEventKbd(Int_t keycode, Int_t keysym)
 {
@@ -1015,4 +1097,7 @@
 
 // --------------------------------------------------------------------------
+//
+// Calculate distance to primitive by checking all gui elements
+//
 Int_t MAstroCatalog::DistancetoPrimitive(Int_t px, Int_t py)
 {
@@ -1053,4 +1138,5 @@
     fToolTip->Show(x+4, y+4);
 }
+
 /*
 void MAstroCatalog::RecursiveRemove(TObject *obj)
Index: trunk/MagicSoft/Mars/mastro/MAstroCatalog.h
===================================================================
--- trunk/MagicSoft/Mars/mastro/MAstroCatalog.h	(revision 3703)
+++ trunk/MagicSoft/Mars/mastro/MAstroCatalog.h	(revision 3704)
@@ -33,11 +33,5 @@
     TString fName;
 
-
 public:
-    /*
-     MVector3(Double_t theta=0, Double_t phi=0, Double_t mag=1)
-     {
-     SetMagThetaPhi(exp(mag), theta, phi);
-     }*/
     MVector3() { fType=kIsInvalid; }
     MVector3(const TVector3 &v3) : TVector3(v3) { fType=kIsArbitrary; }
@@ -62,11 +56,6 @@
 
     const char *GetName() const { return fName; }
-/*
-    MVector3 GetZdAz(const MObservatory &obs, Double_t gmst) const;
-    MVector3 GetZdAz(const MTime &time, MObservatory &obs) const;
-    MVector3 GetRaDec(const MObservatory &obs, Double_t gmst) const;
-    MVector3 GetRaDec(const MTime &time, MObservatory &obs) const;
-  */
-    ClassDef(MVector3, 1)
+
+    ClassDef(MVector3, 1) // A specialized TVector3 storeing a star-name
 };
 
@@ -134,13 +123,13 @@
 protected:
     enum {
-        kHasChanged  = BIT(15),
-        kGuiActive   = BIT(16),
-        kPlainScreen = BIT(17),
-        kMirrorX     = BIT(18),
-        kMirrorY     = BIT(19)
+        kHasChanged  = BIT(15), // Display has changed
+        kGuiActive   = BIT(16), // GUI is interactive
+        kPlainScreen = BIT(17), // View is a plain screen view
+        kMirrorX     = BIT(18), // Mirror display in X
+        kMirrorY     = BIT(19)  // Mirror display in Y
     };
 
-    TList    fList;      // List of stars loaded
-    MVector3 fRaDec;     // pointing position
+    TList    fList;             // List of stars loaded
+    MVector3 fRaDec;            // pointing position
 
     MObservatory *fObservatory; // Possible obervatory location
@@ -157,6 +146,4 @@
     void AddMap(TObject *k, void *v=0)
     {
-        //k->SetBit(kCanDelete);
-        //k->SetBit(kCannotPick);
         fMapG.Add(fMapG.GetSize(), (Long_t)k, (Long_t)v);
     }
@@ -189,8 +176,8 @@
     Bool_t IsPlainScreen() const             { return TestBit(kPlainScreen); }
 
-    Double_t GetLimMag() const { return fLimMag; }
-    Double_t GetRadiusFOV() const { return fRadiusFOV; }
-
-    void Delete(Option_t *o="") { fList.Delete(); DeleteMap(); }
+    Double_t GetLimMag() const { return fLimMag; } // Get Limiting Magnitude
+    Double_t GetRadiusFOV() const { return fRadiusFOV; } // Get maximum radius of Field Of View
+
+    void Delete(Option_t *o="") { fList.Delete(); DeleteMap(); } // Delete list of stars
 
     Int_t ReadXephem(TString catalog = "/usr/X11R6/lib/xephem/catalogs/YBS.edb");
@@ -198,7 +185,7 @@
     Int_t ReadBSC(TString catalog = "bsc5.dat");
 
-    void Print(Option_t *o="") const { fList.Print(); }
-
-    TList *GetList() { return &fList; }
+    void Print(Option_t *o="") const { fList.Print(); } // Print all stars
+
+    TList *GetList() { return &fList; } // Return list of stars
 
     void Draw(Option_t *o="");
@@ -211,5 +198,5 @@
     virtual void EventInfo(Int_t event, Int_t px, Int_t py, TObject *selected=0);
 
-    ClassDef(MAstroCatalog, 1)
+    ClassDef(MAstroCatalog, 1) // Display class for star catalogs
 };
 #endif
Index: trunk/MagicSoft/Mars/mastro/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mastro/Makefile	(revision 3703)
+++ trunk/MagicSoft/Mars/mastro/Makefile	(revision 3704)
@@ -33,6 +33,6 @@
 	   MAstroSky2Local.cc \
 	   MAstroCatalog.cc \
+           MAstroCamera.cc \
            MObservatory.cc
-#           MAstroCamera.cc \
 
 SRCS    = $(SRCFILES)
