5/25/2023 0 Comments Astrometry schoolsSome example files/scripts are found at the examples entry of the documentation. The main page can then be found at (assuming you are in the project root). Then generate the documentation (using Sphinx) by: make documentation To access it, first install the package and the development dependencies: make dependencies There is a local documentation available (defined by docstrings). Then build & install the package with (does not install development dependencies): make install Documentationĭocumentation is available at Readthedocs Create and activate one by running: make virt-env It is heavily recommended to use a virtual environment. by cloning, or downloading & extracting the repo ZIP). Installing the package from source is made easy by the Makefile, once you have a local copy of the repository (e.g. Note that the development and testing of this package is done on Linux, so it Simpy install the package usng PyPi: pip install astrometry-net-client Installation required python version 3.8 or greater. wcs_file () # second call uses previously obtained result Installation wcs_file () # first call makes the actual request wcs_2 = job. Similarely, retrieving files like the WCS file (after a successful Job) will be done once and cached thereafter: wcs = job. This is realized by the following initialize & send pattern: r = Request ( url ) # initialize (request not yet sent) response = r. One of the core ideas of this package is to try and make the minimal amount of requests possible and make them at a clear time. Or with the higher level Client : 1 from astrometry_net_client import Client2 3 c = Client ( api_key = 'xxxxxxxxxx' )4 5 # WARNING: this can take a while, as it blocks until the file is solved.6 # wcs will be None if upload is not successful7 wcs = c. info ()) # works even though the job failed until_done () # blocks until it is finished 8 job = submission. Using this package, these steps are (note that this is not the ideal way to upload multiple files): 1 from astrometry_net_client import Session 2 from astrometry_net_client import FileUpload 3 4 s = Session ( api_key = 'xxxxxxxxx' ) 5 upl = FileUpload ( 'some/file/name', session = s ) # 1. found objects) and result files like the generated WCS header can be retrieved. The job then takes some time to process, and when it is done it can either be successful or fail. When the submission is done preprocessing, and the system is ready to process the uploaded file, a job ( Job) is spawned for each image. This has to do some general processing, even before the uploaded image is processed. The upload creates a submission ( Submission), unique for each upload. Upload some file ( UploadFile), which requires an API key & a login ( Session) The structure of these classes tries to follow the pattern of the API itself, which is essentially: by manually checking the responses), you can also use the Job, Submission and UploadFile classes directly. However, if you want more control over the requests (e.g. A higher level interface is offered through the Client class, combining most functionality. This package is meant to be a simple but extensible interface for the API. The package is still in development, but it can already be used.ĭo not hesitate to leave any feedback (positive or negative)! Introduction
0 Comments
Leave a Reply. |