To retrieve data via your APIs (e.g., Python software), you must first construct the URL that enables you to access the desired tables. There are two methods for constructing such a URL:
- The simple way is to use the DIVA+ web page. For example, if you want to construct the URL to retrieve the astrometry of beta Pic b in the characterizations of the SPHERE IFS images reduced by a PCA algorithm, follow these steps:
a. Go to the DIVA+ ANIS portal
b. Click on “Search,” then “Advanced search,” and finally, “Detections characterizations.”
c. Fill in the fields as follows:
- star_name = “beta Pic”
- companion_letter = “b” (If you don’t fill in “companion_letter,” you may get characterizations around beta Pic that could include background stars. But, it can also be useful to search for detection in the data base that have not be flagged such as a companion)
- instrument_setup = “IFS”
- reduction_algorithm = “PCA”
d. Select the required Output columns (separation, position_angle, etc.)
e. Click on “Result table.”
f. Right-click on the “CSV” button and copy the required URL:
- A more complex but versatile way is to use the automatic DIVA+ documentation:
a. Go to the automatic DIVA+ documentation.
b. Click for exemple on “Detections characterizations” if you are interested by these values
c. Follow the documentation to construct your URL.
Alternatively, you can modify the URL generated in method 1. by using this automatic DIVA+ documentation and by clicking on the desired menu (Detections characterizations for the exemple). For example, if you want to remove the columns dmag, err_dmag, snr, refer to their corresponding numbers in the automatic documentation (14, 15, 16, 4, 5) and remove these numbers from the URL:
WARNING: The star name in the URL must be the DIVA+ name and not an other simbad name. This problem should be corrected in a futur release with the DIVA+ API (More explanation at the bottom of this page).
Finally, you can use the constructed URL in your python programs with the astropy.table module:
> from astropy.table import Table
>astrometry_table = Table.read(“https://data.lam.fr/server/search/divap/characterisations?a=1;37;38;2;3;32;21;22;33;34;35;6;7;8;9;10;11;12;13&c=2::in::HIP_27321;34::in::IFS;35::in::PCA&f=csv”)
etc.
The following example demonstrates a notebook that retrieves the astrometric coordinates of beta Pic b from DIVA+ and utilizes them to compute orbital parameters using the Orbitize module:
Another example designed to help identify which detections in a DIVA+ characterization table are companions:
WARNING: In a future release, we aim to develop a DIVA+ Python API. This API will streamline access to DIVA+ data through straightforward commands such as get_astrometry(‘beta pic’) or get_photometry(‘beta_pic’), among others.
To keep up-to-date with new features in DIVA+, you can subscribe to our divap_news mailing list. To do so, please send an email to sympa@lam.fr with “subscribe divap_news” as the subject line.