Getting Started

When you perform a Query in Marvin, you get a Results object. This page describes the basic usage of Marvin Results. See the Results Reference for a full description of all the methods available.

To perform a simple Query

from import Query
q = Query(search_filter='nsa.z < 0.1', return_params=['absmag_g_r'])

and to get the Results, use the run method on your Query object. Once your query is run you can access the list of query results from the results attribute.

r =

# number of results

# view the results
<ResultSet(set=1/26, index=0:100, count_in_set=100, total=2560)>
[ResultRow(mangaid=u'1-109394', plate=8082, plateifu=u'8082-9102', ifu_name=u'9102', elpetro_absmag_g_r=1.26038932800293, z=0.0361073),
 ResultRow(mangaid=u'1-113208', plate=8618, plateifu=u'8618-3701', ifu_name=u'3701', elpetro_absmag_g_r=1.48788070678711, z=0.0699044),
 ResultRow(mangaid=u'1-113219', plate=7815, plateifu=u'7815-9102', ifu_name=u'9102', elpetro_absmag_g_r=0.543312072753906, z=0.0408897),
 ResultRow(mangaid=u'1-113375', plate=7815, plateifu=u'7815-9101', ifu_name=u'9101', elpetro_absmag_g_r=0.757579803466797, z=0.028215),
 ResultRow(mangaid=u'1-113379', plate=7815, plateifu=u'7815-6101', ifu_name=u'6101', elpetro_absmag_g_r=1.09770011901855, z=0.0171611),
 ResultRow(mangaid=u'1-113403', plate=7815, plateifu=u'7815-12703', ifu_name=u'12703', elpetro_absmag_g_r=0.745466232299805, z=0.0715126),
 ResultRow(mangaid=u'1-113418', plate=7815, plateifu=u'7815-12704', ifu_name=u'12704', elpetro_absmag_g_r=1.44098854064941, z=0.0430806),

The returned object is a ResultSet, which is a fancy list of Python tuple objects containing the results of your query. The representation of the ResultSet indicates some metadata like the total result count, the current set (page) of the total, the current count in the current set, and the array indices out of the total set.

The Results object also contains the Query Datamodel which you can explore.

<QueryDataModel release='MPL-4', n_groups=7, n_parameters=565, n_total=0>

Alternatively, you can perform it in a single step

from import doQuery
q, r = doQuery(search_filter='nsa.z < 0.1')


Class Inheritance Diagram

Inheritance diagram of

Class[results, …])

A class to handle results from queries on the MaNGA dataset, …)

A Set of Results


Extend the Result set with the next page[chunk])

Loop over the full set of results[chunk])

Retrieve the next chunk of results[chunk])

Retrieve the previous chunk of results.

Extracts a subset of results[force])

Retrieve all of the results of a query, …)

Make a scatter plot from two columns of results, **kwargs)

Make a histogram for a given column of the results[path, …])

Save the results as a pickle object[, …])

Restore a pickled Results object