Changeset 15543
- Timestamp:
- Nov 9, 2007, 11:14:10 AM (19 years ago)
- Location:
- trunk/Ohana/src/getstar/src
- Files:
-
- 6 edited
-
ConfigInit.c (modified) (1 diff)
-
args.c (modified) (1 diff)
-
select_by_region.c (modified) (3 diffs)
-
write_getstar_ps1_dev_0.c (modified) (2 diffs)
-
write_getstar_ps1_dev_1.c (modified) (2 diffs)
-
write_getstar_ps1_dev_2.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/getstar/src/ConfigInit.c
r12462 r15543 38 38 exit (1); 39 39 } 40 SetZeroPoint (25.0); 40 41 41 42 free (config); -
trunk/Ohana/src/getstar/src/args.c
r15540 r15543 72 72 exit (1); 73 73 } 74 // XXX check that photcode is SEC type75 74 remove_argument (N, &argc, argv); 76 75 } -
trunk/Ohana/src/getstar/src/select_by_region.c
r15540 r15543 4 4 int select_by_region (Catalog *output, Catalog *catalog, SkyRegion *region, int start, int end) { 5 5 6 int i, j, n, Nm, offset, Nsecfilt;6 int i, j, n, Nm, offset, m, Nsecfilt, code, Nsec; 7 7 int Nave, NAVE, Nmeas, NMEAS; 8 8 double R, D; 9 float mag; 9 10 10 11 Nsecfilt = output[0].Nsecfilt; … … 23 24 gfits_modify (&output[0].header, "DEC1", "%lf", 1, region[0].Dmax); 24 25 } 26 27 code = photcode[0].code; 28 Nsec = GetPhotcodeNsec (code); 25 29 26 30 /* select the average objects in this region */ … … 45 49 if (D > region[0].Dmax) continue; 46 50 47 /* XXX add photcode as argument to MagLimitUse */ 48 if (MagLimitUse && (catalog[0].secfilt[Nsecfilt*i].M > MagLimitValue)) continue; 51 if (MagLimitUse) { 52 mag = NAN; 53 if (Nsec != -1) { 54 mag = catalog[0].secfilt[i*Nsecfilt + Nsec].M; 55 } else { 56 offset = catalog[0].average[i].offset; 57 for (m = 0; m < catalog[0].average[i].Nm; m++) { 58 if (catalog[0].measure[offset + m].photcode == code) { 59 mag = PhotRel (&catalog[0].measure[offset + m], &catalog[0].average[i], &catalog[0].secfilt[i*Nsecfilt]); 60 break; 61 } 62 } 63 } 64 if (isnan(mag) || (mag > MagLimitValue)) continue; 65 } 49 66 50 67 output[0].average[Nave] = catalog[0].average[i]; -
trunk/Ohana/src/getstar/src/write_getstar_ps1_dev_0.c
r15539 r15543 40 40 secfilt = catalog[0].secfilt; 41 41 42 if (Nsec_c0 == -1) {43 fprintf (stderr, "invalid photcode %s\n", photcode[0].name);44 exit (2);45 }46 47 42 // do we skip any of catalog entries? (probably not) 48 43 for (i = 0; i < catalog[0].Naverage; i++) { … … 50 45 output[i].R = average[i].R; 51 46 output[i].D = average[i].D; 52 output[i].mag = secfilt[i*Nsecfilt + Nsec_c0].M;53 47 54 48 output[i].code = average[i].code; 55 49 output[i].photcode = code_c0; 56 50 57 // It is not necessary for the output color terms to be average values. If they are, 58 // we grab them quickly & easily from the secfilt table. If not, then we need to scan 59 // the list of measures to find the value of interest 51 // It is not necessary for the output magnitude or color terms to be average values. 52 // If they are, we grab them quickly & easily from the secfilt table. If not, then we 53 // need to scan the list of measures to find the value of interest 54 55 // find primary magnitude 56 if (Nsec_c0 != -1) { 57 output[i].mag = secfilt[i*Nsecfilt + Nsec_c0].M; 58 } else { 59 output[i].mag = NAN; 60 offset = average[i].offset; 61 for (m = 0; m < average[i].Nm; m++) { 62 if (measure[offset + m].photcode == code_c0) { 63 output[i].mag = PhotRel (&measure[offset + m], &average[i], &secfilt[i*Nsecfilt]); 64 break; 65 } 66 } 67 } 60 68 61 69 // find color term 1 -
trunk/Ohana/src/getstar/src/write_getstar_ps1_dev_1.c
r15539 r15543 40 40 secfilt = catalog[0].secfilt; 41 41 42 if (Nsec_c0 == -1) {43 fprintf (stderr, "invalid photcode %s\n", photcode[0].name);44 exit (2);45 }46 47 42 // do we skip any of catalog entries? (probably not) 48 43 for (i = 0; i < catalog[0].Naverage; i++) { … … 57 52 output[i].photcode = code_c0; 58 53 59 output[i].mag = secfilt[i*Nsecfilt + Nsec_c0].M;60 61 54 // It is not necessary for the output color terms to be average values. If they are, 62 55 // we grab them quickly & easily from the secfilt table. If not, then we need to scan 63 56 // the list of measures to find the value of interest 57 58 // find primary magnitude 59 if (Nsec_c0 != -1) { 60 output[i].mag = secfilt[i*Nsecfilt + Nsec_c0].M; 61 } else { 62 output[i].mag = NAN; 63 offset = average[i].offset; 64 for (m = 0; m < average[i].Nm; m++) { 65 if (measure[offset + m].photcode == code_c0) { 66 output[i].mag = PhotRel (&measure[offset + m], &average[i], &secfilt[i*Nsecfilt]); 67 break; 68 } 69 } 70 } 64 71 65 72 // find color term 1 -
trunk/Ohana/src/getstar/src/write_getstar_ps1_dev_2.c
r15539 r15543 39 39 secfilt = catalog[0].secfilt; 40 40 41 if (Nsec_c0 == -1) {42 fprintf (stderr, "invalid photcode %s\n", photcode[0].name);43 exit (2);44 }45 46 41 // do we skip any of catalog entries? (probably not) 47 42 for (i = 0; i < catalog[0].Naverage; i++) { … … 63 58 output[i].photcode = code_c0; 64 59 65 output[i].mag = secfilt[i*Nsecfilt + Nsec_c0].M;66 67 60 // It is not necessary for the output color terms to be average values. If they are, 68 61 // we grab them quickly & easily from the secfilt table. If not, then we need to scan 69 62 // the list of measures to find the value of interest 63 64 // find primary magnitude 65 if (Nsec_c0 != -1) { 66 output[i].mag = secfilt[i*Nsecfilt + Nsec_c0].M; 67 } else { 68 output[i].mag = NAN; 69 offset = average[i].offset; 70 for (m = 0; m < average[i].Nm; m++) { 71 if (measure[offset + m].photcode == code_c0) { 72 output[i].mag = PhotRel (&measure[offset + m], &average[i], &secfilt[i*Nsecfilt]); 73 break; 74 } 75 } 76 } 70 77 71 78 // find color term 1
Note:
See TracChangeset
for help on using the changeset viewer.
