Changeset 39355
- Timestamp:
- Feb 18, 2016, 4:41:34 PM (10 years ago)
- Location:
- trunk/Ohana/src/uniphot
- Files:
-
- 6 edited
-
Makefile (modified) (2 diffs)
-
include/setphot.h (modified) (2 diffs)
-
src/initialize_setphot.c (modified) (1 diff)
-
src/initialize_setphot_client.c (modified) (1 diff)
-
src/update_catalog_setgalmodel.c (modified) (2 diffs)
-
src/update_dvo_setphot.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/uniphot/Makefile
r39288 r39355 75 75 $(SRC)/update_catalog_setphot.$(ARCH).o \ 76 76 $(SRC)/update_catalog_setastrom.$(ARCH).o \ 77 $(SRC)/update_catalog_setgalmodel.$(ARCH).o \ 77 78 $(SRC)/repair_catalog_by_objID.$(ARCH).o \ 78 79 $(SRC)/SetSignals.$(ARCH).o \ … … 87 88 $(SRC)/update_catalog_setphot.$(ARCH).o \ 88 89 $(SRC)/update_catalog_setastrom.$(ARCH).o \ 90 $(SRC)/update_catalog_setgalmodel.$(ARCH).o \ 89 91 $(SRC)/repair_catalog_by_objID.$(ARCH).o \ 90 92 $(SRC)/initialize_setphot_client.$(ARCH).o \ -
trunk/Ohana/src/uniphot/include/setphot.h
r39288 r39355 62 62 int DCR_RESET; 63 63 int CAM_RESET; 64 65 int SET_GAL_MODEL; 64 66 65 67 int VERBOSE; … … 139 141 int CamAstromCorrectionValue (int chipID, int filter, float Xccd, float Yccd, double *dX, double *dY); 140 142 141 143 int update_catalog_setgalmodel PROTO((Catalog *catalog)); 142 144 int update_catalog_setastrom PROTO((Catalog *catalog)); -
trunk/Ohana/src/uniphot/src/initialize_setphot.c
r39288 r39355 78 78 char *tmpfile = strcreate (argv[N]); 79 79 CAM_PHOTOM_FILE = abspath (tmpfile, DVO_MAX_PATH); 80 remove_argument (N, &argc, argv); 81 } 82 83 SET_GAL_MODEL = FALSE; 84 if ((N = get_argument (argc, argv, "-setgalmodel"))) { 85 SET_GAL_MODEL = TRUE; 80 86 remove_argument (N, &argc, argv); 81 87 } -
trunk/Ohana/src/uniphot/src/initialize_setphot_client.c
r39288 r39355 66 66 } 67 67 68 // NOTE: I do not need to pass the cam-flat file to the 69 // setphot clients because the database gets an update to 70 // CATDIR/flatfield.fits which is loaded by setphot_client 68 71 CAM_PHOTOM_FILE = NULL; 69 /* 70 if ((N = get_argument (argc, argv, "-cam-flat"))) { 71 remove_argument (N, &argc, argv); 72 char *tmpfile = strcreate (argv[N]); 73 CAM_PHOTOM_FILE = abspath (tmpfile, DVO_MAX_PATH); 72 73 SET_GAL_MODEL = FALSE; 74 if ((N = get_argument (argc, argv, "-setgalmodel"))) { 75 SET_GAL_MODEL = TRUE; 74 76 remove_argument (N, &argc, argv); 75 77 } 76 */77 78 78 79 VERBOSE = FALSE; -
trunk/Ohana/src/uniphot/src/update_catalog_setgalmodel.c
r39225 r39355 13 13 14 14 CoordTransform *transform = InitTransform (COORD_CELESTIAL, COORD_GALACTIC); 15 16 // the typical motions do not vary so much as a function of position, we can use the 17 // median uR,uD values for all objects without stellar parameters 18 19 int Nsave = 0; 20 ALLOCATE_PTR (uRsave, double, catalog[0].Nstarpar); 21 ALLOCATE_PTR (uDsave, double, catalog[0].Nstarpar); 15 22 16 23 // first set the proper motion based on Galactic rotation and solar motion … … 57 64 average[i].uRgal = uR; 58 65 average[i].uDgal = uD; 66 67 if (Nsave < catalog[0].Nstarpar) { 68 uRsave[Nsave] = uR; 69 uDsave[Nsave] = uD; 70 Nsave ++; 71 } 59 72 } 73 74 // below we attempt to set the uRgal, uDgal values for objects 75 // without starpar data. but if we do not have enough information, 76 // give up and return 77 if (Nsave < 3) return TRUE; 78 79 dsort (uRsave, Nsave); 80 dsort (uDsave, Nsave); 81 82 int Nmid = 0.5*Nsave; 83 double uRmid = uRsave[Nmid]; 84 double uDmid = uDsave[Nmid]; 85 86 // set the value for unassigned stars based on the median uR,uD values for this patch 87 for (i = 0; i < catalog[0].Naverage; i++) { 88 if (isfinite(average[i].uRgal)) continue; 89 90 average[i].uRgal = uRmid; 91 average[i].uDgal = uDmid; 92 } 60 93 61 94 return (TRUE); -
trunk/Ohana/src/uniphot/src/update_dvo_setphot.c
r39288 r39355 62 62 catalog.catflags |= DVO_LOAD_SECFILT; 63 63 } 64 if (SET_GAL_MODEL) { 65 catalog.catflags |= DVO_LOAD_STARPAR; 66 } 64 67 catalog.Nsecfilt = GetPhotcodeNsecfilt (); 65 68 … … 85 88 if (KH_FILE || DCR_FILE || CAM_ASTROM_FILE) { 86 89 update_catalog_setastrom (&catalog); 90 } 91 92 if (SET_GAL_MODEL) { 93 update_catalog_setgalmodel (&catalog); 87 94 } 88 95 … … 166 173 if (DCR_FILE) { strextend (&command, "-DCR %s", DCR_FILE); } 167 174 if (CAM_ASTROM_FILE) { strextend (&command, "-CAM %s", CAM_ASTROM_FILE); } 175 176 if (SET_GAL_MODEL) { strextend (&command, "-setgalmodel"); } 168 177 169 178 if (KH_RESET) { strextend (&command, "-KH-reset"); }
Note:
See TracChangeset
for help on using the changeset viewer.
