Why Are Some Numbers Read as Masked Astropy

Astropy: Tables

Interact

Objectives

  • Create tables
  • Access data in tables
  • Combining tables
  • Assemblage
  • Masking
  • Reading/writing

Documentation

For more information about the features presented below, y'all tin read the astropy.table docs.

Creating tables

                              import                numpy                as                np                from                astropy.table                import                Table                          
                              # Creating a table from scratch                t1                =                Tabular array                ()                t1                [                'name'                ]                =                [                'source one'                ,                'source 2'                ,                'source 3'                ]                t1                [                'flux'                ]                =                [                one.2                ,                two.2                ,                iii.i                ]                          
                              # Looking at the table                t1                          

Table length=iii

proper noun flux
str8 float64
source 1 one.2
source 2 2.2
source iii 3.1
                              # Adding a column                t1                [                'size'                ]                =                [                one                ,                v                ,                4                ]                t1                          

Tabular array length=3

name flux size
str8 float64 int64
source 1 1.two i
source 2 ii.2 5
source 3 3.1 four
                              # Accessing a cavalcade                t1                [                'size'                ]                          

<Cavalcade proper noun='size' dtype='int64' length=iii>

                              # Converting to a Numpy assortment                np                .                assortment                (                t1                [                'size'                ])                          
                              # Accessing a jail cell                t1                [                'size'                ][                0                ]                          

Row index=0

name flux size
str8 float64 int64
source one 1.ii 1

Units in tables

                              # Gear up unit on column                t1                [                'size'                ]                .                unit                =                'cm'                t1                          

Table length=three

name flux size
cm
str8 float64 int64
source 1 i.2 i
source ii 2.2 5
source three 3.1 4

Some unitful operations volition then work:

$[0.01,~0.05,~0.04] \; \mathrm{m}$

Nonetheless, y'all may run across unexpected behavior, so if you are planning on using table columns as Quantities, nosotros recommend that you use the QTable course:

              astropy.table.cavalcade.Column                          
                              from                astropy.table                import                QTable                qt1                =                QTable                (                t1                )                type                (                qt1                [                'size'                ])                          
              astropy.units.quantity.Quantity                          

Challenge

  1. Brand a tabular array that contains 3 columns: spectral blazon, temperature, and radius, and incude 5 rows with false information (or real data if you like, for instance from here). Try including units on the columns that tin take them.
  2. Detect the mean temperature and the maximum radius
  3. Try and find out how to add together and remove rows
  4. Add a new column which gives the luminosity (using $50=4\pi R^two \sigma T^4$)
                              #1                from                astropy                import                units                equally                u                t                =                QTable                ()                t                [                'spectral type'                ]                =                [                'O5'                ,                'B5'                ,                'A5'                ,                'F5'                ,                'G5'                ]                t                [                'radius'                ]                =                [                12                ,                3.9                ,                1.seven                ,                1.3                ,                0.92                ]                *                u                .                R_sun                t                [                'temperature'                ]                =                [                45000                ,                15000                ,                8200                ,                6400                ,                5700                ]                *                u                .                K                t                          

QTable length=five

spectral type radius temperature
solRad Grand
str2 float64 float64
O5 12.0 45000.0
B5 3.9 15000.0
A5 1.7 8200.0
F5 1.3 6400.0
G5 0.92 5700.0
                              #two                print                (                'Mean temperature:'                ,                np                .                mean                (                t                [                'temperature'                ]))                print                (                'Maximum radius:'                ,                np                .                mean                (                t                [                'radius'                ]))                          
              Hateful temperature: 16060.0 K Maximum radius: 3.964000000000001 solRad                          
                              #3                t                .                add_row                ({                'spectral type'                :                'K5'                ,                'temperature'                :                4300                *                u                .                Thou                ,                'radius'                :                0.72                *                u                .                R_sun                })                t                .                remove_row                (                0                )                t                          

QTable length=5

spectral type radius temperature
solRad Chiliad
str2 float64 float64
B5 3.ix 15000.0
A5 one.7 8200.0
F5 1.3 6400.0
G5 0.92 5700.0
K5 0.72 4300.0
                              #four                from                numpy                import                pi                from                astropy.constants                import                sigma_sb                t                [                'luminosity'                ]                =                (                4                *                pi                *                t                [                'radius'                ]                **                2                *                sigma_sb                *                t                [                'temperature'                ]                **                4                )                .                to                (                u                .                L_sun                )                t                          

