Changeset 408 in Sophya for trunk/Poubelle/archTOI.old


Ignore:
Timestamp:
Sep 22, 1999, 10:57:36 AM (26 years ago)
Author:
ansari
Message:

nouvelles toi

Location:
trunk/Poubelle/archTOI.old
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Poubelle/archTOI.old/archeopsfile.cc

    r407 r408  
    881881}
    882882
     883double 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
    883910double ArcheopsFile::getGainAmpli(int ibolo) {
    884911     return gain_ampli(lastReglage()->reglage.bolo[ibolo]);
    885912}
     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
     921double 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
     927double 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
    886933
    887934// SST, gyros...
  • trunk/Poubelle/archTOI.old/archeopsfile.h

    r407 r408  
    131131  long getRawBolo(int ibolo, int imesure);   // donnee brute, avec seulement soustraction offset
    132132  double getMuVBolo(int ibolo, int imesure); // microvolts, filtre avec filtre carre
     133  double getMuVBolo2(int ibolo, int imesure); // microvolts, filtre +sioux
    133134  double getGainAmpli(int ibolo);
     135  double getDACV(int ibolo); // offset en microvolt
     136  double getDACI(int ibolo); // courant en picoAmps
    134137 
    135138  // SST, gyros, etc
  • trunk/Poubelle/archTOI.old/archtoi.cc

    r407 r408  
    9494    allBolos=true;
    9595  } else if (key == "#REQVERSION") {
     96    if (requestVersion != "") {
     97      cerr << "Error. Duplicate #REQVERSION option" << endl;
     98      exit(-1);
     99    }
    96100    requestVersion = arg;
    97101  } else if (key == "#COMMENT") {
  • trunk/Poubelle/archTOI.old/toiiter.cc

    r407 r408  
    221221        break;
    222222      case boloGainAmpli:
     223      case boloDACV:
     224      case boloDACI:
    223225        trigMask |= block_reglage_mask;
    224226        break;
     
    440442     return file->lastBolo() != NULL;
    441443   case boloGainAmpli:
     444   case boloDACV:
     445   case boloDACI:
    442446     return file->lastReglage() != NULL;
    443447   case sstDiode:
     
    517521   case boloTens:
    518522     return file->getMuVBolo(index, imes);
     523   case boloTens2:
     524     return file->getMuVBolo2(index, imes);
    519525   case boloRaw:
    520526     return file->getRawBolo(index, imes);
    521527   case boloGainAmpli:
    522528     return file->getGainAmpli(index);
     529   case boloDACV:
     530     return file->getDACV(index);
     531   case boloDACI:
     532     return file->getDACI(index);
    523533   case sstDiode:
    524534     return file->getSSTSignal(index, imes);
     
    578588       return true;
    579589     case boloTens:
     590     case boloTens2:
    580591       return file->blockNum() == file->getBoloBlockNum();
    581592     case boloRaw:
    582593       return file->blockNum() == file->getBoloBlockNum();
    583594     case boloGainAmpli:
     595       return file->blockNum() == file->getReglageBlockNum() && imes==0;
     596     case boloDACI:
     597     case boloDACV:
    584598       return file->blockNum() == file->getReglageBlockNum() && imes==0;
    585599     case sstChannel:
  • trunk/Poubelle/archTOI.old/toiiter.h

    r407 r408  
    2424  boloTemp,      // Kelvins, need R(T) -> N/A
    2525  boloGainAmpli, // gain de l'ampli du bolo
     26  boloDACV,      // tension de reference du DAC (microVolts)
     27  boloDACI,      // courant (picoAmps)
    2628  boloRawCN,     // compression noise on bolo raw
    2729  boloTens2T,    // total, microVolts, avec consigne DAC
  • trunk/Poubelle/archTOI.old/toisvr.cc

    r407 r408  
    105105    else tsttoi(boloTemp)
    106106    else tsttoi(boloGainAmpli)
     107    else tsttoi(boloDACV)
     108    else tsttoi(boloDACI)
    107109    else tsttoi(boloTens2T)
    108110    else tsttoi(boloRawCN)
     
    202204    gps->FitsDump("GPSDump.fits");
    203205    useAuxGPS(gps);
     206  } else if (key == "#INCLUDE") {
     207    readReq(ifstream(arg.c_str()));
    204208  } else {
    205209    // cerr << "*Warning, unrecognized option " << line << endl;
Note: See TracChangeset for help on using the changeset viewer.