Changeset 408 in Sophya for trunk/Poubelle
- Timestamp:
- Sep 22, 1999, 10:57:36 AM (26 years ago)
- Location:
- trunk/Poubelle/archTOI.old
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Poubelle/archTOI.old/archeopsfile.cc
r407 r408 881 881 } 882 882 883 double ArcheopsFile::getMuVBolo2(int ibolo, int imesure) { // microvolts, filtre 884 // On commence par trouver la valeur d'offset, en fittant une droite sur les soustractions 885 if (!lastBolo() || !llastBolo()) return 0; 886 block_type_reglage* reglage = lastReglage(); 887 block_type_param* param = lastParam(); 888 if (!reglage) return 0; 889 if (!param) return 0; 890 double sumx=0, sumy=0, sumxy=0, sumx2=0; 891 int n=20; 892 int s = imesure % 2 ? 1 : -1; 893 for (int i=1; i<=n; i++) { 894 double x = -i; 895 double y = s*(getRawBolo(ibolo, imesure-i+1) - getRawBolo(ibolo, imesure-i))/2; 896 s = -s; 897 sumx += x; 898 sumy += y; 899 sumxy += x*y; 900 sumx2 += x*x; 901 } 902 double a = (sumxy/n - (sumx/n)*(sumy/n)) / (sumx2/n - (sumx/n)*(sumx/n)); 903 double b = (sumy/n) - a*(sumx/n); 904 s = imesure % 2 ? 1 : -1; 905 double y = getRawBolo(ibolo, imesure); 906 y = y-s*b; 907 return bol_micro_volt(y,(double)param->param.bolo[ibolo].bolo_gain*gain_ampli(reglage->reglage.bolo[ibolo])); 908 } 909 883 910 double ArcheopsFile::getGainAmpli(int ibolo) { 884 911 return gain_ampli(lastReglage()->reglage.bolo[ibolo]); 885 912 } 913 914 #define capa(uu) ((parametr.bolo[uu].bolo_bebo==10)?0.000868 * (double)parametr.bolo[uu].bolo_capa:0.001 * (double)parametr.bolo[uu].bolo_capa) // capa en pF 915 #define pt_micA(uu) ((4096. * 22. * 20.) / capa(uu) ) // pts / micro Amperes 916 917 918 #define pt_micV(uu) (((double)parametr.bolo[uu].bolo_diviseur) / 2441.) // pts / microvolt 919 920 921 double ArcheopsFile::getDACV(int ibolo) { 922 double dacV = dac_V(lastReglage()->reglage.bolo[ibolo]); 923 param_bolo& parametr = lastParam()->param; 924 return dacV / pt_micV(ibolo); 925 } 926 927 double ArcheopsFile::getDACI(int ibolo) { 928 double dacI = dac_I(lastReglage()->reglage.bolo[ibolo]); 929 param_bolo& parametr = lastParam()->param; 930 return dacI / pt_micA(ibolo); 931 } 932 886 933 887 934 // SST, gyros... -
trunk/Poubelle/archTOI.old/archeopsfile.h
r407 r408 131 131 long getRawBolo(int ibolo, int imesure); // donnee brute, avec seulement soustraction offset 132 132 double getMuVBolo(int ibolo, int imesure); // microvolts, filtre avec filtre carre 133 double getMuVBolo2(int ibolo, int imesure); // microvolts, filtre +sioux 133 134 double getGainAmpli(int ibolo); 135 double getDACV(int ibolo); // offset en microvolt 136 double getDACI(int ibolo); // courant en picoAmps 134 137 135 138 // SST, gyros, etc -
trunk/Poubelle/archTOI.old/archtoi.cc
r407 r408 94 94 allBolos=true; 95 95 } else if (key == "#REQVERSION") { 96 if (requestVersion != "") { 97 cerr << "Error. Duplicate #REQVERSION option" << endl; 98 exit(-1); 99 } 96 100 requestVersion = arg; 97 101 } else if (key == "#COMMENT") { -
trunk/Poubelle/archTOI.old/toiiter.cc
r407 r408 221 221 break; 222 222 case boloGainAmpli: 223 case boloDACV: 224 case boloDACI: 223 225 trigMask |= block_reglage_mask; 224 226 break; … … 440 442 return file->lastBolo() != NULL; 441 443 case boloGainAmpli: 444 case boloDACV: 445 case boloDACI: 442 446 return file->lastReglage() != NULL; 443 447 case sstDiode: … … 517 521 case boloTens: 518 522 return file->getMuVBolo(index, imes); 523 case boloTens2: 524 return file->getMuVBolo2(index, imes); 519 525 case boloRaw: 520 526 return file->getRawBolo(index, imes); 521 527 case boloGainAmpli: 522 528 return file->getGainAmpli(index); 529 case boloDACV: 530 return file->getDACV(index); 531 case boloDACI: 532 return file->getDACI(index); 523 533 case sstDiode: 524 534 return file->getSSTSignal(index, imes); … … 578 588 return true; 579 589 case boloTens: 590 case boloTens2: 580 591 return file->blockNum() == file->getBoloBlockNum(); 581 592 case boloRaw: 582 593 return file->blockNum() == file->getBoloBlockNum(); 583 594 case boloGainAmpli: 595 return file->blockNum() == file->getReglageBlockNum() && imes==0; 596 case boloDACI: 597 case boloDACV: 584 598 return file->blockNum() == file->getReglageBlockNum() && imes==0; 585 599 case sstChannel: -
trunk/Poubelle/archTOI.old/toiiter.h
r407 r408 24 24 boloTemp, // Kelvins, need R(T) -> N/A 25 25 boloGainAmpli, // gain de l'ampli du bolo 26 boloDACV, // tension de reference du DAC (microVolts) 27 boloDACI, // courant (picoAmps) 26 28 boloRawCN, // compression noise on bolo raw 27 29 boloTens2T, // total, microVolts, avec consigne DAC -
trunk/Poubelle/archTOI.old/toisvr.cc
r407 r408 105 105 else tsttoi(boloTemp) 106 106 else tsttoi(boloGainAmpli) 107 else tsttoi(boloDACV) 108 else tsttoi(boloDACI) 107 109 else tsttoi(boloTens2T) 108 110 else tsttoi(boloRawCN) … … 202 204 gps->FitsDump("GPSDump.fits"); 203 205 useAuxGPS(gps); 206 } else if (key == "#INCLUDE") { 207 readReq(ifstream(arg.c_str())); 204 208 } else { 205 209 // cerr << "*Warning, unrecognized option " << line << endl;
Note:
See TracChangeset
for help on using the changeset viewer.