QTable length=five

spectral blazon radius temperature luminosity
solRad K solLum
str2 float64 float64 float64
B5 3.9 15000.0 693.7250235023215
A5 one.7 8200.0 xi.7718945281512
F5 1.3 6400.0 2.554463553120115
G5 0.92 5700.0 0.8049486705065919
K5 0.72 4300.0 0.15967316182594046

Iterating over tables

It is possible to iterate over rows or over columns. To iterate over rows, merely iterate over the tabular array itself:

                              for                row                in                t1                :                print                (                row                )                          
                              proper name   flux size                cm  -------- ---- ---- source ane  ane.two    1   name   flux size                cm  -------- ---- ---- source 2  2.2    5   name   flux size                cm  -------- ---- ---- source 3  3.1    4                          

Rows can act like dictionaries, so you can admission specific columns from a row:

                              for                row                in                t1                :                print                (                row                [                'name'                ])                          
              source i source ii source three                          

Iterating over columns is besides easy:

                              for                colname                in                t1                .                columns                :                column                =                t1                [                colname                ]                print                (                column                )                          
                              proper noun   -------- source 1 source ii source three flux ----  1.2  two.2  3.1 size  cm  ----    one    5    4                          

Accessing specific rows from a cavalcade object can likewise be washed with the item notation:

                              for                colname                in                t1                .                columns                :                column                =                t1                [                colname                ]                print                (                column                [                0                ])                          

Joining tables

                              from                astropy.tabular array                import                bring together                          
                              t2                =                Table                ()                t2                [                'proper noun'                ]                =                [                'source 1'                ,                'source iii'                ]                t2                [                'flux2'                ]                =                [                ane                ,                9                ]                          
                              t3                =                join                (                t1                ,                t2                ,                join_type                =                'outer'                )                t3                          

Table masked=True length=3

proper name flux size flux2
cm
str8 float64 int64 int64
source ane i.2 1 1
source two 2.2 5 --
source 3 3.1 4 9

Masked tables

                              t4                =                Tabular array                (                masked                =                Truthful                )                t4                [                'name'                ]                =                [                'source 1'                ,                'source two'                ,                'source iii'                ]                t4                [                'flux'                ]                =                [                i.two                ,                2.2                ,                3.1                ]                          
                              t4                [                'flux'                ]                .                mask                =                [                1                ,                0                ,                i                ]                t4                          

Table masked=True length=3

proper noun flux
str8 float64
source ane --
source 2 2.ii
source 3 --

Slicing

Tables tin can be sliced like Numpy arrays:

                              obs                =                Table                .                read                (                """proper noun    obs_date    mag_b  mag_v                     M31     2012-01-02  17.0   17.5                     M31     2012-01-02  17.1   17.iv                     M101    2012-01-02  fifteen.1   13.5                     M82     2012-02-14  16.two   14.5                     M31     2012-02-14  xvi.9   17.iii                     M82     2012-02-xiv  15.2   xv.5                     M101    2012-02-14  15.0   13.6                     M82     2012-03-26  15.7   xvi.v                     M101    2012-03-26  15.i   13.5                     M101    2012-03-26  14.8   xiv.3                     """                ,                format                =                'ascii'                )                          

Table length=3

proper noun obs_date mag_b mag_v
str4 str10 float64 float64
M31 2012-01-02 17.1 17.four
M101 2012-01-02 15.ane 13.5
M82 2012-02-14 xvi.ii 14.5

Table length=4

name obs_date mag_b mag_v
str4 str10 float64 float64
M31 2012-01-02 17.0 17.five
M31 2012-01-02 17.1 17.4
M82 2012-02-xiv sixteen.two 14.five
M31 2012-02-14 16.9 17.3

Table length=10

mag_b mag_v
float64 float64
17.0 17.5
17.ane 17.iv
xv.ane 13.5
16.ii 14.5
16.9 17.3
15.2 fifteen.5
15.0 13.6
15.7 16.five
15.1 13.5
fourteen.8 14.iii

Claiming

