<div dir="ltr">If you want to include additional columns in vizier queries, follow these instructions:<div><a href="https://astroquery.readthedocs.io/en/latest/vizier/vizier.html#specifying-keywords-output-columns-and-constraints-on-columns">https://astroquery.readthedocs.io/en/latest/vizier/vizier.html#specifying-keywords-output-columns-and-constraints-on-columns</a> </div><div><br></div><div>for example, to get *all* columns, you would do:</div><div>Vizier(columns=["**"]).query_region(coordinates.SkyCoord(180*u.deg, 0*u.deg, frame='fk5'), radius=field_of_view * u.deg, catalog = 'SDSS12')</div><div>note the double-asterisks <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 21, 2020 at 10:30 AM Robert Carr <<a href="mailto:rspencercarr@gmail.com">rspencercarr@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><font face="arial, sans-serif" size="4"><span style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;color:inherit">I </span>hope that this question is "in bounds," Astroquery being an<span style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;color:inherit"> </span><span style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;color:inherit">Astropy</span><span style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;color:inherit"> </span>affiliated package.</font><span style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline"></span><span style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:16px;line-height:inherit;font-family:Calibri,Arial,Helvetica,sans-serif;vertical-align:baseline;color:rgb(0,0,0)"></span><span style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:16px;line-height:inherit;font-family:Calibri,Arial,Helvetica,sans-serif;vertical-align:baseline;color:rgb(0,0,0)"></span><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline"><font face="arial, sans-serif" size="4"><br></font></div><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline"><font size="4">I am querying the SDSS-12 catalog for photometric data using Vizier. <span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:arial,sans-serif;vertical-align:baseline;color:inherit">The SDSS field "flags" would be ideal to help me assess the photometric quality of the SDSS measurements for each object: this field includes a hexadecimal code that captures issues with the photometry such as pixel saturation, etc. </span></font></div><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline"><font size="4"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:arial,sans-serif;vertical-align:baseline;color:inherit"><br></span></font></div><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline"><font size="4"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:arial,sans-serif;vertical-align:baseline;color:inherit">My query line is:</span></font></div><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline"><font size="4"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:arial,sans-serif;vertical-align:baseline;color:inherit"> targetobj = Vizier.query_region(STAR_NAME, radius=field_of_view * u.deg, catalog = 'SDSS12') </span></font></div><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline"><font face="arial, sans-serif" size="4"><br></font></div><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:large;line-height:inherit;font-family:arial,sans-serif;vertical-align:baseline">The line in my code to collect 'flags' does not work (where targetobjresults is my results from querying SDSS):</span><br></div><blockquote style="margin:0px 0px 0px 40px;border:none"><div style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;color:inherit"><font face="arial, sans-serif" size="4">targetobjresults.append({'flags': targetobj[0]['flags'][0]})</font></div></blockquote><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline"><font face="arial, sans-serif" size="4"><br></font></div><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:large;line-height:inherit;font-family:arial,sans-serif;vertical-align:baseline">I receive the following error message, which I have discovered is because <span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:inherit">Vizier returns only 23 columns of the SDSS data. </span></span></div><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:large;line-height:inherit;font-family:arial,sans-serif;vertical-align:baseline;color:inherit"> Traceback (most recent call last):</span></div><blockquote style="margin:0px 0px 0px 40px;border:none"><div style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;color:inherit"><p style="margin:0in 0in 0.0001pt"><font face="arial, sans-serif" size="4"> File "<stdin>", line 32, in <module></font></p></div><div style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;color:inherit"><p style="margin:0in 0in 0.0001pt"><font face="arial, sans-serif" size="4"> File "C:\Users\mawgui\AppData\Local\Programs\Python\Python36\lib\site-packages\<span style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;color:inherit">astropy</span>\table\table.py", line 1222, in __getitem__</font></p></div><div style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;color:inherit"><p style="margin:0in 0in 0.0001pt"><font face="arial, sans-serif" size="4"> return self.columns[item]</font></p></div><div style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;color:inherit"><p style="margin:0in 0in 0.0001pt"><font face="arial, sans-serif" size="4"> File "C:\Users\mawgui\AppData\Local\Programs\Python\Python36\lib\site-packages\<span style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;color:inherit">astropy</span>\table\table.py", line 106, in __getitem__</font></p></div><div style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;color:inherit"><p style="margin:0in 0in 0.0001pt"><font face="arial, sans-serif" size="4"> return OrderedDict.__getitem__(self, item)</font></p></div><div style="margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;color:inherit"><p style="margin:0in 0in 0.0001pt"><font face="arial, sans-serif" size="4">KeyError: 'flags'</font></p><p style="margin:0in 0in 0.0001pt"><font face="arial, sans-serif" size="4"><br></font></p></div></blockquote><font face="arial, sans-serif" size="4">Is there a way to query SDSS through Vizier to get the hexadecimal 'flags' for each object? Or is there another workaround? I appreciate guidance on how to make this happen.</font><span style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline"></span><span style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:16px;line-height:inherit;font-family:Calibri,Arial,Helvetica,sans-serif;vertical-align:baseline;color:rgb(0,0,0)"></span><span style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:16px;line-height:inherit;font-family:Calibri,Arial,Helvetica,sans-serif;vertical-align:baseline;color:rgb(0,0,0)"></span><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline"><font face="arial, sans-serif" size="4"><br></font></div><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline"><font face="arial, sans-serif" size="4">Thank you!</font></div><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline"><font face="arial, sans-serif" size="4"><br></font></div><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline"><font face="arial, sans-serif" size="4">Bob C</font></div><br></div><div id="gmail-m_4046137496446091284DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
<table style="border-top:1px solid rgb(211,212,222)">
<tbody><tr>
<td style="width:55px;padding-top:13px"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon" target="_blank"><img alt="" width="46" height="29" style="width: 46px; height: 29px;"></a></td>
<td style="width:470px;padding-top:12px;color:rgb(65,66,78);font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Virus-free. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link" style="color:rgb(68,83,234)" target="_blank">www.avast.com</a>
</td>
</tr>
</tbody></table><a href="#m_4046137496446091284_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"></a></div>
_______________________________________________<br>
AstroPy mailing list<br>
<a href="mailto:AstroPy@python.org" target="_blank">AstroPy@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/astropy" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/astropy</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Adam Ginsburg<br>Assistant Professor, Department of Astronomy</div><div>University of Florida, Gainesville</div><div><a href="http://www.adamgginsburg.com/" target="_blank">http://www.adamgginsburg.com/</a></div></div></div></div></div></div></div></div></div></div></div>