Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions pointCollection/grid/mosaic.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import pointCollection as pc

class mosaic(data):
def __init__(self, spacing=[None,None], **kwargs):
def __init__(self, spacing=None, **kwargs):
#self.x=None
#self.y=None
#self.t=None
Expand All @@ -27,7 +27,8 @@ def __init__(self, spacing=[None,None], **kwargs):
self.extent=[np.inf,-np.inf,np.inf,-np.inf]
self.dimensions=[None,None,None]
self.field_dims={}
self.spacing=spacing
# copy spacing so that mosaics never share a spacing list
self.spacing=[None, None] if spacing is None else list(spacing)
self.tile_weight=None
self.fill_value=np.nan
self.normalized=True
Expand Down Expand Up @@ -58,7 +59,7 @@ def update_spacing(self, temp):
dx = temp.x[1] - temp.x[0]
if not dx == 0:
self.spacing[0] = dx
dy = temp.x[1] - temp.x[0]
dy = temp.y[1] - temp.y[0]
if not dy == 0:
self.spacing[1] = dy
except:
Expand Down
Loading