- Timestamp:
- Sep 11, 2012, 10:26:52 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 35 edited
-
. (modified) (1 prop)
-
Ohana/src/addstar/src/ReadStarsFITS.c (modified) (7 diffs)
-
Ohana/src/libdvo/include/dvo.h (modified) (2 diffs)
-
Ohana/src/libdvo/src/dvo_catalog.c (modified) (1 diff)
-
Ohana/src/opihi/cmd.astro (modified) (1 prop)
-
Ohana/src/relastro/src/UpdateObjects.c (modified) (2 diffs)
-
Ohana/src/relastro/src/bcatalog.c (modified) (1 diff)
-
Ohana/src/relastro/src/initialize.c (modified) (2 diffs)
-
Ohana/src/relastro/src/liststats.c (modified) (1 diff)
-
Ohana/src/relastro/src/relastro_objects.c (modified) (1 diff)
-
Ohana/src/relphot/src/StarOps.c (modified) (18 diffs)
-
Ohana/src/relphot/src/initialize.c (modified) (1 diff)
-
Ohana/src/relphot/src/liststats.c (modified) (1 diff)
-
Ohana/src/relphot/src/relphot_objects.c (modified) (1 diff)
-
Ohana/src/relphot/src/setMrelFinal.c (modified) (1 diff)
-
ippMonitor (modified) (1 prop)
-
ippScripts/scripts/destreak_restore_camera.pl (modified) (1 prop)
-
ippScripts/scripts/ipp_apply_burntool_single.pl (modified) (1 prop)
-
ippScripts/scripts/magic_destreak.pl (modified) (1 prop)
-
ippToPsps (modified) (1 prop)
-
ippTools/share/camtool_find_pendingimfile.sql (modified) (1 prop)
-
ippTools/share/chiptool_setimfiletoupdate.sql (modified) (1 prop)
-
ippTools/share/pxadmin_create_tables.sql (modified) (1 prop)
-
ippTools/share/warptool_towarped.sql (modified) (1 prop)
-
ippTools/src (modified) (1 prop)
-
ippTools/src/magictool.c (modified) (1 prop)
-
ippconfig (modified) (1 prop)
-
ippconfig/recipes/reductionClasses.mdc (modified) (1 prop)
-
ppImage/src (modified) (1 prop)
-
psModules (modified) (1 prop)
-
psphot (modified) (1 prop)
-
psphot/src (modified) (1 prop)
-
psphot/src/psphotStackImageLoop.c (modified) (1 prop)
-
pstamp/scripts (modified) (1 prop)
-
psvideophot (modified) (1 prop)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905 merged: 34423-34428
- Property svn:mergeinfo changed
-
trunk/Ohana/src/addstar/src/ReadStarsFITS.c
r34405 r34429 606 606 stars[i].measure.psfChisq = ps1data[i].psfChisq; 607 607 stars[i].measure.psfQF = ps1data[i].psfQF; 608 stars[i].measure.psfQFperf = ps1data[i].psfQFpef; 608 609 stars[i].measure.psfNdof = ps1data[i].psfNdof; 609 610 stars[i].measure.psfNpix = ps1data[i].psfNpix; … … 675 676 stars[i].measure.dMkron = (ps1data[i].kronFlux > 0.0) ? ps1data[i].kronFluxErr / ps1data[i].kronFlux : NAN; 676 677 678 // these fluxes are converted from counts to counts/sec in FilterStars.c 679 stars[i].measure.FluxPSF = ps1data[i].Flux; 680 stars[i].measure.dFluxPSF = ps1data[i].dFlux; 681 stars[i].measure.FluxKron = ps1data[i].kronFlux; 682 stars[i].measure.dFluxKron = ps1data[i].kronFluxErr; 683 684 stars[i].measure.Sky = ps1data[i].sky; 685 stars[i].measure.dSky = ps1data[i].dSky; 686 687 stars[i].measure.psfChisq = ps1data[i].psfChisq; 688 stars[i].measure.psfQF = ps1data[i].psfQF; 689 stars[i].measure.psfQFperf = ps1data[i].psfQFpef; 690 stars[i].measure.psfNdof = ps1data[i].psfNdof; 691 stars[i].measure.psfNpix = ps1data[i].psfNpix; 692 stars[i].measure.crNsigma = ps1data[i].crNsigma; 693 stars[i].measure.extNsigma = ps1data[i].extNsigma; 694 695 stars[i].measure.FWx = ToShortPixels(ps1data[i].fx); 696 stars[i].measure.FWy = ToShortPixels(ps1data[i].fy); 697 stars[i].measure.theta = ToShortDegrees(ps1data[i].df); 698 699 stars[i].measure.Mxx = ToShortPixels(ps1data[i].Mxx); 700 stars[i].measure.Mxy = ToShortPixels(ps1data[i].Mxy); 701 stars[i].measure.Myy = ToShortPixels(ps1data[i].Myy); 702 703 stars[i].measure.photFlags = ps1data[i].flags; 704 705 // this is may optionally be replaced by the internal sequence (see FilterStars.c) 706 stars[i].measure.detID = ps1data[i].detID; 707 708 // the Average fields and the following Measure fields are set in FilterStars after 709 // the image metadata is in hand: dR, dD, Mcal, dt, airmass, az, t, imageID, extID. 710 711 // averef is set in find_matches 712 713 // dbFlags is zero on ingest. 714 715 // the following fields are currently not being set anywhere: t_msec 716 } 717 *nstars = Nstars; 718 return (stars); 719 } 720 721 Stars *Convert_PS1_SV1 (FTable *table, unsigned int *nstars) { 722 723 off_t Nstars; 724 unsigned int i; 725 double ZeroPt; 726 Stars *stars; 727 CMF_PS1_SV1 *ps1data; 728 729 if (table[0].header[0].Naxis[0] == 196) { 730 stars = Convert_PS1_SV1_Alt (table, nstars); 731 return (stars); 732 } 733 734 ps1data = gfits_table_get_CMF_PS1_SV1 (table, &Nstars, NULL); 735 if (!ps1data) { 736 fprintf (stderr, "skipping inconsistent entry\n"); 737 return (NULL); 738 } 739 ZeroPt = GetZeroPoint(); 740 741 ALLOCATE (stars, Stars, Nstars); 742 for (i = 0; i < Nstars; i++) { 743 InitStar (&stars[i]); 744 stars[i].measure.Xccd = ps1data[i].X; 745 stars[i].measure.Yccd = ps1data[i].Y; 746 stars[i].measure.dXccd = ToShortPixels(ps1data[i].dX); 747 stars[i].measure.dYccd = ToShortPixels(ps1data[i].dY); 748 749 stars[i].measure.posangle = ToShortDegrees(ps1data[i].posangle); 750 stars[i].measure.pltscale = ps1data[i].pltscale; 751 752 if ((ps1data[i].M >= 0.0) || isnan(ps1data[i].M)) { 753 stars[i].measure.M = NAN; 754 } else { 755 stars[i].measure.M = ps1data[i].M + ZeroPt; 756 } 757 stars[i].measure.dM = ps1data[i].dM; 758 stars[i].measure.dMcal = ps1data[i].dMcal; 759 stars[i].measure.Map = ps1data[i].Map + ZeroPt; 760 761 stars[i].measure.Mkron = (ps1data[i].kronFlux > 0.0) ? -2.5*log10(ps1data[i].kronFlux) + ZeroPt : NAN; 762 stars[i].measure.dMkron = (ps1data[i].kronFlux > 0.0) ? ps1data[i].kronFluxErr / ps1data[i].kronFlux : NAN; 763 764 // these fluxes are converted from counts to counts/sec in FilterStars.c 765 stars[i].measure.FluxPSF = ps1data[i].Flux; 766 stars[i].measure.dFluxPSF = ps1data[i].dFlux; 767 stars[i].measure.FluxKron = ps1data[i].kronFlux; 768 stars[i].measure.dFluxKron = ps1data[i].kronFluxErr; 769 770 stars[i].measure.Sky = ps1data[i].sky; 771 stars[i].measure.dSky = ps1data[i].dSky; 772 773 stars[i].measure.psfChisq = ps1data[i].psfChisq; 774 stars[i].measure.psfQF = ps1data[i].psfQF; 775 stars[i].measure.psfQFperf = ps1data[i].psfQFpef; 776 stars[i].measure.psfNdof = ps1data[i].psfNdof; 777 stars[i].measure.psfNpix = ps1data[i].psfNpix; 778 stars[i].measure.crNsigma = ps1data[i].crNsigma; 779 stars[i].measure.extNsigma = ps1data[i].extNsigma; 780 781 stars[i].measure.FWx = ToShortPixels(ps1data[i].fx); 782 stars[i].measure.FWy = ToShortPixels(ps1data[i].fy); 783 stars[i].measure.theta = ToShortDegrees(ps1data[i].df); 784 785 stars[i].measure.Mxx = ToShortPixels(ps1data[i].Mxx); 786 stars[i].measure.Mxy = ToShortPixels(ps1data[i].Mxy); 787 stars[i].measure.Myy = ToShortPixels(ps1data[i].Myy); 788 789 stars[i].measure.photFlags = ps1data[i].flags; 790 791 // this is may optionally be replaced by the internal sequence (see FilterStars.c) 792 stars[i].measure.detID = ps1data[i].detID; 793 794 // the Average fields and the following Measure fields are set in FilterStars after 795 // the image metadata is in hand: dR, dD, Mcal, dt, airmass, az, t, imageID, extID, 796 // averef is set in find_matches, dbFlags is zero on ingest. 797 798 // the following fields are currently not being set anywhere: t_msec 799 } 800 *nstars = Nstars; 801 return (stars); 802 } 803 804 Stars *Convert_PS1_SV1_Alt (FTable *table, unsigned int *nstars) { 805 806 off_t Nstars; 807 unsigned int i; 808 double ZeroPt; 809 Stars *stars; 810 CMF_PS1_SV1 *ps1data; 811 812 // some test output files were produced called CMF_PS1_SV1 but with mismatch byte boundaries 813 814 ps1data = gfits_table_get_CMF_PS1_SV1_Alt (table, &Nstars, NULL); 815 if (!ps1data) { 816 fprintf (stderr, "skipping inconsistent entry\n"); 817 return (NULL); 818 } 819 ZeroPt = GetZeroPoint(); 820 821 ALLOCATE (stars, Stars, Nstars); 822 for (i = 0; i < Nstars; i++) { 823 InitStar (&stars[i]); 824 stars[i].measure.Xccd = ps1data[i].X; 825 stars[i].measure.Yccd = ps1data[i].Y; 826 stars[i].measure.dXccd = ToShortPixels(ps1data[i].dX); 827 stars[i].measure.dYccd = ToShortPixels(ps1data[i].dY); 828 829 stars[i].measure.posangle = ToShortDegrees(ps1data[i].posangle); 830 stars[i].measure.pltscale = ps1data[i].pltscale; 831 832 if ((ps1data[i].M >= 0.0) || isnan(ps1data[i].M)) { 833 stars[i].measure.M = NAN; 834 } else { 835 stars[i].measure.M = ps1data[i].M + ZeroPt; 836 } 837 stars[i].measure.dM = ps1data[i].dM; 838 stars[i].measure.dMcal = ps1data[i].dMcal; 839 stars[i].measure.Map = ps1data[i].Map + ZeroPt; 840 841 stars[i].measure.Mkron = (ps1data[i].kronFlux > 0.0) ? -2.5*log10(ps1data[i].kronFlux) + ZeroPt : NAN; 842 stars[i].measure.dMkron = (ps1data[i].kronFlux > 0.0) ? ps1data[i].kronFluxErr / ps1data[i].kronFlux : NAN; 843 677 844 // these fluxes are converted from counts to counts/sec in FilterStars.c 678 845 stars[i].measure.FluxPSF = ps1data[i].Flux; … … 705 872 706 873 // the Average fields and the following Measure fields are set in FilterStars after 707 // the image metadata is in hand: dR, dD, Mcal, dt, airmass, az, t, imageID, extID. 708 709 // averef is set in find_matches 710 711 // dbFlags is zero on ingest. 874 // the image metadata is in hand: dR, dD, Mcal, dt, airmass, az, t, imageID, extID, 875 // averef is set in find_matches, dbFlags is zero on ingest. 712 876 713 877 // the following fields are currently not being set anywhere: t_msec … … 717 881 } 718 882 719 Stars *Convert_PS1_SV 1(FTable *table, unsigned int *nstars) {883 Stars *Convert_PS1_SV2 (FTable *table, unsigned int *nstars) { 720 884 721 885 off_t Nstars; … … 723 887 double ZeroPt; 724 888 Stars *stars; 725 CMF_PS1_SV1 *ps1data; 726 727 if (table[0].header[0].Naxis[0] == 196) { 728 stars = Convert_PS1_SV1_Alt (table, nstars); 729 return (stars); 730 } 731 732 ps1data = gfits_table_get_CMF_PS1_SV1 (table, &Nstars, NULL); 889 CMF_PS1_SV2 *ps1data; 890 891 ps1data = gfits_table_get_CMF_PS1_SV2 (table, &Nstars, NULL); 733 892 if (!ps1data) { 734 893 fprintf (stderr, "skipping inconsistent entry\n"); … … 771 930 stars[i].measure.psfChisq = ps1data[i].psfChisq; 772 931 stars[i].measure.psfQF = ps1data[i].psfQF; 932 stars[i].measure.psfQFperf = ps1data[i].psfQFpef; 773 933 stars[i].measure.psfNdof = ps1data[i].psfNdof; 774 934 stars[i].measure.psfNpix = ps1data[i].psfNpix; … … 799 959 } 800 960 801 Stars *Convert_PS1_SV1_Alt (FTable *table, unsigned int *nstars) { 802 803 off_t Nstars; 804 unsigned int i; 805 double ZeroPt; 806 Stars *stars; 807 CMF_PS1_SV1 *ps1data; 808 809 // some test output files were produced called CMF_PS1_SV1 but with mismatch byte boundaries 810 811 ps1data = gfits_table_get_CMF_PS1_SV1_Alt (table, &Nstars, NULL); 812 if (!ps1data) { 813 fprintf (stderr, "skipping inconsistent entry\n"); 814 return (NULL); 815 } 816 ZeroPt = GetZeroPoint(); 817 818 ALLOCATE (stars, Stars, Nstars); 819 for (i = 0; i < Nstars; i++) { 820 InitStar (&stars[i]); 821 stars[i].measure.Xccd = ps1data[i].X; 822 stars[i].measure.Yccd = ps1data[i].Y; 823 stars[i].measure.dXccd = ToShortPixels(ps1data[i].dX); 824 stars[i].measure.dYccd = ToShortPixels(ps1data[i].dY); 825 826 stars[i].measure.posangle = ToShortDegrees(ps1data[i].posangle); 827 stars[i].measure.pltscale = ps1data[i].pltscale; 828 829 if ((ps1data[i].M >= 0.0) || isnan(ps1data[i].M)) { 830 stars[i].measure.M = NAN; 831 } else { 832 stars[i].measure.M = ps1data[i].M + ZeroPt; 833 } 834 stars[i].measure.dM = ps1data[i].dM; 835 stars[i].measure.dMcal = ps1data[i].dMcal; 836 stars[i].measure.Map = ps1data[i].Map + ZeroPt; 837 838 stars[i].measure.Mkron = (ps1data[i].kronFlux > 0.0) ? -2.5*log10(ps1data[i].kronFlux) + ZeroPt : NAN; 839 stars[i].measure.dMkron = (ps1data[i].kronFlux > 0.0) ? ps1data[i].kronFluxErr / ps1data[i].kronFlux : NAN; 840 841 // these fluxes are converted from counts to counts/sec in FilterStars.c 842 stars[i].measure.FluxPSF = ps1data[i].Flux; 843 stars[i].measure.dFluxPSF = ps1data[i].dFlux; 844 stars[i].measure.FluxKron = ps1data[i].kronFlux; 845 stars[i].measure.dFluxKron = ps1data[i].kronFluxErr; 846 847 stars[i].measure.Sky = ps1data[i].sky; 848 stars[i].measure.dSky = ps1data[i].dSky; 849 850 stars[i].measure.psfChisq = ps1data[i].psfChisq; 851 stars[i].measure.psfQF = ps1data[i].psfQF; 852 stars[i].measure.psfNdof = ps1data[i].psfNdof; 853 stars[i].measure.psfNpix = ps1data[i].psfNpix; 854 stars[i].measure.crNsigma = ps1data[i].crNsigma; 855 stars[i].measure.extNsigma = ps1data[i].extNsigma; 856 857 stars[i].measure.FWx = ToShortPixels(ps1data[i].fx); 858 stars[i].measure.FWy = ToShortPixels(ps1data[i].fy); 859 stars[i].measure.theta = ToShortDegrees(ps1data[i].df); 860 861 stars[i].measure.Mxx = ToShortPixels(ps1data[i].Mxx); 862 stars[i].measure.Mxy = ToShortPixels(ps1data[i].Mxy); 863 stars[i].measure.Myy = ToShortPixels(ps1data[i].Myy); 864 865 stars[i].measure.photFlags = ps1data[i].flags; 866 867 // this is may optionally be replaced by the internal sequence (see FilterStars.c) 868 stars[i].measure.detID = ps1data[i].detID; 869 870 // the Average fields and the following Measure fields are set in FilterStars after 871 // the image metadata is in hand: dR, dD, Mcal, dt, airmass, az, t, imageID, extID, 872 // averef is set in find_matches, dbFlags is zero on ingest. 873 874 // the following fields are currently not being set anywhere: t_msec 875 } 876 *nstars = Nstars; 877 return (stars); 878 } 879 880 Stars *Convert_PS1_SV2 (FTable *table, unsigned int *nstars) { 881 882 off_t Nstars; 883 unsigned int i; 884 double ZeroPt; 885 Stars *stars; 886 CMF_PS1_SV2 *ps1data; 887 888 ps1data = gfits_table_get_CMF_PS1_SV2 (table, &Nstars, NULL); 889 if (!ps1data) { 890 fprintf (stderr, "skipping inconsistent entry\n"); 891 return (NULL); 892 } 893 ZeroPt = GetZeroPoint(); 894 895 ALLOCATE (stars, Stars, Nstars); 896 for (i = 0; i < Nstars; i++) { 897 InitStar (&stars[i]); 898 stars[i].measure.Xccd = ps1data[i].X; 899 stars[i].measure.Yccd = ps1data[i].Y; 900 stars[i].measure.dXccd = ToShortPixels(ps1data[i].dX); 901 stars[i].measure.dYccd = ToShortPixels(ps1data[i].dY); 902 903 stars[i].measure.posangle = ToShortDegrees(ps1data[i].posangle); 904 stars[i].measure.pltscale = ps1data[i].pltscale; 905 906 if ((ps1data[i].M >= 0.0) || isnan(ps1data[i].M)) { 907 stars[i].measure.M = NAN; 908 } else { 909 stars[i].measure.M = ps1data[i].M + ZeroPt; 910 } 911 stars[i].measure.dM = ps1data[i].dM; 912 stars[i].measure.dMcal = ps1data[i].dMcal; 913 stars[i].measure.Map = ps1data[i].Map + ZeroPt; 914 915 stars[i].measure.Mkron = (ps1data[i].kronFlux > 0.0) ? -2.5*log10(ps1data[i].kronFlux) + ZeroPt : NAN; 916 stars[i].measure.dMkron = (ps1data[i].kronFlux > 0.0) ? ps1data[i].kronFluxErr / ps1data[i].kronFlux : NAN; 917 918 // these fluxes are converted from counts to counts/sec in FilterStars.c 919 stars[i].measure.FluxPSF = ps1data[i].Flux; 920 stars[i].measure.dFluxPSF = ps1data[i].dFlux; 921 stars[i].measure.FluxKron = ps1data[i].kronFlux; 922 stars[i].measure.dFluxKron = ps1data[i].kronFluxErr; 923 924 stars[i].measure.Sky = ps1data[i].sky; 925 stars[i].measure.dSky = ps1data[i].dSky; 926 927 stars[i].measure.psfChisq = ps1data[i].psfChisq; 928 stars[i].measure.psfQF = ps1data[i].psfQF; 929 stars[i].measure.psfNdof = ps1data[i].psfNdof; 930 stars[i].measure.psfNpix = ps1data[i].psfNpix; 931 stars[i].measure.crNsigma = ps1data[i].crNsigma; 932 stars[i].measure.extNsigma = ps1data[i].extNsigma; 933 934 stars[i].measure.FWx = ToShortPixels(ps1data[i].fx); 935 stars[i].measure.FWy = ToShortPixels(ps1data[i].fy); 936 stars[i].measure.theta = ToShortDegrees(ps1data[i].df); 937 938 stars[i].measure.Mxx = ToShortPixels(ps1data[i].Mxx); 939 stars[i].measure.Mxy = ToShortPixels(ps1data[i].Mxy); 940 stars[i].measure.Myy = ToShortPixels(ps1data[i].Myy); 941 942 stars[i].measure.photFlags = ps1data[i].flags; 943 944 // this is may optionally be replaced by the internal sequence (see FilterStars.c) 945 stars[i].measure.detID = ps1data[i].detID; 946 947 // the Average fields and the following Measure fields are set in FilterStars after 948 // the image metadata is in hand: dR, dD, Mcal, dt, airmass, az, t, imageID, extID, 949 // averef is set in find_matches, dbFlags is zero on ingest. 950 951 // the following fields are currently not being set anywhere: t_msec 952 } 953 *nstars = Nstars; 954 return (stars); 955 } 956 957 961 -
trunk/Ohana/src/libdvo/include/dvo.h
r34405 r34429 149 149 /* Average.flags values -- these values are 32 bit (as of PS1_V1) */ 150 150 typedef enum { 151 ID_STAR_FEW = 0x00000001, // used within relphot: skip star 152 ID_STAR_POOR = 0x00000002, // used within relphot: skip star 153 ID_PROPER = 0x00000400, // star with large proper motion 154 ID_TRANSIENT = 0x00001000, // is this mutually exclusive with USNO? 155 ID_VARIABLE = 0x00002000, // not currently set? 156 ID_ASTEROID = 0x00002000, // identified with an asteroid 157 ID_BAD_OBJECT = 0x00004000, // if all measurements are bad, set this bit 158 ID_MOVING = 0x00008000, // is a moving object 159 ID_ROCK = 0x0000a000, // 0x8000 + 0x2000 160 ID_GHOST = 0x0000c001, // 0x8000 + 0x4000 + 0x0001 161 ID_TRAIL = 0x0000c002, // 0x8000 + 0x4000 + 0x0002 162 ID_BLEED = 0x0000c003, // 0x8000 + 0x4000 + 0x0003 163 ID_COSMIC = 0x0000c004, // 0x8000 + 0x4000 + 0x0004 164 ID_STAR_FIT_AVE = 0x00010000, // average position fitted 165 ID_STAR_FIT_PM = 0x00020000, // proper motion fitted 166 ID_STAR_FIT_PAR = 0x00040000, // parallax fitted 167 ID_STAR_USE_AVE = 0x00080000, // average position used (not PM or PAR) 168 ID_STAR_USE_PM = 0x00100000, // proper motion used (not AVE or PAR) 169 ID_STAR_USE_PAR = 0x00200000, // parallax used (not AVE or PM) 170 ID_OBJ_EXT = 0x01000000, // extended in our data (eg, PS) 171 ID_OBJ_EXT_ALT = 0x02000000, // extended in external data (eg, 2MASS) 172 ID_OBJ_GOOD = 0x04000000, // good-quality measurement in our data (eg,PS) 173 ID_OBJ_GOOD_ALT = 0x08000000, // good-quality measurement in external data (eg, 2MASS) 151 ID_STAR_FEW = 0x00000001, // used within relphot: skip star 152 ID_STAR_POOR = 0x00000002, // used within relphot: skip star 153 ID_PROPER = 0x00000400, // star with large proper motion 154 ID_TRANSIENT = 0x00001000, // is this mutually exclusive with USNO? 155 ID_VARIABLE = 0x00002000, // not currently set? 156 ID_ASTEROID = 0x00002000, // identified with an asteroid 157 ID_BAD_OBJECT = 0x00004000, // if all measurements are bad, set this bit 158 ID_MOVING = 0x00008000, // is a moving object 159 ID_ROCK = 0x0000a000, // 0x8000 + 0x2000 160 ID_GHOST = 0x0000c001, // 0x8000 + 0x4000 + 0x0001 161 ID_TRAIL = 0x0000c002, // 0x8000 + 0x4000 + 0x0002 162 ID_BLEED = 0x0000c003, // 0x8000 + 0x4000 + 0x0003 163 ID_COSMIC = 0x0000c004, // 0x8000 + 0x4000 + 0x0004 164 ID_STAR_FIT_AVE = 0x00010000, // average position fitted 165 ID_STAR_FIT_PM = 0x00020000, // proper motion fitted 166 ID_STAR_FIT_PAR = 0x00040000, // parallax fitted 167 ID_STAR_USE_AVE = 0x00080000, // average position used (not PM or PAR) 168 ID_STAR_USE_PM = 0x00100000, // proper motion used (not AVE or PAR) 169 ID_STAR_USE_PAR = 0x00200000, // parallax used (not AVE or PM) 170 ID_STAR_NO_ASTROM = 0x00400000, // mean astrometry could not be measured 171 ID_OBJ_EXT = 0x01000000, // extended in our data (eg, PS) 172 ID_OBJ_EXT_ALT = 0x02000000, // extended in external data (eg, 2MASS) 173 ID_OBJ_GOOD = 0x04000000, // good-quality measurement in our data (eg,PS) 174 ID_OBJ_GOOD_ALT = 0x08000000, // good-quality measurement in external data (eg, 2MASS) 174 175 } DVOAverageFlags; 175 176 … … 180 181 ID_SECF_USE_SYNTH = 0x00000004, // synthetic photometry used in average measurement 181 182 ID_SECF_USE_UBERCAL = 0x00000008, // synthetic photometry used in average measurement 183 ID_SECF_HAS_PS1 = 0x00000010, // PS1 photometry used in average measurement 184 ID_SECF_HAS_STACK = 0x00000020, // PS1 stack photometry exists 182 185 ID_PHOTOM_PASS_0 = 0x00000100, // average magnitude calculated in 0th pass 183 186 ID_PHOTOM_PASS_1 = 0x00000200, // average magnitude calculated in 1th pass -
trunk/Ohana/src/libdvo/src/dvo_catalog.c
r34405 r34429 89 89 average->Trange = 0; 90 90 91 average->psfQF = 0.0; 92 average->psfQFperf = 0.0; 93 91 94 average->stargal = 0.0; 92 95 average->Npos = 0; -
trunk/Ohana/src/opihi/cmd.astro
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/Ohana/src/opihi/cmd.astro merged: 34428
- Property svn:mergeinfo changed
-
trunk/Ohana/src/relastro/src/UpdateObjects.c
r34405 r34429 168 168 } 169 169 170 // if we have too few good detections for the desired fit, or too limited a baseline, use a171 // fit with fewer parameters. XXX if we have too few parameters for even the average172 // position, consider including the lower-quality detections173 174 catalog[i].average[j].flags &= ~ID_STAR_ FEW;170 // if we have too few good detections for the desired fit, or too limited a 171 // baseline, use a fit with fewer parameters. XXX if we have too few measurements 172 // for even the average position, consider including the lower-quality detections? 173 174 catalog[i].average[j].flags &= ~ID_STAR_NO_ASTROM; 175 175 176 176 // find Tmin & Tmax from the list of accepted measurements … … 197 197 // XXX need to define PHOTOM and ASTROM object flags 198 198 // XXX reset the average value fields? 199 catalog[i].average[j].flags |= ID_STAR_ FEW;199 catalog[i].average[j].flags |= ID_STAR_NO_ASTROM; 200 200 catalog[i].average[j].ChiSqAve = NAN; 201 201 catalog[i].average[j].ChiSqPM = NAN; -
trunk/Ohana/src/relastro/src/bcatalog.c
r33652 r34429 26 26 27 27 DVOAverageFlags averageBits = 28 ID_STAR_FEW | 29 ID_STAR_POOR | 30 ID_STAR_FIT_AVE | 31 ID_STAR_FIT_PM | 32 ID_STAR_FIT_PAR | 33 ID_STAR_USE_AVE | 34 ID_STAR_USE_PM | 35 ID_STAR_USE_PAR; 28 ID_STAR_FIT_AVE | 29 ID_STAR_FIT_PM | 30 ID_STAR_FIT_PAR | 31 ID_STAR_USE_AVE | 32 ID_STAR_USE_PM | 33 ID_STAR_USE_PAR | 34 ID_STAR_NO_ASTROM ; 36 35 37 36 /* exclude stars not in range or with too few measurements */ -
trunk/Ohana/src/relastro/src/initialize.c
r33652 r34429 19 19 20 20 initstats (STATMODE); 21 22 // IMAGE_BAD = ID_IMAGE_ASTROM_POOR | ID_IMAGE_ASTROM_FEW | ID_IMAGE_ASTROM_SKIP;23 // STAR_BAD = ID_STAR_POOR | ID_STAR_FEW;24 // MEAS_BAD = ID_MEAS_NOCAL | ID_MEAS_POOR_ASTROM | ID_MEAS_SKIP_ASTROM | ID_MEAS_AREA;25 21 26 22 /* XXX drop irrelevant entries */ … … 57 53 58 54 initstats (STATMODE); 59 60 // IMAGE_BAD = ID_IMAGE_ASTROM_POOR | ID_IMAGE_ASTROM_FEW | ID_IMAGE_ASTROM_SKIP;61 // STAR_BAD = ID_STAR_POOR | ID_STAR_FEW;62 // MEAS_BAD = ID_MEAS_NOCAL | ID_MEAS_POOR_ASTROM | ID_MEAS_SKIP_ASTROM | ID_MEAS_AREA;63 55 } 64 56 -
trunk/Ohana/src/relastro/src/liststats.c
r17214 r34429 136 136 dS += M; 137 137 } 138 X2 = X2 / Nm;138 X2 = X2 / (Nm - 1); 139 139 dS = sqrt (dS / Nm); 140 140 -
trunk/Ohana/src/relastro/src/relastro_objects.c
r34405 r34429 16 16 17 17 DVOAverageFlags averageBits = 18 ID_STAR_FEW | 19 ID_STAR_POOR | 20 ID_STAR_FIT_AVE | 21 ID_STAR_FIT_PM | 22 ID_STAR_FIT_PAR | 23 ID_STAR_USE_AVE | 24 ID_STAR_USE_PM | 25 ID_STAR_USE_PAR; 18 ID_STAR_FIT_AVE | 19 ID_STAR_FIT_PM | 20 ID_STAR_FIT_PAR | 21 ID_STAR_USE_AVE | 22 ID_STAR_USE_PM | 23 ID_STAR_USE_PAR | 24 ID_STAR_NO_ASTROM ; 26 25 27 26 // XXX need to decide how to determine PARALLEL mode... -
trunk/Ohana/src/relphot/src/StarOps.c
r34267 r34429 11 11 int Nmos; 12 12 int Ngrid; 13 double *list; 14 double *dlist; 15 double *wlist; 16 double *aplist; 17 double *kronlist; 18 double *dkronlist; 13 14 // NOTE: the following arrays are (possibly) pre-allocated and carried down to each 15 // thread. The first 3 (list, dlist, wlist) are used in all relphot analyses; the 16 // others are only used on the final output steps. 17 18 double *list; // list of measure.mag values for a given star 19 double *dlist; // mag errors for a star 20 double *wlist; // weights to use for mean mags 21 double *aplist; // ap mags for a star 22 double *kronlist; // kron mags for a star 23 double *dkronlist; // kron mag errors 24 25 double *psfqf_list; // psfqf for all filters 26 double *psfqfperf_list; // psfqfperf for all filters 27 double *stargal_list; // stargal for all filters 19 28 } SetMrelInfo; 20 29 … … 168 177 ALLOCATE (results.dkronlist, double, Nmax); 169 178 179 ALLOCATE (results.psfqf_list, double, Nmax); 180 ALLOCATE (results.psfqfperf_list, double, Nmax); 181 ALLOCATE (results.stargal_list, double, Nmax); 182 170 183 for (i = 0; i < Ncatalog; i++) { 171 184 setMrel_catalog (catalog, i, pass, flatcorr, &results, Nsecfilt); // XXX add arguments as needed for options … … 178 191 free (results.kronlist); 179 192 free (results.dkronlist); 193 194 free (results.psfqf_list); 195 free (results.psfqfperf_list); 196 free (results.stargal_list); 180 197 return (TRUE); 181 198 } … … 315 332 liststats_setmode (&kronstats, STATMODE); 316 333 334 // StatType psfstats; 335 // liststats_setmode (&psfstats, "MEAN"); 336 317 337 double *list = results->list; 318 338 double *dlist = results->dlist; … … 322 342 double *dkronlist = results->dkronlist; 323 343 344 double *psfqf_list = results->psfqf_list; 345 double *psfqfperf_list = results->psfqfperf_list; 346 double *stargal_list = results->stargal_list; 347 324 348 SetMrelInfoInit (results, FALSE); // do not allocate list,dlist,wlist arrays 325 349 … … 327 351 328 352 char *primaryCell = NULL; 329 ALLOCATE (primaryCell, char, DVO_MAX_PATH); 353 if (isSetMrelFinal) { 354 ALLOCATE (primaryCell, char, DVO_MAX_PATH); 355 } 330 356 331 357 for (j = 0; j < catalog[Nc].Naverage; j++) { … … 338 364 } 339 365 340 BoundaryTreePrimaryCell(primaryCell, catalog[Nc].average[j].R, catalog[Nc].average[j].D); 366 if (isSetMrelFinal) { 367 BoundaryTreePrimaryCell(primaryCell, catalog[Nc].average[j].R, catalog[Nc].average[j].D); 368 } 341 369 342 370 int GoodPS1 = FALSE; … … 346 374 int NextPS1 = 0; 347 375 int NpsfPS1 = 0; 376 377 int Nmeas = 0; // number of meas used for psfqf, psfqfperf, and stargal 348 378 349 379 int Ns; … … 365 395 int haveSynth = FALSE; 366 396 int haveStack = FALSE; 397 int havePS1 = FALSE; 367 398 368 399 // need to find the measurement closest to the center of its skycell, as well as the … … 420 451 421 452 if (isSetMrelFinal) { 453 // Map (aplist) and Mkron (kronlist,dkronlist) are used to calculate mean mags per filter 422 454 float Map = PhotAper (&catalog[Nc].measure[m]); 423 455 aplist[N] = Map - Mcal - Mmos - Mgrid; … … 426 458 kronlist[N] = Mkron - Mcal - Mmos - Mgrid; 427 459 dkronlist[N] = catalog[Nc].measure[m].dMkron; 460 461 // mean psfQF, psfQFperf, and stargal values are calculated per object (all filters) 462 psfqf_list[Nmeas] = catalog[Nc].measure[m].psfQF; 463 psfqfperf_list[Nmeas] = catalog[Nc].measure[m].psfQF; 464 stargal_list[Nmeas] = catalog[Nc].measure[m].extNsigma; 428 465 429 466 // special options for PS1 data … … 431 468 // count the extended detections 432 469 if (!isnan(catalog[Nc].measure[m].Map)) { 433 if (catalog[Nc].measure[m].M - catalog[Nc].measure[m].Map > 0.5) { 470 float dMagAp = catalog[Nc].measure[m].M - catalog[Nc].measure[m].Map; 471 float SigmaAp = hypot(0.1, 2.5*catalog[Nc].measure[m].dM); 472 // XXX this is still quite ad hoc, but at least it: 473 // (a) converges to 0.1 mag offset at the bright end 474 // (b) converges to 0.5 mag offset at the faint end (dM = 0.2) 475 if (dMagAp > SigmaAp) { 434 476 Next ++; 435 477 NextPS1 ++; … … 438 480 } 439 481 } 482 havePS1 = TRUE; 440 483 } 441 484 // gpc1 stack data … … 543 586 } 544 587 N++; 588 Nmeas++; 545 589 } 546 590 … … 658 702 case 0: 659 703 catalog[Nc].secfilt[Nsecfilt*j+Nsec].flags |= ID_PHOTOM_PASS_0; 660 GoodPS1 = TRUE;704 if (havePS1) GoodPS1 = TRUE; 661 705 break; 662 706 case 1: 663 707 catalog[Nc].secfilt[Nsecfilt*j+Nsec].flags |= ID_PHOTOM_PASS_1; 664 GoodPS1 = TRUE;708 if (havePS1) GoodPS1 = TRUE; 665 709 break; 666 710 case 2: 667 711 catalog[Nc].secfilt[Nsecfilt*j+Nsec].flags |= ID_PHOTOM_PASS_2; 668 GoodPS1 = TRUE;712 if (havePS1) GoodPS1 = TRUE; 669 713 break; 670 714 case 3: … … 678 722 catalog[Nc].secfilt[Nsecfilt*j+Nsec].flags |= ID_SECF_USE_SYNTH; 679 723 } 724 if (haveStack) { 725 catalog[Nc].secfilt[Nsecfilt*j+Nsec].flags |= ID_SECF_HAS_STACK; 726 } 727 if (havePS1) { 728 catalog[Nc].secfilt[Nsecfilt*j+Nsec].flags |= ID_SECF_HAS_PS1; 729 } 680 730 if (haveUbercal) { 681 731 catalog[Nc].secfilt[Nsecfilt*j+Nsec].flags |= ID_SECF_USE_UBERCAL; … … 685 735 686 736 if (isSetMrelFinal) { 687 DVOAverageFlags flagBits = ID_OBJ_EXT | ID_OBJ_EXT_ALT | ID_OBJ_GOOD | ID_OBJ_GOOD_ALT; 688 689 // we attempt to set a few flags here; reset those bits before trying: 690 catalog[Nc].average[j].flags &= ~flagBits; 737 if (pass == 0) { 738 DVOAverageFlags flagBits = ID_OBJ_EXT | ID_OBJ_EXT_ALT | ID_OBJ_GOOD | ID_OBJ_GOOD_ALT; 739 // we attempt to set a few flags here; reset those bits before trying: 740 catalog[Nc].average[j].flags &= ~flagBits; 741 } 691 742 692 743 if (NextPS1 && (NextPS1 > NpsfPS1)) { … … 701 752 if (Good2MASS) { 702 753 catalog[Nc].average[j].flags |= ID_OBJ_GOOD_ALT; 754 } 755 756 // use NAN values for catalog[Nc].average[j].psfQF as signal 757 if (!isfinite(catalog[Nc].average[j].psfQF)) { 758 // do something here 759 float psfQFmax = 0.0; 760 float psfQFperfmax = 0.0; 761 float stargalmax = 0.0; 762 int seq; 763 for (seq = 0; seq < Nmeas; seq++) { 764 if (isfinite(psfqf_list[seq])) { 765 psfQFmax = MAX (psfqf_list[seq], psfQFmax); 766 } 767 if (isfinite(psfqfperf_list[seq])) { 768 psfQFperfmax = MAX (psfqfperf_list[seq], psfQFperfmax); 769 } 770 if (isfinite(stargal_list[seq])) { 771 stargalmax = MAX (stargal_list[seq], stargalmax); 772 } 773 } 774 775 catalog[Nc].average[j].psfQF = psfQFmax; 776 catalog[Nc].average[j].psfQFperf = psfQFperfmax; 777 catalog[Nc].average[j].stargal = stargalmax; 703 778 } 704 779 } -
trunk/Ohana/src/relphot/src/initialize.c
r33963 r34429 77 77 args_client (argc, argv); 78 78 79 if (MODE == MODE_UPDATE_OBJECTS) return; 79 if (MODE == MODE_UPDATE_OBJECTS) { 80 char tmpline1[256]; 81 int Ns; 82 Nphotcodes = GetPhotcodeNsecfilt (); 83 ALLOCATE (photcodes, PhotCode *, Nphotcodes); 84 ALLOCATE (PhotcodeList, char, 256); 85 for (Ns = 0; Ns < Nphotcodes; Ns++) { 86 photcodes[Ns] = GetPhotcodebyNsec (Ns); 87 if (Ns > 0) { 88 snprintf (tmpline1, 256, "%s,%s", PhotcodeList, photcodes[Ns][0].name); 89 } else { 90 snprintf (tmpline1, 256, "%s", photcodes[Ns][0].name); 91 } 92 strcpy (PhotcodeList, tmpline1); 93 } 94 return; 95 } 80 96 81 97 // load the list of photcodes into the globals (photcodes, Nphotcodes) -
trunk/Ohana/src/relphot/src/liststats.c
r33963 r34429 38 38 dsortthree (value, dvalue, weight, N); 39 39 } else { 40 dsortpair (value, dvalue, N); 40 if (dvalue) { 41 dsortpair (value, dvalue, N); 42 } else { 43 dsort (value, N); 44 } 41 45 } 42 46 -
trunk/Ohana/src/relphot/src/relphot_objects.c
r34405 r34429 61 61 Nsecfilt = catalog.Nsecfilt; 62 62 DVOSecfiltFlags secfiltBits = 63 ID_SECF_STAR_FEW |64 ID_SECF_STAR_POOR |65 ID_PHOTOM_PASS_0 |66 ID_PHOTOM_PASS_1 |67 ID_PHOTOM_PASS_2 |68 ID_PHOTOM_PASS_3 |69 ID_PHOTOM_PASS_4 |70 ID_SECF_USE_SYNTH |63 ID_SECF_STAR_FEW | 64 ID_SECF_STAR_POOR | 65 ID_PHOTOM_PASS_0 | 66 ID_PHOTOM_PASS_1 | 67 ID_PHOTOM_PASS_2 | 68 ID_PHOTOM_PASS_3 | 69 ID_PHOTOM_PASS_4 | 70 ID_SECF_USE_SYNTH | 71 71 ID_SECF_USE_UBERCAL | 72 ID_SECF_OBJ_EXT; 72 ID_SECF_HAS_STACK | 73 ID_SECF_HAS_PS1 | 74 ID_SECF_OBJ_EXT ; 75 76 DVOAverageFlags astromBits = 77 ID_STAR_FIT_AVE | 78 ID_STAR_FIT_PM | 79 ID_STAR_FIT_PAR | 80 ID_STAR_USE_AVE | 81 ID_STAR_USE_PM | 82 ID_STAR_USE_PAR | 83 ID_STAR_NO_ASTROM ; 73 84 74 85 for (j = 0; j < catalog.Naverage; j++) { 75 catalog.average[j].flags = 0; 86 catalog.average[j].flags &= astromBits; // reset all except astrometry bits 87 catalog.average[j].psfQF = NAN; // reset (will be re-calculated here) 88 catalog.average[j].psfQFperf = NAN; // reset (will be re-calculated here) 89 catalog.average[j].stargal = NAN; // reset (will be re-calculated here) 76 90 for (k = 0; k < Nsecfilt; k++) { 77 catalog.secfilt[j*Nsecfilt + k].M = NAN; 78 catalog.secfilt[j*Nsecfilt + k].Map = NAN; 79 catalog.secfilt[j*Nsecfilt + k].dM = NAN; 80 catalog.secfilt[j*Nsecfilt + k].Mstdev = NAN_S_SHORT; 81 catalog.secfilt[j*Nsecfilt + k].Xm = NAN; 82 catalog.secfilt[j*Nsecfilt + k].M_20 = NAN_S_SHORT; 83 catalog.secfilt[j*Nsecfilt + k].M_80 = NAN_S_SHORT; 84 catalog.secfilt[j*Nsecfilt + k].Ncode = 0; 85 catalog.secfilt[j*Nsecfilt + k].Nused = 0; 86 catalog.secfilt[j*Nsecfilt + k].flags &= ~secfiltBits; 87 catalog.secfilt[j*Nsecfilt + k].ubercalDist = 1000; 91 dvo_secfilt_init (&catalog.secfilt[j*Nsecfilt + k]); 92 catalog.secfilt[j*Nsecfilt + k].flags &= ~secfiltBits; // XXX: only reset photom bits: 88 93 } 89 94 } -
trunk/Ohana/src/relphot/src/setMrelFinal.c
r34405 r34429 94 94 } 95 95 96 for (i = 0; i < catalog[0].Naverage; i++) { 97 catalog[0].average[i].psfQF = NAN; // force recalculation below 98 catalog[0].average[i].psfQFperf = NAN; // force recalculation below 99 catalog[0].average[i].stargal = NAN; // force recalculation below 100 } 101 96 102 // XXX make this optional? (do not clean for -averages?) 97 103 if (!simpleAverage) clean_measures (catalog, 1, TRUE, flatcorr); /* mark outliers ID_MEAS_POOR_PHOTOM */ -
trunk/ippMonitor
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/ippMonitor merged: 34428
- Property svn:mergeinfo changed
-
trunk/ippScripts/scripts/destreak_restore_camera.pl
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/ippScripts/scripts/destreak_restore_camera.pl merged: 34428
- Property svn:mergeinfo changed
-
trunk/ippScripts/scripts/ipp_apply_burntool_single.pl
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/ippScripts/scripts/ipp_apply_burntool_single.pl merged: 34428
- Property svn:mergeinfo changed
-
trunk/ippScripts/scripts/magic_destreak.pl
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/ippScripts/scripts/magic_destreak.pl merged: 34428
- Property svn:mergeinfo changed
-
trunk/ippToPsps
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/ippToPsps merged: 34428
- Property svn:mergeinfo changed
-
trunk/ippTools/share/camtool_find_pendingimfile.sql
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/ippTools/share/camtool_find_pendingimfile.sql merged: 34428
- Property svn:mergeinfo changed
-
trunk/ippTools/share/chiptool_setimfiletoupdate.sql
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/ippTools/share/chiptool_setimfiletoupdate.sql merged: 34428
- Property svn:mergeinfo changed
-
trunk/ippTools/share/pxadmin_create_tables.sql
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/ippTools/share/pxadmin_create_tables.sql merged: 34428
- Property svn:mergeinfo changed
-
trunk/ippTools/share/warptool_towarped.sql
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/ippTools/share/warptool_towarped.sql merged: 34428
- Property svn:mergeinfo changed
-
trunk/ippTools/src
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/ippTools/src merged: 34428
- Property svn:mergeinfo changed
-
trunk/ippTools/src/magictool.c
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/ippTools/src/magictool.c merged: 34428
- Property svn:mergeinfo changed
-
trunk/ippconfig
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/ippconfig merged: 34428
- Property svn:mergeinfo changed
-
trunk/ippconfig/recipes/reductionClasses.mdc
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/ippconfig/recipes/reductionClasses.mdc merged: 34428
- Property svn:mergeinfo changed
-
trunk/ppImage/src
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/ppImage/src merged: 34428
- Property svn:mergeinfo changed
-
trunk/psModules
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/psModules merged: 34428
- Property svn:mergeinfo changed
-
trunk/psphot
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/psphot merged: 34428
- Property svn:mergeinfo changed
-
trunk/psphot/src
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/psphot/src merged: 34428
- Property svn:mergeinfo changed
-
trunk/psphot/src/psphotStackImageLoop.c
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/psphot/src/psphotStackImageLoop.c merged: 34428
- Property svn:mergeinfo changed
-
trunk/pstamp/scripts
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/pstamp/scripts merged: 34428
- Property svn:mergeinfo changed
-
trunk/psvideophot
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/psvideophot merged: 34428
- Property svn:mergeinfo changed
Note:
See TracChangeset
for help on using the changeset viewer.
