- Timestamp:
- Apr 9, 2016, 11:19:31 AM (10 years ago)
- Location:
- trunk/Ohana/src/libdvo
- Files:
-
- 6 edited
-
include/convert.h (modified) (1 diff)
-
include/dvo.h (modified) (2 diffs)
-
include/dvodb.h (modified) (1 diff)
-
src/convert.c (modified) (1 diff)
-
src/dbExtractAverages.c (modified) (1 diff)
-
src/dbExtractMeasures.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libdvo/include/convert.h
r38553 r39521 10 10 time_t TimeRef PROTO((double time, time_t TimeReference, int TimeFormat)); 11 11 double TimeValue PROTO((time_t time, time_t TimeReference, int TimeFormat)); 12 double TimeRange PROTO((time_t time, int TimeFormat)); 12 13 13 14 int hh_hms PROTO((double hh, int *hr, int *mn, double *sc)); -
trunk/Ohana/src/libdvo/include/dvo.h
r39480 r39521 174 174 ID_OBJ_FEW = 0x00000001, // used within relphot: skip star 175 175 ID_OBJ_POOR = 0x00000002, // used within relphot: skip star 176 176 177 // NOTE: bits used for object classification: 177 178 ID_OBJ_ICRF_QSO = 0x00000004, // object IDed with known ICRF quasar (may have ICRF position measurement) 178 ID_OBJ_OTHEF_QSO = 0x00000008, // identified as likely QSO (Hernitschek et al 2015), without ICRF reference data 179 ID_OBJ_TRANSIENT = 0x00000010, // identified as a non-periodic (stationary) transient 180 ID_OBJ_VARIABLE = 0x00000020, // identified as a periodic variable 181 ID_OBJ_RRLYRA = 0x00000040, // identified as likely RR Lyra (Hernitschek et al 2015) 182 ID_OBJ_HAS_SOLSYS_DET = 0x00000080, // identified with a known solar-system object (asteroid or other) 183 ID_OBJ_ALL_SOLSYS_DET = 0x00000100, // identified with a known solar-system object (asteroid or other) 184 // bits 0x00000200 - 0x00000400 are currently unused 179 ID_OBJ_HERN_QSO_P60 = 0x00000008, // identified as likely QSO (Hernitschek et al 2015), P_QSO = 0.60 180 ID_OBJ_HERN_QSO_P05 = 0x00000010, // identified as possible QSO (Hernitschek et al 2015), P_QSO = 0.05 181 ID_OBJ_HERN_RRL_P60 = 0x00000020, // identified as likely RR Lyra (Hernitschek et al 2015), P_RRLyra = 0.60 182 ID_OBJ_HERN_RRL_P05 = 0x00000040, // identified as possible RR Lyra (Hernitschek et al 2015), P_RRLyra = 0.05 183 ID_OBJ_HERN_VARIABLE = 0x00000080, // identified as a variable based on ChiSq (Hernitschek et al 2015) 184 ID_OBJ_TRANSIENT = 0x00000100, // identified as a non-periodic (stationary) transient 185 ID_OBJ_HAS_SOLSYS_DET = 0x00000200, // identified with a known solar-system object (asteroid or other) 186 ID_OBJ_MOST_SOLSYS_DET = 0x00000400, // most detections from a known solar-system object 187 185 188 // NOTE: bits used for astrometry analysis 186 189 ID_OBJ_LARGE_PM = 0x00000800, // star with large proper motion … … 196 199 ID_OBJ_MEAN_FOR_STACK = 0x00200000, // mean astrometry could not be measured 197 200 ID_OBJ_BAD_PM = 0x00400000, // failure to measure proper-motion model 201 198 202 // NOTE: bits used for photometry analysis 199 203 ID_OBJ_EXT = 0x00800000, // extended in our data (eg, PS) -
trunk/Ohana/src/libdvo/include/dvodb.h
r39462 r39521 491 491 int GetTimeSelection PROTO((time_t *tz, time_t *te)); 492 492 int GetTimeFormat PROTO((time_t *TimeReference, int *TimeFormat)); 493 double TimeValue (time_t time, time_t TimeReference, int TimeFormat); 493 double TimeValue PROTO((time_t time, time_t TimeReference, int TimeFormat)); 494 double TimeRange PROTO((time_t time, int TimeFormat)); 494 495 495 496 void image_subset PROTO((Image *image, off_t Nimage, off_t **Subset, off_t *Nsubset, SkyRegionSelection *selection, e_time tzero, double trange, int TimeSelect)); -
trunk/Ohana/src/libdvo/src/convert.c
r38553 r39521 261 261 } 262 262 263 /* convert UNIX time (sec) range to a time range in the given unit */ 264 double TimeRange (time_t dt, int TimeFormat) { 265 266 double value; 267 268 switch (TimeFormat) { 269 case TIME_JD: 270 case TIME_MJD: 271 case TIME_DAYS: 272 value = dt / 86400.0; 273 break; 274 case TIME_HOURS: 275 value = dt / 3600.0; 276 break; 277 case TIME_MINUTES: 278 value = dt / 60.0; 279 break; 280 case TIME_SECONDS: 281 default: 282 value = dt; 283 break; 284 } 285 return (value); 286 } 287 263 288 /* convert time value referenced to the TimeReference in the given unit to UNIX time */ 264 289 time_t TimeRef (double value, time_t TimeReference, int TimeFormat) { -
trunk/Ohana/src/libdvo/src/dbExtractAverages.c
r39462 r39521 165 165 break; 166 166 case AVE_TRANGE: 167 value.Flt = Time Value (average[0].Trange, 0, TimeFormat);167 value.Flt = TimeRange (average[0].Trange, TimeFormat); 168 168 break; 169 169 -
trunk/Ohana/src/libdvo/src/dbExtractMeasures.c
r39269 r39521 411 411 break; 412 412 case MEAS_TMEAN: /* OK */ 413 value.Flt = Time Value (average[0].Tmean, TimeReference, TimeFormat);413 value.Flt = TimeRange (average[0].Trange, TimeFormat); 414 414 break; 415 415 case MEAS_TRANGE: /* OK */
Note:
See TracChangeset
for help on using the changeset viewer.
