Changeset 3935 in Sophya for trunk/AddOn


Ignore:
Timestamp:
Dec 29, 2010, 11:17:52 AM (15 years ago)
Author:
cmv
Message:

add option for chanum_1210, cmv 29/12/2010

Location:
trunk/AddOn/TAcq
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/AddOn/TAcq/chanum_1210.cc

    r3928 r3935  
    1818#include "nbtrixx.h"
    1919
    20 // > chanum_1210 -f 1375.0610351 -o CasA02Dec.csh ../../crt*/PittsDec10/CasA02Dec/chanum_*.ppf
    21 // > chanum_1210 -f 1375.0610351 -o Crab03Dec.csh ../../crt*/PittsDec10/Crab03Dec/chanum_*.ppf
    22 // > chanum_1210 -f 1382.5378418 -o Sun03Dec.csh  ../../crt*/PittsDec10/Sun03Dec/chanum_*.ppf
    23 // > chanum_1210 -f 1390.0146484 -o CasA03Dec.csh ../../crt*/PittsDec10/CasA03Dec/chanum_*.ppf
     20// > chanum_1210 -f 1375.0610351 -F 0,8888,5 -o CasA02Dec.csh ../../crt*/PittsDec10/CasA02Dec/chanum_*.ppf
     21// > chanum_1210 -f 1375.0610351 -F 0,8888,5 -o Crab03Dec.csh ../../crt*/PittsDec10/Crab03Dec/chanum_*.ppf
     22// > chanum_1210 -f 1382.5378418 -F 0,8888,5 -o Sun03Dec.csh  ../../crt*/PittsDec10/Sun03Dec/chanum_*.ppf
     23// > chanum_1210 -f 1390.0146484 -F 0,8888,5 -o CasA03Dec.csh ../../crt*/PittsDec10/CasA03Dec/chanum_*.ppf
    2424
    2525int decode_numthread(string filein,string& dir);
     
    3030{
    3131cout<<"Usage: chanum_1210 [options] chanum_?.ppf ..."<<endl
    32     <<" -f F0MHz : 1ere frequence pour cette acquisition"<<endl
     32    <<" -f F0MHz : 1ere frequence pour cette acquisition (def=0.)"<<endl
     33    <<" -F if0,if1,idf : selection freq de if0 a if1 moyenne par idf (def=\"0,8888,1\")"<<endl
     34    <<" -T it0,it1 : selection fichier temps de it0 a it1 (def=\"0,999999\")"<<endl
    3335    <<" -o fichier.csh : nom du fichier de sortie pour les commandes a lancer"<<endl;
    3436}
     
    3840{
    3941  string outname = "chanum_1210.csh";
     42  string selfreq = "0,8888,1", seltime = "0,999999";
    4043  double freq0 = 0.;
    4144
    4245  char c;
    43   while((c = getopt(narg,arg,"hO:o:f:")) != -1) {
     46  while((c = getopt(narg,arg,"hO:o:f:F:T:")) != -1) {
    4447    switch (c) {
    4548    case 'f' :
     
    4851    case 'o' :
    4952      outname = optarg;
     53      break;
     54    case 'F' :
     55      selfreq = optarg;
     56      break;
     57    case 'T' :
     58      seltime = optarg;
    5059      break;
    5160    case 'h' :
     
    9099
    91100  // ecriture
     101  {
    92102  ofstream ftxt(outname.c_str(), ofstream::out);
    93103  cout<<"writing in "<<outname<<" (is_open="<<ftxt.is_open()<<")"<<endl;
     
    97107  nvisi = 0;
    98108  for(uint_4 i=0;i<vcode.size();i++) {
    99     char str[256];
    100     sprintf(str,"${TACQEXE}/svv2mtx2_1210 -T 0,99999 -F 0,8888,1 -f %.7f",freq0);
     109    char str[512];
     110    sprintf(str,"${TACQEXE}/svv2mtx2_1210 -f %.7f -T %s -F %s"
     111            ,freq0,seltime.c_str(),selfreq.c_str());
    101112    string argu = str;
    102113    uint_4 ip = IVcode(i);
     
    129140  cout<<"nvisi tot="<<nvisi<<", number of duplicate="<<ndupli<<", nvisi="<<nvisi-ndupli<<" / 528"<<endl;
    130141  ftxt << "exit 0" <<endl;
     142  }
     143
     144  // script should be executable
     145  string chmod = "chmod a+x "; chmod += outname;
     146  system(chmod.c_str());
    131147
    132148  return 0;
  • trunk/AddOn/TAcq/svv2mtx2_1210.cc

    r3928 r3935  
    229229  MVisi.Info()["dir"] = indir;
    230230  MVisi.Info()["dupli"] = (dupli) ? 1: 0;
    231   MVisi.Info()["doconj"] = (doconj) ? 1: 0;
     231  MVisi.Info()["isconj"] = (doconj) ? 1: 0;
    232232  MVisi.Info()["TUobs_0"] = tudeb;
    233233  MVisi.Info()["TUobs_N"] = tufin;
Note: See TracChangeset for help on using the changeset viewer.