Astronomy

Plotting GAIA barycentric radial velocity data with python

Plotting GAIA barycentric radial velocity data with python


We are searching data for your request:

Forums and discussions:
Manuals and reference books:
Data from registers:
Wait the end of the search in all databases.
Upon completion, a link will appear to access the found materials.

Does anybody know of a good tutorial on how to use python and astropy to generate plots of GAIA, RAVE or any other database of barycentric (heliocentric) radial velocity data of stars in our galaxy?

I'd like to generate various plots of the heliocentric velocities of stars in our galaxy, making different restrictions on distances from the sun, and I'd like to see what the data looks like with correction for the proper motion of the sun and without. Now, I know I could find plots done by others, but I really want to learn how to generate my own plots.

I'm pretty new to python, so please target answers accordingly…

(added later:) There's probably a simple astropy function that if you call it with the right variables, say, a certain slice of the sky in RA and Dec, and a certain distance range in kpc, it will spit back a list of all the stars in that region along with their radial velocities. I just need to learn the name of that function and how to call it.


Breakout groups ([A], [B]) are indicated:

  • John Barnes (OU) [A]
  • Ioana Ciuca (MSSL, UCL) (PhD student) [B]
  • Tom Crossland (UCL) (PhD student) [A]
  • Graham Fleming (UCLan) (MSc student) [A]
  • Keith Inight, Liv JM (MSc) [A]
  • Catriona Murray (IoA, Cambridge) [B]
  • John Murrell (Amateur astronomer) [B]
  • Heidi Thiemann (OU) [A]
  • Eugene Vasiliev (IoA, Cambridge) [B]
  • Andrew Wilson (Exeter) (PhD student) [B]
  • Silvia Zane (MSSL, UCL) [B]
  • .

Tutors (Groups A, B)

  • Giorgia Busso (IoA, Cambridge) [B]
  • Nigel Hambly (IfA, Edinburgh) [B]
  • Floor van Leeuwen (IoA, Cambridge) [A]
  • George Seabroke (MSSL, UCL) [Remote dial in]
  • Mark Taylor (Bristol) [A]
  • Nicholas Walton (IoA, Cambridge) [A/B]

Attendees

  • Shadab Alam (IfA, Edinburgh)
  • David Behrendt (IfA, Edinburgh) [PhD student]
  • Beth Biller (IfA, Edinburgh)
  • Aaron Bradley (IfA, Edinburgh) [PhD student]
  • Abi Chown (Bath) [PhD student]
  • Raphael Errani (IfA, Edinburgh) [PhD student]
  • Annette Ferguson (IfA, Edinburgh)
  • Olivia Jones (UKATC, Edinburgh)
  • Pamela Klaassen (UKATC, Edinburgh)
  • Pete Kuzma (IfA, Edinburgh)
  • Marco Lam (ARI, LJMU)
  • Paul Ross McWhirter (IfA, Edinburgh) [PhD student]
  • Keith Palin (IfA, Edinburgh)
  • Tatiana Pavlidou (St Andrews) [PhD student]
  • Ruben Sanchez-Janssen (UKATC, Edinburgh)
  • Hermine Schnetler (IfA, Edinburgh)
  • Anna Lisa Varri (IfA, Edinburgh)
  • Rosemary Wyse (JHU)​

Tutors

  • Nigel Hambly (IfA, Edinburgh)
  • Floor van Leeuwen (IoA, Cambridge)
  • Nick Rowell (IfA, Edinburgh)
  • George Seabroke (MSSL, UCL)
  • Mark Taylor (Bristol)
  • Nicholas Walton (IoA, Cambridge)

Let’s review how we got to this point.

We made an ADQL query to the Gaia server to get data for stars in the vicinity of GD-1.

We transformed the coordinates to the GD1Koposov10 frame so we could select stars along the centerline of GD-1.

We plotted the proper motion of the centerline stars to identify the bounds of the overdense region.

We made a mask that selects stars whose proper motion is in the overdense region.

