- Timestamp:
- Nov 20, 2014, 8:34:19 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/ICRF.c
r37622 r37655 48 48 return TRUE; 49 49 } 50 51 int select_catalog_ICRF (Catalog *catalog, int Ncatalog) { 52 53 if (!USE_ICRF_CORRECT) return TRUE; 54 55 int N = 0; 56 57 char filename[1024]; 58 snprintf (filename, 1024, "%s/test.icrf.dat", CATDIR); 59 FILE *f = fopen (filename, "w"); 60 61 int c, i, j; 62 for (c = 0; c < Ncatalog; c++) { 63 64 for (i = 0; i < catalog[c].Naverage; i++) { 65 if (!(catalog[c].average[i].flags & ID_ICRF_QSO)) continue; 66 67 // only save a single value 68 int savedICRF = FALSE; 69 for (j = 0; j < catalog[c].average[i].Nmeasure; j++) { 70 71 int offset = catalog[c].average[i].measureOffset + j; 72 73 if (!(catalog[c].measureT[offset].dbFlags & ID_MEAS_ICRF_QSO)) continue; 74 75 fprintf (f, "%d %d %d : %f %f : %f %f\n", c, i, offset, 76 catalog[c].average[i].R, catalog[c].average[i].D, 77 catalog[c].measureT[offset].R, catalog[c].measureT[offset].D); 78 79 if (savedICRF) continue; 80 81 ICRFsave (c, i, offset); 82 N ++; 83 savedICRF = TRUE; 84 } 85 } 86 } 87 fclose (f); 88 89 fprintf (stderr, "added %d ICRF QSO\n", N); 90 91 return TRUE; 92 }
Note:
See TracChangeset
for help on using the changeset viewer.
