Closed adl1995 closed 7 years ago
@adl1995 - please modify your test_tile_access_url
function to assert the URL of arguments order=9, tile_index=54321
As you know, tiles are grouped in directories by 10,000 items, thus these arguments should return URL http://alasky.u-strasbg.fr/DSS/DSSColor/Norder9/Dir50000/
This test should bring up an issue with your current code.
I have updated the code to compute directory number using: np.around(ipix, decimals=-(len(str(ipix)) - 1))
. This works for ipix = 54321
, which returns 50000
. But, for ipix = 448
, it returns 400
, when instead, it should return 0
.
@adl1995 - instead of np.around(ipix, decimals=-(len(str(ipix)) - 1))
, I suggest using (ipix // 10000) * 10000
@tboch Thanks! That worked.
Updated the
tile_access_url
method as mentioned in #51.