| Last change
 on this file since 3915 was             3829, checked in by ansari, 15 years ago | 
        
          | 
Adaptation programme srcat2cube.cc pour utilisation catalogue North20cm avec indice spectral, Reza 03/08/2010
 | 
        
          | File size:
            1.1 KB | 
      
      
| Line |  | 
|---|
| 1 | #include "radutil.h" | 
|---|
| 2 | #include <iostream> | 
|---|
| 3 |  | 
|---|
| 4 | // Appel : tjyk [z=redshift] [resol_arcmin] | 
|---|
| 5 |  | 
|---|
| 6 | int main(int narg, char* arg[]) | 
|---|
| 7 | { | 
|---|
| 8 | if (narg<2) { | 
|---|
| 9 | cout << " Usage: tjyk redshift [resol_arcmin] " << endl; | 
|---|
| 10 | return 1; | 
|---|
| 11 | } | 
|---|
| 12 |  | 
|---|
| 13 | H21Conversions conv; | 
|---|
| 14 |  | 
|---|
| 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; | 
|---|
| 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 << "  Mean 21cm emission temperature= " << conv.T21cm_mK() << " milliKelvin " << endl; | 
|---|
| 28 | cout << " --------------------------------------------------------------- " << endl; | 
|---|
| 29 |  | 
|---|
| 30 | return 0; | 
|---|
| 31 | } | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.