Gaia API Module
- class orbitize.gaia.GaiaLogProb(gaia_num, hiplogprob, dr='dr2', query=True, gaia_data=None)[source]
Class to compute the log probability of an orbit with respect to a single astrometric position point from Gaia. Uses astroquery to look up Gaia astrometric data, and computes log-likelihood. To be used in conjunction with orbitize.hipparcos.HipLogProb; see documentation for that object for more detail.
Follows Nielsen+ 2020 (studying the orbit of beta Pic b). Note that this class currently only fits for the position of the star in the Gaia epoch, not the star’s proper motion.
Note
In orbitize, it is possible to perform a fit to just the Hipparcos IAD, but not to just the Gaia astrometric data.
- Parameters
gaia_num (int) – the Gaia source ID of the object you’re fitting. Note that the dr2 and edr3 source IDs are not necessarily the same.
hiplogprob (orbitize.hipparcos.HipLogProb) – object containing all info relevant to Hipparcos IAD fitting
dr (str) – either ‘dr2’ or ‘edr3’
query (bool) – if True, queries the Gaia database for astrometry of the target (requires an internet connection). If False, uses user-input astrometric values (runs without internet).
gaia_data (dict) –
see query keyword above. If query set to False, then user must supply a dictionary of Gaia astometry in the following form:
- gaia_data = {
‘ra’: 139.4 # RA in degrees ‘dec’: 139.4 # Dec in degrees ‘ra_error’: 0.004 # RA error in mas ‘dec_error’: 0.004 # Dec error in mas
}
Written: Sarah Blunt, 2021
- compute_lnlike(raoff_model, deoff_model, samples, param_idx)[source]
Computes the log likelihood of an orbit model with respect to a single Gaia astrometric point. This is added to the likelihoods calculated with respect to other data types in
sampler._logl()
.- Parameters
raoff_model (np.array of float) – 2xM primary RA offsets from the barycenter incurred from orbital motion of companions (i.e. not from parallactic motion), where M is the number of orbits being tested, and raoff_model[0,:] are position predictions at the Hipparcos epoch, and raoff_model[1,:] are position predictions at the Gaia epoch
deoff_model (np.array of float) – 2xM primary decl offsets from the barycenter incurred from orbital motion of companions (i.e. not from parallactic motion), where M is the number of orbits being tested, and deoff_model[0,:] are position predictions at the Hipparcos epoch, and deoff_model[1,:] are position predictions at the Gaia epoch
samples (np.array of float) – R-dimensional array of fitting parameters, where R is the number of parameters being fit. Must be in the same order documented in
System
.param_idx – a dictionary matching fitting parameter labels to their indices in an array of fitting parameters (generally set to System.basis.param_idx).
- Returns
- array of length M, where M is the number of input
orbits, representing the log likelihood of each orbit with respect to the Gaia position measurement.
- Return type
np.array of float
- class orbitize.gaia.HGCALogProb(hip_id, hiplogprob, gost_filepath, hgca_filepath=None)[source]
Class to compute the log probability of an orbit with respect to the proper motion anomalies derived jointly from Gaia and Hipparcos using the HGCA catalogs produced by Brandt (2018, 2021). With this class, both Gaia and Hipparcos data will be considered. Do not need to pass in the Hipparcos class into System!
- Required auxiliary data:
HGCA of acceleration (either DR2 or EDR3)
Hipparcos IAD file (see orbitize.hipparcos for more info)
Gaia Observation Forecast Tool (GOST) CSV output (https://gaia.esac.esa.int/gost/).
For GOST, after entering the target name and resolving its coordinates, use 2014-07-26T00:00:00 as the start date. For the end date, use 2016-05-23T00:00:00 for DR2 and 2017-05-28T00:00:00 for EDR3.
- Parameters
hip_id (int) – the Hipparcos source ID of the object you’re fitting.
hiplogprob (orbitize.hipparcos.HipLogProb) – object containing all info relevant to Hipparcos IAD fitting
gost_filepath (str) – path to CSV file outputted by GOST
hgca_filepath (str) – path to HGCA catalog FITS file. If None, will download and store in orbitize.DATADIR
Written: Jason Wang, 2022
- compute_lnlike(raoff_model, deoff_model, samples, param_idx)[source]
Computes the log likelihood of an orbit model with respect to a single Gaia astrometric point. This is added to the likelihoods calculated with respect to other data types in
sampler._logl()
.- Parameters
raoff_model (np.array of float) – NxM primary RA offsets from the barycenter incurred from orbital motion of companions (i.e. not from parallactic motion), where N is the number of epochs of combined from Hipparcos and Gaia and M is the number of orbits being tested, and raoff_model[0,:] are position predictions at the Hipparcos epoch, and raoff_model[1,:] are position predictions at the Gaia epoch
deoff_model (np.array of float) – NxM primary decl offsets from the barycenter incurred from orbital motion of companions (i.e. not from parallactic motion), where N is the number of epochs of combined from Hipparcos and Gaia and M is the number of orbits being tested, and deoff_model[0,:] are position predictions at the Hipparcos epoch, and deoff_model[1,:] are position predictions at the Gaia epoch
samples (np.array of float) – R-dimensional array of fitting parameters, where R is the number of parameters being fit. Must be in the same order documented in
System
.param_idx – a dictionary matching fitting parameter labels to their indices in an array of fitting parameters (generally set to System.basis.param_idx).
- Returns
- array of length M, where M is the number of input
orbits, representing the log likelihood of each orbit with respect to the Gaia position measurement.
- Return type
np.array of float