12. How to extract pixel values from images¶
RSP Aspect: Portal
Contact authors: Yumi Choi
Last verified to run: 2025-03-05
Targeted learning level: beginner
Introduction: This tutorial demonstrates how to extract pixel values from active images retreived from a Portal image query.
1. Execute an image query. Go to data.lsst.cloud , select the Portal Aspect, and click on the “DP0.2 Images” tab at the top. Enter your desired constraints for the image query, and click “Search” to execute it.
2. Select the Line Tool. To extract pixel values along a line (1D brightness profile), click the “Tools” icon, then select the “Line” icon under the “Extract” section. In the instruction window, choose an aperture for combining values.
3. Draw and view profile. Click the starting point on the image, drag to the endpoint, and release. A pop-up window will display the 1D brightness profile, where you can adjust the aperture if needed.
4. Save or download. Click “Pin Chart/Table” to add the chart and table to the result, or download them directly. Repeat the process to extract another profile.

Figure 1: A line drawn across a source, with a pop-up window displaying the 1D brightness profile of the source.¶
5. Select the Points Tool. To extract pixel information for selected points, click the “Points” icon under the “Extract” section. In the instruction window, choose an aperture to combine the values.
6. Select points. Click multiple points on the image to extract their pixel values at once.
7. Save or download. Click “Pin Chart/Table” to save the results temporariliy, or use “Download as Table” and/or “Download Chart” to save them locally. Results can also be saved as a DS9 region file.

Figure 2: Six selected points on the image (left panel), in the active chart (right panel), and in the pinned table (bottom panel), with a pop-up window offering options for file format and naming for saving.¶
Return to the list of DP0.2 Portal tutorials.