Ignore:
Timestamp:
May 24, 2002, 4:54:53 PM (23 years ago)
Author:
lemeur
Message:

amelioration de la projection de localmap

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/SkyMap/fiolocalmap.cc

    r1967 r2013  
    22
    33#include "fiolocalmap.h"
     4#include "fioarr.h"
    45#include "pexceptions.h"
    56#include "fiondblock.h"
     
    115116  //  dobj->setSize_y(nSzY);
    116117
    117   int_4 nPix;
    118   is.GetI4(nPix);
     118  // int_4 nPix;
     119  // is.GetI4(nPix);
    119120  //  dobj->setNbPixels(nPix);
    120121  dobj->ReSize(nSzX, nSzY);
    121   string ss("local mapping is done");
    122   string sso;
    123   is.GetStr(sso);
    124   if(sso == ss)
    125     {
    126       cout<<" ReadSelf:: local mapping"<<endl;
    127       int_4 x0, y0;
    128       double theta, phi, angle;
    129       is.GetI4(x0);
    130       is.GetI4(y0);
    131       is.GetR8(theta);
    132       is.GetR8(phi);
    133       is.GetR8(angle);
    134       dobj->SetOrigin(theta, phi, x0, y0, angle);
     122  //  string ss("local mapping is done");
     123  // string sso;
     124  // is.GetStr(sso);
     125  // if(sso == ss)
     126  //  {
     127  //   cout<<" ReadSelf:: local mapping"<<endl;
    135128
    136129      double angleX, angleY;
     
    138131      is.GetR8(angleY);
    139132      dobj->SetSize(angleX, angleY);
    140     }
     133
     134
     135      int_4 x0, y0;
     136      double theta, phi, angle;
     137      is.GetR8(theta);
     138      is.GetR8(phi);
     139      is.GetI4(x0);
     140      is.GetI4(y0);
     141      is.GetR8(angle);
     142      dobj->SetOrigin(theta, phi, x0, y0, angle);
     143
     144      //  }
    141145
    142146// On lit le DataBlock;
    143   FIO_NDataBlock<T> fio_nd(&dobj->DataBlock());
     147      //  FIO_NDataBlock<T> fio_nd(&dobj->DataBlock());
     148// On lit la matrice;
     149  FIO_TArray<T> fio_nd(&dobj->Matrix());
    144150  fio_nd.Read(is);
    145151}
     
    176182  os.PutI4(nSzX);
    177183  os.PutI4(nSzY);
    178   os.PutI4(nPix);
    179 
    180   if(dobj->LocalMap_isDone())
    181     {
    182       string ss("local mapping is done");
    183       os.PutStr(ss);
    184       int_4 x0, y0;
    185       double theta, phi, angle;
    186       dobj->Origin(theta, phi, x0, y0, angle);
    187       os.PutI4(x0);
    188       os.PutI4(y0);
    189       os.PutR8(theta);
    190       os.PutR8(phi);
    191       os.PutR8(angle);
     184  //  os.PutI4(nPix);
     185
     186  // if(dobj->LocalMap_isDone())
     187  // {
     188  //   string ss("local mapping is done");
     189  //    os.PutStr(ss);
    192190
    193191      double angleX, angleY;
     
    195193      os.PutR8(angleX);
    196194      os.PutR8(angleY);
    197     }
    198   else
    199     {
    200       string ss("no local mapping");
    201       os.PutStr(ss);
    202     }
     195
     196
     197      int_4 x0, y0;
     198      double theta, phi, angle;
     199      dobj->Origin(theta, phi, x0, y0, angle);
     200      os.PutR8(theta);
     201      os.PutR8(phi);
     202      os.PutI4(x0);
     203      os.PutI4(y0);
     204      os.PutR8(angle);
     205
     206      // }
     207// else
     208//  {
     209//   string ss("no local mapping");
     210//   os.PutStr(ss);
     211//  }
    203212
    204213// On ecrit le dataBlock
    205   FIO_NDataBlock<T> fio_nd(&dobj->DataBlock());
     214      //  FIO_NDataBlock<T> fio_nd(&dobj->DataBlock());
     215// On ecrit la matrice
     216  FIO_TArray<T> fio_nd(&dobj->Matrix());
    206217  fio_nd.Write(os);
    207218}
Note: See TracChangeset for help on using the changeset viewer.