<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Oct 25, 2013 at 5:27 AM, Joe Philip Ninan <span dir="ltr"><<a href="mailto:indiajoe@gmail.com" target="_blank">indiajoe@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div>Hi Yannick, Tom and Jeonghyun,<br></div>Thanks for the examples. They all worked.<br>
</div>I loaded the data with ascii.read() tool.<br></div>What confused me was Mytable['ID']>60 returned an object which contains a boolean data array and another mask array.<br>
</div>Which is why i thought, i had to add .data before taking logical &, to make sure data array is used.<br></div><div><br></div>Am I correct in assuming that this object which returned will basically work like a standard numpy masked array? It will all make sense that way.<br>
</div></div></div></blockquote><div><br></div><div>Yes, that's correct. The fact that you get a masked boolean array in this case is a feature because it means if any elements in your MyTable['ID']) are masked then the corresponding comparison truth values will be masked. I.e. if the input is not known then the comparison is likewise not known.</div>
<div><br></div><div>- Tom</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>
</div>Thanks,<br></div>-cheers<span class="HOEnZb"><font color="#888888"><br>joe<br><div><div><div><div><br></div></div></div></div></font></span></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">
On 25 October 2013 11:25, Yannick Roehlly <span dir="ltr"><<a href="mailto:yannick.roehlly@oamp.fr" target="_blank">yannick.roehlly@oamp.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Le Fri, 25 Oct 2013 02:24:38 +0530,<br>
Joe Philip Ninan <<a href="mailto:indiajoe@gmail.com" target="_blank">indiajoe@gmail.com</a>> a écrit :<br>
<div><br>
> Mytable[np.where((Mytable['ID']>60).data &<br>
> (Mytable['MAG']>18).data)]['MAG'].data.data<br>
><br>
> Quite a lot of ".data" to be appended !!<br>
> Am i missing some feature astropy already has for doing these kind of<br>
> data selection from table?<br>
<br>
</div>Hi Joe,<br>
<br>
How do you read your table ?<br>
<br>
Mytable[(Mytable['ID']>60) & (Mytable['MAG']>18)] should do what you<br>
want.<br>
<br>
Cheers,<br>
<br>
Yannick<br>
<span><font color="#888888"><br>
--<br>
You will never amount to much.<br>
-- Munich Schoolmaster, to Albert Einstein, age 10<br>
</font></span><div><div>_______________________________________________<br>
AstroPy mailing list<br>
<a href="mailto:AstroPy@scipy.org" target="_blank">AstroPy@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/astropy" target="_blank">http://mail.scipy.org/mailman/listinfo/astropy</a><br>
</div></div></blockquote></div><br><br clear="all"><br></div></div><div class="im">-- <br>/---------------------------------------------------------------<br>"GNU/Linux: because a PC is a terrible thing to waste" - GNU Generation<br>
<br>
************************************************<br>Joe Philip Ninan <a href="http://sites.google.com/site/jpninan/" target="_blank">http://sites.google.com/site/jpninan/</a> <br>Research Scholar /________________\<br>
DAA, | Vadakeparambil |<br>TIFR, | Pullad P.O. |<br>Mumbai-05, India. | Kerala, India |<br>Ph: <a href="tel:%2B917738438212" value="+917738438212" target="_blank">+917738438212</a> | PIN:689548 |<br>
------------------------------\_______________/--------------<br>
</div></div>
<br>_______________________________________________<br>
AstroPy mailing list<br>
<a href="mailto:AstroPy@scipy.org">AstroPy@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/astropy" target="_blank">http://mail.scipy.org/mailman/listinfo/astropy</a><br>
<br></blockquote></div><br></div></div>