Changeset 9495 for trunk/MagicSoft/Cosy


Ignore:
Timestamp:
08/17/09 12:19:59 (15 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/Changelog

    r9445 r9495  
    11                                                                  -*-*- END -*-*-
     2
     3 2009/08/17 Thomas Bretz
     4
     5   * tpoint/TPointGui.[h,cc]:
     6     - keep different paths in memory for collections and models
     7     - show kept collection in window title
     8     - added option to set a limiting magnitude for the fit
     9     - setup a new default for the coefficients
     10     - set new icon and window names
     11
     12
    213
    314 2009/05/12 Thomas Bretz (La Palma)
  • trunk/MagicSoft/Cosy/tpoint/TPointGui.cc

    r8982 r9495  
    3434
    3535TPointGui::TPointGui(const char *fname, const char *mod) : TGMainFrame(gClient->GetRoot(), 750, 435, kHorizontalFrame), fExitLoopOnClose(kFALSE),
    36    fAzMin(-180), fAzMax(180), fZdMin(0), fZdMax(90), fLimit(0.05)
     36   fAzMin(-180), fAzMax(180), fZdMin(0), fZdMax(90), fMagMin(0), fLimit(0.05)
    3737{
    3838    fCoordinates.SetOwner();
     
    192192    TGLabel *label1 = new TGLabel(v1, "Az min/°");
    193193    TGLabel *label2 = new TGLabel(v2, "Az max/°");
    194     TGLabel *label3 = new TGLabel(v3, "Limit/°");
     194    TGLabel *label3 = new TGLabel(v3, "Mag min");
    195195    TGLabel *label4 = new TGLabel(v1, "Zd min/°");
    196196    TGLabel *label5 = new TGLabel(v2, "Zd max/°");
     
    209209    fList->Add(label6);
    210210
    211     TGTextEntry *entry1 = new TGTextEntry(v1, Form("%.1f", fAzMin), kIdAzMin);
    212     TGTextEntry *entry2 = new TGTextEntry(v2, Form("%.1f", fAzMax), kIdAzMax);
    213     TGTextEntry *entry3 = new TGTextEntry(v3, " ", -1);
    214     TGTextEntry *entry4 = new TGTextEntry(v1, Form("%.1f", fZdMin), kIdZdMin);
    215     TGTextEntry *entry5 = new TGTextEntry(v2, Form("%.1f", fZdMax), kIdZdMax);
    216     TGTextEntry *entry6 = new TGTextEntry(v3, Form("%.3f", fLimit), kIdLimit);
    217     entry3->SetEnabled(kFALSE);
     211    TGTextEntry *entry1 = new TGTextEntry(v1, Form("%.1f", fAzMin),  kIdAzMin);
     212    TGTextEntry *entry2 = new TGTextEntry(v2, Form("%.1f", fAzMax),  kIdAzMax);
     213    TGTextEntry *entry3 = new TGTextEntry(v3, Form("%.1f", fMagMin), kIdMagMin);
     214    TGTextEntry *entry4 = new TGTextEntry(v1, Form("%.1f", fZdMin),  kIdZdMin);
     215    TGTextEntry *entry5 = new TGTextEntry(v2, Form("%.1f", fZdMax),  kIdZdMax);
     216    TGTextEntry *entry6 = new TGTextEntry(v3, Form("%.3f", fLimit),  kIdLimit);
    218217    entry1->SetToolTipText("TPoints with a real star located at Az<Az min are ignored in the fit.");
    219218    entry2->SetToolTipText("TPoints with a real star located at Az>Az max are ignored in the fit.");
     219    entry2->SetToolTipText("TPoints with a artifiical magnitude Mag<Mag min are ignored in the fit.");
    220220    entry4->SetToolTipText("TPoints with a real star located at Zd<Zd min are ignored in the fit.");
    221221    entry5->SetToolTipText("TPoints with a real star located at Zd>Zd max are ignored in the fit.");
     
    251251    ((TGCheckButton*)fList->FindWidget(0))->SetState(kButtonDown);
    252252    ((TGCheckButton*)fList->FindWidget(1))->SetState(kButtonDown);
     253    ((TGCheckButton*)fList->FindWidget(5))->SetState(kButtonDown);
    253254    ((TGCheckButton*)fList->FindWidget(6))->SetState(kButtonDown);
    254     ((TGCheckButton*)fList->FindWidget(10))->SetState(kButtonDown);
    255     ((TGCheckButton*)fList->FindWidget(12))->SetState(kButtonDown);
     255    ((TGCheckButton*)fList->FindWidget(9))->SetState(kButtonDown);
     256    ((TGCheckButton*)fList->FindWidget(11))->SetState(kButtonDown);
     257    ((TGCheckButton*)fList->FindWidget(15))->SetState(kButtonDown);
     258    ((TGCheckButton*)fList->FindWidget(16))->SetState(kButtonDown);
    256259    ((TGCheckButton*)fList->FindWidget(17))->SetState(kButtonDown);
    257260
     
    266269    ((TGCheckButton*)fList->FindWidget(22+2*MPointing::GetNumPar()))->SetState(kButtonDisabled);
    267270
    268     SetWindowName("TPoint Fitting Window");
    269     SetIconName("TPoint++");
     271    SetWindowName("Telesto");
     272    SetIconName("Telesto");
    270273
    271274    Layout();
     
    306309
    307310        if (set.GetStarZd()<fZdMin || set.GetStarZd()>fZdMax ||
    308             set.GetStarAz()<fAzMin || set.GetStarAz()>fAzMax)
     311            set.GetStarAz()<fAzMin || set.GetStarAz()>fAzMax ||
     312            set.GetMag()   <fMagMin)
    309313            continue;
    310314
     
    582586}
    583587
    584 TString TPointGui::OpenDialog(EFileDialogMode mode)
     588TString TPointGui::OpenDialog(TString &dir, EFileDialogMode mode)
    585589{
    586590    static const char *gOpenTypes[] =
     
    593597    };
    594598
    595     static TString dir("tpoint/");
     599    //static TString dir("tpoint/");
    596600
    597601    TGFileInfo fi; // fFileName and fIniDir deleted in ~TGFileInfo
     
    648652        LoadCollection(fname);
    649653        fFileNameStars = fname;
     654        SetWindowName(Form("Telesto (%s)", fFileNameStars.Data()));
    650655        return;
    651656    }
     
    683688
    684689    fFileNameStars = fname;
     690    SetWindowName(Form("Telesto (%s)", fFileNameStars.Data()));
    685691}
    686692
     
    694700    // cout << "Msg: " << hex << GET_MSG(msg) << endl;
    695701    // cout << "SubMsg: " << hex << GET_SUBMSG(msg) << dec << endl;
     702
     703    static TString dirmod("tpoint/");
     704    static TString dircol("tpoint/");
     705
    696706    switch (GET_MSG(msg))
    697707    {
     
    713723                return kTRUE;
    714724            case kTbLoad:
    715                 fBending.Load(OpenDialog());
     725                fBending.Load(OpenDialog(dirmod));
    716726                DisplayBending();
    717727                return kTRUE;
    718728            case kTbSave:
    719                 fBending.Save(OpenDialog(kFDSave));
     729                fBending.Save(OpenDialog(dirmod, kFDSave));
    720730                return kTRUE;
    721731            case kTbLoadStars:
    722                 LoadStars(OpenDialog());
     732                LoadStars(OpenDialog(dircol));
    723733                DisplayData();
    724734                return kTRUE;
     
    762772            case kIdZdMax:
    763773                fZdMax = GetFloat(kIdZdMax);
     774                return kTRUE;
     775            case kIdMagMin:
     776                fMagMin = GetFloat(kIdMagMin);
    764777                return kTRUE;
    765778            case kIdLimit:
  • trunk/MagicSoft/Cosy/tpoint/TPointGui.h

    r8973 r9495  
    3333        kIdZdMin,
    3434        kIdZdMax,
     35        kIdMagMin,
    3536        kIdLimit,
    3637    };
     
    5455    Float_t fZdMin;
    5556    Float_t fZdMax;
     57    Float_t fMagMin;
    5658
    5759    Float_t fLimit;
     
    7476    void DrawHorizon(TVirtualPad *pad, const char *fname="horizon.dat") const;
    7577
    76     TString OpenDialog(EFileDialogMode mode=kFDOpen);
     78    TString OpenDialog(TString &dir, EFileDialogMode mode=kFDOpen);
    7779
    7880    void LoadCollection(TString fname);
Note: See TracChangeset for help on using the changeset viewer.