source: Sophya/trunk/Cosmo/RadioBeam/tjyk.cc@ 3787

Last change on this file since 3787 was 3787, checked in by ansari, 15 years ago

Ajout classes / programmes de calcul d'effet de lobe sur les radio-sources, Reza 25/06/2010

File size: 988 bytes
RevLine 
[3783]1#include "radutil.h"
2#include <iostream>
3
[3785]4// Appel : tjyk [z=redshift] [resol_arcmin]
5
[3783]6int main(int narg, char* arg[])
7{
[3787]8 if (narg<2) {
9 cout << " Usage: tjyk redshift [resol_arcmin] " << endl;
10 return 1;
11 }
[3783]12
13 H21Conversions conv;
14
[3785]15 double z = 0.;
16 double resol = 10.;
17 if (narg>1) z = atof(arg[1]);
18 if (narg>2) resol = atof(arg[2]);
19
20 conv.setRedshift(z);
21 conv.setOmegaPixArcmin2(resol*resol);
22 cout << " ------------------------------ H21Conversions ------------------------- " << endl;
23 cout << " Redshift=z= " << z << " Resol(arcmin)= " << resol << endl;
[3783]24 cout << " H21Conversions: z=" << conv.getRedshift() << " Freq=" << conv.getFrequency()
25 << " MHz , Lambda=" << conv.getLambda() << " m , OmegaPix=" << conv.getOmegaPix() << " srad" << endl;
26 cout << " toKelvin(1 Jy)= " << conv.toKelvin(1.) << " toJansky(1 K)=" << conv.toJansky(1.) << endl;
27 cout << " --------------------------------------------------------------- " << endl;
28
29 return 0;
30}
Note: See TracBrowser for help on using the repository browser.