/*++++++++++++++ .IDENTIFICATION nomad1def.h .LANGUAGE C .AUTHOR Francois Ochsenbein [CDS] .ENVIRONMENT NOMAD catalog .VERSION 1.0 03-Aug-2006 .COMMENTS Structures & Definitions concerning the NOMAD-1.0 Catalog only for internal usage. The compacted record is made 0f 7 bytes = 56 bits with Field_index (3) GSC/ACT(1) Q(1) RA(11) SD(22) MB(9) MR(9) The first line of the file may be NOMAD-1.0(25) omag=5000mmag U= 80 chunks NOMAD-1.0(26) omag=5000mmag U=... near the poles (a single chunck) Data for 1 star are compressed in -- a fixed part of 25 or 26 bytes -- a variable part of 0 to 20 bytes containing UCAC2, Tycho, and the 6 magnitudes. ----------------- Elem = 8 bits (UCAC2 Tycho Magnitudes) RA = 24 bits (31 near the poles) -- unit=1mas sRA = 10 bits epRA = 10 bits (0.1yr since 1901) SPD = 20 bits -- unit=1mas (1 bit unused) sSD = 10 bits epSD = 10 bits (0.1yr since 1901) pmRA = 14 bits -- unit=0.1mas/yr, offset=-7500 (i.e. 0.75arcsec/yr) pmSD = 14 bits -- unit=0.1mas/yr, offset=-7500 (i.e. 0.75arcsec/yr) e_pmRA = 13 bits e_pmSD = 13 bits status = 30 bits ----------------- The exact byte location are (25-byte length): +00 = 0x80=UCAC2 0x40=Tycho-2 0x20=B 0x10=V 8=R 4=J 2=H 1=K +01 = USNO-B1 (24b) 2b=+/-1 zone, 22bit pour Numero. +04 = RA (24 or 32 bits) +07.0 = sRA (10b) +08.2 = epRA (10b) +09.5 = SD (19b) +12.0 = sSD (10b) +13.2 = epSD (10b) +14.4 = pmRA (14b) +16.2 = pmSD (14b) +18.0 = spma (13b) +19.5 = spmd (13b) +21.2 = Nomad Status Word (table 1) +22 = Nomad Status Word +23 = Nomad Status Word 0x80 = 2MASS, 0x40=YB6 +24 = Nomad Status Word +25.. = UCAC2 (4 bytes) +... = Tycho-2 1+14+14+3 bits. Top 1 bits = 1 for distance Tycho2 > 1" Last 3 bits == 0 Tycho number could not be interpreted +... = Bmag+5000 (2bytes) +23 = Vmag+5000 (2bytes) +25 = Rmag+5000 (2bytes) +27 = Jmag+5000 (2bytes) +29 = Hmag+5000 (2bytes) +31 = Kmag+5000 (2bytes) The header consists in: 1) an ascii line NOMAD-1.0(25) file xxxxxxxxxx-xxxxxxxxxx pm=-10000 NOMAD-1.0(26) file xxxxxxxxxx-xxxxxxxxxx pm=-10000 made of a multiple of 4 bytes 2) An index table of 80*2 (FileLocation, ID) offsets in the case of NOMAD-1.0(35) only Data are then grouped in chunks corresponding to 2**24mas i.e. about 5degrees -- a single chunck in the case of NOMAD-1.0(36). A chunk is made of the following: a) A header of variable length containing: -24 (char24) : Chunk#xx xxxxxxx-xxxxxxx +00 (int4) : Oa = length of preface = offset of accelerator +04 (3*int4) : values id_min RA_min SD_min +16 (3*int4) : values id_max RA_max SD_max +28 (int2) : N2 = number of short 'extras' +30 (int2) : N4 = number of long 'extras' +32 (N4*int4): list of long 'extras' +.. (N2*int2): list of short 'extras' b) +Oa (3N*int4): Accelerator, a list of 3N values containing (offset, id, ra) and a last+1 with a zero offset. c) The variable-length record. Table 1: NOMAD status word: -------- hex code = flag name and explanation --------------------------------------- 0x00000001 = Astrometry source bit 0 0x00000002 = Astrometry source bit 1 0x00000004 = Astrometry source bit 2 0x00000008 = Blue photometry source bit 0 0x00000010 = Blue photometry source bit 1 0x00000020 = Blue photometry source bit 2 0x00000040 = Visual photometry source bit 0 0x00000080 = Visual photometry source bit 1 0x00000100 = Visual photometry source bit 2 0x00000200 = Red photometry source bit 0 0x00000400 = Red photometry source bit 1 0x00000800 = Red photometry source bit 2 Where the sum of each of the 3 bit sets indicates the catalogue which was the source of the information, and the values decode as: 1 = USNOB 2 = 2MASS 3 = YB6 4 = UCAC2 5 = TYCHO2 6 = HIPPARCOS Other bits are the shifted (12) values of NOMAD_xxx bits (see nomad1.h) --------------- */ #ifndef NOMAD1DEF_def #define NOMAD1DEF_def 0 #ifndef _ARG #ifdef __STDC__ #define _ARG(A) A /* ANSI */ #else #define _ARG(A) () /* non-ANSI */ #define const #endif #endif /* Verify 64-bit machine */ #ifndef int4 #define int4 int #endif /* int4 */ #define Dstep 360000 /* Declination step in mas (0.1deg) */ #define Astep (1<<24) /* RA step in mas between chunks */ #define Dacc 500 /* Interval in Accelerator */ #define MASK(b) ((1<<(b))-1) /*=========================================================================== Structures *===========================================================================*/ static char header_text[] = "\ NOMAD-1.0(%d) %s %07d-%07d pm=%+d mag=%+d Ep=%+05d xtra=%d,%d\ UCAC2=%d(%07d/%07d) Tyc2=%d"; static char chunk_text[] = "\ Chunk#%02d %07d-%07d"; #define Lheader 160 /* Size of header line */ #define Nchunks 80 /* Number of Chunks */ #define NOMAD1reclen 25 /* 'Standard' length */ /* Values of Offsets stored for the values with 'extra' */ #define Opm - 7500 #define Omag -10000 #define Oep 19010 /* Limits for Extras values */ #define EXTRA_10_2 1000 #define EXTRA_10_4 1020 #define EXTRA_13_2 7000 #define EXTRA_13_4 8024 #define EXTRA_14_2 15000 #define EXTRA_14_4 16024 typedef struct { int len ; /* Length of Chunk */ int pos, id; /* Current identifier */ int ppos; /* pos of preceding rec */ int RAz; /* 0 .. 77, leftmost RA */ int4 id0, ra0, sd0, id1, ra1, sd1 ; short ntra2, ntra4; /* How many extra's */ short *xtra2; /* Address of extra2 */ int4 *xtra4; /* Addresses of extra4 */ int4 *index; /* Index of (o,ID,RA) */ int4 *endex; /* End of above array */ } CHUNK; /*=========================================================================== Prototypes Declarations *===========================================================================*/ #endif