Changeset 37807 for trunk/Ohana/src/libdvo/include/dvo.h
- Timestamp:
- Jan 11, 2015, 2:14:39 PM (12 years ago)
- Location:
- trunk/Ohana
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/libdvo/include/dvo.h (modified) (23 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana
- Property svn:mergeinfo changed
-
trunk/Ohana/src/libdvo/include/dvo.h
r37729 r37807 24 24 DVO_FORMAT_PS1_DEV_3, 25 25 DVO_FORMAT_PS1_REF, 26 DVO_FORMAT_PS1_SIM, 26 27 DVO_FORMAT_PS1_V1, 27 28 DVO_FORMAT_PS1_V2, … … 36 37 37 38 typedef enum {DVO_CAT_OPEN_FAIL, DVO_CAT_OPEN_OK, DVO_CAT_OPEN_EMPTY} DVOCatalogOpenModes; 38 39 typedef enum {40 PROJ_NONE, // undefined41 PROJ_ZEA, // zenithal42 PROJ_ZPL, // zenithal43 PROJ_ARC, // zenithal44 PROJ_STG, // zenithal45 PROJ_SIN, // zenithal46 PROJ_TAN, // zenithal47 PROJ_TNX, // zenithal48 PROJ_DIS, // zenithal (TAN + polyterms)49 PROJ_LIN, // cartesian50 PROJ_PLY, // cartesian51 PROJ_WRP, // cartesian52 PROJ_AIT, // pseudocyl53 PROJ_GLS, // pseudocyl54 PROJ_PAR, // pseudocyl55 } OhanaProjection;56 57 typedef enum {58 PROJ_MODE_NONE,59 PROJ_MODE_CARTESIAN,60 PROJ_MODE_ZENITHAL,61 PROJ_MODE_PSEUDOCYL,62 } OhanaProjectionMode;63 39 64 40 // these are used as NAN for types of int values … … 79 55 80 56 /* catalog values to be loaded */ 81 # define LOAD_NONE 0x000 82 # define LOAD_AVES 0x001 83 # define LOAD_MEAS 0x002 84 # define LOAD_MISS 0x004 85 # define LOAD_SECF 0x008 86 # define SKIP_AVES 0x010 87 # define SKIP_MEAS 0x020 88 # define SKIP_MISS 0x040 89 # define SKIP_SECF 0x080 90 # define LOAD_LENSING 0x100 91 # define LOAD_LENSOBJ 0x200 92 # define SKIP_LENSING 0x400 93 # define SKIP_LENSOBJ 0x800 57 # define LOAD_NONE 0x0000 58 # define LOAD_AVES 0x0001 59 # define LOAD_MEAS 0x0002 60 # define LOAD_MISS 0x0004 61 # define LOAD_SECF 0x0008 62 # define SKIP_AVES 0x0010 63 # define SKIP_MEAS 0x0020 64 # define SKIP_MISS 0x0040 65 # define SKIP_SECF 0x0080 66 # define LOAD_LENSING 0x0100 67 # define LOAD_LENSOBJ 0x0200 68 # define SKIP_LENSING 0x0400 69 # define SKIP_LENSOBJ 0x0800 70 # define LOAD_STARPAR 0x1000 71 # define SKIP_STARPAR 0x2000 94 72 95 73 /* photometry code types */ … … 114 92 ID_IMAGE_ASTROM_FEW = 0x00000100, /* currently too few measurements for astrometry */ 115 93 ID_IMAGE_PHOTOM_UBERCAL = 0x00000200, /* externally-supplied photometry zero point from ubercal analysis */ 94 ID_IMAGE_ASTROM_GMM = 0x00000400, /* image was fitted to positions corrected by the galaxy motion model */ 116 95 } DVOImageFlags; 117 96 … … 136 115 ID_MEAS_STACK_PRIMARY = 0x00010000, // this stack measurement is in the primary skycell 137 116 ID_MEAS_STACK_PHOT_SRC = 0x00020000, // this measurement supplied the stack photometry 117 ID_MEAS_ICRF_QSO = 0x00040000, // this measurement is an ICRF reference position 118 ID_MEAS_IMAGE_EPOCH = 0x00080000, // this measurement is registered to the image epoch (not tied to ref catalog epoch) 138 119 } DVOMeasureFlags; 139 120 … … 152 133 */ 153 134 135 /** these names were previously used for Average flags in old (LONEOS-era) dvo versions 136 ID_BAD_OBJECT = 0x00004000, // if all measurements are bad, set this bit 137 ID_MOVING = 0x00008000, // is a moving object 138 ID_ROCK = 0x0000a000, // 0x8000 + 0x2000 139 ID_GHOST = 0x0000c001, // 0x8000 + 0x4000 + 0x0001 140 ID_TRAIL = 0x0000c002, // 0x8000 + 0x4000 + 0x0002 141 ID_BLEED = 0x0000c003, // 0x8000 + 0x4000 + 0x0003 142 ID_COSMIC = 0x0000c004, // 0x8000 + 0x4000 + 0x0004 143 **/ 144 154 145 /* Average.flags values -- these values are 32 bit (as of PS1_V1) */ 155 146 typedef enum { 156 ID_STAR_FEW = 0x00000001, // used within relphot: skip star 157 ID_STAR_POOR = 0x00000002, // used within relphot: skip star 158 ID_PROPER = 0x00000400, // star with large proper motion 159 ID_TRANSIENT = 0x00001000, // is this mutually exclusive with USNO? 160 ID_VARIABLE = 0x00002000, // not currently set? 161 ID_ASTEROID = 0x00002000, // identified with an asteroid 162 ID_BAD_OBJECT = 0x00004000, // if all measurements are bad, set this bit 163 ID_MOVING = 0x00008000, // is a moving object 164 ID_ROCK = 0x0000a000, // 0x8000 + 0x2000 165 ID_GHOST = 0x0000c001, // 0x8000 + 0x4000 + 0x0001 166 ID_TRAIL = 0x0000c002, // 0x8000 + 0x4000 + 0x0002 167 ID_BLEED = 0x0000c003, // 0x8000 + 0x4000 + 0x0003 168 ID_COSMIC = 0x0000c004, // 0x8000 + 0x4000 + 0x0004 169 ID_STAR_FIT_AVE = 0x00010000, // average position fitted 170 ID_STAR_FIT_PM = 0x00020000, // proper motion fitted 171 ID_STAR_FIT_PAR = 0x00040000, // parallax fitted 172 ID_STAR_USE_AVE = 0x00080000, // average position used (not PM or PAR) 173 ID_STAR_USE_PM = 0x00100000, // proper motion used (not AVE or PAR) 174 ID_STAR_USE_PAR = 0x00200000, // parallax used (not AVE or PM) 175 ID_STAR_NO_ASTROM = 0x00400000, // mean astrometry could not be measured 176 ID_STAR_BAD_PM = 0x00800000, // mean astrometry could not be measured 177 ID_OBJ_EXT = 0x01000000, // extended in our data (eg, PS) 178 ID_OBJ_EXT_ALT = 0x02000000, // extended in external data (eg, 2MASS) 179 ID_OBJ_GOOD = 0x04000000, // good-quality measurement in our data (eg,PS) 180 ID_OBJ_GOOD_ALT = 0x08000000, // good-quality measurement in external data (eg, 2MASS) 181 ID_OBJ_GOOD_STACK = 0x10000000, // good-quality object in the stack (> 1 good stack) 147 ID_STAR_FEW = 0x00000001, // used within relphot: skip star 148 ID_STAR_POOR = 0x00000002, // used within relphot: skip star 149 ID_ICRF_QSO = 0x00000004, // object IDed with known ICRF quasar (may have ICRF position measurement) 150 ID_OTHEF_QSO = 0x00000008, // object IDed with known or suspected quasar, without ICRF reference data 151 ID_PROPER = 0x00000010, // star with large proper motion 152 ID_TRANSIENT = 0x00000020, // identified as a non-periodic (stationary) transient 153 ID_VARIABLE = 0x00000040, // identified as a period variable 154 ID_ASTEROID = 0x00000080, // identified with a known solar-system object (asteroid or other) 155 // bits 0x00000100 - 0x00008000 are currently unused 156 ID_STAR_FIT_AVE = 0x00010000, // average position fitted 157 ID_STAR_FIT_PM = 0x00020000, // proper motion fitted 158 ID_STAR_FIT_PAR = 0x00040000, // parallax fitted 159 ID_STAR_USE_AVE = 0x00080000, // average position used (not PM or PAR) 160 ID_STAR_USE_PM = 0x00100000, // proper motion used (not AVE or PAR) 161 ID_STAR_USE_PAR = 0x00200000, // parallax used (not AVE or PM) 162 ID_STAR_NO_ASTROM = 0x00400000, // mean astrometry could not be measured 163 ID_STAR_BAD_PM = 0x00800000, // mean astrometry could not be measured 164 ID_OBJ_EXT = 0x01000000, // extended in our data (eg, PS) 165 ID_OBJ_EXT_ALT = 0x02000000, // extended in external data (eg, 2MASS) 166 ID_OBJ_GOOD = 0x04000000, // good-quality measurement in our data (eg,PS) 167 ID_OBJ_GOOD_ALT = 0x08000000, // good-quality measurement in external data (eg, 2MASS) 168 ID_OBJ_GOOD_STACK = 0x10000000, // good-quality object in the stack (> 1 good stack) 182 169 ID_OBJ_SUSPECT_STACK = 0x20000000, // suspect object in the stack (> 1 good or suspect stack, < 2 good) 183 ID_OBJ_BAD_STACK = 0x40000000, // good-quality object in the stack (> 1 good stack)170 ID_OBJ_BAD_STACK = 0x40000000, // good-quality object in the stack (> 1 good stack) 184 171 } DVOAverageFlags; 185 172 … … 202 189 } DVOSecfiltFlags; 203 190 191 /* definitions for parallel dvo host information 192 XXX : need better names (safer namespace) 193 */ 194 195 typedef enum { 196 DATA_ON_TGT = 0x01, 197 DATA_ON_BCK = 0x02, 198 DATA_USE_BCK = 0x04, 199 200 DATA_COPY_FAILURE = 0x80, 201 } SkyTableDataFlags; 202 203 typedef enum { 204 HOST_STDIN = 0, 205 HOST_STDOUT = 1, 206 HOST_STDERR = 2, 207 } HostInfoIOfd; 208 204 209 /*** general dvo structures (internal use only / not IO) ***/ 205 210 … … 253 258 } FlatCorrectionTable; 254 259 255 /* definitions for parallel dvo host information256 XXX : need better names (safer namespace)257 */258 259 typedef enum {260 DATA_ON_TGT = 0x01,261 DATA_ON_BCK = 0x02,262 DATA_USE_BCK = 0x04,263 264 DATA_COPY_FAILURE = 0x80,265 } SkyTableDataFlags;266 267 typedef enum {268 HOST_STDIN = 0,269 HOST_STDOUT = 1,270 HOST_STDERR = 2,271 } HostInfoIOfd;272 273 260 typedef struct { 274 261 char *hostname; // name of remote machine … … 289 276 } HostTable; 290 277 278 typedef struct { 279 int Nhosts; 280 HostInfo **hosts; 281 } HostTableGroup; 282 291 283 // A RegionHost processes data for some region in parallel with other regions 292 284 typedef struct RegionHostInfo { … … 314 306 Image *image; 315 307 off_t *imseq; 308 309 AstromOffsetTable *astromTable; 316 310 317 311 int *neighbors; // list of neighbor index values … … 444 438 double R; 445 439 double D; 440 float RoffGAL; 441 float DoffGAL; 446 442 float M; 447 443 float Mcal; … … 645 641 int lensobjOffset; // offset to mean lensing data 646 642 int extendOffset; // offset to extended object entry 647 int paramsOffset;// offset to stellar parameter data643 int starparOffset; // offset to stellar parameter data 648 644 float refColorBlue; // color of astrometry ref stars 649 645 float refColorRed; // color of astrometry ref stars … … 679 675 Lensing *lensing; 680 676 Lensobj *lensobj; 677 StarPar *starpar; 681 678 682 679 int Nsecfilt; /* number of secfilt entries for each average entry */ 683 off_t Naverage, Nmeasure, Nmissing, Nlensing, Nlensobj, Ns ecf_mem; /* current number of each component in memory */684 off_t Naves_disk, Nmeas_disk, Nmiss_disk, Nlensing_disk, Nlensobj_disk, Ns ecf_disk; /* current number of each component on disk */685 off_t Naves_off, Nmeas_off, Nmiss_off, Nlensing_off, Nlensobj_off, Ns ecf_off; /* index of first loaded data value */680 off_t Naverage, Nmeasure, Nmissing, Nlensing, Nlensobj, Nstarpar, Nsecf_mem; /* current number of each component in memory */ 681 off_t Naves_disk, Nmeas_disk, Nmiss_disk, Nlensing_disk, Nlensobj_disk, Nstarpar_disk, Nsecf_disk; /* current number of each component on disk */ 682 off_t Naves_off, Nmeas_off, Nmiss_off, Nlensing_off, Nlensobj_off, Nstarpar_off, Nsecf_off; /* index of first loaded data value */ 686 683 687 684 // note that we use these for the full-sky relphot analysis … … 704 701 struct Catalog *lensing_catalog; /* lensing catalog data (split) */ 705 702 struct Catalog *lensobj_catalog; /* lensobj catalog data (split) */ 703 struct Catalog *starpar_catalog; /* starpar catalog data (split) */ 706 704 707 705 unsigned int objID; … … 739 737 int gfits_db_close PROTO((FITS_DB *db)); 740 738 int gfits_db_free PROTO((FITS_DB *db)); 741 742 /* in coords.c, using libautocode/def/coords.d */743 int XY_to_LM (double *L, double *M, double x, double y, Coords *coords);744 int LM_to_XY (double *x, double *y, double L, double M, Coords *coords);745 int RD_to_LM (double *L, double *M, double ra, double dec, Coords *coords);746 int LM_to_RD (double *ra, double *dec, double L, double M, Coords *coords);747 int XY_to_RD (double *ra, double *dec, double x, double y, Coords *coords);748 int RD_to_XY (double *x, double *y, double ra, double dec, Coords *coords);749 int fXY_to_RD (float *ra, float *dec, double x, double y, Coords *coords);750 int fRD_to_XY (float *x, float *y, double ra, double dec, Coords *coords);751 int GetCoords (Coords *coords, Header *header);752 int PutCoords (Coords *coords, Header *header);753 void RegisterMosaic (Coords *coords);754 void coords_precess (double *ra, double *dec, double in_epoch, double out_epoch);755 OhanaProjection GetProjection (char *ctype);756 int SetProjection (char *ctype, OhanaProjection proj);757 OhanaProjectionMode GetProjectionMode (OhanaProjection proj);758 739 759 740 char *libdvo_version (void); … … 913 894 Lensing *FtableToLensing (FTable *ftable, off_t *Nlensing, char *format); 914 895 Lensobj *FtableToLensobj (FTable *ftable, off_t *Nlensobj, char *format); 896 StarPar *FtableToStarPar (FTable *ftable, off_t *Nstarpar, char *format); 915 897 int FtableToImage (FTable *ftable, Header *theader, char *format); 916 898 … … 920 902 int LensingToFtable (FTable *ftable, Lensing *lensing, off_t Nlensing, char format); 921 903 int LensobjToFtable (FTable *ftable, Lensobj *lensobj, off_t Nlensobj, char format); 904 int StarParToFtable (FTable *ftable, StarPar *starpar, off_t Nstarpar, char format); 922 905 int ImageToFtable (FTable *ftable, Header *theader, char format); 923 906 int ImageToVtable (VTable *vtable, Header *theader, char format); … … 936 919 # include "ps1_v5_defs.h" 937 920 # include "ps1_ref_defs.h" 921 # include "ps1_sim_defs.h" 938 922 939 923 /*** DVO image db I/O Functions ***/ … … 950 934 void dvo_image_create (FITS_DB *db, double ZeroPoint); 951 935 936 int gfits_table_set_Image (FTable *ftable); 937 int gfits_table_mkheader_Image (Header *header); 938 Image *gfits_table_get_Image (FTable *ftable, off_t *Ndata, char *swapped); 939 952 940 /* flatcorr APIs */ 953 941 FlatCorrectionTable *FlatCorrectionLoad (char *filename, int VERBOSE); … … 963 951 SkyTable *SkyTableLoadOptimal PROTO((char *catdir, char *SKYFILE, char *GSCFILE, int readwrite, int depth, int VERBOSE)); 964 952 int SkyTableSetDepth PROTO((SkyTable *sky, int depth)); 953 SkyList *SkyRegionByIndex PROTO((SkyTable *table, int index)); 965 954 SkyList *SkyRegionByCPT PROTO((SkyTable *table, char *filename)); 966 955 SkyList *SkyRegionByPoint PROTO((SkyTable *table, int depth, double ra, double dec)); … … 1009 998 int HostTableTestHost (SkyRegion *region, int hostID); 1010 999 1000 void InitHost (HostInfo *host); 1001 1002 HostTableGroup *HostTableGroups (HostTable *table, int *ngroups); 1003 int HostTableGroupWaitJobsGetIO (HostTableGroup *table, char *file, int lineno, int VERBOSE); 1004 1011 1005 // functions to support tiny versions of Average and Measure 1012 1006 void CopyAverageToTiny (AverageTiny *averageT, Average *average); … … 1042 1036 void dvo_lensing_init (Lensing *lensing); 1043 1037 void dvo_lensobj_init (Lensobj *lensobj, int toZero); 1038 void dvo_starpar_init (StarPar *starpar); 1044 1039 1045 1040 void InitRegionHosts (RegionHostInfo *hosts, int Nhosts, int NHOSTS); … … 1051 1046 int RegionHostFindNeighbors (RegionHostTable *table, int Nhost); 1052 1047 1048 // galaxy_model: 1049 int TransformProperMotion_radians (double *uR, double *uD, double uL, double uB, double Rrad, double Drad, CoordTransform *transform); 1050 int TransformProperMotion (double *uR, double *uD, double uL, double uB, double R, double D, CoordTransform *transform); 1051 int SolarMotionModel_radians (double *uL_sol, double *uB_sol, double Lrad, double Brad, double distance); 1052 int SolarMotionModel (double *uL_sol, double *uB_sol, double L, double B, double distance); 1053 int GalaxyMotionModel_radians (double *uL_gal, double *uB_gal, double Lrad, double Brad); 1054 int GalaxyMotionModel (double *uL_gal, double *uB_gal, double L, double B); 1055 int InitGalaxyModel (char *version); 1056 1057 # define LENSFIELD(NAME) float LensValue_##NAME (PhotCode *code, Lensobj *lensobj); 1058 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) 1082 1083 # undef LENSFIELD 1084 1053 1085 # endif // DVO_H
Note:
See TracChangeset
for help on using the changeset viewer.
