Changeset 37803 for branches/eam_branches/ipp-20140904
- Timestamp:
- Jan 11, 2015, 2:02:45 PM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140904/Ohana
- Files:
-
- 25 edited
- 8 copied
-
. (modified) (1 prop)
-
src/addstar/include/WISE.h (modified) (1 diff)
-
src/addstar/src/MatchHeaders.c (modified) (1 diff)
-
src/addstar/src/ReadStarsFITS.c (modified) (13 diffs)
-
src/addstar/src/args_loadwise.c (modified) (1 diff)
-
src/addstar/src/loadsupercos_plates.c (modified) (1 diff)
-
src/addstar/src/loadwise.c (modified) (1 diff)
-
src/addstar/src/loadwise_rawdata.c (modified) (2 diffs)
-
src/dvomerge/src/args.c (modified) (1 diff)
-
src/dvomerge/src/build_links.c (modified) (3 diffs)
-
src/dvomerge/src/merge_catalogs_new.c (modified) (2 diffs)
-
src/dvopsps/Makefile (modified) (2 diffs)
-
src/dvopsps/include/dvopsps.h (modified) (1 diff)
-
src/dvopsps/src/dvopsps.c (modified) (1 diff)
-
src/dvopsps/src/dvopsps_client.c (modified) (1 diff)
-
src/dvopsps/src/initialize_dvopsps.c (modified) (1 diff)
-
src/dvopsps/src/insert_FWobjects_dvopsps.c (copied) (copied from trunk/Ohana/src/dvopsps/src/insert_FWobjects_dvopsps.c )
-
src/dvopsps/src/insert_FWobjects_dvopsps_catalog.c (copied) (copied from trunk/Ohana/src/dvopsps/src/insert_FWobjects_dvopsps_catalog.c )
-
src/getstar (modified) (1 prop)
-
src/kapa2/src/InterpretKeys.c (modified) (1 diff)
-
src/libautocode/def/cmf-ps1-sv4.d (copied) (copied from trunk/Ohana/src/libautocode/def/cmf-ps1-sv4.d )
-
src/libautocode/def/cmf-ps1-v5-lensing-alt.d (copied) (copied from trunk/Ohana/src/libautocode/def/cmf-ps1-v5-lensing-alt.d )
-
src/libautocode/def/cmf-ps1-v5-lensing.d (modified) (2 diffs)
-
src/libdvo/Makefile (modified) (2 diffs)
-
src/libdvo/include/cmf-ps1-sv4.h (copied) (copied from trunk/Ohana/src/libdvo/include/cmf-ps1-sv4.h )
-
src/libdvo/include/cmf-ps1-v5-lensing-alt.h (copied) (copied from trunk/Ohana/src/libdvo/include/cmf-ps1-v5-lensing-alt.h )
-
src/libdvo/include/cmf-ps1-v5-lensing.h (modified) (1 diff)
-
src/libdvo/include/dvo.h (modified) (2 diffs)
-
src/libdvo/src/cmf-ps1-sv4.c (copied) (copied from trunk/Ohana/src/libdvo/src/cmf-ps1-sv4.c )
-
src/libdvo/src/cmf-ps1-v5-lensing-alt.c (copied) (copied from trunk/Ohana/src/libdvo/src/cmf-ps1-v5-lensing-alt.c )
-
src/libdvo/src/cmf-ps1-v5-lensing.c (modified) (4 diffs)
-
src/libdvo/src/cmf-ps1-v5.c (modified) (4 diffs)
-
src/relphot/src/setMrelCatalog.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140904/Ohana
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20140904/Ohana/src/addstar/include/WISE.h
r33963 r37803 21 21 short WISE_W1, WISE_W2, WISE_W3, WISE_W4; 22 22 23 int ALLSKY; 23 enum {MODE_NONE, MODE_ALLWISE, MODE_ALLSKY, MODE_PRELIM}; 24 int MODE; 24 25 25 26 AddstarClientOptions args_loadwise (int argc, char **argv, AddstarClientOptions options); 26 27 27 int loadwise_rawdata (SkyList *skytable, char *filename, AddstarClientOptions options , int ALLSKY);28 int loadwise_rawdata (SkyList *skytable, char *filename, AddstarClientOptions options); 28 29 29 30 int getWISE_setup (); -
branches/eam_branches/ipp-20140904/Ohana/src/addstar/src/MatchHeaders.c
r37357 r37803 64 64 if (!strcmp (exttype, "PS1_SV2")) goto keep; 65 65 if (!strcmp (exttype, "PS1_SV3")) goto keep; 66 if (!strcmp (exttype, "PS1_SV4")) goto keep; 66 67 67 68 if (!strcmp (exttype, "PS1_DV1")) goto keep; -
branches/eam_branches/ipp-20140904/Ohana/src/addstar/src/ReadStarsFITS.c
r37246 r37803 14 14 Stars *Convert_PS1_V5 PROTO((FTable *table, unsigned int *nstars)); 15 15 Stars *Convert_PS1_V5_Lensing PROTO((FTable *table, unsigned int *nstars)); 16 Stars *Convert_PS1_V5_Lensing_Alt PROTO((FTable *table, unsigned int *nstars)); 16 17 Stars *Convert_PS1_SV1 PROTO((FTable *table, unsigned int *nstars)); 17 18 Stars *Convert_PS1_SV1_Alt PROTO((FTable *table, unsigned int *nstars)); 18 19 Stars *Convert_PS1_SV2 PROTO((FTable *table, unsigned int *nstars)); 19 20 Stars *Convert_PS1_SV3 PROTO((FTable *table, unsigned int *nstars)); 21 Stars *Convert_PS1_SV4 PROTO((FTable *table, unsigned int *nstars)); 20 22 Stars *Convert_PS1_DV3 PROTO((FTable *table, unsigned int *nstars)); 21 23 Stars *Convert_PS1_DV4 PROTO((FTable *table, unsigned int *nstars)); … … 78 80 } 79 81 if (!strcmp (type, "PS1_V5")) { 80 if (table.header[0].Naxis[0] == 312) { 81 stars = Convert_PS1_V5_Lensing (&table, &Nstars); 82 } else { 83 stars = Convert_PS1_V5 (&table, &Nstars); 82 switch (table.header[0].Naxis[0]) { 83 case 232: 84 stars = Convert_PS1_V5 (&table, &Nstars); 85 break; 86 case 312: 87 stars = Convert_PS1_V5_Lensing_Alt (&table, &Nstars); 88 break; 89 case 320: 90 stars = Convert_PS1_V5_Lensing (&table, &Nstars); 91 break; 92 default: 93 fprintf (stderr, "invalid PS1_V5 table size %d\n", (int) table.header[0].Naxis[0]); 94 return NULL; 84 95 } 85 96 } … … 92 103 if (!strcmp (type, "PS1_SV3")) { 93 104 stars = Convert_PS1_SV3 (&table, &Nstars); 105 } 106 if (!strcmp (type, "PS1_SV4")) { 107 stars = Convert_PS1_SV4 (&table, &Nstars); 94 108 } 95 109 if (!strcmp (type, "PS1_DV3")) { … … 971 985 } 972 986 987 Stars *Convert_PS1_V5_Lensing_Alt (FTable *table, unsigned int *nstars) { 988 989 off_t Nstars; 990 unsigned int i; 991 double ZeroPt; 992 Stars *stars; 993 CMF_PS1_V5_Lensing_Alt *ps1data; 994 995 ps1data = gfits_table_get_CMF_PS1_V5_Lensing_Alt (table, &Nstars, NULL); 996 if (!ps1data) { 997 fprintf (stderr, "skipping inconsistent entry\n"); 998 return (NULL); 999 } 1000 ZeroPt = GetZeroPoint(); 1001 1002 ALLOCATE (stars, Stars, Nstars); 1003 for (i = 0; i < Nstars; i++) { 1004 InitStar (&stars[i]); 1005 stars[i].measure.Xccd = ps1data[i].X; 1006 stars[i].measure.Yccd = ps1data[i].Y; 1007 stars[i].measure.dXccd = ToShortPixels(ps1data[i].dX); 1008 stars[i].measure.dYccd = ToShortPixels(ps1data[i].dY); 1009 1010 stars[i].measure.posangle = ToShortDegrees(ps1data[i].posangle); 1011 stars[i].measure.pltscale = ps1data[i].pltscale; 1012 1013 if ((ps1data[i].M >= 0.0) || isnan(ps1data[i].M)) { 1014 stars[i].measure.M = NAN; 1015 } else { 1016 stars[i].measure.M = ps1data[i].M + ZeroPt; 1017 } 1018 stars[i].measure.dM = ps1data[i].dM; 1019 stars[i].measure.dMcal = ps1data[i].dMcal; 1020 stars[i].measure.Map = ps1data[i].Map + ZeroPt; 1021 stars[i].measure.dMap = (ps1data[i].apFlux > 0.0) ? fabs(ps1data[i].apFluxErr / ps1data[i].apFlux) : NAN; 1022 1023 stars[i].measure.Mkron = (ps1data[i].kronFlux > 0.0) ? -2.5*log10(ps1data[i].kronFlux) + ZeroPt : NAN; 1024 stars[i].measure.dMkron = (ps1data[i].kronFlux > 0.0) ? ps1data[i].kronFluxErr / ps1data[i].kronFlux : NAN; 1025 1026 // these fluxes are converted from counts to counts/sec in FilterStars.c 1027 stars[i].measure.FluxPSF = GetFluxFromFluxOrMag (ps1data[i].Flux, ps1data[i].M); 1028 stars[i].measure.dFluxPSF = GetFluxErrFromFluxOrMag (ps1data[i].dFlux, stars[i].measure.FluxPSF, ps1data[i].dM); 1029 stars[i].measure.FluxKron = ps1data[i].kronFlux; 1030 stars[i].measure.dFluxKron = ps1data[i].kronFluxErr; 1031 stars[i].measure.FluxAp = GetFluxFromFluxOrMag (ps1data[i].apFlux, ps1data[i].Map); 1032 stars[i].measure.dFluxAp = GetFluxErrFromFluxOrMag (ps1data[i].apFluxErr, stars[i].measure.FluxAp, stars[i].measure.dMap); 1033 1034 stars[i].measure.Sky = ps1data[i].sky; 1035 stars[i].measure.dSky = ps1data[i].dSky; 1036 1037 stars[i].measure.psfChisq = ps1data[i].psfChisq; 1038 stars[i].measure.psfQF = ps1data[i].psfQF; 1039 stars[i].measure.psfQFperf = ps1data[i].psfQFperf; 1040 1041 stars[i].measure.psfNdof = ps1data[i].psfNdof; 1042 stars[i].measure.psfNpix = ps1data[i].psfNpix; 1043 stars[i].measure.extNsigma = ps1data[i].extNsigma; 1044 1045 stars[i].measure.FWx = ToShortPixels(ps1data[i].fx); 1046 stars[i].measure.FWy = ToShortPixels(ps1data[i].fy); 1047 stars[i].measure.theta = ToShortDegrees(ps1data[i].df); 1048 1049 stars[i].measure.Mxx = ToShortPixels(ps1data[i].Mxx); 1050 stars[i].measure.Mxy = ToShortPixels(ps1data[i].Mxy); 1051 stars[i].measure.Myy = ToShortPixels(ps1data[i].Myy); 1052 1053 stars[i].measure.photFlags = ps1data[i].flags; 1054 stars[i].measure.photFlags2 = ps1data[i].flags2; 1055 1056 // this is may optionally be replaced by the internal sequence (see FilterStars.c) 1057 stars[i].measure.detID = ps1data[i].detID; 1058 1059 ALLOCATE (stars[i].lensing, Lensing, 1); 1060 dvo_lensing_init (stars[i].lensing); 1061 1062 stars[i].lensing->X11_sm_obj = ps1data[i].X11_sm_obj; 1063 stars[i].lensing->X12_sm_obj = ps1data[i].X12_sm_obj; 1064 stars[i].lensing->X22_sm_obj = ps1data[i].X22_sm_obj; 1065 stars[i].lensing->E1_sm_obj = ps1data[i].E1_sm_obj; 1066 stars[i].lensing->E2_sm_obj = ps1data[i].E2_sm_obj; 1067 1068 stars[i].lensing->X11_sh_obj = ps1data[i].X11_sh_obj; 1069 stars[i].lensing->X12_sh_obj = ps1data[i].X12_sh_obj; 1070 stars[i].lensing->X22_sh_obj = ps1data[i].X22_sh_obj; 1071 stars[i].lensing->E1_sh_obj = ps1data[i].E1_sh_obj; 1072 stars[i].lensing->E2_sh_obj = ps1data[i].E2_sh_obj; 1073 1074 stars[i].lensing->X11_sm_psf = ps1data[i].X11_sm_psf; 1075 stars[i].lensing->X12_sm_psf = ps1data[i].X12_sm_psf; 1076 stars[i].lensing->X22_sm_psf = ps1data[i].X22_sm_psf; 1077 stars[i].lensing->E1_sm_psf = ps1data[i].E1_sm_psf; 1078 stars[i].lensing->E2_sm_psf = ps1data[i].E2_sm_psf; 1079 1080 stars[i].lensing->X11_sh_psf = ps1data[i].X11_sh_psf; 1081 stars[i].lensing->X12_sh_psf = ps1data[i].X12_sh_psf; 1082 stars[i].lensing->X22_sh_psf = ps1data[i].X22_sh_psf; 1083 stars[i].lensing->E1_sh_psf = ps1data[i].E1_sh_psf; 1084 stars[i].lensing->E2_sh_psf = ps1data[i].E2_sh_psf; 1085 1086 // stars[i].lensing->F_ApR5 = ps1data[i].F_ApR5; 1087 // stars[i].lensing->dF_ApR5 = ps1data[i].dF_ApR5; 1088 // stars[i].lensing->sF_ApR5 = ps1data[i].sF_ApR5; 1089 // stars[i].lensing->fF_ApR5 = ps1data[i].fF_ApR5; 1090 // 1091 // stars[i].lensing->F_ApR6 = ps1data[i].F_ApR6; 1092 // stars[i].lensing->dF_ApR6 = ps1data[i].dF_ApR6; 1093 // stars[i].lensing->sF_ApR6 = ps1data[i].sF_ApR6; 1094 // stars[i].lensing->fF_ApR6 = ps1data[i].fF_ApR6; 1095 1096 // this is may optionally be replaced by the internal sequence (see FilterStars.c) 1097 stars[i].lensing->detID = ps1data[i].detID; 1098 1099 // the Average fields and the following Measure fields are set in FilterStars after 1100 // the image metadata is in hand: dR, dD, Mcal, dt, airmass, az, t, imageID, extID. 1101 1102 // averef is set in find_matches 1103 1104 // dbFlags is zero on ingest. 1105 1106 // the following fields are currently not being set anywhere: t_msec 1107 } 1108 *nstars = Nstars; 1109 return (stars); 1110 } 1111 973 1112 Stars *Convert_PS1_SV1 (FTable *table, unsigned int *nstars) { 974 1113 … … 1304 1443 } 1305 1444 1306 Stars *Convert_PS1_ DV3(FTable *table, unsigned int *nstars) {1445 Stars *Convert_PS1_SV4 (FTable *table, unsigned int *nstars) { 1307 1446 1308 1447 off_t Nstars; … … 1310 1449 double ZeroPt; 1311 1450 Stars *stars; 1312 CMF_PS1_ DV3*ps1data;1313 1314 ps1data = gfits_table_get_CMF_PS1_ DV3(table, &Nstars, NULL);1451 CMF_PS1_SV4 *ps1data; 1452 1453 ps1data = gfits_table_get_CMF_PS1_SV4 (table, &Nstars, NULL); 1315 1454 if (!ps1data) { 1316 1455 fprintf (stderr, "skipping inconsistent entry\n"); … … 1342 1481 stars[i].measure.Mkron = (ps1data[i].kronFlux > 0.0) ? -2.5*log10(ps1data[i].kronFlux) + ZeroPt : NAN; 1343 1482 stars[i].measure.dMkron = (ps1data[i].kronFlux > 0.0) ? ps1data[i].kronFluxErr / ps1data[i].kronFlux : NAN; 1344 1483 1345 1484 // these fluxes are converted from counts to counts/sec in FilterStars.c 1346 1485 stars[i].measure.FluxPSF = GetFluxFromFluxOrMag (ps1data[i].Flux, ps1data[i].M); … … 1357 1496 stars[i].measure.psfQF = ps1data[i].psfQF; 1358 1497 stars[i].measure.psfQFperf = ps1data[i].psfQFperf; 1498 1359 1499 stars[i].measure.psfNdof = ps1data[i].psfNdof; 1360 1500 stars[i].measure.psfNpix = ps1data[i].psfNpix; … … 1376 1516 1377 1517 // the Average fields and the following Measure fields are set in FilterStars after 1378 // the image metadata is in hand: dR, dD, Mcal, dt, airmass, az, t, imageID, extID. 1379 1380 // averef is set in find_matches 1381 1382 // dbFlags is zero on ingest. 1518 // the image metadata is in hand: dR, dD, Mcal, dt, airmass, az, t, imageID, extID, 1519 // averef is set in find_matches, dbFlags is zero on ingest. 1383 1520 1384 1521 // the following fields are currently not being set anywhere: t_msec … … 1388 1525 } 1389 1526 1390 Stars *Convert_PS1_DV 4(FTable *table, unsigned int *nstars) {1527 Stars *Convert_PS1_DV3 (FTable *table, unsigned int *nstars) { 1391 1528 1392 1529 off_t Nstars; … … 1394 1531 double ZeroPt; 1395 1532 Stars *stars; 1396 CMF_PS1_DV 4*ps1data;1397 1398 ps1data = gfits_table_get_CMF_PS1_DV 4(table, &Nstars, NULL);1533 CMF_PS1_DV3 *ps1data; 1534 1535 ps1data = gfits_table_get_CMF_PS1_DV3 (table, &Nstars, NULL); 1399 1536 if (!ps1data) { 1400 1537 fprintf (stderr, "skipping inconsistent entry\n"); … … 1402 1539 } 1403 1540 ZeroPt = GetZeroPoint(); 1404 1405 fprintf (stderr, "WARNING: Convert_PS1_DV4 not yet updated to match real format\n");1406 1541 1407 1542 ALLOCATE (stars, Stars, Nstars); … … 1474 1609 } 1475 1610 1476 1477 1611 Stars *Convert_PS1_DV4 (FTable *table, unsigned int *nstars) { 1612 1613 off_t Nstars; 1614 unsigned int i; 1615 double ZeroPt; 1616 Stars *stars; 1617 CMF_PS1_DV4 *ps1data; 1618 1619 ps1data = gfits_table_get_CMF_PS1_DV4 (table, &Nstars, NULL); 1620 if (!ps1data) { 1621 fprintf (stderr, "skipping inconsistent entry\n"); 1622 return (NULL); 1623 } 1624 ZeroPt = GetZeroPoint(); 1625 1626 fprintf (stderr, "WARNING: Convert_PS1_DV4 not yet updated to match real format\n"); 1627 1628 ALLOCATE (stars, Stars, Nstars); 1629 for (i = 0; i < Nstars; i++) { 1630 InitStar (&stars[i]); 1631 stars[i].measure.Xccd = ps1data[i].X; 1632 stars[i].measure.Yccd = ps1data[i].Y; 1633 stars[i].measure.dXccd = ToShortPixels(ps1data[i].dX); 1634 stars[i].measure.dYccd = ToShortPixels(ps1data[i].dY); 1635 1636 stars[i].measure.posangle = ToShortDegrees(ps1data[i].posangle); 1637 stars[i].measure.pltscale = ps1data[i].pltscale; 1638 1639 if ((ps1data[i].M >= 0.0) || isnan(ps1data[i].M)) { 1640 stars[i].measure.M = NAN; 1641 } else { 1642 stars[i].measure.M = ps1data[i].M + ZeroPt; 1643 } 1644 stars[i].measure.dM = ps1data[i].dM; 1645 stars[i].measure.dMcal = ps1data[i].dMcal; 1646 stars[i].measure.Map = ps1data[i].Map + ZeroPt; 1647 stars[i].measure.dMap = (ps1data[i].apFlux > 0.0) ? fabs(ps1data[i].apFluxErr / ps1data[i].apFlux) : NAN; 1648 1649 stars[i].measure.Mkron = (ps1data[i].kronFlux > 0.0) ? -2.5*log10(ps1data[i].kronFlux) + ZeroPt : NAN; 1650 stars[i].measure.dMkron = (ps1data[i].kronFlux > 0.0) ? ps1data[i].kronFluxErr / ps1data[i].kronFlux : NAN; 1651 1652 // these fluxes are converted from counts to counts/sec in FilterStars.c 1653 stars[i].measure.FluxPSF = GetFluxFromFluxOrMag (ps1data[i].Flux, ps1data[i].M); 1654 stars[i].measure.dFluxPSF = GetFluxErrFromFluxOrMag (ps1data[i].dFlux, stars[i].measure.FluxPSF, ps1data[i].dM); 1655 stars[i].measure.FluxKron = ps1data[i].kronFlux; 1656 stars[i].measure.dFluxKron = ps1data[i].kronFluxErr; 1657 stars[i].measure.FluxAp = GetFluxFromFluxOrMag (ps1data[i].apFlux, ps1data[i].Map); 1658 stars[i].measure.dFluxAp = GetFluxErrFromFluxOrMag (ps1data[i].apFluxErr, stars[i].measure.FluxAp, stars[i].measure.dMap); 1659 1660 stars[i].measure.Sky = ps1data[i].sky; 1661 stars[i].measure.dSky = ps1data[i].dSky; 1662 1663 stars[i].measure.psfChisq = ps1data[i].psfChisq; 1664 stars[i].measure.psfQF = ps1data[i].psfQF; 1665 stars[i].measure.psfQFperf = ps1data[i].psfQFperf; 1666 stars[i].measure.psfNdof = ps1data[i].psfNdof; 1667 stars[i].measure.psfNpix = ps1data[i].psfNpix; 1668 stars[i].measure.extNsigma = ps1data[i].extNsigma; 1669 1670 stars[i].measure.FWx = ToShortPixels(ps1data[i].fx); 1671 stars[i].measure.FWy = ToShortPixels(ps1data[i].fy); 1672 stars[i].measure.theta = ToShortDegrees(ps1data[i].df); 1673 1674 stars[i].measure.Mxx = ToShortPixels(ps1data[i].Mxx); 1675 stars[i].measure.Mxy = ToShortPixels(ps1data[i].Mxy); 1676 stars[i].measure.Myy = ToShortPixels(ps1data[i].Myy); 1677 1678 stars[i].measure.photFlags = ps1data[i].flags; 1679 stars[i].measure.photFlags2 = ps1data[i].flags2; 1680 1681 // this is may optionally be replaced by the internal sequence (see FilterStars.c) 1682 stars[i].measure.detID = ps1data[i].detID; 1683 1684 // the Average fields and the following Measure fields are set in FilterStars after 1685 // the image metadata is in hand: dR, dD, Mcal, dt, airmass, az, t, imageID, extID. 1686 1687 // averef is set in find_matches 1688 1689 // dbFlags is zero on ingest. 1690 1691 // the following fields are currently not being set anywhere: t_msec 1692 } 1693 *nstars = Nstars; 1694 return (stars); 1695 } 1696 1697 1698 -
branches/eam_branches/ipp-20140904/Ohana/src/addstar/src/args_loadwise.c
r33963 r37803 53 53 } 54 54 55 enum {MODE_NONE, MODE_ALLWISE, MODE_ALLSKY, MODE_PRELIM}; 56 int MODE; 57 55 58 /* load the prelim data dump */ 56 ALLSKY = TRUE; 57 if ((N = get_argument (argc, argv, "-prelim"))) { 58 ALLSKY = FALSE; 59 MODE = MODE_ALLWISE; 60 if ((N = get_argument (argc, argv, "-mode"))) { 61 MODE = MODE_NONE; 62 remove_argument (N, &argc, argv); 63 if (!strcasecmp(argv[N], "allwise")) MODE = MODE_ALLWISE; 64 if (!strcasecmp(argv[N], "allsky")) MODE = MODE_ALLSKY; 65 if (!strcasecmp(argv[N], "prelim")) MODE = MODE_PRELIM; 66 if (MODE == MODE_NONE) { 67 fprintf (stderr, "invalid mode: %s\n", argv[N]); 68 exit (2); 69 } 59 70 remove_argument (N, &argc, argv); 60 71 } -
branches/eam_branches/ipp-20140904/Ohana/src/addstar/src/loadsupercos_plates.c
r37386 r37803 92 92 image[Nimage].Radius = NAN; 93 93 94 snprintf (image[Nimage].name, 121, "SCOS.%02d.%06d", survey_id, plate_id);94 snprintf (image[Nimage].name, DVO_IMAGE_NAME_LEN, "SCOS.%02d.%06d", survey_id, plate_id); 95 95 image[Nimage].imageID = Nimage + 1; 96 96 image[Nimage].externID = plate_id; -
branches/eam_branches/ipp-20140904/Ohana/src/addstar/src/loadwise.c
r33963 r37803 40 40 for (i = 1; i < argc; i++) { 41 41 fprintf (stderr, "loading %s\n", argv[i]); 42 loadwise_rawdata (skylist, argv[i], options , ALLSKY);42 loadwise_rawdata (skylist, argv[i], options); 43 43 } 44 44 exit (0); -
branches/eam_branches/ipp-20140904/Ohana/src/addstar/src/loadwise_rawdata.c
r34088 r37803 10 10 # define DEBUG 0 11 11 12 int loadwise_rawdata (SkyList *skytable, char *filename, AddstarClientOptions options , int ALLSKY) {12 int loadwise_rawdata (SkyList *skytable, char *filename, AddstarClientOptions options) { 13 13 14 14 int i, j, verbose; … … 159 159 stars[Nstars+3][0].average.D = tstars[j].D; 160 160 161 if (ALLSKY) { 162 loadwise_star_allsky (&stars[Nstars], &buffer[offset], Nbyte - offset); 163 } else { 164 loadwise_star_prelim (&stars[Nstars], &buffer[offset], Nbyte - offset); 161 switch (MODE) { 162 case MODE_PRELIM: 163 loadwise_star_prelim (&stars[Nstars], &buffer[offset], Nbyte - offset); 164 break; 165 case MODE_ALLSKY: 166 loadwise_star_allsky (&stars[Nstars], &buffer[offset], Nbyte - offset); 167 break; 168 case MODE_ALLWISE: 169 default: 170 // loadwise_star_allwise (&stars[Nstars], &buffer[offset], Nbyte - offset); 171 break; 165 172 } 166 173 -
branches/eam_branches/ipp-20140904/Ohana/src/dvomerge/src/args.c
r37790 r37803 59 59 60 60 UPDATE_CATFORMAT = NULL; 61 if ((N = get_argument ( argc, argv, "-update-catformat"))) {62 remove_argument (N, &argc, argv);61 if ((N = get_argument (*argc, argv, "-update-catformat"))) { 62 remove_argument (N, argc, argv); 63 63 UPDATE_CATFORMAT = strcreate (argv[N]); 64 remove_argument (N, &argc, argv);64 remove_argument (N, argc, argv); 65 65 } 66 66 -
branches/eam_branches/ipp-20140904/Ohana/src/dvomerge/src/build_links.c
r37585 r37803 241 241 for (i = 0; i < Naverage; i++) { 242 242 if (!average[i].Nlensing) continue; 243 off_t m = average[i].lensingOffset; 244 myAssert (lensing[m].averef == i, "not sorted"); 243 245 for (j = 0; j < average[i].Nlensing - 1; j++, N++) { 246 myAssert (lensing[m+j+1].averef == i, "not sorted"); 244 247 next_lens[N] = N + 1; 245 248 if (N >= Nlensing) { … … 329 332 } 330 333 331 if (m == -1) { 334 // if Nlensing is 0, m may have been mis-set; add to the end 335 if ((average[0].Nlensing == 0) || (m == -1)) { 332 336 average[0].lensingOffset = Nlensing; 333 337 } else { … … 355 359 356 360 /* fix order of Lensing (memory intensive, but fast) */ 361 np = -1; 357 362 N = 0; 358 363 ALLOCATE (tmplensing, Lensing, Nlensing); -
branches/eam_branches/ipp-20140904/Ohana/src/dvomerge/src/merge_catalogs_new.c
r37585 r37803 15 15 Naverage = output[0].Naverage; 16 16 Nmeasure = output[0].Nmeasure; 17 Nlensing = output[0].Nlensing; 17 18 18 19 NsecfiltOut = output[0].Nsecfilt; … … 21 22 NAVERAGE = Naverage + 100; 22 23 NMEASURE = Nmeasure + 1000; 24 NLENSING = Nlensing + 1000; 23 25 24 26 REALLOCATE (output[0].average, Average, NAVERAGE); 25 27 REALLOCATE (output[0].secfilt, SecFilt, NAVERAGE*NsecfiltOut); 26 28 REALLOCATE (output[0].measure, Measure, NMEASURE); 29 REALLOCATE (output[0].lensing, Lensing, NLENSING); 27 30 28 31 // add all of these entries to the existing catalog -
branches/eam_branches/ipp-20140904/Ohana/src/dvopsps/Makefile
r35098 r37803 30 30 $(SRC)/insert_objects_dvopsps.$(ARCH).o \ 31 31 $(SRC)/insert_objects_dvopsps_catalog.$(ARCH).o \ 32 $(SRC)/insert_FWobjects_dvopsps.$(ARCH).o \ 33 $(SRC)/insert_FWobjects_dvopsps_catalog.$(ARCH).o \ 32 34 $(SRC)/insert_detections_dvopsps.$(ARCH).o \ 33 35 $(SRC)/insert_detections_dvopsps_catalog.$(ARCH).o … … 46 48 $(SRC)/insert_objects_dvopsps.$(ARCH).o \ 47 49 $(SRC)/insert_objects_dvopsps_catalog.$(ARCH).o \ 50 $(SRC)/insert_FWobjects_dvopsps.$(ARCH).o \ 51 $(SRC)/insert_FWobjects_dvopsps_catalog.$(ARCH).o \ 48 52 $(SRC)/insert_detections_dvopsps.$(ARCH).o \ 49 53 $(SRC)/insert_detections_dvopsps_catalog.$(ARCH).o -
branches/eam_branches/ipp-20140904/Ohana/src/dvopsps/include/dvopsps.h
r37246 r37803 102 102 103 103 int insert_objects_mysql_create_tables PROTO((char *basename, MYSQL *mysql)); 104 105 104 int insert_objects_mysql_commit PROTO((IOBuffer *ave_buffer, IOBuffer *sec_buffer, MYSQL *mysql)); 106 105 int insert_objects_mysql_value PROTO((IOBuffer *ave_buffer, IOBuffer *sec_buffer, Average *average, SecFilt *secfilt, int Nsecfilt)); 107 106 int insert_objects_mysql_init PROTO((IOBuffer *ave_buffer, IOBuffer *sec_buffer, char *basename)); 107 108 int insert_FWobjects_dvopsps PROTO(()); 109 int insert_FWobjects_dvopsps_parallel PROTO((SkyList *sky)); 110 int insert_FWobjects_dvopsps_catalog PROTO((Catalog *catalog, char *basename, MYSQL *mysql)); 111 112 int insert_FWobjects_mysql_create_tables PROTO((char *basename, MYSQL *mysql)); 113 int insert_FWobjects_mysql_init PROTO((IOBuffer *ave_buffer, IOBuffer *sec_buffer, IOBuffer *cpy_buffer, char *basename)); 114 int insert_FWobjects_mysql_value PROTO((IOBuffer *ave_buffer, IOBuffer *sec_buffer, IOBuffer *cpy_buffer, Average *average, SecFilt *secfilt, int Nsecfilt, Lensobj *lensobj, int Nlensobj)); 115 int insert_FWobjects_mysql_commit PROTO((IOBuffer *ave_buffer, IOBuffer *sec_buffer, IOBuffer *cpy_buffer, MYSQL *mysql)); 108 116 109 117 int insert_skytable PROTO(()); -
branches/eam_branches/ipp-20140904/Ohana/src/dvopsps/src/dvopsps.c
r35098 r37803 14 14 if (!strcasecmp (argv[1], "objects")) { 15 15 status = insert_objects_dvopsps (); 16 } 17 if (!strcasecmp (argv[1], "forced_warp_objects")) { 18 status = insert_FWobjects_dvopsps (); 16 19 } 17 20 if (!strcasecmp (argv[1], "skytable")) { -
branches/eam_branches/ipp-20140904/Ohana/src/dvopsps/src/dvopsps_client.c
r35111 r37803 22 22 status = insert_objects_dvopsps (); 23 23 } 24 if (!strcasecmp (argv[1], "forced_warp_objects")) { 25 status = insert_FWobjects_dvopsps (); 26 } 24 27 if (status == -1) { 25 28 fprintf (stderr, "invalid mode, should be : detections, skytable\n"); -
branches/eam_branches/ipp-20140904/Ohana/src/dvopsps/src/initialize_dvopsps.c
r36188 r37803 21 21 fprintf (stderr, "\n"); 22 22 23 fprintf (stderr, " (mode) is one of detections, objects, skytable\n");23 fprintf (stderr, " (mode) is one of detections, objects, forced_warp_objects, skytable\n"); 24 24 25 25 fprintf (stderr, "\n"); -
branches/eam_branches/ipp-20140904/Ohana/src/getstar
- Property svn:mergeinfo changed
/branches/eam_branches/ps2-tc3-20130727/Ohana/src/getstar (added) merged: 36680,37403 /trunk/Ohana/src/getstar (added) merged: 37412,37772
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20140904/Ohana/src/kapa2/src/InterpretKeys.c
r37781 r37803 50 50 Z = -1; 51 51 52 if (graph) { 52 int haveGraph = graph && graph->haveGraph; 53 if (haveGraph) { 53 54 X = (event[0].x - graph[0].axis[0].fx)*(graph[0].axis[0].max - graph[0].axis[0].min)/graph[0].axis[0].dfx + graph[0].axis[0].min; 54 55 Y = (event[0].y - graph[0].axis[1].fy)*(graph[0].axis[1].max - graph[0].axis[1].min)/graph[0].axis[1].dfy + graph[0].axis[1].min; 55 56 XY_to_RD (&R, &D, X, Y, &graph[0].data.coords); 56 57 } 57 if (image && ! graph) {58 if (image && !haveGraph) { 58 59 if (event[0].x < image[0].picture.x) goto skip_cursor; 59 60 if (event[0].y < image[0].picture.y) goto skip_cursor; -
branches/eam_branches/ipp-20140904/Ohana/src/libautocode/def/cmf-ps1-v5-lensing.d
r37034 r37803 3 3 EXTNAME CMF_PS1_V5 4 4 TYPE BINTABLE 5 SIZE 3 125 SIZE 320 6 6 7 7 # elements of data structure / FITS table … … 81 81 FIELD E2_sh_psf, E2_SH_PSF, float, lensing shear 82 82 83 FIELD srcChipNum, SRC_CHIP_NUM, short, source chip in warp 84 FIELD srcChipX, SRC_CHIP_X, short, source chip x coordinate 85 FIELD srcChipY, SRC_CHIP_Y, short, source chip y coordinate 86 FIELD padding3, SRC_CHIP_PAD, short, source chip in warp 87 83 88 FIELD Mr1, MOMENTS_R1, float, first radial moment, pixels 84 89 FIELD Mrh, MOMENTS_RH, float, half radial moment, pixels^1/2 -
branches/eam_branches/ipp-20140904/Ohana/src/libdvo/Makefile
r37601 r37803 42 42 $(DESTINC)/cmf-ps1-v5.h \ 43 43 $(DESTINC)/cmf-ps1-sv3.h \ 44 $(DESTINC)/cmf-ps1-v5-lensing.h 44 $(DESTINC)/cmf-ps1-sv4.h \ 45 $(DESTINC)/cmf-ps1-v5-lensing.h \ 46 $(DESTINC)/cmf-ps1-v5-lensing-alt.h 45 47 46 48 INCS = $(DEFS) $(DESTINC)/dvo.h $(DESTINC)/autocode.h $(DESTINC)/dvo_util.h $(DESTINC)/dvodb.h $(DESTINC)/libdvo_astro.h $(DESTINC)/convert.h $(DESTINC)/get_graphdata.h … … 98 100 $(SRC)/cmf-ps1-dv3.$(ARCH).o \ 99 101 $(SRC)/cmf-ps1-sv3.$(ARCH).o \ 102 $(SRC)/cmf-ps1-sv4.$(ARCH).o \ 100 103 $(SRC)/cmf-ps1-v5.$(ARCH).o \ 101 104 $(SRC)/cmf-ps1-v5-lensing.$(ARCH).o \ 105 $(SRC)/cmf-ps1-v5-lensing-alt.$(ARCH).o \ 102 106 $(SRC)/dvo_util.$(ARCH).o \ 103 107 $(SRC)/dbBooleanCond.$(ARCH).o \ -
branches/eam_branches/ipp-20140904/Ohana/src/libdvo/include/cmf-ps1-v5-lensing.h
r37035 r37803 71 71 float E2_sh_psf; // lensing shear 72 72 73 short srcChipNum; 74 short srcChipX; 75 short srcChipY; 76 73 77 float Mr1; // first radial moment (pixels) 74 78 float Mrh; // half radial moment (pixels^1/2) -
branches/eam_branches/ipp-20140904/Ohana/src/libdvo/include/dvo.h
r37664 r37803 332 332 # include "cmf-ps1-dv3.h" 333 333 # include "cmf-ps1-sv3.h" 334 # include "cmf-ps1-sv4.h" 334 335 # include "cmf-ps1-v5.h" 335 336 # include "cmf-ps1-v5-lensing.h" 337 # include "cmf-ps1-v5-lensing-alt.h" 336 338 337 339 typedef struct { … … 1055 1057 # define LENSFIELD(NAME) float LensValue_##NAME (PhotCode *code, Lensobj *lensobj); 1056 1058 1057 LENSFIELD(X11_sm_obj) ;1058 LENSFIELD(X12_sm_obj) ;1059 LENSFIELD(X22_sm_obj) ;1060 LENSFIELD(E1_sm_obj) ;1061 LENSFIELD(E2_sm_obj) ;1062 1063 LENSFIELD(X11_sh_obj) ;1064 LENSFIELD(X12_sh_obj) ;1065 LENSFIELD(X22_sh_obj) ;1066 LENSFIELD(E1_sh_obj) ;1067 LENSFIELD(E2_sh_obj) ;1068 1069 LENSFIELD(X11_sm_psf) ;1070 LENSFIELD(X12_sm_psf) ;1071 LENSFIELD(X22_sm_psf) ;1072 LENSFIELD(E1_sm_psf) ;1073 LENSFIELD(E2_sm_psf) ;1074 1075 LENSFIELD(X11_sh_psf) ;1076 LENSFIELD(X12_sh_psf) ;1077 LENSFIELD(X22_sh_psf) ;1078 LENSFIELD(E1_sh_psf) ;1079 LENSFIELD(E2_sh_psf) ;1059 LENSFIELD(X11_sm_obj) 1060 LENSFIELD(X12_sm_obj) 1061 LENSFIELD(X22_sm_obj) 1062 LENSFIELD(E1_sm_obj) 1063 LENSFIELD(E2_sm_obj) 1064 1065 LENSFIELD(X11_sh_obj) 1066 LENSFIELD(X12_sh_obj) 1067 LENSFIELD(X22_sh_obj) 1068 LENSFIELD(E1_sh_obj) 1069 LENSFIELD(E2_sh_obj) 1070 1071 LENSFIELD(X11_sm_psf) 1072 LENSFIELD(X12_sm_psf) 1073 LENSFIELD(X22_sm_psf) 1074 LENSFIELD(E1_sm_psf) 1075 LENSFIELD(E2_sm_psf) 1076 1077 LENSFIELD(X11_sh_psf) 1078 LENSFIELD(X12_sh_psf) 1079 LENSFIELD(X22_sh_psf) 1080 LENSFIELD(E1_sh_psf) 1081 LENSFIELD(E2_sh_psf) 1080 1082 1081 1083 # undef LENSFIELD -
branches/eam_branches/ipp-20140904/Ohana/src/libdvo/src/cmf-ps1-v5-lensing.c
r37035 r37803 1 1 # include "dvo.h" 2 # define ST_SIZE 3 122 # define ST_SIZE 320 3 3 4 4 // this function is based on the one generated by the autocode of cmf-ps1-v5.d … … 100 100 SWAP_WORD (256); // E1_SH_PSF 101 101 SWAP_WORD (260); // E2_SH_PSF 102 SWAP_WORD (264); // MOMENTS_R1 103 SWAP_WORD (268); // MOMENTS_RH 104 SWAP_WORD (272); // KRON_FLUX 105 SWAP_WORD (276); // KRON_FLUX_ERR 106 SWAP_WORD (280); // KRON_FLUX_INNER 107 SWAP_WORD (284); // KRON_FLUX_OUTER 108 SWAP_WORD (288); // SKY_LIMIT_RAD 109 SWAP_WORD (292); // SKY_LIMIT_FLUX 110 SWAP_WORD (296); // SKY_LIMIT_SLOPE 111 SWAP_WORD (300); // FLAGS 112 SWAP_WORD (304); // FLAGS2 113 SWAP_BYTE (308); // N_FRAMES 114 SWAP_BYTE (310); // PADDING 102 103 SWAP_BYTE (264); // SRC_CHIP_NUM 104 SWAP_BYTE (266); // SRC_CHIP_X 105 SWAP_BYTE (268); // SRC_CHIP_Y 106 107 SWAP_WORD (272); // MOMENTS_R1 108 SWAP_WORD (276); // MOMENTS_RH 109 SWAP_WORD (280); // KRON_FLUX 110 SWAP_WORD (284); // KRON_FLUX_ERR 111 SWAP_WORD (288); // KRON_FLUX_INNER 112 SWAP_WORD (292); // KRON_FLUX_OUTER 113 SWAP_WORD (296); // SKY_LIMIT_RAD 114 SWAP_WORD (300); // SKY_LIMIT_FLUX 115 SWAP_WORD (304); // SKY_LIMIT_SLOPE 116 SWAP_WORD (308); // FLAGS 117 SWAP_WORD (312); // FLAGS2 118 SWAP_BYTE (316); // N_FRAMES 119 SWAP_BYTE (318); // PADDING 115 120 } 116 121 # endif … … 289 294 gfits_define_bintable_column (header, "E", "E1_SH_PSF", "lensing shear", "", 1.0, 0.0); 290 295 gfits_define_bintable_column (header, "E", "E2_SH_PSF", "lensing shear", "", 1.0, 0.0); 296 297 gfits_define_bintable_column (header, "I", "SRC_CHIP_NUM", "number of source chip for warp", "", 1.0, 0.0); 298 gfits_define_bintable_column (header, "I", "SRC_CHIP_X", "x-coord in source chip", "", 1.0, 0.0); 299 gfits_define_bintable_column (header, "I", "SRC_CHIP_Y", "y-coord in source chip", "", 1.0, 0.0); 300 gfits_define_bintable_column (header, "I", "PADDING3", "padding for 8byte records", "", 1.0, 0.0); 301 291 302 gfits_define_bintable_column (header, "E", "MOMENTS_R1", "first radial moment", "pixels", 1.0, 0.0); 292 303 gfits_define_bintable_column (header, "E", "MOMENTS_RH", "half radial moment", "pixels^1/2", 1.0, 0.0); … … 385 396 gfits_define_bintable_column (header, "E", "E1_SH_PSF", "lensing shear", "", 1.0, 0.0); 386 397 gfits_define_bintable_column (header, "E", "E2_SH_PSF", "lensing shear", "", 1.0, 0.0); 398 399 gfits_define_bintable_column (header, "I", "SRC_CHIP_NUM", "number of source chip for warp", "", 1.0, 0.0); 400 gfits_define_bintable_column (header, "I", "SRC_CHIP_X", "x-coord in source chip", "", 1.0, 0.0); 401 gfits_define_bintable_column (header, "I", "SRC_CHIP_Y", "y-coord in source chip", "", 1.0, 0.0); 402 gfits_define_bintable_column (header, "I", "PADDING3", "padding for 8byte records", "", 1.0, 0.0); 403 387 404 gfits_define_bintable_column (header, "E", "MOMENTS_R1", "first radial moment", "pixels", 1.0, 0.0); 388 405 gfits_define_bintable_column (header, "E", "MOMENTS_RH", "half radial moment", "pixels^1/2", 1.0, 0.0); -
branches/eam_branches/ipp-20140904/Ohana/src/libdvo/src/cmf-ps1-v5.c
r37035 r37803 1 1 # include "dvo.h" 2 # define ST_SIZE 232 2 3 3 4 // this function is based on the one generated by the autocode of cmf-ps1-v5.d … … 7 8 unsigned char tmp; 8 9 9 if (size != 232) {10 fprintf (stderr, "WARNING: mismatch in data types CMF_PS1_V5: "OFF_T_FMT" vs %d\n", size, 232);10 if (size != ST_SIZE) { 11 fprintf (stderr, "WARNING: mismatch in data types CMF_PS1_V5: "OFF_T_FMT" vs %d\n", size, ST_SIZE); 11 12 return (FALSE); 12 13 } … … 33 34 # ifdef BYTE_SWAP 34 35 byte = (unsigned char *) data; 35 for (i = 0; i < nitems; i++, byte += 232) {36 for (i = 0; i < nitems; i++, byte += ST_SIZE) { 36 37 /** BYTE SWAP **/ 37 38 SWAP_WORD (0); // IPP_IDET … … 176 177 177 178 Ncols = ftable[0].header[0].Naxis[0]; 178 if (Ncols != 232) {179 fprintf (stderr, "ERROR: mis-match in table size: width is %d but should be %d bytes\n", Ncols, 232);179 if (Ncols != ST_SIZE) { 180 fprintf (stderr, "ERROR: mis-match in table size: width is %d but should be %d bytes\n", Ncols, ST_SIZE); 180 181 return NULL; 181 182 } -
branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/setMrelCatalog.c
r37743 r37803 520 520 haveStackObject = TRUE; 521 521 522 // match measurement to its image (this is just a check, right?)523 if (getImageEntry (meas, cat) < 0) {524 fprintf (stderr, "*** warning : this should be impossible\n");525 abort();526 continue;527 }528 529 522 // find the PRIMARY measurement 530 523 … … 546 539 // overlaps). we only want measurements associated with stack images in this loop 547 540 548 Mcal = getMcal_alt (meas, cat, flatcorr, measure[k].Xccd, measure[k].Yccd); 549 if (isnan(Mcal)) SKIP_THIS_MEAS_STACK(Ncal); 550 Mmos = getMmos (meas, cat); 551 if (isnan(Mmos)) SKIP_THIS_MEAS_STACK(Nmos); 552 Mgrid = getMgrid (meas, cat); 553 if (isnan(Mgrid)) SKIP_THIS_MEAS_STACK(Ngrid); 541 // match measurement to its image (this is just a check, right?) 542 if (getImageEntry (meas, cat) < 0) { 543 // measurements without an image are either external reference photometry or 544 // data for which the associated image has not been loaded (probably because of 545 // overlaps). Msys + measure.Mcal is our best guess of the true magnitude 546 Mmos = Mgrid = 0; 547 Mcal = measure[k].Mcal; // check that this is zero for loaded REF value 548 } else { 549 Mcal = getMcal_alt (meas, cat, flatcorr, measure[k].Xccd, measure[k].Yccd); 550 if (isnan(Mcal)) SKIP_THIS_MEAS_STACK(Ncal); 551 Mmos = getMmos (meas, cat); 552 if (isnan(Mmos)) SKIP_THIS_MEAS_STACK(Nmos); 553 Mgrid = getMgrid (meas, cat); 554 if (isnan(Mgrid)) SKIP_THIS_MEAS_STACK(Ngrid); 555 } 554 556 555 557 // NOTE: negative and insignificant vlues values are allowed, but not NAN flux values
Note:
See TracChangeset
for help on using the changeset viewer.
