Sample Selection Tutorial¶
Select Main Sample Galaxies¶
To select the Main Sample galaxies (Primary + Secondary + Color Enhanced samples), we can use the MaNGA DRPall summary file. You can use the get_drpall_table
utility to load the full DRPall table. By default this will load the DRPall file for the current release set in Marvin.
Let’s open the DRPall file:
from marvin.utils.general import get_drpall_table
data = get_drpall_table()
The Main Sample consists of the Primary, Secondary, and Color-Enhanced Samples, which correspond to MNGTARG1 bits 10, 11, and 12, respectively.
import numpy as np
primary = data['mngtarg1'] & 2**10
secondary = data['mngtarg1'] & 2**11
color_enhanced = data['mngtarg1'] & 2**12
main_sample = np.logical_or.reduce((primary, secondary, color_enhanced))
plateifus = data['plateifu'][main_sample]
Now we can use the downloadList()
function to download all of the files of type map
(other valid dltypes
: map
, image
, rss
, mastar
, default
, or plate
).
from marvin.utils.general.general import downloadList
downloadList(plateifus, dltype='map')