Starting from the obs table:

  1. Make a new table that shows every other row, starting with the 2nd row? (that is, the second, quaternary, sixth, etc. rows).
  2. Make a new tabular array the only contains rows where proper noun is M31
                              #1                subset1                =                obs                [                one                ::                2                ]                subset1                          

Tabular array length=5

proper name obs_date mag_b mag_v
str4 str10 float64 float64
M31 2012-01-02 17.1 17.4
M82 2012-02-14 xvi.2 xiv.5
M82 2012-02-14 xv.ii 15.five
M82 2012-03-26 15.vii sixteen.five
M101 2012-03-26 xiv.viii xiv.3
                              #two                subset2                =                obs                [                obs                [                'proper noun'                ]                ==                'M31'                ]                subset2                          

Table length=three

proper name obs_date mag_b mag_v
str4 str10 float64 float64
M31 2012-01-02 17.0 17.5
M31 2012-01-02 17.1 17.4
M31 2012-02-fourteen 16.9 17.three

Grouping and Aggregation

                              obs_by_name                =                obs                .                group_by                (                'name'                )                          

Table length=10

name obs_date mag_b mag_v
str4 str10 float64 float64
M101 2012-01-02 15.one 13.five
M101 2012-02-14 15.0 13.6
M101 2012-03-26 15.1 13.v
M101 2012-03-26 14.viii 14.3
M31 2012-01-02 17.0 17.5
M31 2012-01-02 17.one 17.4
M31 2012-02-14 xvi.ix 17.three
M82 2012-02-xiv sixteen.2 14.5
M82 2012-02-14 15.2 xv.five
M82 2012-03-26 fifteen.vii 16.five
                              for                grouping                in                obs_by_name                .                groups                :                print                (                group                )                print                (                ""                )                          
              name  obs_date  mag_b mag_v ---- ---------- ----- ----- M101 2012-01-02  15.1  xiii.five M101 2012-02-fourteen  15.0  13.vi M101 2012-03-26  xv.1  13.v M101 2012-03-26  fourteen.8  xiv.3  proper noun  obs_date  mag_b mag_v ---- ---------- ----- -----  M31 2012-01-02  17.0  17.v  M31 2012-01-02  17.1  17.4  M31 2012-02-xiv  16.9  17.3  name  obs_date  mag_b mag_v ---- ---------- ----- -----  M82 2012-02-xiv  16.2  14.5  M82 2012-02-14  15.2  fifteen.5  M82 2012-03-26  xv.vii  16.5                          
                              obs_by_name                .                groups                .                aggregate                (                np                .                mean                )                          

Tabular array length=iii

name mag_b mag_v
str4 float64 float64
M101 15.000000000000002 13.725000000000001
M31 17.0 17.400000000000002
M82 15.699999999999998 fifteen.5

Writing data

                              obs                .                write                (                'test.fits'                ,                overwrite                =                True                )                          
                              obs                .                write                (                'examination.vot'                ,                format                =                'votable'                ,                overwrite                =                True                )                          

Reading data

                              t4                =                Table                .                read                (                '2mass.tbl'                ,                format                =                'ascii.ipac'                )                          

Table masked=True length=929

