Frequently Asked Questions

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.


If you cannot find an answer to your question here, please send a message to: sled-info@sled.amnh.org

If you haven't done so yet, you can join the SLED Slack workspace too.


Of course there is! Click here to join.


Preparation

Before experimenting with queries yourself, have a look that the standard queries and collections first. Maybe what you are looking for is already there.

Querying

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.

Processing the result

  • Export the result - the returned lenses can be downloaded in .json format by clicking on the 'Export .json' button at the end of the query result list. It is possible to select which lens fields to download and any related data to attach to them.
  • Make a collection - you can select some or all returned lenses by clicking on the checkboxes and create a new collection, or add them to an existing one.
  • Save the query - the query parameters can be saved by cliking the 'Save query' button at the top of the query results. Saved queries can be accessed in your user profile. In contrast to a collection, these queries are dynamic and will return the latest sample of matching lenses from the database each time they are used.



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


Coming soon


Please have a look at this presentation by Cameron Lemon (work in progress).



Preparation

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.

A few lenses

If you have only a handful of new lenses to inject, then use the web interface.

Large numbers of lenses

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:

  1. Use this simple query script to perform a query to the database at your RA,DEC. This will identify any lenses from your sample that may already exist in the database. If such lenses are found, then before injecting your sample you may:
    • Remove them from your sample completely (you can still suggest updates to the existing ones or add data). This is the recommended approach.
    • Inject them anyway and resolve the duplicate entries via the website functionality.
  2. Use this upload script to inject your lenses in the database. The script reports any conflicts, such as duplicates within your sample, non-matching coordinates, etc, that need to be resolved before uploading. You are free to choose which other SLED fields you want to include, besides the RA, DEC, and a lens image. It is recommended to upload the lenses with restricted (private) access (PRI), in order to avoid any mistakes.

Final steps

  • What's next? - Upon successful upload, the new lenses will appear in your user profile. You will be the owner of these lenses and responsible for keeping them up-to-date.
  • Private vs Public - If you uploaded your lenses with private access (PRI), then you can select which other users or groups are able to see them. You can either do this for each lens individually by clicking the 'Give access' button on its page, or select several lenses from your user profile lens tab and click the ‘Give access’ button at the bottom of the page. Any lenses that are uploaded as public (PUB) will need to be visually confirmed by another SLED user with the role of an Inspector. They are termorarily injected in the database as private and will be made available to all SLED users as soon as the related Inspect Images task is completed.
  • A collection of your new lenses - You can optionally use this script to create a SLED collection with the lenses you just uploaded (or you can do it by hand from your user profile page).



Preparation

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 few images, spectra, etc

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.

Mass data injection

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:

  1. Use this simple query script to perform a query to the database at your RA,DEC. This will ensure that all the lenses that you are adding data to exist in the database. If some lenses are missing, then follow the instructions on how to inject new lenses first.
  2. Use these scripts to upload each type of data: The scripts will report any conflicts, such as missing fields, non-matching coordinates, wrong values, etc, that need to be resolved before uploading. It is recommended to upload the data with restricted (private) access (PRI), in order to avoid any mistakes.

Final steps

  • What's next? - Upon successful upload, the fresh data will appear in your user profile under the respective tab, e.g. here for Generic Images. You will be the owner of these data and responsible for keeping them up-to-date.
  • Private vs Public - If you uploaded your data with private access (PRI), then you can select which other users or groups are able to see them; locate the respective tab ('Imaging data', 'Sepctra', etc) in your user profile page, select several objects that you want to share with other users and groups, and click the 'Give access' button at the bottom. If you uploaded Imaging data, Spectra, or Generic Images with public access (PUB) then they will be temporarily stored as private. The reason is that, similarly to lenses, their associated images will need to be inspected and approved by another SLED user with the role of an Inspector. They will be made available to all SLED users as soon as the related Inspect Images task is completed.



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.



Preparation

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.

Adding a paper

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.

Important note

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.




Preparation

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.

A few lenses

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.

Large numbers of lenses

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.

Final steps

  • What's next? - Upon successful upload, the new collection will appear in your collection list. From this page, you can select a collection, go to its main page, and update its details or keep adding/removing lenses from it. Finally, you can add any specific lens to your collection by clicking the 'Add to collection' button on its main page, e.g. add Q2237+0305 to an existing collection.
  • Private vs Public - If you uploaded your collection with private access (PRI), then you can select which other users or groups are able to see it by clicking the 'Give access' button on its page. Public collections are immediately visible to all SLED users.
  • Querying collections - It is possible to restrict the result of any query on lenses included in one or more collections. The names of these collections can be specified in the 'Management' tab on the main query page.


Coming soon

Coming soon

Coming soon

Coming soon

Coming soon