Changeset 42477
- Timestamp:
- Jul 21, 2023, 10:45:50 AM (3 years ago)
- Location:
- trunk/Ohana/src
- Files:
-
- 2 added
- 3 edited
-
addstar/src/ReadStarsFITS.c (modified) (3 diffs)
-
libdvo/Makefile (modified) (2 diffs)
-
libdvo/include/cmf-ps1-v5-r0.h (added)
-
libdvo/include/dvo.h (modified) (1 diff)
-
libdvo/src/cmf-ps1-v5-r0.c (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/addstar/src/ReadStarsFITS.c
r39457 r42477 13 13 Catalog *Convert_PS1_V4 PROTO((FTable *table)); 14 14 Catalog *Convert_PS1_V5 PROTO((FTable *table)); 15 Catalog *Convert_PS1_V5_R0 PROTO((FTable *table)); 15 16 Catalog *Convert_PS1_V5_R0_Lensing PROTO((FTable *table)); 16 17 Catalog *Convert_PS1_V5_R1_Lensing PROTO((FTable *table)); … … 99 100 case 232: 100 101 catalog = Convert_PS1_V5 (&table); 102 break; 103 case 288: 104 catalog = Convert_PS1_V5_R0 (&table); 101 105 break; 102 106 case 312: … … 859 863 } 860 864 865 // alternate version of PS1_V5 (UNIONS TEST?) 866 Catalog *Convert_PS1_V5_R0 (FTable *table) { 867 868 off_t Nstars; 869 unsigned int i; 870 double ZeroPt; 871 CMF_PS1_V5_R0 *ps1data; 872 873 ps1data = gfits_table_get_CMF_PS1_V5_R0 (table, &Nstars, NULL); 874 if (!ps1data) { 875 fprintf (stderr, "skipping inconsistent entry\n"); 876 return (NULL); 877 } 878 ZeroPt = GetZeroPoint(); 879 880 Catalog *catalog = addstar_catalog_init (Nstars); 881 882 for (i = 0; i < Nstars; i++) { 883 catalog->measure[i].Xccd = ps1data[i].X; 884 catalog->measure[i].Yccd = ps1data[i].Y; 885 catalog->measure[i].dXccd = ToShortPixels(ps1data[i].dX); 886 catalog->measure[i].dYccd = ToShortPixels(ps1data[i].dY); 887 888 catalog->measure[i].posangle = ToShortDegrees(ps1data[i].posangle); 889 catalog->measure[i].pltscale = ps1data[i].pltscale; 890 891 if ((ps1data[i].M >= 0.0) || isnan(ps1data[i].M)) { 892 catalog->measure[i].M = NAN; 893 } else { 894 catalog->measure[i].M = ps1data[i].M + ZeroPt; 895 } 896 catalog->measure[i].dM = ps1data[i].dM; 897 catalog->measure[i].dMcal = ps1data[i].dMcal; 898 catalog->measure[i].Map = ps1data[i].Map + ZeroPt; 899 catalog->measure[i].dMap = (ps1data[i].apFlux > 0.0) ? fabs(ps1data[i].apFluxErr / ps1data[i].apFlux) : NAN; 900 901 catalog->measure[i].Mkron = (ps1data[i].kronFlux > 0.0) ? -2.5*log10(ps1data[i].kronFlux) + ZeroPt : NAN; 902 catalog->measure[i].dMkron = (ps1data[i].kronFlux > 0.0) ? ps1data[i].kronFluxErr / ps1data[i].kronFlux : NAN; 903 904 // these fluxes are converted from counts to counts/sec in FilterStars.c 905 catalog->measure[i].FluxPSF = GetFluxFromFluxOrMag (ps1data[i].Flux, ps1data[i].M); 906 catalog->measure[i].dFluxPSF = GetFluxErrFromFluxOrMag (ps1data[i].dFlux, catalog->measure[i].FluxPSF, ps1data[i].dM); 907 catalog->measure[i].FluxKron = ps1data[i].kronFlux; 908 catalog->measure[i].dFluxKron = ps1data[i].kronFluxErr; 909 catalog->measure[i].FluxAp = GetFluxFromFluxOrMag (ps1data[i].apFlux, ps1data[i].Map); 910 catalog->measure[i].dFluxAp = GetFluxErrFromFluxOrMag (ps1data[i].apFluxErr, catalog->measure[i].FluxAp, catalog->measure[i].dMap); 911 912 catalog->measure[i].Sky = ps1data[i].sky; 913 catalog->measure[i].dSky = ps1data[i].dSky; 914 915 catalog->measure[i].psfChisq = ps1data[i].psfChisq; 916 catalog->measure[i].psfQF = ps1data[i].psfQF; 917 catalog->measure[i].psfQFperf = ps1data[i].psfQFperf; 918 919 catalog->measure[i].psfNdof = ps1data[i].psfNdof; 920 catalog->measure[i].psfNpix = ps1data[i].psfNpix; 921 catalog->measure[i].extNsigma = ps1data[i].extNsigma; 922 923 catalog->measure[i].FWx = ToShortPixels(ps1data[i].fx); 924 catalog->measure[i].FWy = ToShortPixels(ps1data[i].fy); 925 catalog->measure[i].theta = ToShortDegrees(ps1data[i].df); 926 927 catalog->measure[i].Mxx = ToShortPixels(ps1data[i].Mxx); 928 catalog->measure[i].Mxy = ToShortPixels(ps1data[i].Mxy); 929 catalog->measure[i].Myy = ToShortPixels(ps1data[i].Myy); 930 931 catalog->measure[i].photFlags = ps1data[i].flags; 932 catalog->measure[i].photFlags2 = ps1data[i].flags2; 933 934 // this is may optionally be replaced by the internal sequence (see FilterStars.c) 935 catalog->measure[i].detID = ps1data[i].detID; 936 937 // the Average fields and the following Measure fields are set in FilterStars after 938 // the image metadata is in hand: dR, dD, Mcal, dt, airmass, az, t, imageID, extID. 939 940 // averef is set in find_matches 941 942 // dbFlags is zero on ingest. 943 944 // the following fields are currently not being set anywhere: t_msec 945 } 946 return catalog; 947 } 948 861 949 Catalog *Convert_PS1_V5_R0_Lensing (FTable *table) { 862 950 -
trunk/Ohana/src/libdvo/Makefile
r41491 r42477 56 56 $(DESTINC)/cmf-ps1-dv3.h \ 57 57 $(DESTINC)/cmf-ps1-v5.h \ 58 $(DESTINC)/cmf-ps1-v5-r0.h \ 58 59 $(DESTINC)/cmf-ps1-sv3.h \ 59 60 $(DESTINC)/cmf-ps1-sv4.h \ … … 120 121 $(SRC)/cmf-ps1-sv4.$(ARCH).o \ 121 122 $(SRC)/cmf-ps1-v5.$(ARCH).o \ 123 $(SRC)/cmf-ps1-v5-r0.$(ARCH).o \ 122 124 $(SRC)/cmf-ps1-v5-r0-lensing.$(ARCH).o \ 123 125 $(SRC)/cmf-ps1-v5-r1-lensing.$(ARCH).o \ -
trunk/Ohana/src/libdvo/include/dvo.h
r42102 r42477 403 403 # include "cmf-ps1-sv4.h" 404 404 # include "cmf-ps1-v5.h" 405 # include "cmf-ps1-v5-r0.h" 405 406 # include "cmf-ps1-v5-r0-lensing.h" 406 407 # include "cmf-ps1-v5-r1-lensing.h"
Note:
See TracChangeset
for help on using the changeset viewer.
