Ignore:
Timestamp:
Nov 26, 2001, 4:13:38 PM (24 years ago)
Author:
aubourg
Message:

debug bornes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ArchTOIPipe/ProcWSophya/toi2map.cc

    r1762 r1786  
    33//                               Christophe Magneville
    44//                               Reza Ansari
    5 // $Id: toi2map.cc,v 1.15 2001-11-13 16:22:47 aubourg Exp $
     5// $Id: toi2map.cc,v 1.16 2001-11-26 15:13:38 aubourg Exp $
    66
    77#include "machdefs.h"
     
    162162  // sphere theta entre [0,Pi]   en radians
    163163  double phi=-1.,theta;
    164   CoordConvertToStd(mTypCoorIn,coord1,coord2);
     164  int crc = CoordConvertToStd(mTypCoorIn,coord1,coord2);
     165
     166  // On tente de remettre dans l'intervalle si on est hors intervalle
     167  if ((mTypCoorIn&TypCoordEq) && (coord1<0))
     168    coord1 += 24;
     169  if ((mTypCoorIn&TypCoordEq) && (coord1>24))
     170    coord1 -= 24;
     171  if ((mTypCoorIn&TypCoordEq) && (coord2>90))
     172    coord2 -= 180;
     173  if ((mTypCoorIn&TypCoordEq) && (coord2<-90))
     174    coord2 += 180;
     175
     176  if ((mTypCoorIn&TypCoordGal) && (coord1<0))
     177    coord1 += 360;
     178  if ((mTypCoorIn&TypCoordGal) && (coord1>360))
     179    coord1 -= 360;
     180  if ((mTypCoorIn&TypCoordGal) && (coord2>90))
     181    coord2 -= 180;
     182  if ((mTypCoorIn&TypCoordGal) && (coord2<-90))
     183    coord2 += 180;
     184
    165185  if(mTypCoorIn&TypCoordEq && mTypCoorOut&TypCoordGal) { // Eq -> Gal
    166186    EqtoGal(mjd,coord1,coord2,&coord1,&coord2);
     
    175195  }
    176196  theta = (90.-coord2) * M_PI/180.;
     197
     198  if(phi<0.   || phi>=2*M_PI || theta<0. || theta>=M_PI) {
     199    cout << "out of range " << theta << " " << phi << " "
     200         << coord1 << " " << coord2 << endl;
     201  }
     202     
     203
    177204  if(phi<0.   || phi>=2*M_PI) continue;
    178205  if(theta<0. || theta>=M_PI) continue;
Note: See TracChangeset for help on using the changeset viewer.