Skip to content

Commit

Permalink
Add tile_width property to HipsTile
Browse files Browse the repository at this point in the history
  • Loading branch information
adl1995 committed Jun 22, 2017
1 parent 27cca87 commit 7869a5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hips/tiles/tests/test_tile.py
Expand Up @@ -11,7 +11,7 @@ def setup_class(cls):
filename = get_pkg_data_filename('data/properties.txt')
hips_description = HipsDescription.read(filename)

cls.tile = HipsTile(hips_description, 6, 24185, 'jpg')
cls.tile = HipsTile(hips_description, 6, 24185, 'jpg', 512)
cls.tile.base_url = 'http://alasky.unistra.fr/DSS/DSSColor'

def test_base_url(self):
Expand Down
5 changes: 4 additions & 1 deletion hips/tiles/tile.py
Expand Up @@ -29,6 +29,8 @@ class HipsTile:
Order of the HiPS
ipix : `int`
HEALPix pixel number
tile_width : `int`
Width of HiPS tile
format : `format`
Format of HiPS tile
data : `list`
Expand All @@ -54,10 +56,11 @@ class HipsTile:
[4261 3581 3842 ..., 7095 6390 6191]]
"""

def __init__(self, hips_description: HipsDescription, order: int, ipix: int, format: str, data: list=None) -> None:
def __init__(self, hips_description: HipsDescription, order: int, ipix: int, format: str, data: list=None, tile_width: int=512) -> None:
self.hips_description = hips_description
self.order = order
self.ipix = ipix
self.tile_width = tile_width
self.format = format
self.data = data

Expand Down

0 comments on commit 7869a5d

Please sign in to comment.