Changeset 432 in Sophya for trunk/Poubelle
- Timestamp:
- Sep 24, 1999, 4:06:09 PM (26 years ago)
- Location:
- trunk/Poubelle/archTOI.old
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Poubelle/archTOI.old/archeopsfile.cc
r429 r432 900 900 int expo = data[iExp] & 0xf; 901 901 int noise = 1 << expo; 902 return (noise << 1)/double(nb_coups) ;902 return (noise << 1)/double(nb_coups)/2.; 903 903 } 904 904 … … 1039 1039 int expo = data[iExp] & 0xf; 1040 1040 int noise = 1 << expo; 1041 return noise ;1041 return noise/2.; 1042 1042 } 1043 1043 -
trunk/Poubelle/archTOI.old/archparam.cc
r394 r432 12 12 ArchParam::AcqParam::AcqParam() 13 13 : tBlock0 (1376.8358818), 14 perEch (0.005836818076) 14 perEch (0.005836818076), 15 utcOrigin (1376.5) 15 16 {} 16 17 … … 30 31 cout << " tBlock0 " << acq.tBlock0 << "\n"; 31 32 cout << " perEch " << acq.perEch << "\n"; 33 cout << " utcOrigin " << acq.utcOrigin << "\n"; 32 34 cout << " **GEOM\n"; 33 35 cout << " **SST\n"; -
trunk/Poubelle/archTOI.old/archparam.h
r394 r432 9 9 double tBlock0; // MJD du bloc numero zero... 10 10 double perEch; // periode d''echantillonage en secondes 11 double utcOrigin; 11 12 AcqParam(); 12 13 }; -
trunk/Poubelle/archTOI.old/archtoi.cc
r426 r432 54 54 format = ascii_fmt; 55 55 undef = "#"; 56 undefV = -99999; 56 57 allBolos = false; 57 58 fptr = NULL; … … 92 93 } else if (key == "#UNDEF") { 93 94 undef=arg; 95 if (undef[0] >= '0' && undef[0] <= '9') 96 undefV = atoi(undef.c_str()); 94 97 } else if (key == "#ALLBOLOS") { 95 98 allBolos=true; … … 316 319 317 320 void ArchTOI::outValue_F(int icolumn, double value, bool notdef) { 321 if (notdef && undef != "#") { 322 notdef = false; 323 value = undefV; 324 } 318 325 if (notdef) { 319 326 fits_write_col_null(fptr, icolumn+1, fitsLine, 1, 1, &fitsStatus); -
trunk/Poubelle/archTOI.old/archtoi.h
r416 r432 38 38 fmt format; 39 39 string undef; 40 double undefV; 40 41 bool allBolos; // tous les bolos dans le header. Sinon seulement bolos transmis. 41 42 -
trunk/Poubelle/archTOI.old/templocator.cc
r426 r432 172 172 } 173 173 174 double TempLocator::getAlphaCenter(int sampleNum) { 175 return getAlphaBolo(sampleNum, 11); 176 } 177 178 double TempLocator::getDeltaCenter(int sampleNum) { 179 return getDeltaBolo(sampleNum, 11); 180 } 181 182 174 183 175 184 -
trunk/Poubelle/archTOI.old/templocator.h
r426 r432 19 19 double getAlphaBolo(int sampleNum, int ibolo); 20 20 double getDeltaBolo(int sampleNum, int ibolo); 21 double getAlphaCenter(int sampleNum); 22 double getDeltaCenter(int sampleNum); 21 23 22 24 void getAltAzBolo(int sampleNum, int ibolo, double& elv, double& az); -
trunk/Poubelle/archTOI.old/toiiter.cc
r426 r432 36 36 tStart = -9.e99; 37 37 tEnd = 9.e99; 38 utcStart = -9.e99; 39 utcEnd = 9.e99; 40 41 sStart = -999999999; 42 sEnd = 999999999; 38 43 39 44 //tBlock0 = -1; … … 61 66 if (x.initDone && x.curFile != x.files.end()) curFile = files.find(*(x.curFile)); 62 67 isOnBoardRecorder = x.isOnBoardRecorder; 63 imes = x.imes; 64 tStart = x.tStart; 65 tEnd = x.tEnd; 68 imes = x.imes; 69 70 tStart = x.tStart; 71 tEnd = x.tEnd; 72 utcStart = x.utcStart; 73 utcEnd = x.utcEnd; 74 sStart = x.sStart; 75 sEnd = x.sEnd; 76 66 77 trigMask = x.trigMask; 67 78 infos = x.infos; … … 108 119 if (initDone) return; 109 120 initDone = true; 121 if (utcStart > 0) { 122 double t = (utcStart/24.) + archParam.acq.utcOrigin; 123 if (t > tStart) tStart=t; 124 } 125 if (utcEnd > 0) { 126 double t = (utcEnd/24.) + archParam.acq.utcOrigin; 127 if (t < tEnd) tEnd=t; 128 } 110 129 // On a soit un repertoire, soit une liste de fichiers.... 111 130 if (directory == "") { … … 215 234 if ((*i).triggering) { 216 235 switch ((*i).kind) { 217 case boloTens: 218 case boloTens2: 219 case boloRaw: 220 case boloRawCN: 221 case boloTensCN: 236 case boloMuV: 237 case boloMuV2: 238 case boloRawMuV: 239 case boloRawMuVCN: 222 240 trigMask |= block_bolo_mask; 223 241 break; 224 case bolo Tens2T:242 case boloMuV2T: 225 243 case boloRes: 226 244 case boloTemp: 227 245 trigMask |= block_bolo_mask | block_reglage_mask; 228 246 break; 229 case dilDAC:247 case dilDAC: 230 248 case dilSwitch: 231 249 trigMask |= block_dilution_mask; … … 241 259 trigMask |= block_gps_mask; 242 260 break; 243 case azimut Bolo:261 case azimuthBolo: 244 262 trigMask |= block_bolo_mask; 245 263 //file->needSSTProcessMask(SSTHandler::findPeriod); … … 263 281 break; 264 282 case gyroRaw: 265 case gyro Tens:283 case gyroV: 266 284 trigMask |= block_gyro_mask; 267 285 break; … … 269 287 trigMask |= block_gyro_mask; // $CHECK$ + info to calibrate gyros 270 288 break; 271 case alpha Axis:272 case delta Axis:289 case alphaRotAxis: 290 case deltaRotAxis: 273 291 case alphaSst: 274 292 case deltaSst: 293 case alphaFPAxis: 294 case deltaFPAxis: 275 295 case alphaBolo: 276 296 case deltaBolo: … … 278 298 //file->needSSTProcessMask(SSTHandler::findAxis); 279 299 //trigMask |= block_sst_mask; 300 break; 301 case alphaZenith: 302 case deltaZenith: 303 trigMask |= block_gps_mask; 280 304 break; 281 305 } … … 323 347 double smp = file1stSamp[*i]; 324 348 double t = archParam.acq.tBlock0 + smp * archParam.acq.perEch/86400.; 325 if (t>tEnd ) { // premier echantillon apres tEnd349 if (t>tEnd || smp>sEnd) { // premier echantillon apres tEnd 326 350 files.erase(*i); 327 351 prev = ""; 328 352 continue; 329 353 } 330 if (t<tStart ) { // premier echantillon avant tStart -> on vire le precedent si existe354 if (t<tStart || smp<sStart) { // premier echantillon avant tStart -> on vire le precedent si existe 331 355 if (prev != "") { 332 356 files.erase(prev); … … 436 460 TOIKind kind = infos[column].kind; 437 461 if (auxGPS && 438 (kind == longitude || kind == latitude || kind == altitude || kind == tsid)) { 462 (kind == longitude || kind == latitude || kind == altitude || kind == tsid || 463 kind == alphaZenith || kind == deltaZenith)) { 439 464 double dummy; 440 465 return auxGPS->getLocation(getMJD(), dummy, dummy, dummy) == 0; … … 448 473 case internalTime: 449 474 case mjd: 475 case mutc: 450 476 return true; 451 case bolo Tens:452 case bolo Tens2:453 case bolo Tens2T:477 case boloMuV: 478 case boloMuV2: 479 case boloMuV2T: 454 480 case boloRes: 455 case boloRaw CN:481 case boloRawMuVCN: 456 482 if (imes==0 && file->llastBolo()==NULL) return false; 457 483 return file->lastBolo() != NULL; 458 case boloTensCN: 459 case boloRaw: 484 case boloRawMuV: 460 485 return file->lastBolo() != NULL; 461 486 case boloGainAmpli: … … 480 505 } 481 506 case gyroRaw: 482 case gyro Tens:507 case gyroV: 483 508 case gyroSpeed: 484 509 return (file->lastGyro() != NULL); … … 487 512 case longitude: 488 513 case latitude: 514 case alphaZenith: 515 case deltaZenith: 489 516 return file->hasGPSPos(); 490 517 case altitude: … … 492 519 case tsid: 493 520 return file->hasGPSPos(); 494 case azimutBolo: 495 case alphaAxis: 496 case deltaAxis: 521 case azimuthBolo: 522 case alphaRotAxis: 523 case deltaRotAxis: 524 case alphaFPAxis: 525 case deltaFPAxis: 497 526 case alphaBolo: 498 527 case deltaBolo: … … 525 554 return tSid.getLST(getMJD()); 526 555 } 556 527 557 } 528 558 if (rawIter) { … … 540 570 case mjd: 541 571 return getMJD(); 542 case boloTens: 572 case mutc: 573 return (getMJD()-archParam.acq.utcOrigin)*24.; 574 case boloMuV: 543 575 return file->getMuVBolo(index, imes); 544 case bolo Tens2:576 case boloMuV2: 545 577 return file->getMuVBolo2(index, imes); 546 case boloRaw :578 case boloRawMuV: 547 579 return file->getRawBolo(index, imes); 548 case boloRawCN: 549 return file->getRawBoloCN(index, imes); 550 case boloTensCN: 580 case boloRawMuVCN: 551 581 return file->getMuVBoloCN(index, imes); 552 582 case boloGainAmpli: … … 556 586 case boloDACI: 557 587 return file->getDACI(index); 558 case bolo Tens2T:588 case boloMuV2T: 559 589 return file->getMuVBolo2T(index, imes); 560 590 case boloRes: … … 582 612 case gyroRaw: 583 613 return file->getGyroRaw(index, imes); 584 case gyro Tens:614 case gyroV: 585 615 return file->getGyroTens(index, imes); 586 616 case gyroSpeed: … … 597 627 tSid.setLongitude(file->getGPSLong()); 598 628 return tSid.getLST(getMJD()); 599 case azimutBolo: 600 case alphaAxis: 601 case deltaAxis: 629 case azimuthBolo: 630 case alphaRotAxis: 631 case deltaRotAxis: 632 case alphaFPAxis: 633 case deltaFPAxis: 634 case alphaZenith: 635 case deltaZenith: 602 636 case alphaBolo: 603 637 case deltaBolo: { … … 614 648 tempLocator.setEarthPos(lon, lat); 615 649 tempLocator.setTSid(ts); 616 if ((kind) == alphaAxis) return tempLocator.getAlphaZenith(); 617 if ((kind) == deltaAxis) return tempLocator.getDeltaZenith(); 618 if ((kind) == azimutBolo) return tempLocator.getAzimutBolo(getSampleIndex(),index); 650 if ((kind) == alphaRotAxis) return tempLocator.getAlphaZenith(); 651 if ((kind) == deltaRotAxis) return tempLocator.getDeltaZenith(); 652 if ((kind) == alphaZenith) return tempLocator.getAlphaZenith(); 653 if ((kind) == deltaZenith) return tempLocator.getDeltaZenith(); 654 if ((kind) == azimuthBolo) return tempLocator.getAzimutBolo(getSampleIndex(),index); 619 655 if ((kind) == alphaBolo) return tempLocator.getAlphaBolo(getSampleIndex(),index); 620 656 if ((kind) == deltaBolo) return tempLocator.getDeltaBolo(getSampleIndex(),index); 657 if ((kind) == alphaFPAxis) return tempLocator.getAlphaCenter(getSampleIndex()); 658 if ((kind) == deltaFPAxis) return tempLocator.getDeltaCenter(getSampleIndex()); 621 659 return 0; 622 660 } … … 640 678 case internalTime: 641 679 case mjd: 680 case mutc: 642 681 case tsid: 643 682 return true; 644 case bolo Tens:645 case bolo Tens2:646 case bolo Tens2T:683 case boloMuV: 684 case boloMuV2: 685 case boloMuV2T: 647 686 case boloRes: 648 687 return file->blockNum() == file->getBoloBlockNum(); 649 case boloRaw: 650 case boloRawCN: 651 case boloTensCN: 688 case boloRawMuV: 689 case boloRawMuVCN: 652 690 return file->blockNum() == file->getBoloBlockNum(); 653 691 case boloGainAmpli: … … 670 708 return file->blockNum() == file->getSSTCompBlockNum(); 671 709 case gyroRaw: 672 case gyro Tens:710 case gyroV: 673 711 case gyroSpeed: 674 712 return file->blockNum() == file->getGyroBlockNum(); … … 681 719 case altitude: 682 720 return file->blockNum() == file->getGPSBlockNum() && imes==0; 683 case azimut Bolo:721 case azimuthBolo: 684 722 case alphaBolo: 685 723 case deltaBolo: 724 case alphaZenith: 725 case deltaZenith: 726 case alphaFPAxis: 727 case deltaFPAxis: 686 728 return true; // $CHECK$ with SSTHandler 687 case alpha Axis:729 case alphaRotAxis: 688 730 return true; // $CHECK$ with SSTHandler 689 case delta Axis:731 case deltaRotAxis: 690 732 return true; // $CHECK$ with SSTHandler 691 733 } -
trunk/Poubelle/archTOI.old/toiiter.h
r426 r432 17 17 sampleNum, // Numero d''echantillon (timer interne transputer) 18 18 internalTime, // temps transputer depuis debut manip, en secondes. 19 mjd, // UTC (en jours, MJD = JD - 2450000). index=0 : premier bloc GPS. 1: + sioux. 20 boloTens, // tension en microVolts, filtree avec filtre carre indexe par bolometre 21 boloTens2, // tension en microVolts, avec soustraction offset filtre 22 boloRaw, // tension brute en microVolts, non filtree indexe par bolometre, sans chgt signe 19 mjd, // UTC (en jours, MJD = JD - 2450000). 20 mutc, // UTC en heure, avec soustraction d'origine 21 boloMuV, // tension en microVolts, filtree avec filtre carre indexe par bolometre 22 boloMuV2, // tension en microVolts, avec soustraction offset filtre 23 boloRawMuV, // tension brute en microVolts, non filtree indexe par bolometre, sans chgt signe 23 24 boloTemp, // Kelvins, need R(T) -> N/A 24 boloGainAmpli, // gain de l'ampli du bolo25 25 boloDACV, // tension de reference du DAC (microVolts) 26 26 boloDACI, // courant (microAmps) 27 boloRawCN, // compression noise on bolo raw 28 boloTensCN, // compression noise on bolo (microVolts), no filter 29 boloTens2T, // total, microVolts, avec consigne DAC 27 boloRawMuVCN, // compression noise on bolo (microVolts), no filter 28 boloMuV2T, // total, microVolts, avec consigne DAC 30 29 boloRes, // Resistance, ohms 30 boloGainAmpli, // 31 31 dilDAC, // dilution DAC, index = 0-47 32 32 dilSwitch, // dilution, mot de 32 bits 33 serviceTemp, // service temperature, K 33 34 sstDiode, // signal brut SST, indice = diode, 0-45 34 35 sstChannel, // signal brut SST, indice = canal, 0-47 … … 40 41 sstStarT, // temps d''une eventuelle etoile, <0 si moins de i+1 etoiles 41 42 gyroRaw, // valeur brute du gyro, index = 0,1,2 42 gyro Tens,// tension gyro, V, index = 0,1,243 gyroV, // tension gyro, V, index = 0,1,2 43 44 gyroSpeed, // vitesse gyro, deg/s, index = 0,1,2, calibree... 44 45 gpsTime, // temps fourni par GPS … … 47 48 altitude, // position ballon, m 48 49 tsid, // temps sideral en secondes 49 azimutBolo, // azimut 50 alphaAxis, // 51 deltaAxis, // 50 azimuthBolo, // azimut 51 alphaRotAxis, // 52 deltaRotAxis, // 53 alphaZenith, // 54 deltaZenith, // 52 55 alphaSst, // 53 56 deltaSst, // 57 alphaFPAxis, // 58 deltaFPAxis, // 54 59 alphaBolo, // sur le ciel, indexe par bolometre 55 60 deltaBolo // sur le ciel, indexe par bolometre … … 117 122 int imes; 118 123 119 double tStart, tEnd; 124 double tStart, tEnd; // MJD 125 double utcStart, utcEnd; // UTC, will be converted towards tStart tEnd at init 126 long sStart, sEnd; // samplenum 120 127 121 128 //double tBlock0; // MJD du bloc numero zero... -
trunk/Poubelle/archTOI.old/toisvr.cc
r426 r432 36 36 37 37 38 void TOISvr::set TimeInterval(double tStart, double tEnd) {38 void TOISvr::setMJDInterval(double tStart, double tEnd) { 39 39 if (tStart>0) iter.tStart = tStart; 40 40 if (tEnd>0) iter.tEnd = tEnd; 41 41 } 42 43 void TOISvr::setUTCInterval(double tStart, double tEnd) { 44 if (tStart>0) iter.utcStart = tStart; 45 if (tEnd>0) iter.utcEnd = tEnd; 46 } 47 48 void TOISvr::setSNInterval(long tStart, long tEnd) { 49 if (tStart>0) iter.sStart = tStart; 50 if (tEnd>0) iter.sEnd = tEnd; 51 } 52 42 53 43 54 void TOISvr::setUnderSample(int n) { … … 110 121 else tsttoi(internalTime) 111 122 else tsttoi(mjd) 112 else tsttoi(boloTens) 113 else tsttoi(boloTens2) 114 else tsttoi(boloRaw) 123 else tsttoi(mutc) 124 else tsttoi(boloMuV) 125 else tsttoi(boloMuV2) 126 else tsttoi(boloRawMuV) 115 127 else tsttoi(boloRes) 116 128 else tsttoi(boloTemp) … … 118 130 else tsttoi(boloDACV) 119 131 else tsttoi(boloDACI) 120 else tsttoi(boloTens2T) 121 else tsttoi(boloRawCN) 122 else tsttoi(boloTensCN) 132 else tsttoi(boloMuV2T) 133 else tsttoi(boloRawMuVCN) 123 134 else tsttoi(dilDAC) 124 135 else tsttoi(dilSwitch) 136 else tsttoi(serviceTemp) 125 137 else tsttoi(sstDiode) 126 138 else tsttoi(sstChannel) … … 132 144 else tsttoi(sstStarT) 133 145 else tsttoi(gyroRaw) 134 else tsttoi(gyro Tens)146 else tsttoi(gyroV) 135 147 else tsttoi(gyroSpeed) 136 148 else tsttoi(gpsTime) … … 139 151 else tsttoi(altitude) 140 152 else tsttoi(tsid) 141 else tsttoi(azimut Bolo)142 else tsttoi(alpha Axis)143 else tsttoi(delta Axis)153 else tsttoi(azimuthBolo) 154 else tsttoi(alphaRotAxis) 155 else tsttoi(deltaRotAxis) 144 156 else tsttoi(alphaSst) 145 157 else tsttoi(deltaSst) 158 else tsttoi(alphaZenith) 159 else tsttoi(deltaZenith) 160 else tsttoi(alphaFPAxis) 161 else tsttoi(deltaFPAxis) 146 162 else tsttoi(alphaBolo) 147 163 else tsttoi(deltaBolo) … … 150 166 return false; 151 167 } 152 if (kind == sampleNum || kind == mjd ) notrig = true;168 if (kind == sampleNum || kind == mjd || kind == mutc) notrig = true; 153 169 string toiname = keyw.substr(1); 154 170 while (args != "") { 155 171 if (args[0] == ' ') { 156 args = args.substr(args.find_first_not_of(' ')); 172 x = args.find_first_not_of(' '); 173 if (x==string::npos) break; 174 args = args.substr(x); 157 175 if (args == "") break; 158 176 } … … 196 214 arg = arg.substr(arg.find_first_not_of(' ')); 197 215 } 198 if (key == "# TRANGE") {216 if (key == "#MJDRANGE") { 199 217 double tmin, tmax; 200 218 sscanf(arg.c_str(), "%lg %lg", &tmin, &tmax); 201 setTimeInterval(tmin, tmax); 219 setMJDInterval(tmin, tmax); 220 } else if (key == "#UTCRANGE") { 221 double tmin, tmax; 222 sscanf(arg.c_str(), "%lg %lg", &tmin, &tmax); 223 setUTCInterval(tmin, tmax); 224 } else if (key == "#SNRANGE") { 225 long tmin, tmax; 226 sscanf(arg.c_str(), "%ld %ld", &tmin, &tmax); 227 setSNInterval(tmin, tmax); 202 228 } else if (key == "#PATH") { 203 229 setDirectory(arg); … … 212 238 sscanf(arg.c_str(), "%lg", &t0); 213 239 archParam.acq.tBlock0 = t0; 240 } else if (key == "#UTCORIGIN") { 241 double t0; 242 sscanf(arg.c_str(), "%lg", &t0); 243 archParam.acq.utcOrigin = t0; 214 244 } else if (key == "#PERECH") { 215 245 double t0; … … 235 265 processRequest("#MJD0 1376.8358818"); 236 266 processRequest("#PERECH 0.005836818076"); 267 processRequest("#UTCORIGIN 1376.5"); 237 268 processRequest("#ASIGPS ASI_GPS_archeops1999.ascii"); 238 269 processRequest("#COMMENT Archtoi -- 23 september 1999 -- Eric Aubourg CEA/DAPNIA"); -
trunk/Poubelle/archTOI.old/toisvr.h
r426 r432 27 27 void useAuxGPS(AuxGPS* gps); 28 28 29 void setTimeInterval(double tStart, double tEnd); 29 void setMJDInterval(double tStart, double tEnd); 30 void setUTCInterval(double tStart, double tEnd); 31 void setSNInterval(long sStart, long sEnd); 30 32 void setUnderSample(int n); 31 33
Note:
See TracChangeset
for help on using the changeset viewer.