ra dec clon clat err_maj err_min err_ang designation j_m j_cmsig j_msigcom j_snr h_m h_cmsig h_msigcom h_snr k_m k_cmsig k_msigcom k_snr ph_qual rd_flg bl_flg cc_flg ndet gal_contam mp_flg dist angle j_h h_k j_k
deg deg arcsec arcsec deg mag mag mag mag mag mag mag mag mag
float64 float64 str12 str13 float64 float64 int64 str16 float64 float64 float64 float64 float64 float64 float64 float64 float64 float64 float64 float64 str3 str3 str3 str3 str6 int64 int64 float64 float64 float64 float64 float64
274.429506 -thirteen.870547 18h17m43.08s -13d52m13.97s 0.08 0.08 45 18174308-1352139 sixteen.305 0.142 0.143 6.7 fourteen.048 0.107 0.108 13.6 xiii.257 0.066 0.066 xvi.5 CAA 222 111 0ss 066655 0 0 975.080151 256.448 2.257 0.791 3.048
274.423821 -13.86974 18h17m41.72s -13d52m11.06s 0.06 0.06 90 18174171-1352110 xiv.802 0.058 0.059 26.vii 12.635 0.059 0.06 50.1 eleven.768 0.045 0.046 65.2 AAA 222 111 0ss 666666 0 0 993.752042 256.878 2.167 0.867 three.034
274.424587 -13.739629 18h17m41.90s -13d44m22.66s 0.08 0.08 45 18174190-1344226 xvi.328 -- -- -- 14.345 0.059 0.06 10.4 xiii.405 0.046 0.047 14.4 UAA 022 011 0cc 003666 0 0 995.726698 284.113 -- 0.94 --
274.433933 -13.769502 18h17m44.14s -13d46m10.21s 0.08 0.08 45 18174414-1346102 16.281 0.098 0.099 6.8 14.057 0.035 0.036 xiii.5 12.956 0.032 0.033 21.8 CAA 222 111 000 065566 0 0 942.627418 278.252 2.224 1.101 3.325
274.437013 -thirteen.885698 18h17m44.88s -13d53m08.51s 0.09 0.09 45 18174488-1353085 15.171 -- -- -- 14.412 0.152 0.152 9.eight 13.742 0.095 0.095 10.six UBA 622 022 0cc 005566 0 0 964.105389 252.93 -- 0.67 --
274.433996 -thirteen.752446 18h17m44.16s -13d45m08.81s 0.08 0.08 90 18174415-1345088 16.54 -- -- -- 14.519 0.083 0.083 8.8 13.604 0.043 0.044 12.0 UBA 022 011 0cc 005666 0 0 953.230532 281.908 -- 0.915 --
274.418138 -13.77215 18h17m40.35s -13d46m19.74s 0.08 0.08 90 18174035-1346197 17.98 -- -- -- xiv.61 0.043 0.044 viii.ane 13.456 0.056 0.057 13.viii UBA 022 011 000 001645 0 0 996.047248 277.25 -- i.154 --
274.433695 -thirteen.899049 18h17m44.09s -13d53m56.58s 0.06 0.06 ninety 18174408-1353565 13.011 0.021 0.024 139.0 10.917 0.02 0.021 243.8 ten.013 0.017 0.019 328.3 AAA 222 111 000 666666 0 0 990.166399 250.466 two.094 0.904 ii.998
274.425482 -13.77149 18h17m42.12s -13d46m17.36s 0.08 0.08 135 18174211-1346173 sixteen.086 -- -- -- thirteen.709 0.065 0.066 18.half-dozen 12.503 0.044 0.045 33.1 UAA 622 012 00c 005555 0 0 970.896919 277.582 -- 1.206 --
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
274.81801 -fourteen.001245 18h19m16.32s -14d00m04.48s 0.xviii 0.sixteen 1 18191632-1400044 16.24 0.113 0.113 5.half dozen 15.531 0.164 0.164 two.5 fifteen.252 -- -- -- CDU 220 110 000 060600 0 0 809.817146 149.61 0.709 -- --
274.822709 -14.037254 18h19m17.45s -14d02m14.11s 0.07 0.07 45 18191745-1402141 xv.999 0.097 0.098 seven.0 14.009 0.032 0.033 10.0 13.077 0.035 0.036 16.iv CAA 222 111 000 062656 0 0 931.339773 152.779 one.99 0.932 2.922
274.880758 -13.99956 18h19m31.38s -13d59m58.42s 0.06 0.06 90 18193138-1359584 14.163 0.035 0.037 37.8 11.179 0.02 0.021 135.half-dozen 9.765 0.017 0.019 347.1 AAA 222 111 000 556666 0 0 935.512452 137.762 2.984 one.414 four.398
274.652526 -fourteen.055106 18h18m36.61s -14d03m18.38s 0.06 0.06 xc 18183660-1403183 15.035 0.052 0.054 nineteen.four 13.099 0.04 0.041 27.5 12.254 0.041 0.041 41.7 AAA 222 111 c00 566666 0 0 908.109808 190.682 ane.936 0.845 two.781
274.760586 -13.999927 18h19m02.54s -13d59m59.74s 0.08 0.08 90 18190254-1359597 16.329 0.122 0.123 5.five 14.488 0.067 0.067 6.4 thirteen.617 0.051 0.052 11.1 CCA 222 111 000 060616 0 0 724.557553 163.227 i.841 0.871 2.712
274.831132 -14.020027 18h19m19.47s -14d01m12.10s 0.08 0.08 45 18191947-1401120 xvi.203 -- -- -- 13.238 0.02 0.021 twenty.4 12.016 0.023 0.024 43.6 UAA 022 011 000 006666 0 0 891.347132 149.27 -- one.222 --
274.972435 -13.760374 18h19m53.38s -13d45m37.35s 0.12 0.11 10 18195338-1345373 17.472 -- -- -- 16.755 -- -- -- 14.413 0.084 0.084 4.8 UUD 002 001 000 000006 0 0 964.828933 79.963 -- -- --
274.870009 -13.817775 18h19m28.80s -13d49m03.99s 0.08 0.08 45 18192880-1349039 16.933 -- -- -- 14.514 0.064 0.065 6.3 12.957 0.041 0.041 xviii.four UCA 022 011 000 002666 0 0 592.998058 93.69 -- i.557 --
274.735323 -13.941575 18h18m56.48s -13d56m29.67s 0.14 0.fourteen 45 18185647-1356296 xvi.643 -- -- -- 14.88 -- -- -- xiv.291 0.116 0.117 6.0 UUC 002 001 000 000004 0 0 498.524438 165.968 -- -- --
274.866294 -13.841778 18h19m27.91s -13d50m30.40s 0.08 0.08 45 18192791-1350304 15.615 -- -- -- 13.911 0.075 0.075 10.9 12.765 0.134 0.134 21.nine UAE 022 011 0cc 005545 0 0 591.97725 102.147 -- 1.146 --

