Most frequent questions will regard the operations at the core of each database: query, add, update, and delete. For most of these actions, you will need a SLED user account, so if you don't have one yet you can create one here.
SLED allows for a lot of flexibility regarding database operations through its ownership based design, i.e. the users who own lenses, etc, are responsible for maintaining them. There are some safeguards built into place as well, e.g. when deleting public lenses.
Various other topics are covered here too, for example, how to gain access to actual science quality data (SLED only gathers and stores metadata, including images). This is a continuously evolving list of questions and we keep adding information to it through user feedback and further development.
Before experimenting with queries yourself, have a look that the standard queries and collections first. Maybe what you are looking for is already there.
The web interface is the place to start for both simple and advanced queries. Joined queries, the real power of SLED, are straightforward. All the query fields are explained in the guide.
A frequent use case is to check whether a list of locations on the sky matches with something in SLED. This script is a simple way to achieve this quickly. Note that if you are checking \( \mathcal{O}(10^2) \) of locations this may become impractical.
Joined queries are the real power of SLED and they can be performed equally well by the web interface and the API. There are just too many combinations of query fields to document. A generic example is shown in this script. This example can be used as the basis for more creative queries by modifying and expanding it. All the available query fields are explained in the guide. Note that the lens properties and associated data to download can also be specificed as query parameters. If your desired query is too complex to be achieved through this querying mechanism, please get in touch with us: sled-info@sled.amnh.org
You will need a SLED user account, at least the RA and DEC of your lenses, and an image of each lens (.jpeg, .png, or .jpg). More details on all the different information that one can upload with each lens can be found in the guide. The recommended approach is to upload lenses as private (PRI) and then make them public at a later time once any mistakes will have been spotted and fixed.
If you have only a handful of new lenses to inject, then use the web interface.
Using the web interface for uploading more than a handful of lenses can be impractical. There is the alternative option to upload lenses using scripts from the command line or from ipython notebooks. Just follow these two steps:
You will need a SLED user account and the lenses for which you want to upload data, e.g. have them gathered in a collection or know their RA and DEC (you don't have to be the owner of the lenses in order to upload and associate data to them). There are 6 types of data that can be associated to lenses, each with its own fields described in detail in the guide:
The more of these fields that can be injected in SLED the better. The mandatory fields for each type are included in the example scripts below and will be indicated during submission time (if missing) through the website or API. The recommended approach is to upload data as private (PRI) and then make them public at a later time once any mistakes will have been spotted and fixed.NOTE: SLED automatically fetches some data for newly injected lenses as described in the guide.
A typical use case is having just a few images, redshifts, etc, that you are trying to inject for a single, or a few lenses. The best way to achieve this is to go directly to each lens page on the website, e.g. for Q2237+0305, and click on the 'Add imaging data', 'Add redshift', etc, buttons.
When lots of data needs to be added for several lenses, then the best approach is to use scripts from the command line or ipython notebooks. Matching data to existing lenses happens through their RA and DEC, which should uniquely identify a lens in SLED. Follow these two steps:
The procedure to follow for adding spectra is the same as described in "How to add data associated to lenses?". However, you will need to prepare a figure with the plot of the spectrum. In order to facilitate this, as well as have a uniform style for all the spectrum plots in SLED, we provide a plotting script here.
The SLED admin team has compiled a list of exisitng instruments and bands, but inevitably there will be cases that are left out. If you cannot find what you are looking for in the pre-defined list, please send a request to add a new instrument/band to the admins. Alternatively, you can reach out for support in the Slack workspace.
You will need a SLED user account, the bibcode of the paper (e.g. from ADS), the lenses that are part of the paper, e.g. getting their RA and DEC from exporting an existing collection, and the association of each lens to a paper through 3 possible flags: discovery, classification, and model. All the lenses will need to be already injected in SLED and made public - no private lenses can be associated with papers.
Papers can be added only through the API - there is no associated web interface for that. This script allows for uploading a paper to SLED and it will report any conflicts, such as non-matching coordinates, existing paper, etc, that need to be resolved before uploading. SLED retrieves information about the paper (e.g. authors, year, etc) automatically from ADS based on the provided bibcode.
Papers should be immutable collections of lenses, therefore updating them is not straightforward by design. If any mistake is spotted after uploading a paper, e.g. omitting a lens or wrongly including another one, then the paper will have to be deleted and re-uploaded. There is a safeguard in place to force exporting the paper before deleting in, which ensures no data is lost. The exported .json file can serve as a starting point to fix mistakes and re-upload the paper.
You will need a SLED user account and the lenses that you want to include in your collection, e.g. knowing their RA and DEC or from the result of a query. The recommended approach is to create a collection as private (PRI) and then make it public at a later time once any mistakes will have been spotted and fixed.
If you have only a handful of new lenses to include in your collection, then start by performing a query based on their RA and DEC. You can select which of the returned lenses you want (click the checkbox next to each lens) and then click the 'Make collection' button at the bottom of the query result page. Follow the steps to create a collection that will contain the lenses you just selected. You can repeat this step to add more lenses to your collection.
If you have a collection that includes several lenses from start, then the best option is to use the API to create it. You will need to know the RA and DEC of the target lenses beforehand and use this script to create a collection that will contain them. The script reports any conflicts, such as non-matching coordinates from your sample, existing collection name, etc, that need to be resolved before uploading.