At this point we have downloaded data for a relatively large number of stars (more than 100,000) and selected a relatively small number (around 1000).

It would be more efficient to use ADQL to select only the stars we need. That would also make it possible to download data covering a larger region of the sky.

However, the selection we did was based on proper motion in the GD1Koposov10 frame. In order to do the same selection in ADQL, we have to work with proper motions in ICRS.

As a reminder, here’s the rectangle we selected based on proper motion in the GD1Koposov10 frame.


Plotting GAIA barycentric radial velocity data with python - Astronomy

Functions related to astrometry suitable for use with data from the Gaia astrometry mission.

The methods here are not specific to the Gaia mission, but the parameters of the functions and their units are specified in a form that is convenient for use with Gaia data, in particular the gaia_source catalogue available from http://gea.esac.esa.int/archive/ and copies or mirrors.

  • position and velocity vector calculation and manipulation
  • distance estimation from parallaxes
  • astrometry propagation to different epochs

Position and velocity vectors

Functions are provided for converting the astrometric parameters contained in the Gaia catalogue to ICRS Cartesian position (XYZ) and velocity (UVW) vectors. Functions are also provided to convert these vectors between ICRS and Galactic or Ecliptic coordinates. The calculations are fairly straightforward, and follow the equations laid out in section 1.5.6 of The Hipparcos and Tycho Catalogues, ESA SP-1200 (1997) and also section 3.1.7 of the Gaia DR2 documentation (2018).

These functions will often be combined for instance to calculate the position and velocity in galactic coordinates from Gaia catalogue values, the following expressions may be useful: though note that these particular examples simply invert parallax to provide distance estimates, which is not generally valid. Note also that these functions do not attempt to correct for solar motion. Such adjustments should be carried out by hand on the results of these functions if they are required.

Functions for calculating errors on the Cartesian components based on the error and correlation quantities from the Gaia catalogue are not currently provided. They would require fairly complicated invocations. If there is demand they may be implemented in the future.

Distance estimation

  • C.A.L.Bailer-Jones, "Estimating distances from parallaxes", PASP 127, p994 (2015) 2015PASP..127..994B
  • T.L.Astraatmadja and C.A.L.Bailer-Jones, "Estimating Distances from Parallaxes. II. Performance of Bayesian Distance Estimators on a Gaia-like Catalogue", ApJ 832, a137 (2016) 2016ApJ. 832..137A
  • X.Luri et al., "Gaia Data Release 2: Using Gaia Parallaxes", A&A in press (2018) arXiv:1804.09376

The functions provided here correspond to calculations from Astraatmadja & Bailer-Jones, "Estimating Distances from Parallaxes. III. Distances of Two Million Stars in the Gaia DR1 Catalogue", ApJ 833, a119 (2016) 2016ApJ. 833..119A based on the Exponentially Decreasing Space Density prior defined therein. This implementation was written with reference to the Java implementation by Enrique Utrilla (DPAC).

These functions are parameterised by a length scale L that defines the exponential decay (the mode of the prior PDF is at r=2L). Some value for this length scale, specified in parsec, must be supplied to the functions as the lpc parameter.

Note that the values provided by these functions do not match those from the paper Bailer-Jones et al. "Estimating Distances from Parallaxes IV: Distances to 1.33 Billion stars in Gaia Data Release 2", accepted for AJ (2018) arXiv:1804.10121. The calculations of that paper differ from the ones presented here in several ways: it uses a galactic model for the direction-dependent length scale not currently available here, it pre-applies a parallax correction of -0.029mas, and it uses different uncertainty measures and in some cases (bimodal PDF) a different best distance estimator.

Epoch Propagation