Claiming

Using the t4 tabular array above:

  1. Make a plot that shows j_m-h_m on the x-axis, and h_m-k_m on the y-axis

  2. Make a new tabular array that contains the subset of rows where the j_snr, h_snr, and k_snr columns, which give the point-to-noise-ratio in the J, H, and K band, are greater than 10, and try and show these points in ruddy in the plot you just made.

  3. Make a new table (based on the full tabular array) that contains only the RA, December, and the j_m, h_m and k_m columns, and so try and write out this catalog into a format that y'all can read into another software package. For example, endeavor and write out the catalog into CSV format, then read it into a spreadsheet software package (e.g. Excel, Google Docs, Numbers, OpenOffice). You may meet an issue at this indicate - if so, have a look at https://github.com/astropy/astropy/bug/7357 to see how to fix it.

                              #ane                import                matplotlib.pyplot                every bit                plt                plt                .                scatter                (                t4                [                'j_m'                ]                -                t4                [                'h_m'                ],                t4                [                'h_m'                ]                -                t4                [                'k_m'                ],                )                          
              <matplotlib.collections.PathCollection at 0x7f696f91a630>                          
                              #2                subset                =                t4                [(                t4                [                'j_snr'                ]                >                x                )                &                (                t4                [                'h_snr'                ]                >                10                )                &                (                t4                [                'k_snr'                ]                >                10                )]                subset                          

Table masked=Truthful length=264

