3

I would like to create a script to download the magnitudes from a set of objects. For example the ones which appear here:

http://mirror.sdss3.org/spectrumDetail?plateid=556&mjd=51991&fiber=312

As an input I have the object coordinates (which I get from the astroquery get_spec method as I know the object's mjd, plate and fiber). I am trying to use the example on the astroquery site:

from astropy import coordinates as coords
from astroquery.sdss import SDSS

co = coords.SkyCoord(143.50993, 55.239775, unit="deg")
result = SDSS.query_region(co)
imgs = SDSS.get_images(co, band = ['g', 'r'])

However, from the images downloaded I cannot find the magnitudes. How can I find the magnitudes of my objects?

MSeifert
  • 145,886
  • 38
  • 333
  • 352
Delosari
  • 677
  • 2
  • 17
  • 29

1 Answers1

4

From the sound of things instead you want the properties of your object that are spat out of the SDSS pipeline, crossmatched by coordinates.

To do this have a look at the SDSS.query_crossid method. This allows you to specify which of the photometry columns that you want.

As I don't know the science that you are doing you'll have to work out what would be best for your targets. Have a look here for the various measures of magnitude that are available.

As an example if I wanted the g and r band model magnitudes for your object I would do:

In [31]: result = SDSS.query_crossid(co, photoobj_fields=['modelMag_g', 'modelMag_i'])

In [32]: print result
Out[32]: 
obj_id        objID        modelMag_g modelMag_i       obj_id1        type 
 str5         int64         float64    float64          int64         str6 
------ ------------------- ---------- ---------- ------------------- ------
 obj_0 1237654382516699210   17.57231   18.13992 1237654382516699210 GALAXY
Simon Gibbons
  • 6,969
  • 1
  • 21
  • 34
  • Thank you very much just what I needed. If I may take advantage of your time... do you know if something like this can be done with astropy/astroquery in the SDSS? http://www.astroml.org/sklearn_tutorial/auto_examples/plot_sdss_images.html – Delosari Apr 26 '16 at 15:45