Changeset 4888 for trunk/MagicSoft/Cosy


Ignore:
Timestamp:
09/08/04 18:01:21 (20 years ago)
Author:
rwagner
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/Changelog

    r4867 r4888  
    2020     - Acquisition of sky brightness (average CCD pixel content in Starfield)
    2121       and comparison to last sky brightness
    22      - MStarguider::TrackingError(): Modified histogram binning to enhance excess
     22     - MStarguider::TrackingError(): Modified histogram binning to enhance
     23       excess
    2324     - MStarguider::FindStar(): Now returns position of found star as ZdAz
    24      - MStarguider::FindStar(): Cut and ROI box can now handed over as parameters
     25     - MStarguider::FindStar(): Cut and ROI box can now handed over as i
     26       parameters
    2527     - MStarguider::FindStar(): Scale factor to compensate for different FOV
    2628       (TPoint camera vs. Starfield camera)
    2729     - MStarguider::ProcessFrame(): Modified structure to accomodate Starguider
    28        algorithm and tools: 1) Find Center of PMT camera, find Star (if activated)
     30       algorithm and tools: 1) Find Center of PMT camera, find Star (if
     31       activated)
    2932       to obtain misspointing found from PMT camera.
    3033     - Set ROI for starfield in space not occupied by the PMT camera in the
    3134       starfield camera FOV
    3235     - Calculate star positions and draw stars only in that ROI
    33      - fStatus variable contains status of starguider (Error, Monitoring, Standby)
     36     - fStatus variable contains status of starguider (Error, Monitoring,
     37       Standby)
    3438     - Draw representation of MAGIC's FOV on starfield
    3539     - Send STARG-REPORTS unconditionally by using MDriveCom::SendStargReport
    36 
    37 
    38  Finalized
    39        details of all changes follow after some additional testing
    40        on 2004/09/06 (this evening).
     40     - Add Ra/Dec in filename when writing pictures
     41     - Introduced #define EXPERT to allow for debug output
     42     - tracking_*.txt is only produced in case of EXPERT mode
    4143
    4244   * tcpip/MTcpIpIO.[h,cc], tcpip/MCeCoCom.[h,cc]
     
    9597       chosen FOV
    9698
     99   * videodev/Writer.[cc,h]
     100     - Ra/Dec in filename when writing pictures
    97101 
     102
    98103
    99104 2004/08/23 - Thomas Bretz
  • trunk/MagicSoft/Cosy/main/MStarguider.cc

    r4865 r4888  
    658658                return kTRUE;
    659659
    660 
    661660            case IDM_kStargHistograms:
    662661                Toggle(fDisplay, IDM_kStargHistograms);
     
    942941    TH2F h("Hist", "dX/dY", 49, -768/2-8, 768/2+8, 37, -576/2-8, 576/2+8); // 3
    943942
    944     TH1F hmag("HistMag", "Mag", 19, 0, 100);
    945     for (int i=0; i<mag.GetSize(); i++)
    946         hmag.Fill(mag[i]);
     943//     TH1F hmag("HistMag", "Mag", 19, 0, 100);
     944//     for (int i=0; i<mag.GetSize(); i++)
     945//         hmag.Fill(mag[i]);
    947946   
    948947    //
     
    10401039    stars.Sort(); // Sort by magnitude
    10411040
     1041#ifdef EXPERT
    10421042    TString str = "data/tracking_";
    10431043    str += fSao->GetMjd();
     
    10451045
    10461046    ofstream fout(str);
     1047#endif
    10471048
    10481049    TArrayF x, y, mag;
     
    10711072            y.AddAt(dpos.Y(), idx);
    10721073            mag.AddAt(spot->GetMag()/star->GetMag(), idx);
    1073 
     1074#ifdef EXPERT
    10741075            if (fout) {
    10751076                fout << spot->GetX() << " "
     
    10811082                fout << x[idx] << " " << y[idx] << " " << mag[idx] << endl;
    10821083            }
     1084#endif
    10831085        }
    10841086    } 
     
    12921294    if (!fWritePictures->IsEntryEnabled(IDM_kStart) &&
    12931295        (!(n%fWrtRate) || fWriteType->IsEntryChecked(IDM_kOnce)))
    1294     {
     1296    {     
     1297 
    12951298        if (fFileType->IsEntryChecked(IDM_kPNG))
    1296             Writer::Png("pix/file", img, tm);
     1299            Writer::Png("pix/file", img, tm, fCRaDec->GetCoordinates());
    12971300       
    12981301        if (fFileType->IsEntryChecked(IDM_kPPM))
    1299             Writer::Ppm("pix/file", img, tm);
     1302            Writer::Ppm("pix/file", img, tm, fCRaDec->GetCoordinates());
    13001303       
    13011304        if (fWriteType->IsEntryChecked(IDM_kOnce))
  • trunk/MagicSoft/Cosy/videodev/Writer.cc

    r2615 r4888  
    66#include <stdio.h>    // FILE
    77#include <png.h>
     8#include <coord.h>
    89
    910#include "MTime.h"
     
    1213
    1314void Writer::Png(const char *fname, const byte *buf,
    14                  struct timeval *date)
     15                 struct timeval *date, const XY xy)
    1516{
    1617    MTime t(*date);
     
    2122        mjd.Append('0', 10-mjd.Length());
    2223
     24    TString pos;
     25    pos += xy.X();
     26    pos = pos.Strip(TString::kBoth);
     27    pos +="_";
     28    TString posy;
     29    posy += xy.Y();
     30    posy = posy.Strip(TString::kBoth);
     31    pos +=posy;
     32
    2333    TString name = fname;
    2434    name += "_";
    2535    name += mjd;
     36    name += "_";
     37    name += pos;
    2638    name += ".png";
    2739
     
    125137}
    126138
    127 void Writer::Ppm(const char *fname, const byte *img, struct timeval *date)
     139void Writer::Ppm(const char *fname, const byte *img, struct timeval *date, const XY xy)
    128140{
    129141    TString name = fname;
     
    131143    MTime t(*date);
    132144
     145    TString pos;
     146    pos += xy.X();
     147    pos = pos.Strip(TString::kBoth);
     148    pos +="_";
     149    TString posy;
     150    posy += xy.Y();
     151    posy = posy.Strip(TString::kBoth);
     152    pos +=posy;
     153
    133154    name += "_";
    134155    name += t.GetMjd()-52000;
     156    name += "_";
     157    name += pos; 
    135158    name += ".ppm";
    136159
  • trunk/MagicSoft/Cosy/videodev/Writer.h

    r1816 r4888  
    99#endif
    1010
     11#ifndef COORD_H
     12#include <coord.h>
     13#endif
     14
    1115typedef unsigned char byte;
    1216
     
    1721public:
    1822
    19     static void Ppm(const char *fname, const byte *img, struct timeval *date);
    20     static void Png(const char *fname, const byte *buf, struct timeval *date);
     23    static void Ppm(const char *fname, const byte *img, struct timeval *date, const XY xy);
     24    static void Png(const char *fname, const byte *buf, struct timeval *date, const XY xy);
    2125
    2226    ClassDef(Writer, 0)
Note: See TracChangeset for help on using the changeset viewer.