ra dec clon clat err_maj err_min err_ang designation j_m j_cmsig j_msigcom j_snr h_m h_cmsig h_msigcom h_snr k_m k_cmsig k_msigcom k_snr ph_qual rd_flg bl_flg cc_flg ndet gal_contam mp_flg dist bending j_h h_k j_k
deg deg arcsec arcsec deg mag mag mag mag mag mag magazine mag magazine
float64 float64 str12 str13 float64 float64 int64 str16 float64 float64 float64 float64 float64 float64 float64 float64 float64 float64 float64 float64 str3 str3 str3 str3 str6 int64 int64 float64 float64 float64 float64 float64
274.423821 -xiii.86974 18h17m41.72s -13d52m11.06s 0.06 0.06 90 18174171-1352110 xiv.802 0.058 0.059 26.7 12.635 0.059 0.06 l.1 11.768 0.045 0.046 65.ii AAA 222 111 0ss 666666 0 0 993.752042 256.878 2.167 0.867 3.034
274.433695 -13.899049 18h17m44.09s -13d53m56.58s 0.06 0.06 ninety 18174408-1353565 thirteen.011 0.021 0.024 139.0 10.917 0.02 0.021 243.8 10.013 0.017 0.019 328.iii AAA 222 111 000 666666 0 0 990.166399 250.466 2.094 0.904 two.998
274.431606 -xiii.781877 18h17m43.59s -13d46m54.76s 0.06 0.06 45 18174358-1346547 13.87 0.032 0.034 63.0 13.406 0.06 0.061 24.6 13.365 0.087 0.088 15.0 AAA 222 111 ccc 666666 0 0 945.318343 275.508 0.464 0.041 0.505
274.433361 -13.892246 18h17m44.01s -13d53m32.09s 0.06 0.06 45 18174400-1353320 xv.151 0.059 0.06 19.four xiii.37 0.064 0.065 25.v 12.599 0.048 0.049 30.three AAA 222 111 000 566666 0 0 983.384329 251.834 one.781 0.771 two.552
274.427483 -13.768612 18h17m42.60s -13d46m07.00s 0.06 0.06 90 18174259-1346070 14.423 0.041 0.043 37.ix 13.926 0.064 0.065 15.3 xiii.744 0.052 0.053 10.6 AAA 222 222 ccc 666666 0 0 965.406417 278.247 0.497 0.182 0.679
274.43155 -xiii.883111 18h17m43.57s -13d52m59.20s 0.06 0.06 90 18174357-1352591 15.702 0.084 0.085 eleven.7 thirteen.725 0.091 0.091 eighteen.4 12.908 0.069 0.07 22.eight AAA 222 222 ccc 266666 0 0 979.746164 253.778 1.977 0.817 two.794
274.432195 -xiii.723433 18h17m43.73s -13d43m24.36s 0.06 0.06 xc 18174372-1343243 13.843 0.019 0.023 64.6 xi.363 0.02 0.021 161.7 ten.243 0.019 0.021 265.6 AAA 222 111 000 666666 0 0 986.230333 287.779 2.48 1.12 3.six
274.429849 -thirteen.838672 18h17m43.16s -13d50m19.22s 0.06 0.06 45 18174316-1350192 15.726 0.069 0.07 11.4 xiii.911 0.053 0.053 fifteen.5 13.025 0.069 0.07 xx.5 AAA 222 111 c00 166666 0 0 953.670451 263.151 1.815 0.886 2.701
274.427993 -13.829856 18h17m42.72s -13d49m47.48s 0.06 0.06 90 18174271-1349474 13.307 0.029 0.032 105.eight 12.919 0.063 0.063 38.6 12.795 0.065 0.065 25.3 AEA 222 212 c0c 665566 0 0 956.908469 265.084 0.388 0.124 0.512
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
274.788401 -thirteen.953847 18h19m09.22s -13d57m13.85s 0.06 0.06 90 18190921-1357138 14.991 0.041 0.043 18.nine 12.716 0.036 0.037 32.9 11.688 0.024 0.026 65.5 AAA 222 111 ccc 666655 0 0 610.307615 149.875 2.275 1.028 three.303
274.797491 -14.066624 18h19m11.40s -14d03m59.85s 0.06 0.06 90 18191139-1403598 13.965 0.036 0.038 48.vi xiii.019 0.053 0.053 24.9 12.61 0.042 0.043 28.0 AAA 222 111 000 555566 0 0 993.135358 160.109 0.946 0.409 1.355
274.804877 -thirteen.91268 18h19m13.17s -13d54m45.65s 0.06 0.06 45 18191317-1354456 14.356 0.035 0.037 33.9 xiii.504 0.055 0.056 15.9 13.273 0.049 0.05 15.2 AAA 222 111 000 666656 0 0 525.943465 136.214 0.852 0.231 1.083
274.900945 -13.903238 18h19m36.23s -13d54m11.66s 0.06 0.06 90 18193622-1354116 12.454 0.028 0.03 182.3 11.81 0.03 0.031 75.8 xi.36 0.024 0.026 79.9 AAA 222 111 000 556655 0 0 780.501247 116.308 0.644 0.45 1.094
274.836101 -14.037536 18h19m20.66s -14d02m15.13s 0.06 0.06 45 18192066-1402151 15.217 0.061 0.062 14.3 13.358 0.062 0.062 18.2 12.489 0.051 0.052 28.ii AAA 222 111 000 266666 0 0 954.544823 150.31 ane.859 0.869 2.728
274.862392 -13.84573 18h19m26.97s -13d50m44.63s 0.06 0.06 90 18192697-1350446 14.369 0.041 0.043 31.2 12.46 0.03 0.031 41.7 11.561 0.026 0.027 66.4 AAA 222 111 000 666633 0 0 581.867714 103.799 ane.909 0.899 two.808
274.858201 -13.918294 18h19m25.97s -13d55m05.86s 0.06 0.06 45 18192596-1355058 xiv.156 0.052 0.054 38.0 12.13 0.051 0.052 56.5 11.215 0.037 0.038 91.3 AAA 222 111 ccc 666666 0 0 680.283673 126.015 ii.026 0.915 ii.941
274.611341 -14.056347 18h18m26.72s -14d03m22.85s 0.06 0.06 90 18182672-1403228 xv.066 0.07 0.071 18.9 13.367 0.091 0.091 21.5 12.634 0.065 0.065 29.4 AAA 222 111 ccc 666666 0 0 949.652829 199.nineteen 1.699 0.733 2.432
274.880758 -thirteen.99956 18h19m31.38s -13d59m58.42s 0.06 0.06 xc 18193138-1359584 14.163 0.035 0.037 37.8 11.179 0.02 0.021 135.half dozen ix.765 0.017 0.019 347.1 AAA 222 111 000 556666 0 0 935.512452 137.762 2.984 one.414 iv.398
274.652526 -14.055106 18h18m36.61s -14d03m18.38s 0.06 0.06 90 18183660-1403183 15.035 0.052 0.054 19.four 13.099 0.04 0.041 27.5 12.254 0.041 0.041 41.7 AAA 222 111 c00 566666 0 0 908.109808 190.682 1.936 0.845 2.781
                              #2 (continued)                import                matplotlib.pyplot                as                plt                plt                .                scatter                (                t4                [                'j_m'                ]                -                t4                [                'h_m'                ],                t4                [                'h_m'                ]                -                t4                [                'k_m'                ],                s                =                5                ,                colour                =                'black'                )                plt                .                scatter                (                subset                [                'j_m'                ]                -                subset                [                'h_m'                ],                subset                [                'h_m'                ]                -                subset                [                'k_m'                ],                due south                =                thirty                ,                colour                =                'carmine'                ,                alpha                =                0.5                )                          
              <matplotlib.collections.PathCollection at 0x7f696f80ac18>                          

