Changeset 394 in Sophya for trunk/Poubelle
- Timestamp:
- Sep 1, 1999, 2:45:54 PM (26 years ago)
- Location:
- trunk/Poubelle/archTOI.old
- Files:
-
- 16 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Poubelle/archTOI.old/archeopsfile.cc
r393 r394 884 884 } 885 885 886 double ArcheopsFile::getSSTStarT(int istar, int imesure) { 887 return blockSet->sstHandler.getStarTime(imesure, istar); 888 } 889 890 double ArcheopsFile::getNumbStar(int imesure) { 891 return blockSet->sstHandler.getNumbStar(imesure); 892 } 893 886 894 long ArcheopsFile::getGyro(int igyro, int imesure) { 887 895 if (igyro<0 || igyro>2) return 0; -
trunk/Poubelle/archTOI.old/archeopsfile.h
r350 r394 138 138 double getSSTStarZ(int iStar, int imesure); 139 139 double getSSTStarF(int iStar, int imesure); 140 double getSSTStarT(int iStar, int imesure); 141 double getNumbStar(int imesure); 140 142 141 143 int getGyroBlockNum(); -
trunk/Poubelle/archTOI.old/archtoi.cc
r358 r394 11 11 #include "toisvr.h" 12 12 #include "archtoi.h" 13 #include "archparam.h" 13 14 #include "asigps.h" 14 15 … … 74 75 else tsttoi(sstStarZ) 75 76 else tsttoi(sstStarF) 77 else tsttoi(sstStarT) 76 78 else tsttoi(gyroRaw) 77 79 else tsttoi(gpsTime) … … 155 157 double t0; 156 158 sscanf(arg.c_str(), "%lg", &t0); 157 svr.SetMJD0(t0);159 archParam.acq.tBlock0 = t0; 158 160 } else if (key == "#PERECH") { 159 161 double t0; 160 162 sscanf(arg.c_str(), "%lg", &t0); 161 svr.SetPerEch(t0);163 archParam.acq.perEch = t0; 162 164 } else if (key == "#ASIGPS") { 163 165 ASIGPS* gps = new ASIGPS(arg); -
trunk/Poubelle/archTOI.old/ssthandler.cc
r393 r394 13 13 #include <math.h> 14 14 #include "ssthandler.h" 15 #include <iostream.h>15 #include "pisteetoile.h" 16 16 17 17 // diodpermut[i] = channel de la diode i … … 25 25 26 26 SSTHandler::SSTHandler() 27 :sstchass("SSTChassLogFile") 27 28 { 28 29 diodeHistLength = nb_per_block*2+10; 29 30 diodeT = new int[diodeHistLength*nb_photo_diodes]; 30 31 starHistLength = 300; 31 stars = new (vector<star>[starHistLength]); 32 32 33 lastBlkNum = -1; 33 34 34 35 //Has2Bars(false); 35 36 prcTodo=0; 36 seuil=100; 37 } 38 39 SSTHandler::SSTHandler(SSTHandler const& x) 37 38 pPiste = NULL; 39 LastBlockSSTNb = -2; 40 noStarDet = 0; 41 42 findStarConstruct(); 43 44 } 45 46 SSTHandler::SSTHandler(SSTHandler const& x) 47 :sstchass("SSTChassLogFile") 40 48 { 41 49 diodeHistLength = x.diodeHistLength; … … 43 51 memcpy(diodeT, x.diodeT, diodeHistLength*nb_photo_diodes); 44 52 starHistLength = x.starHistLength; 45 stars = new (vector<star>[starHistLength]); 46 for (int i=0; i<starHistLength; i++) 47 stars[i] = x.stars[i]; 53 54 prcTodo = x.prcTodo; 55 // has2bars = x.has2bars; 56 lastBlkNum = x.lastBlkNum; 57 58 pPiste = NULL; 59 LastBlockSSTNb = x.LastBlockSSTNb; 60 noStarDet = x.noStarDet; 61 62 findStarConstruct(); 63 for(int i=0; i<NbPhotDiodBarette; i++) { 64 *PisteBar[i]=*(x.PisteBar[i]); 65 } 66 } 67 68 SSTHandler& SSTHandler::operator = (SSTHandler const& x) { 69 delete[] diodeT; 70 diodeHistLength = x.diodeHistLength; 71 diodeT = new int[diodeHistLength*nb_photo_diodes]; 72 memcpy(diodeT, x.diodeT, diodeHistLength*nb_photo_diodes); 48 73 49 74 prcTodo = x.prcTodo; … … 51 76 // elecOffset = x.elecOffset; 52 77 lastBlkNum = x.lastBlkNum; 53 seuil = x.seuil; 54 } 55 56 SSTHandler& SSTHandler::operator = (SSTHandler const& x) { 57 delete[] stars; 58 delete[] diodeT; 59 diodeHistLength = x.diodeHistLength; 60 diodeT = new int[diodeHistLength*nb_photo_diodes]; 61 memcpy(diodeT, x.diodeT, diodeHistLength*nb_photo_diodes); 62 starHistLength = x.starHistLength; 63 stars = new (vector<star>[starHistLength]); 64 for (int i=0; i<starHistLength; i++) 65 stars[i] = x.stars[i]; 66 67 prcTodo = x.prcTodo; 68 // has2bars = x.has2bars; 69 // elecOffset = x.elecOffset; 70 lastBlkNum = x.lastBlkNum; 71 seuil = x.seuil; 72 78 for(int i=0; i<NbPhotDiodBarette; i++) *PisteBar[i]=*(x.PisteBar[i]); 73 79 return *this; 74 80 } 75 81 76 SSTHandler::~SSTHandler() 77 { 78 delete[] stars; 82 SSTHandler::~SSTHandler(){ 79 83 delete[] diodeT; 84 findStarDestruct(); 80 85 } 81 86 … … 85 90 if (prcTodo & findAxis) prcTodo |= findPeriod; 86 91 if (prcTodo & findPeriod) prcTodo |= findStars; 87 if (prcTodo & findStars) prcTodo |= rmveOffset;92 if (prcTodo & findStars) prcTodo |= permDiode; 88 93 } 89 94 … … 96 101 elecOffset = eo; 97 102 } 98 99 void SSTHandler::ProcessBlock(block_type_sst* blk)100 {101 lastBlkNum = numero_block(blk);102 for (int i = 0; i<nb_per_block*2; i++) {103 DecodeTMBlock(blk, i, diodeRaw[i]);104 }105 if (prcTodo & rmveOffset) {106 RemoveOffset();107 }108 if (prcTodo & findStars) {109 FindStars();110 }111 }112 113 103 114 104 void SSTHandler::DecodeTMBlock(block_type_sst* blk, int i, int* diod) … … 139 129 140 130 141 void SSTHandler:: RemoveOffset()131 void SSTHandler::PermutDiode() 142 132 { 143 133 int j0 = diodeHistLength-(nb_per_block*2); … … 187 177 } 188 178 189 int SSTHandler::getStarZ(int imesure, int istar) // for last block 190 { 191 int j0 = starHistLength-(nb_per_block*2); 192 if (imesure+j0<0 || imesure>=nb_per_block*2) return -99999; 193 if (istar < 0 || istar >= stars[imesure+j0].size()) return -99999; 194 return stars[imesure+j0][istar].z; 195 } 196 197 int SSTHandler::getStarF(int imesure, int istar) // for last block 198 { 199 int j0 = starHistLength-(nb_per_block*2); 200 if (imesure+j0<0 || imesure>=nb_per_block*2) return -99999; 201 if (istar < 0 || istar >= stars[imesure+j0].size()) return -99999; 202 return stars[imesure+j0][istar].m; 203 } 204 205 206 void SSTHandler::FindStars() // sur les 72 derniers echantillons dans diode. 207 { 208 int js0 = starHistLength-(nb_per_block*2); 209 int jd0 = diodeHistLength-(nb_per_block*2); 210 // Decalage vers la gauche de la taille d'un bloc 211 for (int i=0; i<js0; i++) { 212 stars[i] = stars[i+(nb_per_block*2)]; 213 } 214 215 // Recherche d'etoiles 216 for (int i=0; i<(nb_per_block*2); i++) { 217 stars[js0+i].clear(); 218 for (int idiode=0; idiode<46; idiode++) { 219 if (diode(jd0+i,idiode) < -seuil) { 220 if (has2bars) { 221 for (int j=-2; j>=-5; j--) { 222 if (diode(jd0+i+j,(idiode+elecOffset)%46) < -seuil) { 223 star s; 224 s.z = idiode; 225 s.m = -diode(jd0+i,idiode); 226 s.t = i; // $CHECK$ need absolute time... 227 stars[js0+i].push_back(s); 228 break; 229 } else if (idiode<45 && diode(jd0+i+j,(idiode+1+elecOffset)%46) > seuil) { 230 star s; 231 s.z = idiode+.5; 232 s.m = -diode(jd0+i,idiode); 233 s.t = i; // $CHECK$ need absolute time... 234 stars[js0+i].push_back(s); 235 break; 236 } 237 } 238 } else { 239 if (diode(jd0+i,idiode) > diode(jd0+i-1,idiode)) { 240 star s; 241 s.z = idiode; 242 s.m = -diode(jd0+i-1,idiode); 243 s.t = i; // $CHECK$ need absolute time... 244 stars[js0+i].push_back(s); 245 } 246 } 247 } 248 } 249 } 250 251 252 } 179 int SSTHandler::FindStars(block_type_sst* blk) { 180 NbStarInBlock=0; 181 LastBlockStarVec.clear(); 182 183 int NoFirstSpInBlock=FirstSplNb(blk); 184 int jd0 = diodeHistLength-NbSampleBlock; 185 186 bool FlagLBlockPerdu=false; 187 int ThisBlockNumb=numero_block(blk); 188 189 if ((LastBlockSSTNb+1)==ThisBlockNumb) LastBlockSSTNb++; 190 else { 191 FlagLBlockPerdu=true; 192 LastBlockSSTNb=ThisBlockNumb; 193 } 194 195 // On cherche les etoiles 196 for(int NoDiode=0;NoDiode<NbPhotDiodBarette; NoDiode++) { 197 pPiste=PisteBar[NoDiode]; 198 199 // Traitons une diode pendant un block 200 offseDataDiod=0; 201 for (int i=0; i<NbSampleBlock; i++) Diodedata[i]=diode(jd0+i,NoDiode); 202 203 if (FlagLBlockPerdu) { 204 pPiste->fill(Diodedata+offseDataDiod,FirstSplNb(blk)); 205 offseDataDiod+=PhDiodTabLong; 206 } 207 else { 208 pPiste->push(Diodedata); 209 offseDataDiod+=Pousslong; 210 } 211 212 // Recherchons les etoiles 213 while (true) { 214 if (pPiste->traque()) { // On a trouve! 215 LastStar=pPiste->DonneEtoile(); 216 /* double dum= LastStar.TEchan; 217 pair<const double, SSTEtoile> unepaire=make_pair(dum,LastStar); 218 StarHistoryMap.insert(unepaire); 219 */ 220 StarHistoryMap[LastStar.TEchan]=LastStar; 221 //On empile sur la map. 222 NbStarInBlock++; 223 #ifdef SST_DEBUG 224 // On écrit les pistes ayant déclénchées 225 int NoDiodeEvt=LastStar.NoDiode; 226 if(pPisteDump[NoDiodeEvt]->is_open()) 227 for(int noSamp=0; noSamp<NbSampleBlock;noSamp++) 228 (*pPisteDump[NoDiodeEvt])<<noStarDet<<'\t'<<NoDiode<<'\t'<<NoFirstSpInBlock+noSamp<<'\t'<<Diodedata[noSamp]<<endl; 229 #endif 230 noStarDet++; 231 } 232 // Est-on en bout de Piste? 233 if(offseDataDiod+Pousslong>=NbSampleBlock) break; 234 else { 235 pPiste->push(Diodedata+offseDataDiod); 236 offseDataDiod+=Pousslong; 237 } 238 } 239 } 240 241 // On ne garde que les NbEtInSetMax dernières étoiles 242 int nbEtoileInMap=StarHistoryMap.size(); 243 if(nbEtoileInMap>NbEtInMapMax) { 244 int nbErase=nbEtoileInMap-NbEtInMapMax; 245 StarHistIter StarIter=StarHistoryMap.begin(); 246 for(int i=0;i<nbErase;i++){ 247 StarHistoryMap.erase(StarIter); 248 StarIter++; 249 } 250 nbEtoileInMap-=nbErase; 251 } 252 253 // On stocke les etoiles du block dans LastBlockStarVec 254 map<double,SSTEtoile>::reverse_iterator StarHistReIter= StarHistoryMap.rbegin() ; 255 for(int i=0; i<NbStarInBlock; i++, StarHistReIter++) 256 LastBlockStarVec.push_back((*StarHistReIter).second); 257 258 //#ifdef SST_DEBUG 259 if(NbStarInBlock>0) { 260 261 // On écrit les étoiles detectées 262 vector<SSTEtoile>::reverse_iterator StarVecRevIter; 263 StarVecRevIter=LastBlockStarVec.rbegin(); 264 for(int i=0; i<NbStarInBlock;i++,StarVecRevIter++) 265 (*StarVecRevIter).print(sstchass); 266 } 267 268 //#endif 269 270 return NbStarInBlock; 271 } 272 273 void SSTHandler::findStarConstruct() { 274 PisteBar=new PisteEtoile*[NbPhotDiodBarette]; 275 for(int i=0; i<NbPhotDiodBarette; i++) PisteBar[i]=new PisteEtoile(i); 276 StarHistoryMap.clear(); 277 sstchass<<LastStar.printHeader()<<endl; 278 279 #ifdef SST_DEBUG 280 char s[32]; 281 string fileName; 282 // if(pPisteDump==NULL) 283 pPisteDump= new ofstream* [NbChanDump]; 284 285 for (int pistNumb=0; pistNumb<NbChanDump; pistNumb++) { 286 sprintf(s,"%i", pistNumb); 287 string piste=s; 288 fileName="pisteno"+piste+"dump"; 289 /* 290 if ((*pPisteDump[pistNumb]).is_open()) { 291 cerr<<"Erreur: le fichier "<<fileName<<" devrait être libre"<<endl; 292 //On libère 293 (*pPisteDump[pistNumb]).close(); 294 delete pPisteDump[pistNumb]; 295 } 296 */ 297 pPisteDump[pistNumb]=new ofstream(fileName.c_str(),ios::out|ios::trunc); 298 299 if(!(*pPisteDump[pistNumb]).is_open()) { 300 cerr<<"Warning Echec à l'ouverture du fichier: "<<fileName<<endl; 301 } 302 } 303 #endif 304 return; 305 } 306 307 void SSTHandler::findStarDestruct() { 308 for(int i=0; i<NbPhotDiodBarette; i++) { 309 delete PisteBar[i]; 310 } 311 delete[] PisteBar; 312 313 #ifdef SST_DEBUG 314 for (int pistNumb=0; pistNumb<NbChanDump; pistNumb++) { 315 pPisteDump[pistNumb]->close(); 316 delete pPisteDump[pistNumb]; 317 } 318 delete pPisteDump; 319 #endif 320 321 return; 322 } 323 324 int SSTHandler::getNumbStar(int iSampl) { 325 StarHistIter IterLow=StarHistoryMap.lower_bound((double)iSampl); 326 StarHistIter IterHigh=StarHistoryMap.upper_bound((double)(iSampl+1.)); 327 int Compteur=0; 328 while (!(IterLow==IterHigh)) {IterLow++; Compteur++;} 329 return Compteur; 330 } 331 332 double SSTHandler::getStarF(int iSampl, int istar){ 333 if( (getNumbStar(iSampl)==0)||(getNumbStar(iSampl)<istar)) return -1; 334 else { 335 StarHistIter IterLow=StarHistoryMap.lower_bound((double)iSampl); 336 while(!(istar==0)) { 337 IterLow++; 338 istar--; 339 } 340 return (double) ((*IterLow).second).InpCurrent; 341 } 342 } 343 344 345 int SSTHandler::getStarZ(int iSampl, int istar) { 346 if( (getNumbStar(iSampl)==0)||(getNumbStar(iSampl)<istar)) return -1; 347 StarHistIter IterLow=StarHistoryMap.lower_bound((double)iSampl); 348 while(!(istar==0)) { 349 IterLow++; 350 istar--; 351 } 352 return ((*IterLow).second).NoDiode; 353 } 354 355 double SSTHandler::getStarTime(int iSampl, int istar) { 356 if( (getNumbStar(iSampl)==0)||(getNumbStar(iSampl)<istar)) return -1; 357 StarHistIter IterLow=StarHistoryMap.lower_bound((double)iSampl); 358 while(!(istar==0)) { 359 IterLow++; 360 istar--; 361 } 362 return ((*IterLow).second).TEchan; 363 } 364 365 int SSTHandler::FirstSplNb(block_type_sst* blk){ 366 return NbSampleBlock*numero_block(blk); // BUGG A verifier 367 } 368 369 370 void SSTHandler::ProcessBlock(block_type_sst* blk) 371 { 372 lastBlkNum = numero_block(blk); 373 for (int i = 0; i<nb_per_block*2; i++) { 374 DecodeTMBlock(blk, i, diodeRaw[i]); 375 } 376 if (prcTodo & permDiode) { 377 PermutDiode(); 378 } 379 if (prcTodo & findStars) { 380 FindStars(blk); 381 } 382 } 383 -
trunk/Poubelle/archTOI.old/ssthandler.h
r350 r394 5 5 #define SSTHANDLER_H 6 6 7 #include <math.h> 7 8 #include <vector> 9 #include <map> 8 10 9 11 #ifndef nb_max_bolo … … 15 17 #endif 16 18 19 class ArcheopsFile; 20 21 // Zone findStar 22 #include "sstetoile.h" 23 #include "pisteetoile.h" 24 25 //#define SST_DEBUG 26 #define NbChanDump (10) 27 #define NbPhotDiodBarette (46) 28 #define NbEtInMapMax (100) 29 #define SSTChassLog (true) 30 #define NbSampleBlock (2*nb_per_block) 31 // Fin Zone findStar 17 32 18 33 class SSTHandler { … … 23 38 virtual ~SSTHandler(); 24 39 25 enum process { rmveOffset= 1,40 enum process { permDiode = 1, 26 41 findStars = 2, 27 42 findPeriod = 4, … … 33 48 static void Has2Bars(bool, int elecOffset=0); // elecOffset : which wired together 34 49 50 long getLastBlkNum() {return lastBlkNum;} 35 51 int getRawSignal(int imesure, int idiode); // for last block 36 52 int getSignal(int imesure, int idiode); // for last block, imesure<0 -> history 37 int getStarZ(int imesure, int istar); // for last block, imesure<0 -> history 38 int getStarF(int imesure, int istar); // for last block, imesure<0 -> history 39 long getLastBlkNum() {return lastBlkNum;} 53 54 // Zone findStar 55 int getNumbStar(int iSampl); 56 // return number of star found in sample number iSampl 57 int getStarZ(int iSampl, int istar); 58 // return diode number of the star 59 double getStarF(int iSampl, int istar); 60 // return star flux in Ampère 61 double getStarTime(int iSampl, int istar); 62 // return star time in this sample 40 63 41 64 protected: … … 46 69 int starHistLength; 47 70 long lastBlkNum; 48 int seuil;49 71 72 // Is there two photoDiod Arrays and how are they connected? 50 73 static bool has2bars; 51 74 static int elecOffset; … … 53 76 inline int& diode(int iSamp, int iDiod) {return diodeT[iSamp*nb_photo_diodes+iDiod];} 54 77 55 struct star { 56 float z; 57 float m; 58 double t; 59 }; 60 61 vector<star>* stars; 62 78 static int diodpermut[46]; // diodpermut[i] = channel de la diode i 63 79 64 80 void DecodeTMBlock(block_type_sst*, int i, int* diodes); // mesure i -> diodes 65 void RemoveOffset(); // diodeRaw -> diode, avec decalage, 1 echantillon. 66 void FindStars(); // sur les 72 derniers echantillons dans diode. 81 void PermutDiode(); // diodeRaw -> diode, avec decalage, 1 echantillon. 82 int FindStars(block_type_sst* blk); // sur les 72 derniers echantillons dans diode. 83 // return nmber of star found in last block 67 84 68 static int diodpermut[46]; // diodpermut[i] = channel de la diode i 85 // Zone findStar 86 int NbStarInBlock; 87 88 PisteEtoile** PisteBar; 89 90 #ifdef SST_DEBUG 91 ofstream** pPisteDump; 92 #endif 93 94 map<double,SSTEtoile> StarHistoryMap; 95 // On stocke les etoiles de manière ordonnée en temps 96 typedef map<double,SSTEtoile>::iterator StarHistIter; 97 typedef map<double,SSTEtoile>::const_iterator StarConstHistIter; 98 99 vector<SSTEtoile> LastBlockStarVec; 100 // Vecteur des SSTEtoile du block classees en ordre de temps decroissant. 101 //vector<SSTEtoile> reverse_iterator StarVecRevIter LastBlockStarVec.rbegin(); 102 SSTEtoile LastStar; 103 PisteEtoile* pPiste; // Piste courante d'analyse 104 int Diodedata[NbSampleBlock]; 105 int offseDataDiod; 106 int LastBlockSSTNb; // Gère la disparition des blocs défectueux 107 int noStarDet; 108 int FirstSplNb(block_type_sst* blk); // Calcule l'index du premier echantillon du block analysé 109 ofstream sstchass; 110 111 void findStarConstruct(); 112 void findStarDestruct(); 69 113 }; 70 114 -
trunk/Poubelle/archTOI.old/toiiter.cc
r393 r394 5 5 #include "toiiter.h" 6 6 #include "toiinterpolator.h" 7 #include "archparam.h" 7 8 #include <dirent.h> 8 9 #include <iostream.h> … … 27 28 tEnd = 9.e99; 28 29 29 tBlock0 = -1;30 perEch = -1;30 //tBlock0 = -1; 31 // perEch = -1; 31 32 // Values for Trapani 99 = default values 32 tBlock0 = 1376.8358818;33 perEch = 0.005836818076;33 //tBlock0 = 1376.8358818; 34 //perEch = 0.005836818076; 34 35 35 36 trigMask = 0; … … 53 54 tStart = x.tStart; 54 55 tEnd = x.tEnd; 55 tBlock0 = x.tBlock0;56 perEch = x.perEch;56 //tBlock0 = x.tBlock0; 57 //perEch = x.perEch; 57 58 trigMask = x.trigMask; 58 59 infos = x.infos; … … 180 181 // peu plus de details sur la facon dont le GPS est lu. 181 182 182 if ( tBlock0 < 0) {183 tBlock0 = file->getStartMJD();183 if (archParam.acq.tBlock0 < 0) { 184 archParam.acq.tBlock0 = file->getStartMJD(); 184 185 185 186 file->pushMark(); … … 187 188 // le temps du bloc courant, en secondes 188 189 double dt = file->blockNum() * file->perBlock(); 189 tBlock0 = file->getGPSMJD() - dt/86400.;190 archParam.acq.tBlock0 = file->getGPSMJD() - dt/86400.; 190 191 } else { // pas de bloc GPS... 191 tBlock0 = file->getStartMJD();192 archParam.acq.tBlock0 = file->getStartMJD(); 192 193 } 193 194 file->popMark(); … … 195 196 tStart = oldTStart; // on restaure 196 197 197 if ( perEch < 0)198 perEch = file->perEchant();198 if (archParam.acq.perEch < 0) 199 archParam.acq.perEch = file->perEchant(); 199 200 200 201 bool hasInterp = false; … … 221 222 case sstStarZ: 222 223 case sstStarF: 224 case sstStarT: 223 225 file->needSSTProcessMask(SSTHandler::findStars); 224 226 trigMask |= block_sst_mask; 225 227 break; 226 228 case sstDiode: 227 file->needSSTProcessMask(SSTHandler:: rmveOffset);229 file->needSSTProcessMask(SSTHandler::permDiode); 228 230 trigMask |= block_sst_mask; 229 231 break; … … 284 286 for (set<string>::iterator i = copy.begin(); i != copy.end(); i++) { 285 287 double smp = file1stSamp[*i]; 286 double t = tBlock0 + smp *perEch/86400.;288 double t = archParam.acq.tBlock0 + smp * archParam.acq.perEch/86400.; 287 289 if (t>tEnd) { // premier echantillon apres tEnd 288 290 files.erase(*i); … … 416 418 case sstStarZ: 417 419 case sstStarF: 418 return (file->lastSST() != NULL) && (file->getSSTStarZ(index, imes) >= 0); 420 case sstStarT:{ 421 if (file->lastSST() == NULL) return false; 422 int n = file->getNumbStar(imes); 423 return (n > 0 && imes < n); 424 } 419 425 case gyroRaw: 420 426 return (file->lastGyro() != NULL); … … 472 478 return getSampleIndex(); 473 479 case internalTime: 474 return getSampleIndex() * perEch;480 return getSampleIndex() * archParam.acq.perEch; 475 481 case mjd: 476 482 return getMJD(); … … 487 493 case sstStarF: 488 494 return file->getSSTStarF(index, imes); 495 case sstStarT: 496 return file->getSSTStarT(index, imes); 489 497 case gyroRaw: 490 498 return file->getGyro(index, imes); … … 535 543 case sstStarZ: 536 544 case sstStarF: 545 case sstStarT: 537 546 return file->blockNum() == file->getSSTBlockNum(); 538 547 case gyroRaw: … … 616 625 if (!initDone) Init(); 617 626 int sample = getSampleIndex(); 618 return tBlock0 + sample*perEch/86400.;627 return archParam.acq.tBlock0 + sample*archParam.acq.perEch/86400.; 619 628 } 620 629 -
trunk/Poubelle/archTOI.old/toiiter.h
r393 r394 25 25 sstStarZ, // numero de diode d''une eventuelle etoile, i=etoile 0..n 26 26 sstStarF, // flux d''une eventuelle etoile, <0 si moins de i+1 etoiles 27 sstStarT, // temps d''une eventuelle etoile, <0 si moins de i+1 etoiles 27 28 gyroRaw, // valeur brute du gyro, index = 0,1,2 28 29 gpsTime, // temps fourni par GPS … … 101 102 double tStart, tEnd; 102 103 103 double tBlock0; // MJD du bloc numero zero...104 double perEch; // periode d''echantillonage en secondes104 //double tBlock0; // MJD du bloc numero zero... 105 //double perEch; // periode d''echantillonage en secondes 105 106 106 107 struct info { -
trunk/Poubelle/archTOI.old/toisvr.cc
r393 r394 21 21 } 22 22 23 24 void TOISvr::SetMJD0(double t0) {25 iter.tBlock0 = t0;26 }27 28 void TOISvr::SetPerEch(double t0) { // en secondes, periode d'echantillonnage29 iter.perEch = t0;30 }31 23 32 24 void TOISvr::OnBoardRecorderFiles(bool x) { -
trunk/Poubelle/archTOI.old/toisvr.h
r358 r394 17 17 void AddFile(string); 18 18 void OnBoardRecorderFiles(bool); 19 void SetMJD0(double);20 void SetPerEch(double);21 19 void UseAuxGPS(AuxGPS* gps); 22 20
Note:
See TracChangeset
for help on using the changeset viewer.