Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 1.13 KB

query_returntype.rst

File metadata and controls

29 lines (18 loc) · 1.13 KB

Returning Marvin Objects

By default, Marvin Queries return a list of tuples of parameters. You can convert your query results directly into Marvin objects using the returntype keyword in the Query. The return type can be

NOTE: This is time intensive. Depending on the size of your results, this conversion may take awhile. Be wary of doing this on the initial query as this will also perform the conversion on the server-side, delaying your results.

# return Marvin Cube objects

query = Query(search_filter='nsa.z < 0.1', returntype='cube')
results = query.run()
Converting results to Marvin Cube objects

results.objects[0]
<Marvin Cube (plateifu=u'8485-1901', mode='remote', data_origin='api')>

When you convert your results into Marvin objects, they are stored in the objects attribute in your Results.