png

                              #3                uncomplicated                =                t4                [                'ra'                ,                'dec'                ,                'j_m'                ,                'h_m'                ,                'k_m'                ]                uncomplicated                          

Table masked=True length=929

ra dec j_m h_m k_m
deg deg mag mag mag
float64 float64 float64 float64 float64
274.429506 -13.870547 16.305 14.048 13.257
274.423821 -13.86974 14.802 12.635 11.768
274.424587 -13.739629 xvi.328 14.345 thirteen.405
274.433933 -thirteen.769502 16.281 14.057 12.956
274.437013 -13.885698 15.171 xiv.412 thirteen.742
274.433996 -13.752446 16.54 xiv.519 13.604
274.418138 -13.77215 17.98 xiv.61 13.456
274.433695 -13.899049 13.011 10.917 ten.013
274.425482 -13.77149 sixteen.086 13.709 12.503
... ... ... ... ...
274.81801 -14.001245 xvi.24 15.531 fifteen.252
274.822709 -14.037254 xv.999 14.009 13.077
274.880758 -13.99956 xiv.163 11.179 9.765
274.652526 -14.055106 15.035 xiii.099 12.254
274.760586 -thirteen.999927 16.329 14.488 13.617
274.831132 -fourteen.020027 16.203 13.238 12.016
274.972435 -13.760374 17.472 16.755 14.413
274.870009 -13.817775 16.933 14.514 12.957
274.735323 -13.941575 16.643 fourteen.88 14.291
274.866294 -13.841778 15.615 13.911 12.765
                              #3 (continued)                simple                .                write                (                '2mass_subset.csv'                ,                format                =                'ascii.csv'                ,                overwrite                =                True                ,                comment                =                '#'                )                          

bartleytiness1992.blogspot.com

Source: https://openastronomy.org/rcsc18/chapters/11-tabular-data/01-astropy-tables

0 Response to "Why Are Some Numbers Read as Masked Astropy"

إرسال تعليق

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel