Changeset 581 in Sophya


Ignore:
Timestamp:
Nov 16, 1999, 5:10:08 PM (26 years ago)
Author:
ansari
Message:

sst

Location:
trunk/Poubelle/archTOI.old
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Poubelle/archTOI.old/archeopsfile.cc

    r534 r581  
    438438  static char* buffer = 0;
    439439  static int4  debswp = debut_block_mesure;
    440   static int4  longmax = taille_maxi_block_archeops*20;
     440  static long  longmax = taille_maxi_block_archeops*20;
    441441  if (!buffer) {
    442442    buffer = new char[longmax];
  • trunk/Poubelle/archTOI.old/gondolageom.cc

    r577 r581  
    1515double GondolaGeom::azFPC     = 0;
    1616double GondolaGeom::elevSST0  = 39.6567;
    17 double GondolaGeom::sstHeight = 1.41;
     17double GondolaGeom::sstPixelHeight = 0.031359;
    1818
    1919                        //       ;
  • trunk/Poubelle/archTOI.old/gondolageom.h

    r577 r581  
    4242  static double azFPC;      // degrees, relative to SST alignment
    4343  static double elevSST0;   // degrees
    44   static double sstHeight;  // degrees, between middle pixel 0 and pixel 45
     44  static double sstPixelHeight;  // degrees
    4545 
    4646  static void getAltAzBolo(int ibolo, double& elv, double& az); // pure geom,
  • trunk/Poubelle/archTOI.old/starmatcher.cc

    r577 r581  
    1212#define STARDUMP
    1313
     14#include <math.h>
     15
    1416extern "C" {
    1517#include "aa_hadec.h"
    1618#define NRANSI
    1719#include "nrutil.h"
     20
     21#ifndef M_PI
     22#define M_PI 3.1415926535
     23#endif
    1824
    1925void lfit(double x[], double y[], double sig[], int ndat, double a[], int ia[],
     
    235241    double dmin = delta - dist; if (dmin<-90) dmin=-90;
    236242    double dmax = delta + dist; if (dmax> 90) dmax= 90;
    237     double amin = alpha - dist / cos(delta * 3.1415926/180) / 15.;
     243    double amin = alpha - dist / cos(delta * M_PI/180) / 15.;
    238244    if (amin<0) amin += 24;
    239     double amax = alpha + dist / cos(delta * 3.1415926/180) / 15.;
     245    double amax = alpha + dist / cos(delta * M_PI/180) / 15.;
    240246    if (amax>24) amax -= 24;
    241247 
     
    256262    for (int i=imin; i<=imax; i++) {
    257263      if (stars[i].ra >= amin && stars[i].ra <= amax) {
    258         double ha = (ts/3600. - stars[i].ra) * 15. * 3.1415926/180.;
     264        double ha = (ts/3600. - stars[i].ra) * 15. * M_PI/180.;
    259265        double elv, azim;
    260         hadec_aa(lat * 3.1415926/180., ha, stars[i].dec * 3.1415926/180.,
     266        hadec_aa(lat * M_PI/180., ha, stars[i].dec * M_PI/180.,
    261267                 &elv, &azim);
    262         elv  *= 180/3.1415926;
    263         azim *= 180/3.1415926;
     268        elv  *= 180/M_PI;
     269        azim *= 180/M_PI;
    264270        if (azim<0) azim += 360;
    265271     
    266272        double da = azim-az; if (da>360) da -= 360;
    267273        if (da < -0.6 || da > 0.4) continue;
    268         double elv0 = elv - 1.41/45. * lastStar.NoDiode;
     274        double elv0 = elv - GondolaGeom::sstPixelHeight * lastStar.NoDiode;
    269275        if (fabs(elv0-GondolaGeom::elevSST0) > 0.25) continue; // Might be too strong
    270276       
     
    375381    if (ndata > 0 && az - oldAz >  180) az -= 360;
    376382    if (ndata > 0 && az - oldAz < -180) az += 360;
    377     fitElvAz.addData(s1.SN-sn0, s1.elvGSC - s1.nDiode*1.41/45., az);
     383    fitElvAz.addData(s1.SN-sn0, s1.elvGSC - s1.nDiode*GondolaGeom::sstPixelHeight, az);
    378384    oldAz = az;
    379385    ndata++;
     
    408414      matchStar sss = (*it1);
    409415      if (!sss.ok) continue;
    410       if (fabs(fitElvAz.valueY(sss.SN-sn0)-(sss.elvGSC - sss.nDiode*1.41/45.)) > dcutElv) {
     416      if (fabs(fitElvAz.valueY(sss.SN-sn0)-
     417               (sss.elvGSC - sss.nDiode*GondolaGeom::sstPixelHeight)) > dcutElv) {
    411418        (*it1).ok = false;
    412419        //logstream << "  kill " << sss.seq << " " << setprecision(11) << sss.SN << " "
     
    483490    ndata++;
    484491    snmean += st.SN;
    485     azi[ndata]  = st.azGSC * 3.1415926/180;
    486     elv0[ndata] = st.elvGSC - st.nDiode*1.41/45.;
     492    azi[ndata]  = st.azGSC * M_PI/180;
     493    elv0[ndata] = st.elvGSC - st.nDiode*GondolaGeom::sstPixelHeight;
    487494    sig[ndata]  = 0.01;
    488495  }
     
    516523
    517524  double ampl = sqrt(cc*cc+ss*ss);
    518   double phase = atan2(cc,ss)/(3.1415926/180);
     525  double phase = atan2(cc,ss)/(M_PI/180);
    519526 
    520527 
  • trunk/Poubelle/archTOI.old/toillsstproducer.cc

    r534 r581  
    1313
    1414// diodpermut[i] = channel de la diode i
     15// int TOILLSSTProducer::diodpermut[46]=
     16//  { 8,24,40, 9,25,41,10,26,42,11,
     17//   27,43,16,32, 1,17,33, 2,18,34,
     18//    3,19,35,12,28,44,13,29,45,14,
     19//   30,46,15,31,47,20,36, 5,21,37,
     20//    6,22,38, 7,23,39};
    1521int TOILLSSTProducer::diodpermut[46]=
    1622 { 8,24,40, 9,25,41,10,26,42,11,
     
    1824   3,19,35,12,28,44,13,29,45,14,
    1925  30,46,15,31,47,20,36, 5,21,37,
    20    6,22,38, 7,23,39};
     26   6,38,22, 7,23,39};
    2127 // voies 0 et 4 non connectees, voie 1 en panne.
    2228
Note: See TracChangeset for help on using the changeset viewer.