These are chat archives for astropy/astropy

23rd
Feb 2017
VSN Reddy Janga
@janga1997
Feb 23 2017 18:25
While running local tests, do I have to account for the failures too, or only for the errors?
9 failed, 34 passed, 1536 deselected in 2.22 seconds
Zé Vinícius
@mirca
Feb 23 2017 18:32
Hi @janga1997 please do report failures to astropy issues tracker on github. (make sure the failure is not already reported and also make sure you followed this page http://docs.astropy.org/en/stable/install.html while trying to install astropy)
VSN Reddy Janga
@janga1997
Feb 23 2017 18:33
Sure @mirca
What I'm trying to do here is to add couple of tests, and I am not sure if I'm triggering the both the errors and failures, or just the errors.
Never mind. I found what I was doing wrong.
Thanks for the help anyway.
Zé Vinícius
@mirca
Feb 23 2017 18:36
@janga1997 ;)
VSN Reddy Janga
@janga1997
Feb 23 2017 18:37
While you are here, @mirca
I'm trying to test for the case where a numpy array scalar is set as the index in Table, for which I wrote a fix.
I'm trying to add a test for the column case too.
Zé Vinícius
@mirca
Feb 23 2017 18:39
Awesome, I think I saw your PR, #5772 right?
VSN Reddy Janga
@janga1997
Feb 23 2017 18:39
Should I just write it in the same function in test_row.py, or create another test function by the same name in test_column.py
Yes.
That's the one.
i'm asking because the the way test_column.py and test_row.py are written seem to different.
In test_row.py, I can just call in the default Table and test on both rows and columns, but I have to create a new one in test_column.py
seems like a lot of duplication for a single test case.
Zé Vinícius
@mirca
Feb 23 2017 18:43
Looks like you should a test on table_row.py or table_index.py, right?
VSN Reddy Janga
@janga1997
Feb 23 2017 18:43
In test_row.py, yes.
To be frank, its a little ambiguous.
I could do the test in test_index, test_row, test_column, test_item_access
There seems to be a lot of overlap
Zé Vinícius
@mirca
Feb 23 2017 18:47
Well, I’m sure there are good reason(s) to have test_index, test_row, etc… ;)
I mean, as long as the tests you added covers the right bug you are trying to fix, then I’m sure the reviewers of your PR will guide you to move the test(s) to the right places ;)
VSN Reddy Janga
@janga1997
Feb 23 2017 18:48
I understand the reasons for test_index, test_row..etc
i just find it a little confusing where to put my test.
Anyways..like you said.. I could just move it later.
Zé Vinícius
@mirca
Feb 23 2017 18:49
So, make sure your tests trigger the bug in #5742, and after your code, the tests pass with no failures ;)
Simon Conseil
@saimn
Feb 23 2017 18:56
@janga1997 : in test_item_access.py, TestTableItems.test_row already covers the different indexing possibilities for the integer case.
This is where you should add the @parametrize line ;)
VSN Reddy Janga
@janga1997
Feb 23 2017 19:02
That just makes a lot more sense, and easier.
I guess I just have to replace all instances of 1 in the two test_column() test_row() in TestTableItems wih idx.
VSN Reddy Janga
@janga1997
Feb 23 2017 19:19
I edited table.py to accept array scalars for columns, and added the tests too.
Do review if you find the time.
Thanks for the help @mirca @saimn .
This org definitely has the most emojis in its gitter room. :-)
Simon Conseil
@saimn
Feb 23 2017 19:36
@janga1997 - Great ! Looks good, I will look more in detail later.
Thomas Lechner
@Dranearian_twitter
Feb 23 2017 19:58
Hey everyone, im relatively new to python and am having an issue with some data analysis/interpolation. I have tried a few different things, but I am not getting any change in the data/graph of the data after running it through the interpolation. Attempting cubic interpolation took my machine 20 minutes to run it, but still just returned the same values/graph.
VSN Reddy Janga
@janga1997
Feb 23 2017 20:00
@Dranearian_twitter Could you state what you were working on, what you expected, and what you actually got?
I'm not an expert either, but maybe I could help.
Thomas Lechner
@Dranearian_twitter
Feb 23 2017 20:04
I have data that is in 10km bins. (radius increases in 10km increments) I am attempting to interpolate the data so that I can perform calculations in 1km increments to create an optical depth profile. What it is returning is the exact same sharp lined graph, and the values themselves in the list are no different than the data from the table
the red dots in this image is the original data, the dotted line is the interpolated data. https://gyazo.com/194567b6a1050e9a4ad9bcc050784d76
VSN Reddy Janga
@janga1997
Feb 23 2017 20:08
@Dranearian_twitter Like I guessed. Too complicated for me. :-)
Maybe somebody else could help.
Thomas Lechner
@Dranearian_twitter
Feb 23 2017 20:09
Thanks for looking! :)
Nathan Goldbaum
@ngoldbaum
Feb 23 2017 21:51
@Dranearian_twitter how are you generating the interpolated data? It looks like you're using linear interpolation. You may want to use something more sophisticated. I've had lots of sucess with the bspline implementation in scipy. There are a number of other spline options there as well.
if you can share your code, even better share an example that one of us can run locally and reproduce what you're seeing, that would helpo
it's difficult to help someone if we need to speculate about what they're actually doing
Thomas Lechner
@Dranearian_twitter
Feb 23 2017 21:58
@ngoldbaum Just got home, booting up laptop. Yeah that image was linear. I just wanted to run it quickly to get an image. Running it on cubic took 20 minutes for my laptop to chug on it. Uploading text files now.
Thomas Lechner
@Dranearian_twitter
Feb 23 2017 22:08
Sorry, took a few minutes laptop is not great. https://www.dropbox.com/sh/ge7z9d4k6nwyzjl/AABpn6cft2Ugb8PPjAxQv4oia?dl=0
the datafile in question is included, and those were 3 different scripts I attempted.
https://gyazo.com/7bc9a1b0f373884dbc0d2b0447adb940 is an example from newinterptest when I compared values in test and its base data