How Do I Know If MaNGA Has Observed My Galaxy?

Back to MaNGA tutorials

Finding your galaxy in the drpall summary file

The current (and final) MaNGA DRPall file contains all the galaxies observed by MaNGA and included in this data release (DR17). You can check if your galaxy is included in MaNGA DR17 using the Right Ascension (RA) and Declination (DEC) of your galaxy, or its MaNGA-ID, or the plate-IFU of the observation. General tutorials on accessing the DRPall file can be found here:

IDL

dpf=mrdfits('drpall-v3_1_1.fits',1,hdr)

Now dpf is an IDL structure of the drpall file.

By RA, Dec

Assuming for the moment that your galaxy has RA = 229.52558 deg and declination DEC = 42.745842 deg, you can see if there is a galaxy near this position.

ii=where(abs(dpf.objra-229.52558) lt 0.001 and abs(dpf.objdec-42.745842) lt 0.001)
print,dpf[ii].mangaid  ;should print 12-193481

By MaNGA-ID or plate-IFU

If you know the MaNGA id or the plate and ifu design of your galaxy, similar procedure can be followed:

ii=where(dpf.mangaid eq '12-193481')
jj=where(dpf.plateifu eq '7443-12703')

Here ii and jj would be the indices for your given galaxy. A value of -1 means no galaxy was found.

Python

# Imports
import numpy as np
from astropy.io import fits

# Read in the DRPall table data
drpall = fits.open('drpall-v3_1_1.fits')[1].data

By RA, Dec

# Find galaxy at (RA,DEC) = (229.52558, 42.745842)
i = (np.abs(drpall['OBJRA']-229.52558) < 0.001) & (np.abs(drpall['OBJDEC']-42.745842) < 0.001)
print(drpall['MANGAID'][i]) #should print ['12-193481']

By MaNGA-ID or plate-IFU

# Find a specific galaxy using the MaNGA ID
j = drpall['MANGAID'] == '12-193481'

# Find a specific observation
k = drpall['PLATEIFU'] == '7443-12703'

# i, j, k are boolean arrays

Marvin

By RA, Dec

# given an RA, or DEC
(RA,DEC) = (229.525575871, 42.7458424664)

# set DR17 as the Marvin release
from marvin import config
config.setRelease('DR17')

# create and run a Query
from marvin.tools.query import Query
q = Query(search_filter='cube.ra == {0} and cube.dec == {1}'.format(RA,DEC))
r = q.run()

# see the results
r.results

[ResultRow(mangaid=u'12-193481', plate=7443, plateifu=u'7443-12703', ifu_name=u'12703', ra=229.525575871, dec=42.7458424664)]

# convert to a Marvin Cube
r.convertToTool('cube')
cube = r.objects[0]

By MaNGA-ID

# check if your target has been observed
from marvin.utils.general import target_status, target_is_observed

# return a boolean
target_is_observed('12-193481')
True

# or get a string status indicator
target_status('12-193481')
‘observed'

# or just grab a Cube
from marvin.tools.cube import Cube
cube = Cube('12-193481')

By plate-IFU

# by plate-IFU
from marvin.utils.general import get_drpall_row
row = get_drpall_row('7443-12703')

# or just grab a Cube
from marvin.tools.cube import Cube
cube = Cube('7443-12703')

MaNGA footprint

The MaNGA observing footprint is given on the Footprint page. There are also instructions on this page for extracting the list of observed plates using Python and further down the page with IDL.