predict_search¶
-
astropy.vo.client.conesearch.
predict_search
(url, *args, **kwargs)[source] [edit on github]¶ Predict the run time needed and the number of objects for a Cone Search for the given access URL, position, and radius.
Run time prediction uses
astropy.utils.timer.RunTimePredictor
. Baseline searches are done with starting and ending radii at 0.05 and 0.5 of the given radius, respectively.Extrapolation on good data uses least-square straight line fitting, assuming linear increase of search time and number of objects with radius, which might not be accurate for some cases. If there are less than 3 data points in the fit, it fails.
Warnings (controlled by
warnings
) are given when:- Fitted slope is negative.
- Any of the estimated results is negative.
- Estimated run time exceeds
astropy.utils.data.Conf.remote_timeout
.
Note
If
verbose=True
, extra log info will be provided. But unlikeconesearch_timer()
, timer info is suppressed.If
plot=True
, plot will be displayed. Plotting uses matplotlib.The predicted results are just rough estimates.
Prediction is done using
conesearch()
. Prediction forAsyncConeSearch
is not supported.Parameters: url : str
Cone Search access URL to use.
args, kwargs : see
conesearch()
Extra keyword
plot
is allowed and only used by this function and notconesearch()
.Returns: t_est : float
Estimated time in seconds needed for the search.
n_est : int
Estimated number of objects the search will yield.
Raises: AssertionError
If prediction fails.
ConeSearchError
If input parameters are invalid.
VOSError
If VO service request fails.