from astropy import constants as const
help(const)
Help on package astropy.constants in astropy: NAME astropy.constants DESCRIPTION Contains astronomical and physical constants for use in Astropy or other places. A typical use case might be:: >>> from astropy.constants import c, m_e >>> # ... define the mass of something you want the rest energy of as m ... >>> m = m_e >>> E = m * c**2 >>> E.to('MeV') # doctest: +FLOAT_CMP <Quantity 0.510998927603161 MeV> The following constants are available: ========== ============== ================ ========================= Name Value Unit Description ========== ============== ================ ========================= G 6.6743e-11 m3 / (kg s2) Gravitational constant N_A 6.02214076e+23 1 / (mol) Avogadro's number R 8.31446262 J / (K mol) Gas constant Ryd 10973731.6 1 / (m) Rydberg constant a0 5.29177211e-11 m Bohr radius alpha 0.00729735257 Fine-structure constant atm 101325 Pa Standard atmosphere b_wien 0.00289777196 m K Wien wavelength displacement law constant c 299792458 m / (s) Speed of light in vacuum e 1.60217663e-19 C Electron charge eps0 8.85418781e-12 F/m Vacuum electric permittivity g0 9.80665 m / s2 Standard acceleration of gravity h 6.62607015e-34 J s Planck constant hbar 1.05457182e-34 J s Reduced Planck constant k_B 1.380649e-23 J / (K) Boltzmann constant m_e 9.1093837e-31 kg Electron mass m_n 1.6749275e-27 kg Neutron mass m_p 1.67262192e-27 kg Proton mass mu0 1.25663706e-06 N/A2 Vacuum magnetic permeability muB 9.27401008e-24 J/T Bohr magneton sigma_T 6.65245873e-29 m2 Thomson scattering cross-section sigma_sb 5.67037442e-08 W / (K4 m2) Stefan-Boltzmann constant u 1.66053907e-27 kg Atomic mass GM_earth 3.986004e+14 m3 / (s2) Nominal Earth mass parameter GM_jup 1.2668653e+17 m3 / (s2) Nominal Jupiter mass parameter GM_sun 1.3271244e+20 m3 / (s2) Nominal solar mass parameter L_bol0 3.0128e+28 W Luminosity for absolute bolometric magnitude 0 L_sun 3.828e+26 W Nominal solar luminosity M_earth 5.97216787e+24 kg Earth mass M_jup 1.8981246e+27 kg Jupiter mass M_sun 1.98840987e+30 kg Solar mass R_earth 6378100 m Nominal Earth equatorial radius R_jup 71492000 m Nominal Jupiter equatorial radius R_sun 695700000 m Nominal solar radius au 1.49597871e+11 m Astronomical Unit kpc 3.08567758e+19 m Kiloparsec pc 3.08567758e+16 m Parsec ========== ============== ================ ========================= PACKAGE CONTENTS astropyconst13 astropyconst20 astropyconst40 cgs codata2010 codata2014 codata2018 config constant iau2012 iau2015 si tests (package) utils SUBMODULES codata iaudata FUNCTIONS set_enabled_constants(modname) .. deprecated:: 4.0 The set_enabled_constants function is deprecated and may be removed in a future version. Use Use 'astropy.physical_constants' and 'astropy.astronomical_constants' instead. Context manager to temporarily set values in the ``constants`` namespace to an older version. See :ref:`astropy-constants-prior` for usage. Parameters ---------- modname : {'astropyconst13', 'astropyconst20'} Name of the module containing an older version. DATA G = <<class 'astropy.constants.codata2018.CODATA2018...e-15 unit='m3 /... GM_earth = <<class 'astropy.constants.iau2015.IAU2015'> nam...it='m3 /... GM_jup = <<class 'astropy.constants.iau2015.IAU2015'> nam...it='m3 / s... GM_sun = <<class 'astropy.constants.iau2015.IAU2015'> nam...it='m3 / s... L_bol0 = <<class 'astropy.constants.iau2015.IAU2015'> nam...0.0 unit='... L_sun = <<class 'astropy.constants.iau2015.IAU2015'> nam...0.0 unit='W... M_earth = <<class 'astropy.constants.iau2015.IAU2015'> nam...eference=... M_jup = <<class 'astropy.constants.iau2015.IAU2015'> nam...eference='I... M_sun = <<class 'astropy.constants.iau2015.IAU2015'> nam...eference='I... N_A = <<class 'astropy.constants.codata2018.CODATA2018...ainty=0.0 uni... R = <<class 'astropy.constants.codata2018.CODATA2018...y=0.0 unit='J /... R_earth = <<class 'astropy.constants.iau2015.IAU2015'> nam...0.0 unit=... R_jup = <<class 'astropy.constants.iau2015.IAU2015'> nam...0.0 unit='m... R_sun = <<class 'astropy.constants.iau2015.IAU2015'> nam...0.0 unit='m... Ryd = <<class 'astropy.constants.codata2018.CODATA2018...nty=2.1e-05 u... a0 = <<class 'astropy.constants.codata2018.CODATA2018...certainty=8e-2... alpha = <<class 'astropy.constants.codata2018.CODATA2018...ertainty=1.... atm = <<class 'astropy.constants.codata2018.CODATA2018...ncertainty=0.... au = <<class 'astropy.constants.iau2015.IAU2015'> nam...=0.0 unit='m' ... b_wien = <<class 'astropy.constants.codata2018.CODATA2018...certainty=... c = <<class 'astropy.constants.codata2018.CODATA2018...rtainty=0.0 uni... e = <<class 'astropy.constants.codata2018.EMCODATA20...uncertainty=0.0... eps0 = <<class 'astropy.constants.codata2018.EMCODATA20...nty=1.3e-21 ... g0 = <<class 'astropy.constants.codata2018.CODATA2018...tainty=0.0 uni... h = <<class 'astropy.constants.codata2018.CODATA2018...certainty=0.0 u... hbar = <<class 'astropy.constants.codata2018.CODATA2018...certainty=0.... k_B = <<class 'astropy.constants.codata2018.CODATA2018...rtainty=0.0 u... kpc = <<class 'astropy.constants.iau2015.IAU2015'> nam...ived from au ... m_e = <<class 'astropy.constants.codata2018.CODATA2018...tainty=2.8e-4... m_n = <<class 'astropy.constants.codata2018.CODATA2018...tainty=9.5e-3... m_p = <<class 'astropy.constants.codata2018.CODATA2018...tainty=5.1e-3... mu0 = <<class 'astropy.constants.codata2018.CODATA2018...ty=1.9e-16 un... muB = <<class 'astropy.constants.codata2018.CODATA2018...nty=2.8e-33 u... pc = <<class 'astropy.constants.iau2015.IAU2015'> nam...ived from au +... sigma_T = <<class 'astropy.constants.codata2018.CODATA2018...ertainty=... sigma_sb = <<class 'astropy.constants.codata2018.CODATA2018...y=0.0 un... u = <<class 'astropy.constants.codata2018.CODATA2018...ertainty=5e-37 ... FILE /usr/local/lib/python3.9/site-packages/astropy/constants/__init__.py
print(const.c)
Name = Speed of light in vacuum Value = 299792458.0 Uncertainty = 0.0 Unit = m / s Reference = CODATA 2018
print(const.c.to('km/s'))
299792.458 km / s
from astropy import units as u
F = (const.G * 3. * const.M_sun * 100 * u.kg) / (2.2 * u.au) ** 2
print(F.to(u.N))
0.3675671602160826 N
m = const.m_e
E = m * const.c**2
E
E.to('MeV')
from astropy import units as u
15.1 * u.meter / (32.0 * u.second)
x = 1.0 * u.parsec
x
x.to(u.km)
ly = 1.0 * u.lyr
ly
ly.to(u.au)
ly.to(u.parsec)
ly.to(u.km)
yellow = 580 * u.nm
yellow.to(u.terahertz, equivalencies=u.spectral())
from astropy.nddata import NDData
from astropy.nddata import CCDData
import numpy as np
x = CCDData([[1,2,3], [4,5,6]], unit='adu')
np.asarray(x)
from matplotlib import pyplot as plt
plt.imshow(x)
<matplotlib.image.AxesImage at 0x164f5c370>
from astropy.table import Table
hip = Table.read('data/hipparcos/hip_main.dat', readme='data/hipparcos/ReadMe',format='ascii.cds')
hip
Catalog | HIP | Proxy | RAhms | DEdms | Vmag | VarFlag | r_Vmag | RAdeg | DEdeg | AstroRef | Plx | pmRA | pmDE | e_RAdeg | e_DEdeg | e_Plx | e_pmRA | e_pmDE | DE:RA | Plx:RA | Plx:DE | pmRA:RA | pmRA:DE | pmRA:Plx | pmDE:RA | pmDE:DE | pmDE:Plx | pmDE:pmRA | F1 | F2 | --- | BTmag | e_BTmag | VTmag | e_VTmag | m_BTmag | B-V | e_B-V | r_B-V | V-I | e_V-I | r_V-I | CombMag | Hpmag | e_Hpmag | Hpscat | o_Hpmag | m_Hpmag | Hpmax | HPmin | Period | HvarType | moreVar | morePhoto | CCDM | n_CCDM | Nsys | Ncomp | MultFlag | Source | Qual | m_HIP | theta | rho | e_rho | dHp | e_dHp | Survey | Chart | Notes | HD | BD | CoD | CPD | (V-I)red | SpType | r_SpType |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mag | deg | deg | mas | mas / yr | mas / yr | mas | mas | mas | mas / yr | mas / yr | % | mag | mag | mag | mag | mag | mag | mag | mag | mag | mag | mag | mag | mag | d | deg | arcsec | arcsec | mag | mag | mag | ||||||||||||||||||||||||||||||||||||||||||||||
str1 | int64 | str1 | str11 | str11 | float64 | int64 | str1 | float64 | float64 | str1 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | int64 | float64 | int64 | float64 | float64 | float64 | float64 | str1 | float64 | float64 | str1 | float64 | float64 | str1 | str1 | float64 | float64 | float64 | int64 | str1 | float64 | float64 | float64 | str1 | str1 | str1 | str10 | str1 | int64 | int64 | str1 | str1 | str1 | str2 | int64 | float64 | float64 | float64 | float64 | str1 | str1 | str1 | int64 | str10 | str10 | str10 | float64 | str12 | str1 |
H | 1 | -- | 00 00 00.22 | +01 05 20.4 | 9.1 | -- | H | 0.00091185 | 1.08901332 | -- | 3.54 | -5.2 | -1.88 | 1.32 | 0.74 | 1.39 | 1.36 | 0.81 | 0.32 | -0.07 | -0.11 | -0.24 | 0.09 | -0.01 | 0.1 | -0.01 | 0.01 | 0.34 | 0 | 0.74 | 1 | 9.643 | 0.02 | 9.13 | 0.019 | -- | 0.482 | 0.025 | T | 0.55 | 0.03 | L | -- | 9.2043 | 0.002 | 0.017 | 87 | -- | 9.17 | 9.24 | -- | -- | -- | -- | -- | -- | -- | 1 | -- | -- | -- | -- | -- | -- | -- | -- | -- | S | -- | -- | 224700 | B+00 5077 | -- | -- | 0.66 | F5 | S |
H | 2 | -- | 00 00 00.91 | -19 29 55.8 | 9.27 | -- | G | 0.00379737 | -19.49883745 | + | 21.9 | 181.21 | -0.93 | 1.28 | 0.7 | 3.1 | 1.74 | 0.92 | 0.12 | -0.14 | -0.24 | -0.29 | 0.01 | 0.21 | -0.02 | -0.19 | -0.28 | 0.14 | 2 | 1.45 | 2 | 10.519 | 0.033 | 9.378 | 0.021 | -- | 0.999 | 0.002 | G | 1.04 | 0.0 | I | -- | 9.4017 | 0.0017 | 0.015 | 120 | -- | 9.37 | 9.44 | -- | C | -- | -- | -- | -- | -- | 1 | O | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | 224690 | B-20 6688 | -- | -- | 1.04 | K3V | 4 |
H | 3 | -- | 00 00 01.20 | +38 51 33.4 | 6.61 | -- | G | 0.00500795 | 38.85928608 | -- | 2.81 | 5.24 | -2.91 | 0.53 | 0.4 | 0.63 | 0.57 | 0.47 | 0.06 | 0.09 | 0.04 | 0.43 | -0.01 | -0.06 | 0.03 | 0.24 | 0.07 | 0.21 | 0 | -0.45 | 3 | 6.576 | 0.004 | 6.621 | 0.005 | -- | -0.019 | 0.004 | G | 0.0 | 0.0 | H | -- | 6.6081 | 0.0007 | 0.008 | 127 | -- | 6.6 | 6.62 | -- | C | -- | -- | 00000+3852 | I | 1 | 1 | -- | -- | -- | -- | -- | -- | -- | -- | -- | S | -- | -- | 224699 | B+38 5108 | -- | -- | 0.0 | B9 | S |
H | 4 | -- | 00 00 02.01 | -51 53 36.8 | 8.06 | -- | H | 0.0083817 | -51.89354612 | -- | 7.75 | 62.85 | 0.16 | 0.53 | 0.59 | 0.97 | 0.65 | 0.65 | -0.22 | -0.09 | -0.03 | 0.24 | 0.2 | 0.08 | 0.18 | 0.08 | -0.31 | -0.18 | 0 | -1.46 | 4 | 8.471 | 0.007 | 8.092 | 0.007 | -- | 0.37 | 0.009 | T | 0.43 | 0.01 | L | -- | 8.1498 | 0.0011 | 0.015 | 201 | -- | 8.12 | 8.18 | -- | -- | -- | -- | -- | -- | -- | 1 | -- | -- | -- | -- | -- | -- | -- | -- | -- | S | -- | -- | 224707 | -- | -- | P-52 12237 | 0.43 | F0V | 2 |
H | 5 | -- | 00 00 02.39 | -40 35 28.4 | 8.55 | -- | H | 0.00996534 | -40.5912244 | -- | 2.87 | 2.53 | 9.07 | 0.64 | 0.61 | 1.11 | 0.67 | 0.74 | 0.1 | 0.24 | 0.06 | 0.26 | -0.1 | 0.2 | -0.16 | -0.3 | -0.19 | 0.06 | 0 | -1.24 | 5 | 9.693 | 0.014 | 8.656 | 0.01 | -- | 0.902 | 0.013 | T | 0.9 | 0.01 | L | -- | 8.7077 | 0.0018 | 0.019 | 161 | -- | 8.68 | 8.74 | -- | -- | -- | -- | -- | -- | -- | 1 | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | 224705 | -- | C-41 15372 | P-41 9991 | 0.95 | G8III | 2 |
H | 6 | -- | 00 00 04.35 | +03 56 47.4 | 12.31 | -- | G | 0.01814144 | 3.94648893 | -- | 18.8 | 226.29 | -12.84 | 4.03 | 2.18 | 4.99 | 6.15 | 3.2 | 0.35 | -0.01 | 0.03 | -0.11 | -0.02 | 0.47 | -0.02 | 0.03 | 0.31 | 0.35 | 4 | 2.95 | 6 | -- | -- | -- | -- | -- | 1.336 | 0.02 | G | 1.55 | 0.03 | I | -- | 12.4488 | 0.0085 | 0.091 | 87 | -- | 12.3 | 12.6 | -- | -- | -- | -- | -- | -- | -- | 1 | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | G | -- | -- | -- | -- | -- | 1.55 | M0V: | S |
H | 7 | -- | 00 00 05.41 | +20 02 11.8 | 9.64 | -- | G | 0.02254891 | 20.03660216 | -- | 17.74 | -208.12 | -200.79 | 1.01 | 0.79 | 1.3 | 1.13 | 0.82 | 0.32 | 0.08 | -0.02 | -0.04 | 0.12 | 0.06 | 0.11 | 0.0 | 0.16 | 0.43 | 0 | 0.21 | 7 | 10.542 | 0.039 | 9.679 | 0.03 | -- | 0.74 | 0.02 | G | 0.79 | 0.02 | H | -- | 9.6795 | 0.0021 | 0.017 | 104 | -- | 9.65 | 9.72 | -- | C | -- | -- | -- | -- | -- | 1 | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | B+19 5185 | -- | -- | 0.79 | G0 | S |
H | 8 | -- | 00 00 06.55 | +25 53 11.3 | 9.05 | 3 | H | 0.0272916 | 25.88647445 | -- | 5.17 | 19.09 | -5.66 | 1.7 | 0.93 | 1.95 | 1.54 | 0.88 | 0.27 | -0.66 | -0.36 | -0.38 | -0.12 | 0.36 | -0.21 | -0.24 | 0.32 | 0.18 | 0 | 0.98 | 8 | 10.433 | 0.055 | 9.151 | 0.029 | -- | 1.102 | 0.051 | T | 3.92 | 0.39 | O | -- | 8.5522 | 0.1671 | 1.46 | 77 | -- | 7.15 | 11.25 | 327.5 | P | 1 | B | -- | -- | -- | 1 | -- | -- | S | -- | -- | -- | -- | -- | -- | -- | G | P | 224709 | B+25 5054 | -- | -- | 4.82 | M6e-M8.5e Tc | G |
H | 9 | -- | 00 00 08.48 | +36 35 09.4 | 8.59 | -- | H | 0.03534189 | 36.58593777 | -- | 4.81 | -6.3 | 8.42 | 0.86 | 0.55 | 0.99 | 1.02 | 0.65 | 0.03 | 0.16 | -0.01 | 0.0 | 0.07 | -0.02 | 0.08 | 0.04 | 0.1 | 0.13 | 3 | -1.26 | 9 | 9.962 | 0.025 | 8.711 | 0.015 | -- | 1.067 | 0.023 | T | 1.03 | 0.02 | L | -- | 8.7534 | 0.0018 | 0.014 | 107 | -- | 8.73 | 8.78 | -- | C | -- | -- | -- | -- | -- | 1 | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | 224708 | B+35 5149 | -- | -- | 1.0 | G5 | S |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
H | 118313 | -- | 23 59 49.40 | +21 08 59.1 | 8.94 | -- | H | 359.95581726 | 21.14973973 | -- | 2.32 | 0.28 | -15.77 | 0.89 | 0.7 | 1.15 | 0.9 | 0.7 | 0.28 | 0.21 | 0.03 | 0.02 | -0.03 | 0.06 | 0.03 | -0.25 | 0.3 | 0.27 | 0 | 1.21 | 118313 | 9.4 | 0.019 | 8.989 | 0.019 | -- | 0.423 | 0.015 | G | 0.49 | 0.02 | H | -- | 9.0336 | 0.0021 | 0.013 | 92 | -- | 9.01 | 9.06 | -- | C | -- | -- | -- | -- | -- | 1 | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | 224671 | B+20 5413 | -- | -- | 0.49 | F0 | S |
H | 118314 | -- | 23 59 49.64 | -37 51 28.6 | 9.27 | -- | H | 359.9568242 | -37.85795617 | -- | 0.93 | -6.6 | -4.6 | 1.03 | 0.76 | 1.32 | 1.35 | 0.85 | 0.11 | -0.1 | -0.05 | -0.21 | -0.03 | 0.23 | -0.06 | -0.38 | 0.0 | -0.13 | 0 | 0.26 | 118314 | 10.731 | 0.034 | 9.378 | 0.018 | -- | 1.147 | 0.03 | T | 1.11 | 0.03 | L | -- | 9.435 | 0.002 | 0.022 | 148 | -- | 9.38 | 9.47 | -- | C | -- | -- | -- | -- | -- | 1 | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | C-38 15704 | P-38 8593 | 1.03 | K0 | S |
H | 118315 | -- | 23 59 50.18 | -18 30 26.2 | 8.47 | -- | H | 359.95908083 | -18.5072878 | -- | 3.0 | 6.81 | -1.29 | 1.0 | 0.64 | 1.13 | 1.72 | 0.61 | 0.16 | -0.01 | -0.14 | -0.01 | 0.04 | 0.18 | -0.05 | -0.38 | 0.1 | -0.1 | 0 | -1.69 | 118315 | 9.741 | 0.02 | 8.561 | 0.013 | -- | 1.011 | 0.019 | T | 0.99 | 0.01 | L | -- | 8.6313 | 0.0017 | 0.014 | 109 | -- | 8.6 | 8.66 | -- | -- | -- | -- | -- | -- | -- | 1 | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | 224680 | B-19 6553 | -- | -- | 0.99 | K0III | 4 |
H | 118316 | -- | 23 59 50.62 | +32 32 13.0 | 9.51 | -- | H | 359.96089863 | 32.53693255 | -- | 3.1 | 40.44 | -1.43 | 1.01 | 0.69 | 1.14 | 1.14 | 0.71 | 0.02 | 0.11 | -0.09 | 0.36 | 0.01 | -0.12 | 0.04 | 0.0 | 0.17 | 0.08 | 3 | -0.45 | 118316 | 10.039 | 0.024 | 9.541 | 0.024 | -- | 0.468 | 0.031 | T | 0.54 | 0.03 | L | -- | 9.6177 | 0.0024 | 0.017 | 105 | -- | 9.6 | 9.65 | -- | -- | -- | -- | -- | -- | -- | 1 | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | B+31 5014 | -- | -- | 0.45 | F2 | S |
H | 118317 | -- | 23 59 50.81 | -36 25 10.1 | 10.01 | -- | H | 359.9617006 | -36.4194809 | -- | 3.42 | 31.41 | -5.41 | 1.2 | 0.74 | 1.55 | 1.51 | 0.95 | -0.01 | 0.04 | -0.04 | -0.33 | 0.1 | 0.14 | 0.12 | -0.3 | 0.14 | -0.09 | 0 | 1.64 | 118317 | 10.615 | 0.03 | 10.027 | 0.029 | -- | 0.549 | 0.037 | T | 0.62 | 0.03 | L | -- | 10.133 | 0.003 | 0.029 | 156 | -- | 10.08 | 10.18 | -- | -- | -- | -- | -- | -- | -- | 1 | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | C-37 15450 | P-37 9430 | 0.65 | F8 | S |
H | 118318 | -- | 23 59 51.30 | +11 40 25.4 | 6.99 | 1 | H | 359.96374383 | 11.67370866 | -- | 1.92 | -2.16 | 2.09 | 0.78 | 0.5 | 0.91 | 0.88 | 0.6 | 0.33 | -0.02 | -0.09 | -0.19 | -0.03 | 0.21 | -0.02 | -0.11 | 0.27 | 0.49 | 0 | 2.0 | 118318 | 9.107 | 0.015 | 7.186 | 0.007 | -- | 1.595 | 0.013 | T | 1.61 | 0.01 | L | -- | 7.1043 | 0.0018 | 0.014 | 92 | -- | 7.08 | 7.12 | -- | M | -- | -- | -- | -- | -- | 1 | -- | -- | -- | -- | -- | -- | -- | -- | -- | S | -- | -- | 224673 | B+10 5018 | -- | -- | 1.56 | K2 | S |
H | 118319 | -- | 23 59 53.74 | -22 25 41.4 | 8.23 | -- | G | 359.97391252 | -22.4281803 | -- | 10.63 | 148.74 | 27.53 | 0.97 | 0.58 | 1.17 | 1.1 | 0.52 | 0.04 | 0.17 | 0.04 | -0.11 | 0.1 | 0.17 | 0.07 | -0.31 | 0.12 | -0.05 | 0 | 1.19 | 118319 | 9.019 | 0.013 | 8.295 | 0.011 | -- | 0.639 | 0.015 | G | 0.7 | 0.01 | H | -- | 8.3699 | 0.0014 | 0.016 | 118 | -- | 8.34 | 8.39 | -- | C | -- | -- | -- | -- | -- | 1 | -- | -- | -- | -- | -- | -- | -- | -- | -- | S | -- | -- | 224693 | -- | C-23 18108 | P-23 8366 | 0.7 | G2V | 4 |
H | 118320 | -- | 23 59 54.25 | +05 57 23.9 | 7.59 | -- | H | 359.97605747 | 5.95663786 | -- | 5.0 | 20.92 | -35.26 | 0.95 | 0.53 | 1.01 | 0.89 | 0.54 | 0.21 | 0.0 | -0.05 | -0.18 | 0.01 | -0.04 | 0.01 | -0.14 | 0.22 | 0.27 | 4 | -1.12 | 118320 | 8.868 | 0.013 | 7.704 | 0.009 | -- | 0.999 | 0.012 | T | 0.98 | 0.01 | L | -- | 7.7604 | 0.001 | 0.01 | 86 | -- | 7.74 | 7.77 | -- | C | -- | -- | -- | -- | -- | 1 | -- | -- | -- | -- | -- | -- | -- | -- | -- | S | -- | -- | 224689 | B+05 5245 | -- | -- | 0.98 | K0 | S |
H | 118321 | -- | 23 59 54.78 | -64 22 21.3 | 9.2 | -- | G | 359.97823891 | -64.3725722 | -- | 19.22 | 216.99 | 106.46 | 0.74 | 0.76 | 1.0 | 0.84 | 0.81 | 0.01 | -0.07 | -0.24 | -0.03 | 0.15 | -0.04 | 0.15 | 0.01 | -0.14 | 0.12 | 0 | 0.05 | 118321 | 10.077 | 0.031 | 9.318 | 0.026 | -- | 0.698 | 0.003 | G | 0.75 | 0.0 | H | -- | 9.3312 | 0.0019 | 0.022 | 145 | -- | 9.28 | 9.36 | -- | -- | -- | -- | -- | -- | -- | 1 | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | 224685 | -- | C-65 2958 | P-65 4188 | 0.75 | G5V | 1 |
H | 118322 | -- | 23 59 54.91 | -65 34 37.5 | 4.49 | -- | H | 359.97879195 | -65.57707774 | -- | 8.71 | 48.63 | -22.33 | 0.44 | 0.42 | 0.57 | 0.48 | 0.47 | 0.03 | -0.12 | -0.18 | -0.17 | 0.02 | 0.17 | 0.07 | -0.12 | -0.08 | 0.22 | 0 | -1.72 | 118322 | 4.396 | 0.002 | 4.482 | 0.002 | -- | -0.075 | 0.011 | G | -0.04 | 0.02 | A | -- | 4.4758 | 0.0003 | 0.004 | 136 | -- | 4.47 | 4.48 | -- | -- | -- | -- | -- | -- | -- | 1 | -- | -- | -- | -- | -- | -- | -- | -- | -- | S | -- | -- | 224686 | -- | -- | P-66 3819 | -0.04 | B9IV | X |
hip.write('data/hip.fits', overwrite=True)
WARNING: table contains column(s) with defined 'format', 'description', or 'meta' info attributes. These will be dropped unless you install PyYAML. [astropy.io.fits.connect] WARNING: VerifyWarning: It is strongly recommended that column names contain only upper and lower-case ASCII letters, digits, or underscores for maximum compatibility with other software (got '---'). [astropy.io.fits.column] WARNING: VerifyWarning: It is strongly recommended that column names contain only upper and lower-case ASCII letters, digits, or underscores for maximum compatibility with other software (got '(V-I)red'). [astropy.io.fits.column]
!fitsheader data/hip.fits
# HDU 0 in data/hip.fits: SIMPLE = T / conforms to FITS standard BITPIX = 8 / array data type NAXIS = 0 / number of array dimensions EXTEND = T # HDU 1 in data/hip.fits: XTENSION= 'BINTABLE' / binary table extension BITPIX = 8 / array data type NAXIS = 2 / number of array dimensions NAXIS1 = 496 / length of dimension 1 NAXIS2 = 118218 / length of dimension 2 PCOUNT = 0 / number of group parameters GCOUNT = 1 / number of groups TFIELDS = 78 / number of table fields TTYPE1 = 'Catalog ' TFORM1 = '1A ' TTYPE2 = 'HIP ' TFORM2 = 'K ' TTYPE3 = 'Proxy ' TFORM3 = '1A ' TTYPE4 = 'RAhms ' TFORM4 = '11A ' TTYPE5 = 'DEdms ' TFORM5 = '11A ' TTYPE6 = 'Vmag ' TFORM6 = 'D ' TUNIT6 = 'mag ' TTYPE7 = 'VarFlag ' TFORM7 = 'K ' TTYPE8 = 'r_Vmag ' TFORM8 = '1A ' TTYPE9 = 'RAdeg ' TFORM9 = 'D ' TUNIT9 = 'deg ' TTYPE10 = 'DEdeg ' TFORM10 = 'D ' TUNIT10 = 'deg ' TTYPE11 = 'AstroRef' TFORM11 = '1A ' TTYPE12 = 'Plx ' TFORM12 = 'D ' TUNIT12 = 'mas ' TTYPE13 = 'pmRA ' TFORM13 = 'D ' TUNIT13 = 'mas yr-1' TTYPE14 = 'pmDE ' TFORM14 = 'D ' TUNIT14 = 'mas yr-1' TTYPE15 = 'e_RAdeg ' TFORM15 = 'D ' TUNIT15 = 'mas ' TTYPE16 = 'e_DEdeg ' TFORM16 = 'D ' TUNIT16 = 'mas ' TTYPE17 = 'e_Plx ' TFORM17 = 'D ' TUNIT17 = 'mas ' TTYPE18 = 'e_pmRA ' TFORM18 = 'D ' TUNIT18 = 'mas yr-1' TTYPE19 = 'e_pmDE ' TFORM19 = 'D ' TUNIT19 = 'mas yr-1' TTYPE20 = 'DE:RA ' TFORM20 = 'D ' TTYPE21 = 'Plx:RA ' TFORM21 = 'D ' TTYPE22 = 'Plx:DE ' TFORM22 = 'D ' TTYPE23 = 'pmRA:RA ' TFORM23 = 'D ' TTYPE24 = 'pmRA:DE ' TFORM24 = 'D ' TTYPE25 = 'pmRA:Plx' TFORM25 = 'D ' TTYPE26 = 'pmDE:RA ' TFORM26 = 'D ' TTYPE27 = 'pmDE:DE ' TFORM27 = 'D ' TTYPE28 = 'pmDE:Plx' TFORM28 = 'D ' TTYPE29 = 'pmDE:pmRA' TFORM29 = 'D ' TTYPE30 = 'F1 ' TFORM30 = 'K ' TUNIT30 = '10**-2 ' TTYPE31 = 'F2 ' TFORM31 = 'D ' TTYPE32 = '--- ' TFORM32 = 'K ' TTYPE33 = 'BTmag ' TFORM33 = 'D ' TUNIT33 = 'mag ' TTYPE34 = 'e_BTmag ' TFORM34 = 'D ' TUNIT34 = 'mag ' TTYPE35 = 'VTmag ' TFORM35 = 'D ' TUNIT35 = 'mag ' TTYPE36 = 'e_VTmag ' TFORM36 = 'D ' TUNIT36 = 'mag ' TTYPE37 = 'm_BTmag ' TFORM37 = '1A ' TTYPE38 = 'B-V ' TFORM38 = 'D ' TUNIT38 = 'mag ' TTYPE39 = 'e_B-V ' TFORM39 = 'D ' TUNIT39 = 'mag ' TTYPE40 = 'r_B-V ' TFORM40 = '1A ' TTYPE41 = 'V-I ' TFORM41 = 'D ' TUNIT41 = 'mag ' TTYPE42 = 'e_V-I ' TFORM42 = 'D ' TUNIT42 = 'mag ' TTYPE43 = 'r_V-I ' TFORM43 = '1A ' TTYPE44 = 'CombMag ' TFORM44 = '1A ' TTYPE45 = 'Hpmag ' TFORM45 = 'D ' TUNIT45 = 'mag ' TTYPE46 = 'e_Hpmag ' TFORM46 = 'D ' TUNIT46 = 'mag ' TTYPE47 = 'Hpscat ' TFORM47 = 'D ' TUNIT47 = 'mag ' TTYPE48 = 'o_Hpmag ' TFORM48 = 'K ' TTYPE49 = 'm_Hpmag ' TFORM49 = '1A ' TTYPE50 = 'Hpmax ' TFORM50 = 'D ' TUNIT50 = 'mag ' TTYPE51 = 'HPmin ' TFORM51 = 'D ' TUNIT51 = 'mag ' TTYPE52 = 'Period ' TFORM52 = 'D ' TUNIT52 = 'd ' TTYPE53 = 'HvarType' TFORM53 = '1A ' TTYPE54 = 'moreVar ' TFORM54 = '1A ' TTYPE55 = 'morePhoto' TFORM55 = '1A ' TTYPE56 = 'CCDM ' TFORM56 = '10A ' TTYPE57 = 'n_CCDM ' TFORM57 = '1A ' TTYPE58 = 'Nsys ' TFORM58 = 'K ' TTYPE59 = 'Ncomp ' TFORM59 = 'K ' TTYPE60 = 'MultFlag' TFORM60 = '1A ' TTYPE61 = 'Source ' TFORM61 = '1A ' TTYPE62 = 'Qual ' TFORM62 = '1A ' TTYPE63 = 'm_HIP ' TFORM63 = '2A ' TTYPE64 = 'theta ' TFORM64 = 'K ' TUNIT64 = 'deg ' TTYPE65 = 'rho ' TFORM65 = 'D ' TUNIT65 = 'arcsec ' TTYPE66 = 'e_rho ' TFORM66 = 'D ' TUNIT66 = 'arcsec ' TTYPE67 = 'dHp ' TFORM67 = 'D ' TUNIT67 = 'mag ' TTYPE68 = 'e_dHp ' TFORM68 = 'D ' TUNIT68 = 'mag ' TTYPE69 = 'Survey ' TFORM69 = '1A ' TTYPE70 = 'Chart ' TFORM70 = '1A ' TTYPE71 = 'Notes ' TFORM71 = '1A ' TTYPE72 = 'HD ' TFORM72 = 'K ' TTYPE73 = 'BD ' TFORM73 = '10A ' TTYPE74 = 'CoD ' TFORM74 = '10A ' TTYPE75 = 'CPD ' TFORM75 = '10A ' TTYPE76 = '(V-I)red' TFORM76 = 'D ' TUNIT76 = 'mag ' TTYPE77 = 'SpType ' TFORM77 = '12A ' TTYPE78 = 'r_SpType' TFORM78 = '1A '
from astropy.time import Time
times = ['2020-01-01T00:00:00.123456789', '2021-01-01T00:00:00']
t = Time(times, format='isot', scale='utc')
t
<Time object: scale='utc' format='isot' value=['2020-01-01T00:00:00.123' '2021-01-01T00:00:00.000']>
t[1]
<Time object: scale='utc' format='isot' value=2021-01-01T00:00:00.000>
t2 = Time.now()
t2
<Time object: scale='utc' format='datetime' value=2020-12-08 03:00:29.225255>
t.jd
array([2458849.50000143, 2459215.5 ])
t2.jd
2459191.6253382554
t2.mjd
59191.12533825527
t2.to_value('mjd', 'long')
59191.125338255266204
t.tt
<Time object: scale='tt' format='isot' value=['2020-01-01T00:01:09.307' '2021-01-01T00:01:09.184']>
t2.fits
'2020-12-08T03:00:29.225'
t2.unix
1607396429.225255
t2.ymdhms
(2020, 12, 8, 3, 0, 29.225255)
t2.iso
'2020-12-08 03:00:29.225'
t2.yday
'2020:343:03:00:29.225'
from astropy.coordinates import SkyCoord
from astropy.coordinates import EarthLocation
c = SkyCoord('18 36 56.19 +38 46 58.8', unit=(u.hourangle, u.deg)) # 织女星
c
<SkyCoord (ICRS): (ra, dec) in deg (279.234125, 38.783)>
c.ra
c.dec
c.ra.hms
hms_tuple(h=18.0, m=36.0, s=56.190000000015914)
c.dec.dms
dms_tuple(d=38.0, m=46.0, s=58.8000000000045)
c.ra.deg
279.234125
c.ra.radian
4.873554865175412
c.to_string('hmsdms')
'18h36m56.19s +38d46m58.8s'
c.galactic
<SkyCoord (Galactic): (l, b) in deg (67.44735094, 19.23746579)>
c.cartesian
<CartesianRepresentation (x, y, z) [dimensionless] (0.12508948, -0.76942189, 0.62637255)>
xinglong = EarthLocation(lat='40d23m45.36s', lon='117d34m28.35', height=900*u.m)
xinglong
observing_time = Time('2020-12-09 11:00')
from astropy.coordinates import AltAz
aa = AltAz(location=xinglong, obstime=observing_time)
print(aa)
<AltAz Frame (obstime=2020-12-09 11:00:00.000, location=(-2252027.40020133, 4312396.98322976, 4112149.16146495) m, pressure=0.0 hPa, temperature=0.0 deg_C, relative_humidity=0.0, obswl=1.0 micron)>
c.transform_to(aa)
<SkyCoord (AltAz: obstime=2020-12-09 11:00:00.000, location=(-2252027.40020133, 4312396.98322976, 4112149.16146495) m, pressure=0.0 hPa, temperature=0.0 deg_C, relative_humidity=0.0, obswl=1.0 micron): (az, alt) in deg (297.72329249, 29.37692638)>
delta_hours = np.linspace(0, 8, 100)*u.hour
full_night_times = observing_time + delta_hours
full_night_aa_frames = AltAz(location=xinglong, obstime=full_night_times)
full_night_aa_coos = c.transform_to(full_night_aa_frames)
plt.plot(delta_hours, full_night_aa_coos.alt)
plt.xlabel('Hours from 7pm AZ time')
plt.ylabel('Alt')
plt.tight_layout()
from astropy.io import fits
header = fits.getheader('data/hip.fits',1)
header
data = fits.getdata('data/hip.fits',1)
WARNING: VerifyWarning: It is strongly recommended that column names contain only upper and lower-case ASCII letters, digits, or underscores for maximum compatibility with other software (got '---'). [astropy.io.fits.column] WARNING: VerifyWarning: It is strongly recommended that column names contain only upper and lower-case ASCII letters, digits, or underscores for maximum compatibility with other software (got '(V-I)red'). [astropy.io.fits.column]
data2 = Table.read('data/hip.fits')
WARNING: VerifyWarning: It is strongly recommended that column names contain only upper and lower-case ASCII letters, digits, or underscores for maximum compatibility with other software (got '---'). [astropy.io.fits.column] WARNING: VerifyWarning: It is strongly recommended that column names contain only upper and lower-case ASCII letters, digits, or underscores for maximum compatibility with other software (got '(V-I)red'). [astropy.io.fits.column]
data
FITS_rec([('H', 1, 'N', '00 00 00.22', '+01 05 20.4', 9.1 , 999999, 'H', 9.11850000e-04, 1.08901332, 'N', 3.54, -5.2 , -1.88, 1.32, 0.74, 1.39, 1.36, 0.81, 0.32, -0.07, -0.11, -0.24, 0.09, -0.01, 0.1 , -0.01, 0.01, 0.34, 0, 0.74, 1, 9.643, 0.02 , 9.13 , 0.019, 'N', 0.482, 0.025, 'T', 0.55, 0.03, 'L', 'N', 9.2043, 0.002 , 0.017, 87, 'N', 9.17, 9.24, 1.e+20, 'N', 'N', 'N', 'N/A', 'N', 999999, 1, 'N', 'N', 'N', 'N/', 999999, 1.e+20, 1.e+20, 1.e+20, 1.e+20, 'S', 'N', 'N', 224700, 'B+00 5077', 'N/A', 'N/A', 0.66, 'F5', 'S'), ('H', 2, 'N', '00 00 00.91', '-19 29 55.8', 9.27, 999999, 'G', 3.79737000e-03, -19.49883745, '+', 21.9 , 181.21, -0.93, 1.28, 0.7 , 3.1 , 1.74, 0.92, 0.12, -0.14, -0.24, -0.29, 0.01, 0.21, -0.02, -0.19, -0.28, 0.14, 2, 1.45, 2, 10.519, 0.033, 9.378, 0.021, 'N', 0.999, 0.002, 'G', 1.04, 0. , 'I', 'N', 9.4017, 0.0017, 0.015, 120, 'N', 9.37, 9.44, 1.e+20, 'C', 'N', 'N', 'N/A', 'N', 999999, 1, 'O', 'N', 'N', 'N/', 999999, 1.e+20, 1.e+20, 1.e+20, 1.e+20, 'N', 'N', 'N', 224690, 'B-20 6688', 'N/A', 'N/A', 1.04, 'K3V', '4'), ('H', 3, 'N', '00 00 01.20', '+38 51 33.4', 6.61, 999999, 'G', 5.00795000e-03, 38.85928608, 'N', 2.81, 5.24, -2.91, 0.53, 0.4 , 0.63, 0.57, 0.47, 0.06, 0.09, 0.04, 0.43, -0.01, -0.06, 0.03, 0.24, 0.07, 0.21, 0, -0.45, 3, 6.576, 0.004, 6.621, 0.005, 'N', -0.019, 0.004, 'G', 0. , 0. , 'H', 'N', 6.6081, 0.0007, 0.008, 127, 'N', 6.6 , 6.62, 1.e+20, 'C', 'N', 'N', '00000+3852', 'I', 1, 1, 'N', 'N', 'N', 'N/', 999999, 1.e+20, 1.e+20, 1.e+20, 1.e+20, 'S', 'N', 'N', 224699, 'B+38 5108', 'N/A', 'N/A', 0. , 'B9', 'S'), ..., ('H', 118320, 'N', '23 59 54.25', '+05 57 23.9', 7.59, 999999, 'H', 3.59976057e+02, 5.95663786, 'N', 5. , 20.92, -35.26, 0.95, 0.53, 1.01, 0.89, 0.54, 0.21, 0. , -0.05, -0.18, 0.01, -0.04, 0.01, -0.14, 0.22, 0.27, 4, -1.12, 118320, 8.868, 0.013, 7.704, 0.009, 'N', 0.999, 0.012, 'T', 0.98, 0.01, 'L', 'N', 7.7604, 0.001 , 0.01 , 86, 'N', 7.74, 7.77, 1.e+20, 'C', 'N', 'N', 'N/A', 'N', 999999, 1, 'N', 'N', 'N', 'N/', 999999, 1.e+20, 1.e+20, 1.e+20, 1.e+20, 'S', 'N', 'N', 224689, 'B+05 5245', 'N/A', 'N/A', 0.98, 'K0', 'S'), ('H', 118321, 'N', '23 59 54.78', '-64 22 21.3', 9.2 , 999999, 'G', 3.59978239e+02, -64.3725722 , 'N', 19.22, 216.99, 106.46, 0.74, 0.76, 1. , 0.84, 0.81, 0.01, -0.07, -0.24, -0.03, 0.15, -0.04, 0.15, 0.01, -0.14, 0.12, 0, 0.05, 118321, 10.077, 0.031, 9.318, 0.026, 'N', 0.698, 0.003, 'G', 0.75, 0. , 'H', 'N', 9.3312, 0.0019, 0.022, 145, 'N', 9.28, 9.36, 1.e+20, 'N', 'N', 'N', 'N/A', 'N', 999999, 1, 'N', 'N', 'N', 'N/', 999999, 1.e+20, 1.e+20, 1.e+20, 1.e+20, 'N', 'N', 'N', 224685, 'N/A', 'C-65 2958', 'P-65 4188', 0.75, 'G5V', '1'), ('H', 118322, 'N', '23 59 54.91', '-65 34 37.5', 4.49, 999999, 'H', 3.59978792e+02, -65.57707774, 'N', 8.71, 48.63, -22.33, 0.44, 0.42, 0.57, 0.48, 0.47, 0.03, -0.12, -0.18, -0.17, 0.02, 0.17, 0.07, -0.12, -0.08, 0.22, 0, -1.72, 118322, 4.396, 0.002, 4.482, 0.002, 'N', -0.075, 0.011, 'G', -0.04, 0.02, 'A', 'N', 4.4758, 0.0003, 0.004, 136, 'N', 4.47, 4.48, 1.e+20, 'N', 'N', 'N', 'N/A', 'N', 999999, 1, 'N', 'N', 'N', 'N/', 999999, 1.e+20, 1.e+20, 1.e+20, 1.e+20, 'S', 'N', 'N', 224686, 'N/A', 'N/A', 'P-66 3819', -0.04, 'B9IV', 'X')], dtype=(numpy.record, [('Catalog', 'S1'), ('HIP', '>i8'), ('Proxy', 'S1'), ('RAhms', 'S11'), ('DEdms', 'S11'), ('Vmag', '>f8'), ('VarFlag', '>i8'), ('r_Vmag', 'S1'), ('RAdeg', '>f8'), ('DEdeg', '>f8'), ('AstroRef', 'S1'), ('Plx', '>f8'), ('pmRA', '>f8'), ('pmDE', '>f8'), ('e_RAdeg', '>f8'), ('e_DEdeg', '>f8'), ('e_Plx', '>f8'), ('e_pmRA', '>f8'), ('e_pmDE', '>f8'), ('DE:RA', '>f8'), ('Plx:RA', '>f8'), ('Plx:DE', '>f8'), ('pmRA:RA', '>f8'), ('pmRA:DE', '>f8'), ('pmRA:Plx', '>f8'), ('pmDE:RA', '>f8'), ('pmDE:DE', '>f8'), ('pmDE:Plx', '>f8'), ('pmDE:pmRA', '>f8'), ('F1', '>i8'), ('F2', '>f8'), ('---', '>i8'), ('BTmag', '>f8'), ('e_BTmag', '>f8'), ('VTmag', '>f8'), ('e_VTmag', '>f8'), ('m_BTmag', 'S1'), ('B-V', '>f8'), ('e_B-V', '>f8'), ('r_B-V', 'S1'), ('V-I', '>f8'), ('e_V-I', '>f8'), ('r_V-I', 'S1'), ('CombMag', 'S1'), ('Hpmag', '>f8'), ('e_Hpmag', '>f8'), ('Hpscat', '>f8'), ('o_Hpmag', '>i8'), ('m_Hpmag', 'S1'), ('Hpmax', '>f8'), ('HPmin', '>f8'), ('Period', '>f8'), ('HvarType', 'S1'), ('moreVar', 'S1'), ('morePhoto', 'S1'), ('CCDM', 'S10'), ('n_CCDM', 'S1'), ('Nsys', '>i8'), ('Ncomp', '>i8'), ('MultFlag', 'S1'), ('Source', 'S1'), ('Qual', 'S1'), ('m_HIP', 'S2'), ('theta', '>i8'), ('rho', '>f8'), ('e_rho', '>f8'), ('dHp', '>f8'), ('e_dHp', '>f8'), ('Survey', 'S1'), ('Chart', 'S1'), ('Notes', 'S1'), ('HD', '>i8'), ('BD', 'S10'), ('CoD', 'S10'), ('CPD', 'S10'), ('(V-I)red', '>f8'), ('SpType', 'S12'), ('r_SpType', 'S1')]))
data2
Catalog | HIP | Proxy | RAhms | DEdms | Vmag | VarFlag | r_Vmag | RAdeg | DEdeg | AstroRef | Plx | pmRA | pmDE | e_RAdeg | e_DEdeg | e_Plx | e_pmRA | e_pmDE | DE:RA | Plx:RA | Plx:DE | pmRA:RA | pmRA:DE | pmRA:Plx | pmDE:RA | pmDE:DE | pmDE:Plx | pmDE:pmRA | F1 | F2 | --- | BTmag | e_BTmag | VTmag | e_VTmag | m_BTmag | B-V | e_B-V | r_B-V | V-I | e_V-I | r_V-I | CombMag | Hpmag | e_Hpmag | Hpscat | o_Hpmag | m_Hpmag | Hpmax | HPmin | Period | HvarType | moreVar | morePhoto | CCDM | n_CCDM | Nsys | Ncomp | MultFlag | Source | Qual | m_HIP | theta | rho | e_rho | dHp | e_dHp | Survey | Chart | Notes | HD | BD | CoD | CPD | (V-I)red | SpType | r_SpType |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mag | deg | deg | mas | mas / yr | mas / yr | mas | mas | mas | mas / yr | mas / yr | 0.01 | mag | mag | mag | mag | mag | mag | mag | mag | mag | mag | mag | mag | mag | d | deg | arcsec | arcsec | mag | mag | mag | ||||||||||||||||||||||||||||||||||||||||||||||
bytes1 | int64 | bytes1 | bytes11 | bytes11 | float64 | int64 | bytes1 | float64 | float64 | bytes1 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | float64 | int64 | float64 | int64 | float64 | float64 | float64 | float64 | bytes1 | float64 | float64 | bytes1 | float64 | float64 | bytes1 | bytes1 | float64 | float64 | float64 | int64 | bytes1 | float64 | float64 | float64 | bytes1 | bytes1 | bytes1 | bytes10 | bytes1 | int64 | int64 | bytes1 | bytes1 | bytes1 | bytes2 | int64 | float64 | float64 | float64 | float64 | bytes1 | bytes1 | bytes1 | int64 | bytes10 | bytes10 | bytes10 | float64 | bytes12 | bytes1 |
H | 1 | N | 00 00 00.22 | +01 05 20.4 | 9.1 | 999999 | H | 0.00091185 | 1.08901332 | N | 3.54 | -5.2 | -1.88 | 1.32 | 0.74 | 1.39 | 1.36 | 0.81 | 0.32 | -0.07 | -0.11 | -0.24 | 0.09 | -0.01 | 0.1 | -0.01 | 0.01 | 0.34 | 0 | 0.74 | 1 | 9.643 | 0.02 | 9.13 | 0.019 | N | 0.482 | 0.025 | T | 0.55 | 0.03 | L | N | 9.2043 | 0.002 | 0.017 | 87 | N | 9.17 | 9.24 | 1e+20 | N | N | N | N/A | N | 999999 | 1 | N | N | N | N/ | 999999 | 1e+20 | 1e+20 | 1e+20 | 1e+20 | S | N | N | 224700 | B+00 5077 | N/A | N/A | 0.66 | F5 | S |
H | 2 | N | 00 00 00.91 | -19 29 55.8 | 9.27 | 999999 | G | 0.00379737 | -19.49883745 | + | 21.9 | 181.21 | -0.93 | 1.28 | 0.7 | 3.1 | 1.74 | 0.92 | 0.12 | -0.14 | -0.24 | -0.29 | 0.01 | 0.21 | -0.02 | -0.19 | -0.28 | 0.14 | 2 | 1.45 | 2 | 10.519 | 0.033 | 9.378 | 0.021 | N | 0.999 | 0.002 | G | 1.04 | 0.0 | I | N | 9.4017 | 0.0017 | 0.015 | 120 | N | 9.37 | 9.44 | 1e+20 | C | N | N | N/A | N | 999999 | 1 | O | N | N | N/ | 999999 | 1e+20 | 1e+20 | 1e+20 | 1e+20 | N | N | N | 224690 | B-20 6688 | N/A | N/A | 1.04 | K3V | 4 |
H | 3 | N | 00 00 01.20 | +38 51 33.4 | 6.61 | 999999 | G | 0.00500795 | 38.85928608 | N | 2.81 | 5.24 | -2.91 | 0.53 | 0.4 | 0.63 | 0.57 | 0.47 | 0.06 | 0.09 | 0.04 | 0.43 | -0.01 | -0.06 | 0.03 | 0.24 | 0.07 | 0.21 | 0 | -0.45 | 3 | 6.576 | 0.004 | 6.621 | 0.005 | N | -0.019 | 0.004 | G | 0.0 | 0.0 | H | N | 6.6081 | 0.0007 | 0.008 | 127 | N | 6.6 | 6.62 | 1e+20 | C | N | N | 00000+3852 | I | 1 | 1 | N | N | N | N/ | 999999 | 1e+20 | 1e+20 | 1e+20 | 1e+20 | S | N | N | 224699 | B+38 5108 | N/A | N/A | 0.0 | B9 | S |
H | 4 | N | 00 00 02.01 | -51 53 36.8 | 8.06 | 999999 | H | 0.0083817 | -51.89354612 | N | 7.75 | 62.85 | 0.16 | 0.53 | 0.59 | 0.97 | 0.65 | 0.65 | -0.22 | -0.09 | -0.03 | 0.24 | 0.2 | 0.08 | 0.18 | 0.08 | -0.31 | -0.18 | 0 | -1.46 | 4 | 8.471 | 0.007 | 8.092 | 0.007 | N | 0.37 | 0.009 | T | 0.43 | 0.01 | L | N | 8.1498 | 0.0011 | 0.015 | 201 | N | 8.12 | 8.18 | 1e+20 | N | N | N | N/A | N | 999999 | 1 | N | N | N | N/ | 999999 | 1e+20 | 1e+20 | 1e+20 | 1e+20 | S | N | N | 224707 | N/A | N/A | P-52 12237 | 0.43 | F0V | 2 |
H | 5 | N | 00 00 02.39 | -40 35 28.4 | 8.55 | 999999 | H | 0.00996534 | -40.5912244 | N | 2.87 | 2.53 | 9.07 | 0.64 | 0.61 | 1.11 | 0.67 | 0.74 | 0.1 | 0.24 | 0.06 | 0.26 | -0.1 | 0.2 | -0.16 | -0.3 | -0.19 | 0.06 | 0 | -1.24 | 5 | 9.693 | 0.014 | 8.656 | 0.01 | N | 0.902 | 0.013 | T | 0.9 | 0.01 | L | N | 8.7077 | 0.0018 | 0.019 | 161 | N | 8.68 | 8.74 | 1e+20 | N | N | N | N/A | N | 999999 | 1 | N | N | N | N/ | 999999 | 1e+20 | 1e+20 | 1e+20 | 1e+20 | N | N | N | 224705 | N/A | C-41 15372 | P-41 9991 | 0.95 | G8III | 2 |
H | 6 | N | 00 00 04.35 | +03 56 47.4 | 12.31 | 999999 | G | 0.01814144 | 3.94648893 | N | 18.8 | 226.29 | -12.84 | 4.03 | 2.18 | 4.99 | 6.15 | 3.2 | 0.35 | -0.01 | 0.03 | -0.11 | -0.02 | 0.47 | -0.02 | 0.03 | 0.31 | 0.35 | 4 | 2.95 | 6 | 1e+20 | 1e+20 | 1e+20 | 1e+20 | N | 1.336 | 0.02 | G | 1.55 | 0.03 | I | N | 12.4488 | 0.0085 | 0.091 | 87 | N | 12.3 | 12.6 | 1e+20 | N | N | N | N/A | N | 999999 | 1 | N | N | N | N/ | 999999 | 1e+20 | 1e+20 | 1e+20 | 1e+20 | N | G | N | 999999 | N/A | N/A | N/A | 1.55 | M0V: | S |
H | 7 | N | 00 00 05.41 | +20 02 11.8 | 9.64 | 999999 | G | 0.02254891 | 20.03660216 | N | 17.74 | -208.12 | -200.79 | 1.01 | 0.79 | 1.3 | 1.13 | 0.82 | 0.32 | 0.08 | -0.02 | -0.04 | 0.12 | 0.06 | 0.11 | 0.0 | 0.16 | 0.43 | 0 | 0.21 | 7 | 10.542 | 0.039 | 9.679 | 0.03 | N | 0.74 | 0.02 | G | 0.79 | 0.02 | H | N | 9.6795 | 0.0021 | 0.017 | 104 | N | 9.65 | 9.72 | 1e+20 | C | N | N | N/A | N | 999999 | 1 | N | N | N | N/ | 999999 | 1e+20 | 1e+20 | 1e+20 | 1e+20 | N | N | N | 999999 | B+19 5185 | N/A | N/A | 0.79 | G0 | S |
H | 8 | N | 00 00 06.55 | +25 53 11.3 | 9.05 | 3 | H | 0.0272916 | 25.88647445 | N | 5.17 | 19.09 | -5.66 | 1.7 | 0.93 | 1.95 | 1.54 | 0.88 | 0.27 | -0.66 | -0.36 | -0.38 | -0.12 | 0.36 | -0.21 | -0.24 | 0.32 | 0.18 | 0 | 0.98 | 8 | 10.433 | 0.055 | 9.151 | 0.029 | N | 1.102 | 0.051 | T | 3.92 | 0.39 | O | N | 8.5522 | 0.1671 | 1.46 | 77 | N | 7.15 | 11.25 | 327.5 | P | 1 | B | N/A | N | 999999 | 1 | N | N | S | N/ | 999999 | 1e+20 | 1e+20 | 1e+20 | 1e+20 | N | G | P | 224709 | B+25 5054 | N/A | N/A | 4.82 | M6e-M8.5e Tc | G |
H | 9 | N | 00 00 08.48 | +36 35 09.4 | 8.59 | 999999 | H | 0.03534189 | 36.58593777 | N | 4.81 | -6.3 | 8.42 | 0.86 | 0.55 | 0.99 | 1.02 | 0.65 | 0.03 | 0.16 | -0.01 | 0.0 | 0.07 | -0.02 | 0.08 | 0.04 | 0.1 | 0.13 | 3 | -1.26 | 9 | 9.962 | 0.025 | 8.711 | 0.015 | N | 1.067 | 0.023 | T | 1.03 | 0.02 | L | N | 8.7534 | 0.0018 | 0.014 | 107 | N | 8.73 | 8.78 | 1e+20 | C | N | N | N/A | N | 999999 | 1 | N | N | N | N/ | 999999 | 1e+20 | 1e+20 | 1e+20 | 1e+20 | N | N | N | 224708 | B+35 5149 | N/A | N/A | 1.0 | G5 | S |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
H | 118313 | N | 23 59 49.40 | +21 08 59.1 | 8.94 | 999999 | H | 359.95581726 | 21.14973973 | N | 2.32 | 0.28 | -15.77 | 0.89 | 0.7 | 1.15 | 0.9 | 0.7 | 0.28 | 0.21 | 0.03 | 0.02 | -0.03 | 0.06 | 0.03 | -0.25 | 0.3 | 0.27 | 0 | 1.21 | 118313 | 9.4 | 0.019 | 8.989 | 0.019 | N | 0.423 | 0.015 | G | 0.49 | 0.02 | H | N | 9.0336 | 0.0021 | 0.013 | 92 | N | 9.01 | 9.06 | 1e+20 | C | N | N | N/A | N | 999999 | 1 | N | N | N | N/ | 999999 | 1e+20 | 1e+20 | 1e+20 | 1e+20 | N | N | N | 224671 | B+20 5413 | N/A | N/A | 0.49 | F0 | S |
H | 118314 | N | 23 59 49.64 | -37 51 28.6 | 9.27 | 999999 | H | 359.9568242 | -37.85795617 | N | 0.93 | -6.6 | -4.6 | 1.03 | 0.76 | 1.32 | 1.35 | 0.85 | 0.11 | -0.1 | -0.05 | -0.21 | -0.03 | 0.23 | -0.06 | -0.38 | 0.0 | -0.13 | 0 | 0.26 | 118314 | 10.731 | 0.034 | 9.378 | 0.018 | N | 1.147 | 0.03 | T | 1.11 | 0.03 | L | N | 9.435 | 0.002 | 0.022 | 148 | N | 9.38 | 9.47 | 1e+20 | C | N | N | N/A | N | 999999 | 1 | N | N | N | N/ | 999999 | 1e+20 | 1e+20 | 1e+20 | 1e+20 | N | N | N | 999999 | N/A | C-38 15704 | P-38 8593 | 1.03 | K0 | S |
H | 118315 | N | 23 59 50.18 | -18 30 26.2 | 8.47 | 999999 | H | 359.95908083 | -18.5072878 | N | 3.0 | 6.81 | -1.29 | 1.0 | 0.64 | 1.13 | 1.72 | 0.61 | 0.16 | -0.01 | -0.14 | -0.01 | 0.04 | 0.18 | -0.05 | -0.38 | 0.1 | -0.1 | 0 | -1.69 | 118315 | 9.741 | 0.02 | 8.561 | 0.013 | N | 1.011 | 0.019 | T | 0.99 | 0.01 | L | N | 8.6313 | 0.0017 | 0.014 | 109 | N | 8.6 | 8.66 | 1e+20 | N | N | N | N/A | N | 999999 | 1 | N | N | N | N/ | 999999 | 1e+20 | 1e+20 | 1e+20 | 1e+20 | N | N | N | 224680 | B-19 6553 | N/A | N/A | 0.99 | K0III | 4 |
H | 118316 | N | 23 59 50.62 | +32 32 13.0 | 9.51 | 999999 | H | 359.96089863 | 32.53693255 | N | 3.1 | 40.44 | -1.43 | 1.01 | 0.69 | 1.14 | 1.14 | 0.71 | 0.02 | 0.11 | -0.09 | 0.36 | 0.01 | -0.12 | 0.04 | 0.0 | 0.17 | 0.08 | 3 | -0.45 | 118316 | 10.039 | 0.024 | 9.541 | 0.024 | N | 0.468 | 0.031 | T | 0.54 | 0.03 | L | N | 9.6177 | 0.0024 | 0.017 | 105 | N | 9.6 | 9.65 | 1e+20 | N | N | N | N/A | N | 999999 | 1 | N | N | N | N/ | 999999 | 1e+20 | 1e+20 | 1e+20 | 1e+20 | N | N | N | 999999 | B+31 5014 | N/A | N/A | 0.45 | F2 | S |
H | 118317 | N | 23 59 50.81 | -36 25 10.1 | 10.01 | 999999 | H | 359.9617006 | -36.4194809 | N | 3.42 | 31.41 | -5.41 | 1.2 | 0.74 | 1.55 | 1.51 | 0.95 | -0.01 | 0.04 | -0.04 | -0.33 | 0.1 | 0.14 | 0.12 | -0.3 | 0.14 | -0.09 | 0 | 1.64 | 118317 | 10.615 | 0.03 | 10.027 | 0.029 | N | 0.549 | 0.037 | T | 0.62 | 0.03 | L | N | 10.133 | 0.003 | 0.029 | 156 | N | 10.08 | 10.18 | 1e+20 | N | N | N | N/A | N | 999999 | 1 | N | N | N | N/ | 999999 | 1e+20 | 1e+20 | 1e+20 | 1e+20 | N | N | N | 999999 | N/A | C-37 15450 | P-37 9430 | 0.65 | F8 | S |
H | 118318 | N | 23 59 51.30 | +11 40 25.4 | 6.99 | 1 | H | 359.96374383 | 11.67370866 | N | 1.92 | -2.16 | 2.09 | 0.78 | 0.5 | 0.91 | 0.88 | 0.6 | 0.33 | -0.02 | -0.09 | -0.19 | -0.03 | 0.21 | -0.02 | -0.11 | 0.27 | 0.49 | 0 | 2.0 | 118318 | 9.107 | 0.015 | 7.186 | 0.007 | N | 1.595 | 0.013 | T | 1.61 | 0.01 | L | N | 7.1043 | 0.0018 | 0.014 | 92 | N | 7.08 | 7.12 | 1e+20 | M | N | N | N/A | N | 999999 | 1 | N | N | N | N/ | 999999 | 1e+20 | 1e+20 | 1e+20 | 1e+20 | S | N | N | 224673 | B+10 5018 | N/A | N/A | 1.56 | K2 | S |
H | 118319 | N | 23 59 53.74 | -22 25 41.4 | 8.23 | 999999 | G | 359.97391252 | -22.4281803 | N | 10.63 | 148.74 | 27.53 | 0.97 | 0.58 | 1.17 | 1.1 | 0.52 | 0.04 | 0.17 | 0.04 | -0.11 | 0.1 | 0.17 | 0.07 | -0.31 | 0.12 | -0.05 | 0 | 1.19 | 118319 | 9.019 | 0.013 | 8.295 | 0.011 | N | 0.639 | 0.015 | G | 0.7 | 0.01 | H | N | 8.3699 | 0.0014 | 0.016 | 118 | N | 8.34 | 8.39 | 1e+20 | C | N | N | N/A | N | 999999 | 1 | N | N | N | N/ | 999999 | 1e+20 | 1e+20 | 1e+20 | 1e+20 | S | N | N | 224693 | N/A | C-23 18108 | P-23 8366 | 0.7 | G2V | 4 |
H | 118320 | N | 23 59 54.25 | +05 57 23.9 | 7.59 | 999999 | H | 359.97605747 | 5.95663786 | N | 5.0 | 20.92 | -35.26 | 0.95 | 0.53 | 1.01 | 0.89 | 0.54 | 0.21 | 0.0 | -0.05 | -0.18 | 0.01 | -0.04 | 0.01 | -0.14 | 0.22 | 0.27 | 4 | -1.12 | 118320 | 8.868 | 0.013 | 7.704 | 0.009 | N | 0.999 | 0.012 | T | 0.98 | 0.01 | L | N | 7.7604 | 0.001 | 0.01 | 86 | N | 7.74 | 7.77 | 1e+20 | C | N | N | N/A | N | 999999 | 1 | N | N | N | N/ | 999999 | 1e+20 | 1e+20 | 1e+20 | 1e+20 | S | N | N | 224689 | B+05 5245 | N/A | N/A | 0.98 | K0 | S |
H | 118321 | N | 23 59 54.78 | -64 22 21.3 | 9.2 | 999999 | G | 359.97823891 | -64.3725722 | N | 19.22 | 216.99 | 106.46 | 0.74 | 0.76 | 1.0 | 0.84 | 0.81 | 0.01 | -0.07 | -0.24 | -0.03 | 0.15 | -0.04 | 0.15 | 0.01 | -0.14 | 0.12 | 0 | 0.05 | 118321 | 10.077 | 0.031 | 9.318 | 0.026 | N | 0.698 | 0.003 | G | 0.75 | 0.0 | H | N | 9.3312 | 0.0019 | 0.022 | 145 | N | 9.28 | 9.36 | 1e+20 | N | N | N | N/A | N | 999999 | 1 | N | N | N | N/ | 999999 | 1e+20 | 1e+20 | 1e+20 | 1e+20 | N | N | N | 224685 | N/A | C-65 2958 | P-65 4188 | 0.75 | G5V | 1 |
H | 118322 | N | 23 59 54.91 | -65 34 37.5 | 4.49 | 999999 | H | 359.97879195 | -65.57707774 | N | 8.71 | 48.63 | -22.33 | 0.44 | 0.42 | 0.57 | 0.48 | 0.47 | 0.03 | -0.12 | -0.18 | -0.17 | 0.02 | 0.17 | 0.07 | -0.12 | -0.08 | 0.22 | 0 | -1.72 | 118322 | 4.396 | 0.002 | 4.482 | 0.002 | N | -0.075 | 0.011 | G | -0.04 | 0.02 | A | N | 4.4758 | 0.0003 | 0.004 | 136 | N | 4.47 | 4.48 | 1e+20 | N | N | N | N/A | N | 999999 | 1 | N | N | N | N/ | 999999 | 1e+20 | 1e+20 | 1e+20 | 1e+20 | S | N | N | 224686 | N/A | N/A | P-66 3819 | -0.04 | B9IV | X |
header['comment'] = 'This is a comment'
header
XTENSION= 'BINTABLE' / binary table extension BITPIX = 8 / array data type NAXIS = 2 / number of array dimensions NAXIS1 = 496 / length of dimension 1 NAXIS2 = 118218 / length of dimension 2 PCOUNT = 0 / number of group parameters GCOUNT = 1 / number of groups TFIELDS = 78 / number of table fields TTYPE1 = 'Catalog ' TFORM1 = '1A ' TTYPE2 = 'HIP ' TFORM2 = 'K ' TTYPE3 = 'Proxy ' TFORM3 = '1A ' TTYPE4 = 'RAhms ' TFORM4 = '11A ' TTYPE5 = 'DEdms ' TFORM5 = '11A ' TTYPE6 = 'Vmag ' TFORM6 = 'D ' TUNIT6 = 'mag ' TTYPE7 = 'VarFlag ' TFORM7 = 'K ' TTYPE8 = 'r_Vmag ' TFORM8 = '1A ' TTYPE9 = 'RAdeg ' TFORM9 = 'D ' TUNIT9 = 'deg ' TTYPE10 = 'DEdeg ' TFORM10 = 'D ' TUNIT10 = 'deg ' TTYPE11 = 'AstroRef' TFORM11 = '1A ' TTYPE12 = 'Plx ' TFORM12 = 'D ' TUNIT12 = 'mas ' TTYPE13 = 'pmRA ' TFORM13 = 'D ' TUNIT13 = 'mas yr-1' TTYPE14 = 'pmDE ' TFORM14 = 'D ' TUNIT14 = 'mas yr-1' TTYPE15 = 'e_RAdeg ' TFORM15 = 'D ' TUNIT15 = 'mas ' TTYPE16 = 'e_DEdeg ' TFORM16 = 'D ' TUNIT16 = 'mas ' TTYPE17 = 'e_Plx ' TFORM17 = 'D ' TUNIT17 = 'mas ' TTYPE18 = 'e_pmRA ' TFORM18 = 'D ' TUNIT18 = 'mas yr-1' TTYPE19 = 'e_pmDE ' TFORM19 = 'D ' TUNIT19 = 'mas yr-1' TTYPE20 = 'DE:RA ' TFORM20 = 'D ' TTYPE21 = 'Plx:RA ' TFORM21 = 'D ' TTYPE22 = 'Plx:DE ' TFORM22 = 'D ' TTYPE23 = 'pmRA:RA ' TFORM23 = 'D ' TTYPE24 = 'pmRA:DE ' TFORM24 = 'D ' TTYPE25 = 'pmRA:Plx' TFORM25 = 'D ' TTYPE26 = 'pmDE:RA ' TFORM26 = 'D ' TTYPE27 = 'pmDE:DE ' TFORM27 = 'D ' TTYPE28 = 'pmDE:Plx' TFORM28 = 'D ' TTYPE29 = 'pmDE:pmRA' TFORM29 = 'D ' TTYPE30 = 'F1 ' TFORM30 = 'K ' TUNIT30 = '10**-2 ' TTYPE31 = 'F2 ' TFORM31 = 'D ' TTYPE32 = '--- ' TFORM32 = 'K ' TTYPE33 = 'BTmag ' TFORM33 = 'D ' TUNIT33 = 'mag ' TTYPE34 = 'e_BTmag ' TFORM34 = 'D ' TUNIT34 = 'mag ' TTYPE35 = 'VTmag ' TFORM35 = 'D ' TUNIT35 = 'mag ' TTYPE36 = 'e_VTmag ' TFORM36 = 'D ' TUNIT36 = 'mag ' TTYPE37 = 'm_BTmag ' TFORM37 = '1A ' TTYPE38 = 'B-V ' TFORM38 = 'D ' TUNIT38 = 'mag ' TTYPE39 = 'e_B-V ' TFORM39 = 'D ' TUNIT39 = 'mag ' TTYPE40 = 'r_B-V ' TFORM40 = '1A ' TTYPE41 = 'V-I ' TFORM41 = 'D ' TUNIT41 = 'mag ' TTYPE42 = 'e_V-I ' TFORM42 = 'D ' TUNIT42 = 'mag ' TTYPE43 = 'r_V-I ' TFORM43 = '1A ' TTYPE44 = 'CombMag ' TFORM44 = '1A ' TTYPE45 = 'Hpmag ' TFORM45 = 'D ' TUNIT45 = 'mag ' TTYPE46 = 'e_Hpmag ' TFORM46 = 'D ' TUNIT46 = 'mag ' TTYPE47 = 'Hpscat ' TFORM47 = 'D ' TUNIT47 = 'mag ' TTYPE48 = 'o_Hpmag ' TFORM48 = 'K ' TTYPE49 = 'm_Hpmag ' TFORM49 = '1A ' TTYPE50 = 'Hpmax ' TFORM50 = 'D ' TUNIT50 = 'mag ' TTYPE51 = 'HPmin ' TFORM51 = 'D ' TUNIT51 = 'mag ' TTYPE52 = 'Period ' TFORM52 = 'D ' TUNIT52 = 'd ' TTYPE53 = 'HvarType' TFORM53 = '1A ' TTYPE54 = 'moreVar ' TFORM54 = '1A ' TTYPE55 = 'morePhoto' TFORM55 = '1A ' TTYPE56 = 'CCDM ' TFORM56 = '10A ' TTYPE57 = 'n_CCDM ' TFORM57 = '1A ' TTYPE58 = 'Nsys ' TFORM58 = 'K ' TTYPE59 = 'Ncomp ' TFORM59 = 'K ' TTYPE60 = 'MultFlag' TFORM60 = '1A ' TTYPE61 = 'Source ' TFORM61 = '1A ' TTYPE62 = 'Qual ' TFORM62 = '1A ' TTYPE63 = 'm_HIP ' TFORM63 = '2A ' TTYPE64 = 'theta ' TFORM64 = 'K ' TUNIT64 = 'deg ' TTYPE65 = 'rho ' TFORM65 = 'D ' TUNIT65 = 'arcsec ' TTYPE66 = 'e_rho ' TFORM66 = 'D ' TUNIT66 = 'arcsec ' TTYPE67 = 'dHp ' TFORM67 = 'D ' TUNIT67 = 'mag ' TTYPE68 = 'e_dHp ' TFORM68 = 'D ' TUNIT68 = 'mag ' TTYPE69 = 'Survey ' TFORM69 = '1A ' TTYPE70 = 'Chart ' TFORM70 = '1A ' TTYPE71 = 'Notes ' TFORM71 = '1A ' TTYPE72 = 'HD ' TFORM72 = 'K ' TTYPE73 = 'BD ' TFORM73 = '10A ' TTYPE74 = 'CoD ' TFORM74 = '10A ' TTYPE75 = 'CPD ' TFORM75 = '10A ' TTYPE76 = '(V-I)red' TFORM76 = 'D ' TUNIT76 = 'mag ' TTYPE77 = 'SpType ' TFORM77 = '12A ' TTYPE78 = 'r_SpType' TFORM78 = '1A ' COMMENT This is a comment COMMENT This is a comment HISTORY I updated this file 2020-12-09
header['history'] = 'I updated this file 2020-12-09'
header
header.keys()
<generator object Header.keys at 0x1659cd6d0>
list(header.keys())
data3 = data2[data2['Vmag'] < 3]
header
c1 = fits.Column(name='hip', array=data3['HIP'], format='K')
c2 = fits.Column(name='ra', array=data3['RAdeg'], format='D', unit='deg')
c3 = fits.Column(name='dec', array=data3['DEdeg'], format='D', unit='deg')
c4 = fits.Column(name='vmag', array=data3['Vmag'], format='D', unit='mag')
ht = fits.BinTableHDU.from_columns([c1, c2, c3,c4])
ht
<astropy.io.fits.hdu.table.BinTableHDU at 0x181d01be0>
ht.writeto('data/bright-hip.fits')
!fitsheader data/bright-hip.fits
# HDU 0 in data/bright-hip.fits: SIMPLE = T / conforms to FITS standard BITPIX = 8 / array data type NAXIS = 0 / number of array dimensions EXTEND = T # HDU 1 in data/bright-hip.fits: XTENSION= 'BINTABLE' / binary table extension BITPIX = 8 / array data type NAXIS = 2 / number of array dimensions NAXIS1 = 32 / length of dimension 1 NAXIS2 = 172 / length of dimension 2 PCOUNT = 0 / number of group parameters GCOUNT = 1 / number of groups TFIELDS = 4 / number of table fields TTYPE1 = 'hip ' TFORM1 = 'K ' TTYPE2 = 'ra ' TFORM2 = 'D ' TUNIT2 = 'deg ' TTYPE3 = 'dec ' TFORM3 = 'D ' TUNIT3 = 'deg ' TTYPE4 = 'vmag ' TFORM4 = 'D ' TUNIT4 = 'mag '
from astropy.utils.data import download_file
image_file = download_file('http://data.astropy.org/tutorials/FITS-images/HorseHead.fits', cache=True )
hdu_list = fits.open(image_file)
hdu_list.info()
Filename: /Users/hebl/.astropy/cache/download/url/ff6e0b93871033c68022ca026a956d87/contents No. Name Ver Type Cards Dimensions Format 0 PRIMARY 1 PrimaryHDU 161 (891, 893) int16 1 er.mask 1 TableHDU 25 1600R x 4C [F6.2, F6.2, F6.2, F6.2]
image_data = hdu_list[0].data
hdu_list.close()
image_data = fits.getdata(image_file)
print(type(image_data))
print(image_data.shape)
<class 'numpy.ndarray'> (893, 891)
plt.imshow(image_data, cmap='gray')
plt.colorbar()
<matplotlib.colorbar.Colorbar at 0x165398e80>
print('Min:', np.min(image_data))
print('Max:', np.max(image_data))
print('Mean:', np.mean(image_data))
print('Stdev:', np.std(image_data))
Min: 3759 Max: 22918 Mean: 9831.481676287574 Stdev: 3032.3927542049046