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