Ignore:
Timestamp:
05/20/04 04:42:48 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy/catalog
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/catalog/CatalogLinkDef.h

    r1109 r4104  
    99#pragma link C++ class SlaPlanets+;
    1010
    11 #pragma link C++ class SaoFile+;
    1211#pragma link C++ class StarCatalog+;
    1312
  • trunk/MagicSoft/Cosy/catalog/Makefile

    r1109 r4104  
    3131.SUFFIXES: .c .cc .cxx .h .hxx .o
    3232
    33 SRCFILES = SaoFile.cc \
    34            Slalib.cc \
     33SRCFILES = Slalib.cc \
    3534           SlaStars.cc \
    3635           SlaPlanets.cc \
  • trunk/MagicSoft/Cosy/catalog/Slalib.cc

    r3897 r4104  
    6161    return ZdAz(kPiDiv2-alt, az);
    6262}
    63 /*
    64 Double_t Slalib::Hms2Sec(Int_t deg, UInt_t min, Double_t sec, Char_t sgn)
    65 {
    66     const Double_t rc = TMath::Sign((60.0 * (60.0 * (Double_t)TMath::Abs(deg) + (Double_t)min) + sec), (Double_t)deg);
    67     return sgn=='-' ? -rc : rc;
    68 }
    69 
    70 Double_t Slalib::Dms2Rad(Int_t deg, UInt_t min, Double_t sec, Char_t sgn)
    71 {
    72     // pi/(180*3600):  arcseconds to radians
    73 #define DAS2R 4.8481368110953599358991410235794797595635330237270e-6
    74     return Hms2Sec(deg, min, sec, sgn)*DAS2R;
    75 }
    76 
    77 Double_t Slalib::Hms2Rad(Int_t hor, UInt_t min, Double_t sec, Char_t sgn)
    78 {
    79     // pi/(12*3600):  seconds of time to radians
    80 #define DS2R 7.2722052166430399038487115353692196393452995355905e-5
    81     return Hms2Sec(hor, min, sec, sgn)*DS2R;
    82 }
    83 
    84 Double_t Slalib::Dms2Deg(Int_t deg, UInt_t min, Double_t sec, Char_t sgn)
    85 {
    86     return Hms2Sec(deg, min, sec, sgn)/3600.;
    87 }
    88 
    89 Double_t Slalib::Hms2Deg(Int_t hor, UInt_t min, Double_t sec, Char_t sgn)
    90 {
    91     return Hms2Sec(hor, min, sec, sgn)/240.;
    92 }
    93 
    94 Double_t Slalib::Dms2Hor(Int_t deg, UInt_t min, Double_t sec, Char_t sgn)
    95 {
    96     return Hms2Sec(deg, min, sec, sgn)/15.;
    97 }
    98 
    99 Double_t Slalib::Hms2Hor(Int_t hor, UInt_t min, Double_t sec, Char_t sgn)
    100 {
    101     return Hms2Sec(hor, min, sec, sgn)/3600.;
    102 }
    103 
    104 void Slalib::Day2Hms(Double_t day, Char_t &sgn, UShort_t &hor, UShort_t &min, UShort_t &sec)
    105 {
    106     // Handle sign
    107     sgn = day<0?'-':'+';
    108 
    109     // Round interval and express in smallest units required
    110     Double_t a = Round(86400. * TMath::Abs(day)); // Days to seconds
    111 
    112     // Separate into fields
    113     const Double_t ah = Trunc(a/3600.);
    114     a -= ah * 3600.;
    115     const Double_t am = Trunc(a/60.);
    116     a -= am * 60.;
    117     const Double_t as = Trunc(a);
    118 
    119     // Return results
    120     hor = (UShort_t)ah;
    121     min = (UShort_t)am;
    122     sec = (UShort_t)as;
    123 }
    124 
    125 void Slalib::Rad2Hms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec)
    126 {
    127     Day2Hms(rad/(TMath::Pi()*2), sgn, deg, min, sec);
    128 }
    129 
    130 void Slalib::Rad2Dms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec)
    131 {
    132     Rad2Hms(rad*15, sgn, deg, min, sec);
    133 }
    134 
    135 void Slalib::Deg2Dms(Double_t d, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec)
    136 {
    137     Day2Hms(d/24, sgn, deg, min, sec);
    138 }
    139 
    140 void Slalib::Deg2Hms(Double_t d, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec)
    141 {
    142     Rad2Hms(d/360, sgn, deg, min, sec);
    143 }
    144 
    145 void Slalib::Hor2Dms(Double_t h, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec)
    146 {
    147     Day2Hms(h*15/24, sgn, deg, min, sec);
    148 }
    149 
    150 void Slalib::Hor2Hms(Double_t h, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec)
    151 {
    152     Day2Hms(h/24, sgn, deg, min, sec);
    153 }
    154 
    155 void Slalib::Day2Hm(Double_t day, Char_t &sgn, UShort_t &hor, Double_t &min)
    156 {
    157     // Handle sign
    158     sgn = day<0?'-':'+';
    159 
    160     // Round interval and express in smallest units required
    161     Double_t a = Round(86400. * TMath::Abs(day)); // Days to seconds
    162 
    163     // Separate into fields
    164     const Double_t ah = Trunc(a/3600.);
    165     a -= ah * 3600.;
    166 
    167     // Return results
    168     hor = (UShort_t)ah;
    169     min = a/60.;
    170 }
    171 
    172 void Slalib::Rad2Hm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min)
    173 {
    174     Day2Hm(rad/(TMath::Pi()*2), sgn, deg, min);
    175 }
    176 
    177 void Slalib::Rad2Dm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min)
    178 {
    179     Rad2Hm(rad*15, sgn, deg, min);
    180 }
    181 
    182 void Slalib::Deg2Dm(Double_t d, Char_t &sgn, UShort_t &deg, Double_t &min)
    183 {
    184     Day2Hm(d/24, sgn, deg, min);
    185 }
    186 
    187 void Slalib::Deg2Hm(Double_t d, Char_t &sgn, UShort_t &deg, Double_t &min)
    188 {
    189     Rad2Hm(d/360, sgn, deg, min);
    190 }
    191 
    192 void Slalib::Hor2Dm(Double_t h, Char_t &sgn, UShort_t &deg, Double_t &min)
    193 {
    194     Day2Hm(h*15/24, sgn, deg, min);
    195 }
    196 
    197 void Slalib::Hor2Hm(Double_t h, Char_t &sgn, UShort_t &deg, Double_t &min)
    198 {
    199     Day2Hm(h/24, sgn, deg, min);
    200 }
    201 
    202 */
  • trunk/MagicSoft/Cosy/catalog/StarCatalog.cc

    r4076 r4104  
    196196        Float_t yy = loc.X()*fSinAngle + loc.Y()*fCosAngle;
    197197
     198        if (xx<0 || xx >=768 || yy<0 || yy>=576)
     199            continue;
     200
    198201        // Store pixel coordinates of star in list
    199202        list.Add(xx+768/2, yy+576/2, -2.5*log10(mag));
Note: See TracChangeset for help on using the changeset viewer.