📣 An issue occured with the embedded container registry on October 25 2021, between 10:30 and 12:10 (UTC+2). Any persisting issues should be reported to CC-IN2P3 Support. 🐛

Commit c16a82d8 authored by Reza  ANSARI's avatar Reza ANSARI
Browse files

Gestion texte d'aide court/long avec -h -help , Reza 19/07/2018

parent bd06dd24
......@@ -42,13 +42,12 @@
#include "fitsioserver.h"
#include "fiosinit.h"
int Usage(void);
int Usage(void)
int Usage(bool fglong)
{
cout << " --- vis2ra.cc : Reads PPF files produced by mfacq time-frequency \n"
<< " and produces maps of visibilies as a function of ra (Right Ascension) \n"
cout << " --- vis2ra : reads time stream visibility data and projects \n"
<< " (selected) visibility data into ra-maps (Right Ascension) \n"
<< " Usage: vis2ra [-arguments] \n" << endl;
P4AnaParams::UsageOptions();
P4AnaParams::UsageOptions(fglong);
cout<< endl;
return 1;
}
......@@ -57,8 +56,15 @@ int Usage(void)
int main(int narg, const char* arg[])
{
// --- Decoding parameters
if( (narg<2) || ((narg>1)&&(strcmp(arg[1],"-h")==0) ) ) return Usage();
FitsIOServerInit();
if (narg<2) {
cout << " --- vis2ra : compute ra-maps (Right Ascension) from visibilities time stream \n"
<< " vis2ra/ Missing argument - To get short/long usage information type \n"
<< " vis2ra -h (list of arguments) OR vis2ra -help (list of arguments + description)"<<endl;
return 1;
}
else if ((narg>1)&&(strcmp(arg[1],"-h")==0) ) return Usage(false);
else if ((narg>1)&&(strcmp(arg[1],"-help")==0) ) return Usage(true);
P4AnaParams params;
params.DecodeArgs(narg, arg);
......@@ -101,15 +107,14 @@ int main(int narg, const char* arg[])
cout << "KVCXHH["<<k<<"]="<<KVCXHH[k]<<" ->"<<visiencod.Convert2VisiName(KVCXHH[k])<<endl;
}
// ---
HiStatsInitiator _inia;
int rc = 0;
try {
// --- Init SOPHYA
HiStatsInitiator _inia;
FitsIOServerInit();
ResourceUsage resu;
VisiP4WindowReader wreader(params);
long Imin = wreader.getReader().getSerialFirst();
......
......@@ -43,14 +43,14 @@
#include "p4freqselmgr.h"
int Usage(void);
int Usage(void)
int Usage(bool fglong)
{
cout << " --- visamm.cc : Reads PPF files produced by mfacq and produces visibility \n"
<< " arrays suitable as input for map making step \n"
cout << " ----- visamm : Reads visibility time stream data and computes \n"
<< " frequency band ra (Right Ascension) visibility maps as sarrays \n"
<< " suitable as input for map making step \n"
<< " Usage: visamm [-arguments] [-elev elevationAngleDegree] \n"
<< " Note that Frequency bands should be specified \n" << endl;
P4AnaParams::UsageOptions();
P4AnaParams::UsageOptions(fglong);
cout<< endl;
return 1;
}
......@@ -59,8 +59,16 @@ int Usage(void)
int main(int narg, const char* arg[])
{
// --- Decoding parameters
if( (narg<2) || ((narg>1)&&(strcmp(arg[1],"-h")==0) ) ) return Usage();
FitsIOServerInit();
// --- Decoding parameters
if (narg<2) {
cout << " --- visamm : computes frequency band ra-maps suitable for map-making \n"
<< " visamm/ Missing argument - To get short/long usage information type \n"
<< " visamm -h (list of arguments) OR visamm -help (list of arguments + description)"<<endl;
return 1;
}
else if ((narg>1)&&(strcmp(arg[1],"-h")==0) ) return Usage(false);
else if ((narg>1)&&(strcmp(arg[1],"-help")==0) ) return Usage(true);
P4AnaParams params;
params.DecodeArgs(narg, arg);
......@@ -96,7 +104,9 @@ int main(int narg, const char* arg[])
int rc = 0;
try {
//-- SOPHYA init
HiStatsInitiator _inia;
FitsIOServerInit();
ResourceUsage resu;
// Frequency band definition
......
......@@ -42,12 +42,11 @@
#include "fitsioserver.h"
#include "fiosinit.h"
int Usage(void);
int Usage(void)
int Usage(bool fglong)
{
cout << " --- visiavg.cc : Read PPF files produced by mfacq time-frequency\n" << endl;
cout << " Usage: visiavg [-arguments] \n" << endl;
P4AnaParams::UsageOptions();
cout << " --- visiavg.cc : Computes time-frequency visibility maps from time stream visibility data\n"
<< " Usage: visiavg [-arguments] \n" << endl;
P4AnaParams::UsageOptions(fglong);
cout<< endl;
return 1;
}
......@@ -56,8 +55,15 @@ int Usage(void)
int main(int narg, const char* arg[])
{
// --- Decoding parameters
if( (narg<2) || ((narg>1)&&(strcmp(arg[1],"-h")==0) ) ) return Usage();
FitsIOServerInit();
if (narg<2) {
cout << " --- visiavg : computes TFM (time-frequency) maps from visibilities \n"
<< " visiavg/ Missing argument - To get short/long usage information type \n"
<< " visiavg -h (list of arguments) OR visiavg -help (list of arguments + description)"<<endl;
return 1;
}
else if ((narg>1)&&(strcmp(arg[1],"-h")==0) ) return Usage(false);
else if ((narg>1)&&(strcmp(arg[1],"-help")==0) ) return Usage(true);
P4AnaParams params;
params.DecodeArgs(narg, arg);
......@@ -105,15 +111,14 @@ int main(int narg, const char* arg[])
cout << "KVCXHH["<<k<<"]="<<KVCXHH[k]<<" ->"<<visiencod.Convert2VisiName(KVCXHH[k])<<endl;
}
// ---
HiStatsInitiator _inia;
int rc = 0;
try {
// --- Init SOPHYA
HiStatsInitiator _inia;
FitsIOServerInit();
ResourceUsage resu;
VisiP4WindowReader wreader(params);
long Imin = wreader.getReader().getSerialFirst();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment