Giter Site home page Giter Site logo

casaluca / colte Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 0.0 129 KB

Stellar colour-effective temperature relations for the Gaia and 2MASS photometric systems. In Python and IDL.

License: MIT License

IDL 48.98% Python 51.02%
stars colour-teff photometry astronomy gaia

colte's Introduction

Gaia DR2, DR3 and 2MASS colour-Teff relations


The IDL and python routines provided here are equivalent, and they allow users to derive photometric stellar effective temperatures (Teff) using the colour-Teff relations of Casagrande et al. (2021). These relations have been obtained implementing Gaia and 2MASS photometry in the InfraRed Flux Method, and applying it to over 360,000 stars across different evolutionary stages in the GALAH+ DR3 survey. Please refer to the paper for further details on the method, and its validation against benchmark effective temperatures. Users must specify whether they are using Gaia DR2 or DR3 photometry.

  • Gaia DR2 photometry should be passed as is. For G>6 the routine will correct the Gaia DR2 G magnitude dependent offset according to this paper. G<6 will be removed to avoid uncalibrated systematics.
  • Gaia DR3 G-band photometry for sources with 2 or 6-parameter astrometric solutions is not corrected by the routine, and must not be corrected if photometry originates from gaiadr3.gaia_source. If however photometry has been retrieved from EDR3 (gaiaedr3.gaia_source), it is responsibility of the user to correct G magnitudes as per here. The routine will corrected for saturation G<8. In abundance of caution, note that G<6 will still be removed to avoid uncalibrated systematics. If the option to apply a quality cut based on "phot_bp_rp_excess_factor" is used, this excess factor must be passed as given in the Gaia catalog (i.e., do not use the corrected factor defined here).

For each stars, up to 12 different Teff can be derived from various combinations of Gaia G, BP, RP and 2MASS J, H and KS photometry. Different colour indices have different range of applicability. Users have the choice to compute for each star as many Teff as possible. If a MonteCarlo is called, a weighted averaged Teff is also provided. Effective temperatures from weighted average will likely have the best accuracy. However, in the pursue of precision, one might be better off by choosing effective temperatures from colour indices with small intrinsic scatter. Results are written in an output file, with the meaning of each column given in its header (e.g., "T_bprp" is Teff derived from the BP-RP colour index, and "eT_bprp" its MonteCarlo uncertainty, and so on for the other colour indices, "bpj", "rpk", "grp", etc... . "wTeff" is the weighted average for Teff and "ewTeff" its uncertainty).

See the routine for a detailed discussion on the required and optional input parameters, and practical examples. In short, to derive the effective temperature of a star, Gaia BP and RP photometry, surface gravity, metallicity, and reddening must be provided at the very least. It must also be specified whether Gaia DR2 or DR3 photometry is used. The routine will use colour dependent extinction coefficients derived from an assumed extinction law to deredden magnitudes. The option to use extinction coefficients from a different law is available. If e.g., surface gravity is not know, one can assume log(g)=2 for a giant and log(g)=4 for a dwarf, and check the impact if different values were adopted (using the MonteCarlo option and allowing for large uncertainties in log(g) is also advisable, although uncertainties will be centred around assumed input values). Same reasoning can be done for metallicity. If a star is unaffected by reddening, that should be passed as 0. The effects of surface gravity and metallicity will vary depending on colour index and Teff (stronger when moving to cooler stars). A star identifier, Gaia G and 2MASS J, H and KS photometry are also required inputs, but empty entries can be passed if some of these quantities are unavailable. The more photometric bands are provided, the more robustly a weighted averaged Teff can be derived. Optional input parameters are Gaia photometric flags ("phot_bp_rp_excess_factor" and "phot_proc_mode") and uncertainties on the adopted photometry, surface gravity, metallicity, and reddening. If uncertainties are not provided, the routines will assume reasonable uncertainties when doing a MonteCarlo. The routines will remove very bright stars for which Gaia and 2MASS photometry is likely to be unreliable, but users are ultimately responsible for what they pass in.

Here are four different examples of calling these routines in python or IDL. Note that the output file is always in csv format for the python routine, and ascii for IDL (unless the /csv keyword is set).

  1. For each star, compute effective temperatures with MonteCarlo uncertainties based on some known input errors. Colour-Teff relations for Gaia DR3 and default extinction law are used. Effective temperatures from each possible colour index and weighted averaged Teff are written into a filename called set1.dat
colte(sid,logg,feh,gg,bp,rp,j2,h2,k2,ebv,DR3=True,MC=True,ej2=ej2,eh2=eh2,ek2=ek2,eebv=ered,elogg=elogg,efeh=efeh,outfile='set1.dat')
colte,sid,logg,feh,gg,bp,rp,j2,h2,k2,ebv,/DR3,/MC,ej2=ej,eh2=eh,ek2=ek,eebv=ered,elogg=elogg,efeh=efeh,outfile='set1.dat'

  1. For each star, compute effective temperatures with MonteCarlo uncertainties based on default errors assumed by the routine. Colour-Teff relations for Gaia DR2 and Cardelli/O'Donnel (COD) extinction law are used. Effective temperatures from each possible colour index and weighted averaged Teff are written into a filename called set2.dat
colte(sid,logg,feh,gg,bp,rp,j2,h2,k2,ebv,DR2=True,COD=True,MC=True,outfile='set2.dat')
colte,sid,logg,feh,gg,bp,rp,j2,h2,k2,ebv,/DR2,/COD,/MC,outfile='set2.dat'

  1. For each star, compute effective temperatures with MonteCarlo uncertainties based on default errors assumed by the routine. Colour-Teff relations for Gaia DR3 and Cardelli/O'Donnel (COD) extinction law are used. Only the weighted averaged Teff and its uncertainty are written into the default output file (colte.csv in python, colte.dat in IDL)
colte(sid,logg,feh,gg,bp,rp,j2,h2,k2,ebv,DR3=True,COD=True,MC=True,wato=True')
colte,sid,logg,feh,gg,bp,rp,j2,h2,k2,ebv,/DR3,/COD,/MC,/wato

  1. For each star, compute effective temperatures in all available colour indices and dump the results into the default csv output file. Colour-Teff relations for Gaia DR2 and default extinction law are used. Note that weighted averaged Teff is not computed since MC keyword is not set
colte(sid,logg,feh,gg,bp,rp,j2,h2,k2,ebv,DR2=True)
colte,sid,logg,feh,gg,bp,rp,j2,h2,k2,ebv,/DR2,/csv

  1. Compute effective temperature for some notorious metal poor benchmark stars from here, based on their Gaia DR3 photometry, and 2MASS if available
colte('HD122563',1.40,-2.75,5.8750,6.3975,5.1787,-9,-9,-9,0.003,DR3=True,MC=True,eebv=0.01)
colte,'HD122563',1.40,-2.75,5.8750,6.3975,5.1787,-9,-9,-9,0.003,/DR3,/MC,eebv=0.01

will return from the only usable colour index BP-RP Teff=4678 ± 52 K, very close to the latest interferometric value (4635 ± 34 K).

colte('HD140283',3.65,-2.29,7.0360,7.3207,6.5618,6.014,5.696,5.588,0,DR3=True,MC=True)
colte,'HD140283',3.65,-2.29,7.0360,7.3207,6.5618,6.014,5.696,5.588,0,/DR3,/MC

will return the weighted averaged Teff=5785 ± 92 K, in excellent agreement with the latest interferometric value (5792 ± 55 K).

colte's People

Contributors

casaluca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

colte's Issues

Type of inputs

Hello Luca

I'm willing to use your code, however I cannot figure out which type the inputs should defined. Using floats the code gets stacked in the line 159, where the script requires the bp input to be a list. When I define the inputs as lists, the code gets stacked in the line 250, where it apparently demands the variables to be floats. Can you help me with this? I neither managed to run the code using numpy arrays.

Best regards

Riano E. Giribaldi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.