The Gaia source catalogue provides, for at least some sources, the six-parameter astrometric solution (Right Ascension, Declination, Parallax, Proper motion in RA and Dec, and Radial Velocity), along with errors on these values and correlations between these errors. While a crude estimate of the position at an earlier or later epoch than that of the measurement can be made by multiplying the proper motion components by epoch difference and adding to the measured position, a more careful treatment is required for accurate propagation between epochs of the astrometric parameters, and if required their errors and correlations. The expressions for this are set out in section 1.5.5 (Volume 1) of The Hipparcos and Tycho Catalogues, ESA SP-1200 (1997) (but see below), and the code is based on an implementation by Alexey Butkevich and Daniel Michalik (DPAC). A correction is applied to the SP-1200 treatment of radial velocity uncertainty following Michalik et al. 2014 2014A&A. 571A..85M because of their better handling of small radial velocities or parallaxes.

The calculations give the same results, though not exactly in the same form, as the epoch propagation functions available in the Gaia archive service.

polarXYZ( phi, theta, r ) Converts from spherical polar to Cartesian coordinates.

  • Parameters:
    • phi (floating point): longitude in degrees
    • theta (floating point): latitude in degrees
    • r (floating point): radial distance
    • (array of floating point): 3-element vector giving Cartesian coordinates
    • polarXYZ(ra, dec, distance_estimate)
    • polarXYZ(l, b, 3262./parallax) - calculates vector components in units of light year in the galactic system, on the assumption that distance is the inverse of parallax

    astromXYZ( ra, dec, parallax ) Calculates Cartesian components of position from RA, Declination and parallax. This is a convenience function, equivalent to:

    Note that this performs distance scaling using a simple inversion of parallax, which is not in general reliable for parallaxes with non-negligable errors. Use at your own risk.

    • Parameters:
      • ra (floating point): Right Ascension in degrees
      • dec (floating point): Declination in degrees
      • parallax (floating point): parallax in mas
      • (array of floating point): 3-element vector giving equatorial space coordinates in parsec
      • astromXYZ(ra, dec, parallax)
      • icrsToGal(astromXYZ(ra, dec, parallax))

      icrsToGal( xyz ) Converts a 3-element vector representing ICRS (equatorial) coordinates to galactic coordinates. This can be used with position or velocity vectors.

      The input vector is multiplied by the matrix AG', given in Eq. 3.61 of the Gaia DR2 documentation, following Eq. 1.5.13 of the Hipparcos catalogue.

      The output coordinate system is right-handed, with the three components positive in the directions of the Galactic center, Galactic rotation, and the North Galactic Pole respectively.

      • Parameters:
        • xyz (array of floating point): 3-element vector giving ICRS Cartesian components
        • (array of floating point): 3-element vector giving Galactic Cartesian components
        • icrsToGal(polarXYZ(ra, dec, distance))

        galToIcrs( xyz ) Converts a 3-element vector representing galactic coordinates to ICRS (equatorial) coordinates. This can be used with position or velocity vectors.

        The input vector is multiplied by the matrix AG, given in Eq. 3.61 of the Gaia DR2 documentation, following Eq. 1.5.13 of the Hipparcos catalogue.

        The input coordinate system is right-handed, with the three components positive in the directions of the Galactic center, Galactic rotation, and the North Galactic Pole respectively.

        • Parameters:
          • xyz (array of floating point): 3-element vector giving Galactic Cartesian components
          • (array of floating point): 3-element vector giving ICRS Cartesian components
          • galToIcrs(polarXYZ(l, b, distance))

          icrsToEcl( xyz ) Converts a 3-element vector representing ICRS (equatorial) coordinates to ecliptic coordinates. This can be used with position or velocity vectors.

          The transformation corresponds to that between the coordinates (ra,dec) and (ecl_lon,ecl_lat) in the Gaia source catalogue (DR2).

          • Parameters:
            • xyz (array of floating point): 3-element vector giving ICRS Cartesian components
            • (array of floating point): 3-element vector giving ecliptic Cartesian components
            • icrsToEcl(polarXYZ(ra, dec, distance))

            eclToIcrs( xyz ) Converts a 3-element vector representing ecliptic coordinates to ICRS (equatorial) coordinates. This can be used with position or velocity vectors.

            The transformation corresponds to that between the coordinates (ecl_lon,ecl_lat) and (ra,dec) in the Gaia source catalogue (DR2).

            • Parameters:
              • xyz (array of floating point): 3-element vector giving ecliptic Cartesian coordinates
              • (array of floating point): 3-element vector giving ICRS Cartesian coordinates
              • eclToIcrs(polarXYZ(ecl_lon, ecl_lat, distance))

              astromUVW( astrom6 ) Calculates Cartesian components of velocity from quantities available in the Gaia source catalogue. The output is in the same coordinate system as the inputs, that is ICRS for the correspondingly-named Gaia quantities.

              The input astrometry parameters are represented by a 6-element array, with the following elements: The units used by this function are the units used in the gaia_source table.

              This convenience function just invokes the 7-argument astromUVW function using the inverted parallax for the radial distance, and without invoking the Doppler correction. It is exactly equivalent to: Note this naive inversion of parallax to estimate distance is not in general reliable for parallaxes with non-negligable errors.

              • Parameters:
                • astrom6 (array of floating point): vector of 6 astrometric parameters as provided by the Gaia source catalogue
                • (array of floating point): 3-element vector giving equatorial velocity components in km/s
                • astromUVW(array(ra, dec, parallax, pmra, pmdec, radial_velocity))
                • icrsToGal(astromUVW(array(ra, dec, parallax, pmra, pmdec, radial_velocity)))

                astromUVW( ra, dec, pmra, pmdec, radial_velocity, r_parsec, useDoppler ) Calculates Cartesian components of velocity from the observed position and proper motion, radial velocity and radial distance, with optional light-time correction. The output is in the same coordinate system as the inputs, that is ICRS for the correspondingly-named Gaia quantities.

                The radial distance must be supplied using the r_parsec parameter. A naive estimate from quantities in the Gaia source catalogue may be made with the expression 1000./parallax , though note that this simple inversion of parallax is not in general reliable for parallaxes with non-negligable errors.

                The calculations are fairly straightforward, following Eq. 1.5.74 from the Hipparcos catalogue. A (usually small) Doppler factor accounting for light-time effects can also optionally be applied. The effect of this is to multiply the returned vector by a factor of 1/(1-radial_velocity/c) , as discussed in Eq. 1.2.21 of the Hipparcos catalogue.

                Note that no attempt is made to adjust for solar motion.

                • Parameters:
                  • ra (floating point): Right Ascension in degrees
                  • dec (floating point): Declination in degrees
                  • pmra (floating point): proper motion in RA * cos(dec) in mas/yr
                  • pmdec (floating point): proper motion in declination in mas/yr
                  • radial_velocity (floating point): radial velocity in km/s
                  • r_parsec (floating point): radial distance in parsec
                  • useDoppler (boolean): whether to apply the Doppler factor to account for light-time effects
                  • (array of floating point): 3-element vector giving equatorial velocity components in km/s
                  • astromUVW(ra, dec, pmra, pmdec, radial_velocity, dist, true)
                  • icrsToGal(astromUVW(ra, dec, pmra, pmdec, radial_velocity, 1000./parallax, false))

                  epochProp( tYr, astrom6 ) Propagates the astrometry parameters, supplied as a 6-element array, to a different epoch.

                  The input and output astrometry parameters are each represented by a 6-element array, with the following elements: The units used by this function are the units used in the gaia_source table.

                  • Parameters:
                    • tYr (floating point): epoch difference in years
                    • astrom6 (array of floating point): astrometry at time t0, represented by a 6-element array as above (a 5-element array is also permitted where radial velocity is zero or unknown)
                    • (array of floating point): astrometry at time t0+tYr , represented by a 6-element array as above
                    • epochProp(-15.5, array(ra,dec,parallax,pmra,pmdec,radial_velocity)) - calculates the astrometry at 2000.0 of gaia_source values that were observed at 2015.5

                    epochPropErr( tYr, astrom22 ) Propagates the astrometry parameters and their associated errors and correlations, supplied as a 22-element array, to a different epoch.

                    The input and output astrometry parameters with associated error and correlation information are each represented by a 22-element array, with the following elements: Note the correlation coefficients, always in the range -1..1, are dimensionless.

                    This is clearly an unwieldy function to invoke, but if you are using it with the gaia_source catalogue itself, or other similar catalogues with the same column names and units, you can invoke it by just copying and pasting the example shown in this documentation.

                    This transformation is only applicable for radial velocities determined independently of the astrometry, such as those obtained with a spectrometer. It is not applicable for the back-transformation of data already propagated to another epoch.

                    • Parameters:
                      • tYr (floating point): epoch difference in years
                      • astrom22 (array of floating point): astrometry at time t0, represented by a 22-element array as above
                      • (array of floating point): astrometry at time t0+tYr, represented by a 22-element array as above
                      • epochPropErr(-15.5, array( ra,dec,parallax,pmra,pmdec,radial_velocity, ra_error,dec_error,parallax_error,pmra_error,pmdec_error,radial_velocity_error, ra_dec_corr,ra_parallax_corr,ra_pmra_corr,ra_pmdec_corr, dec_parallax_corr,dec_pmra_corr,dec_pmdec_corr, parallax_pmra_corr,parallax_pmdec_corr, pmra_pmdec_corr)) - calculates the astrometry with all errors and correlations at 2000.0 for gaia_source values that were observed at 2015.5.

                      rvMasyrToKms( rvMasyr, plxMas ) Converts from normalised radial velocity in mas/year to unnormalised radial velocity in km/s.

                      The output is calculated as AU_YRKMS * rvMasyr / plxMas , where AU_YRKMS=4.740470446 is one Astronomical Unit in km.yr/sec.

                      • Parameters:
                        • rvMasyr (floating point): normalised radial velocity, in mas/year
                        • plxMas (floating point): parallax in mas
                        • (floating point): radial velocity in km/s

                        rvKmsToMasyr( rvKms, plxMas ) Converts from unnormalised radial velocity in km/s to normalised radial velocity in mas/year.

                        The output is calculated as rvKms * plxMas / AU_YRKMS , where AU_YRKMS=4.740470446 is one Astronomical Unit in km.yr/sec.

                        • Parameters:
                          • rvKms (floating point): unnormalised radial velocity, in mas/year
                          • plxMas (floating point): parallax in mas
                          • (floating point): radial velocity in mas/year

                          distanceEstimateEdsd( plxMas, plxErrorMas, lPc ) Best estimate of distance using the Exponentially Decreasing Space Density prior. This estimate is provided by the mode of the PDF.

                          • Parameters:
                            • plxMas (floating point): parallax in mas
                            • plxErrorMas (floating point): parallax error in mas
                            • lPc (floating point): length scale in parsec
                            • (floating point): best distance estimate in parsec

                            distanceBoundsEdsd( plxMas, plxErrorMas, lPc ) Calculates the 5th and 95th percentile confidence intervals on the distance estimate using the Exponentially Decreasing Space Density prior.

                            Note this function has to numerically integrate the PDF to determine quantile values, so it is relatively slow.

                            • Parameters:
                              • plxMas (floating point): parallax in mas
                              • plxErrorMas (floating point): parallax error in mas
                              • lPc (floating point): length scale in parsec
                              • (array of floating point): 2-element array giving the 5th and 95th percentiles in parsec of the EDSD distance PDF

                              distanceQuantilesEdsd( plxMas, plxErrorMas, lPc, qpoints, . ) Calculates arbitrary quantiles for the distance estimate using the Exponentially Decreasing Space Density prior.

                              Note this function has to numerically integrate the PDF to determine quantile values, so it is relatively slow.

                              • Parameters:
                                • plxMas (floating point): parallax in mas
                                • plxErrorMas (floating point): parallax error in mas
                                • lPc (floating point): length scale in parsec
                                • qpoints (floating point, one or more): one or more required quantile cut points, each in the range 0..1
                                • (array of floating point): array with one element for each of the supplied qpoints giving the corresponding distance in parsec
                                • distanceQuantilesEdsd(parallax, parallax_error, 1350, 0.5)[0] calculates the median of the EDSD distance PDF using a length scale of 1.35kpc
                                • distanceQuantilesEdsd(parallax, parallax_error, 3000, 0.01, 0.99) returns a 2-element array giving the 1st and 99th percentile of the distance estimate using a length scale of 3kpc

                                distanceToModulus( distPc ) Converts a distance in parsec to a distance modulus. The formula is 5*log10(distPc)-5 .

                                • Parameters:
                                  • distPc (floating point): distance in parsec
                                  • (floating point): distance modulus in magnitudes

                                  modulusToDistance( distmod ) Converts a distance modulus to a distance in parsec. The formula is 10^(1+distmod/5) .

                                  • Parameters:
                                    • distmod (floating point): distance modulus in magnitudes
                                    • (floating point): distance in parsec

                                    AU_YRKMS This quantity is A_v, the Astronomical Unit expressed in km.yr/sec. See the Hipparcos catalogue (ESA SP-1200) table 1.2.2 and Eq. 1.5.24.

                                    PC_AU Parsec in Astronomical Units, equal to 648000/PI.


                                    Author information

                                    Affiliations

                                    Department of Physics and Astronomy, University of Sheffield, Sheffield, UK

                                    Steven G. Parsons, Alexander J. Brown, Stuart P. Littlefair, Vikram S. Dhillon, Martin J. Dyer & David I. Sahman

                                    Instituto de Astrofísica de Canarias, La Laguna, Tenerife, Spain

                                    Department of Physics, University of Warwick, Coventry, UK

                                    Thomas R. Marsh & Matthew J. Green

                                    Department of Astronomy, Boston University, Boston, MA, USA

                                    Department of Astrophysics, Radboud University Nijmegen, Nijmegen, The Netherlands

                                    Institute of Astronomy, University of Cambridge, Cambridge, UK

                                    You can also search for this author in PubMed Google Scholar

                                    You can also search for this author in PubMed Google Scholar

                                    You can also search for this author in PubMed Google Scholar

                                    You can also search for this author in PubMed Google Scholar

                                    You can also search for this author in PubMed Google Scholar

                                    You can also search for this author in PubMed Google Scholar

                                    You can also search for this author in PubMed Google Scholar

                                    You can also search for this author in PubMed Google Scholar

                                    You can also search for this author in PubMed Google Scholar

                                    You can also search for this author in PubMed Google Scholar

                                    You can also search for this author in PubMed Google Scholar

                                    Contributions

                                    All authors contributed to the work presented in this paper. S.G.P. reduced all the spectroscopic and photometric data and carried out the SED fitting. S.G.P. and V.S.D. performed the Gran Telescopio Canarias observations. A.J.B. performed the radial-velocity and lightcurve fitting. S.P.L. wrote the Python code that implemented the Gaussian processes in the lightcurve fitting. V.S.D., S.P.L., T.R.M., S.G.P., E.B., M.J.D., M.J.G. and D.I.S. all contributed to the development and support of HiPERCAM. J.J.H. analysed the pulsations in the HiPERCAM lightcurves. A.G.I. investigated the internal structure of the white dwarfs and the evolution of the binary. All authors reviewed the manuscript.

                                    Corresponding author


                                    • ESA/ESAC: http://gea.esac.esa.int/archive/
                                    • CDS: http://cdsweb.u-strasbg.fr/gaia
                                    • ARI: http://gaia.ari.uni-heidelberg.de/index.html
                                    • AIP: https://gaia.aip.de/
                                    • ASI/ASCD: http://gaia.asdc.asi.it/
                                    • ADQL Gaia DR1 cookbook: https://gaia.ac.uk/data/gaia-data-release-1/adql-cookbook
                                    • CDS ADQL quick info sheet: http://tapvizier.u-strasbg.fr/adql/help.html
                                    • GAVO ADQL help sheet: http://docs.g-vo.org/adqlref/adqlref.pdf
                                    • ARI ADQL tutorial page: http://docs.g-vo.org/adql-gaia with associated slides http://docs.g-vo.org/adql-gaia/html/pop.pdf

                                    Installing the 'helper' clients:

                                    Topcat (recent version, preferably v4.6+): see http://www.star.bris.ac.uk/

                                    mbt/topcat/#install
                                    Aladin (recent version, preferably v9+): see http://aladin.u-strasbg.fr/java/nph-aladin.pl?frame=downloading
                                    Java is required by Topcat and Aladin: any recent java version is OK, but Oracle/Hotspot Java SE (from https://www.oracle.com/technetwork/java/index.html) is recommended rather than OpenJDK. On linux you can run “java -version” to see which you have.

                                    Instructions for installing Python

                                    If you don’t already have a Python (scientific) stack on your computer, you can easily install the Anaconda stack. This comes with “batteries included”, and comes packed with numpy (numerical python), scipy (scientific python), Astropy (astronomical Python library), and matplotlib (a plotting library).

                                    You can get the Python 2.7 or Python 3.5 Anaconda version from:

                                    If you don’t know which Python version to chose, then select Python 3.5 (graphical or command line installer -- either is OK).


                                    Plotting GAIA barycentric radial velocity data with python - Astronomy

                                    Jo Bovy - bovy at astro dot utoronto dot ca

                                    See AUTHORS.txt for a full list of contributors.

                                    If you find this code useful in your research, please let me know. If you use galpy in a publication, please cite Bovy (2015) and link to http://github.com/jobovy/galpy. See the acknowledgement documentation section for a more detailed guide to citing parts of the code. Thanks!

                                    The latest documentation can be found here. You can also join the galpy slack community for any questions related to galpy join here.

                                    If you find any bug in the code, please report these using the Issue Tracker or by joining the galpy slack community.

                                    If you are having issues with the installation of galpy , please first consult the Installation FAQ.

                                    PYTHON VERSIONS AND DEPENDENCIES

                                    galpy supports Python 3. Specifically, galpy supports Python 3.7, 3.8, and 3.9. It should also work on earlier Python 3.* versions, but this is not extensively tested on an ongoing basis and because libraries that galpy depends on are dropping earlier Python 3.* versions, galpy itself likely doesn't fully work on them. GitHub Actions CI builds regularly check support for Python 3.9 (and of 3.7, and 3.8 using a more limited, core set of tests) on Linux and Windows Appveyor builds regularly check support for Python 3.9 on Windows. While most of galpy likely works in Python 2.7, this is no longer tested and Python 2.7 is no longer officially supported.

                                    This package requires Numpy, Scipy, and Matplotlib. Certain advanced features require the GNU Scientific Library (GSL), with action calculations requiring version 1.14 or higher. Other optional dependencies include:

                                    • Support for providing inputs and getting outputs as Quantities with units is provided through astropy .
                                    • Querying SIMBAD for the coordinates of an object in the Orbit.from_name initialization method requires astroquery .
                                    • Plotting arbitrary functions of Orbit attributes requires numexpr .
                                    • Constant-anisotropy DFs in galpy.df.constantbetadf require JAX .
                                    • Use of SnapshotRZPotential and InterpSnapshotRZPotential requires pynbody .

                                    Other parts of the code may require additional packages and you will be alerted by the code if they are not installed.

                                    If you are interested in contributing to galpy's development, take a look at this brief guide on the wiki. This will hopefully help you get started!

                                    Some further development notes can be found on the wiki. This includes a list of small and larger extensions of galpy that would be useful here as well as a longer-term roadmap here. Please let the main developer know if you need any help contributing!


                                    Figure 8: Two-dimensional posterior distributions for all model parameters. The first five parameters are for the Keplerian signal, b is offset, ω and ln τ are respectively the amplitude and logarithmic time scale of the MA model. The names of data sets are denoted by the superscripts for relevant parameters. The “pre” and “post” superscripts denote the HARPSpre and HARPSpost sets, respectively. The contours show the 68% and 90% confidence levels. The dashed lines denote the MAP parameter values in the posterior distribution while the solid lines show the 10% and 90% quantiles of the distribution.

                                    Figure 9: Posterior distribution of the mass and orbital period of ϵ Indi A b. The contour is calculated from a subsample drawn by the MCMC chains from the posterior distribution. Three contour levels corresponding to one, two and three sigma levels are shown by black lines. The MAP value (white solid lines) and the 10% and 90% quantiles (white dashed lines) of the orbital period and planetary mass are shown in the histograms of the mass and orbital period. The black cross in the contour denotes the MAP solution. This MAP solution differs from the mean solution because the distributions of the mass and orbital parameters are not Gaussian and are asymmetric.

                                    Attributes vs functions

                                    shape is an attribute, so we display its value without calling it as a function.

                                    head is a function, so we need the parentheses.

                                    Now we can extract the columns we want from skycoord_gd1 and add them as columns in the DataFrame . phi1 and phi2 contain the transformed coordinates.

                                    pm_phi1_cosphi2 and pm_phi2 contain the components of proper motion in the transformed frame.

                                    Detail If you notice that SkyCoord has an attribute called proper_motion , you might wonder why we are not using it.

                                    We could have: proper_motion contains the same data as pm_phi1_cosphi2 and pm_phi2 , but in a different format.

                                    Before we go any further, we will take all of the steps that we have done and consolidate them into a single function that we can use to take the coordinates and proper motion that we get as an Astropy Table from our Gaia query, transform it into a Pandas DataFrame , and add columns representing the reflex corrected GD-1 coordinates and proper motions. This is a general function that we will use multiple times as we build different queries so we want to write it once and then call the function rather than having to copy and paste the code over and over again.

                                    Here is how we use the function:


                                    Finding Unresolved Stellar Companions in Kepler Planet Hosts with Gaia

                                    At this week’s meeting, I updated the group about my project with D F-M, Andy Casey (Monash University), and Tim Morton (USC- the west coast one). We are looking into how to determine how the binarity of Kepler planet hosts influence planet formation. That sounds really exciting but “determine” is doing a lot of work in that sentence. First, we have to figure out which stars are (unresolved) binaries. There are a couple of different ways in which we’ll go about doing this, but the one highlighted this week is the fruit of Andy’s work.

                                    Alongside the astrometric and RV measurements, Gaia also lists errors associated with fits. For unresolved binaries, trying to fit the astrometric or RV curve of a single star will yield an uncharacteristically large amount of error. Through Andy’s work (which I can’t claim to understand beyond the surface level), we can turn this error into a likelihood that the star is not a single star.

                                    Incredibly, this seems to work really well! In the color-magnitude diagram above of the KIC stars with astrometric measurements, we can pick out the stars that have a low probability of being single above the main sequence right where we would expect binaries to be.

                                    Interestingly, the same plot for KIC stars with RV measurements looks very different. There are a few selection effects here we’ll have to figure out: not all stars have both astrometric and RV measurements and (as pointed out by Trevor) the population of binaries detected by astrometry is different from that of RV binaries. Known spectroscopic and eclipsing binaries are picked up through RV jitter but not astrometric jitter!

                                    Figuring out how exactly accurate this is will be key. Because neither method is batting 1.000, exactly how to quantify “I’m pretty sure this star is not a single” represents an interesting puzzle for our near-future selves.


                                    Watch the video: Interpolationspolynom Lagrange berechnen. Einfach Erklärt + Vor-u0026Nachteile (February 2023).