Skip to content
Snippets Groups Projects
Commit 516518d1 authored by Stefan Hendricks's avatar Stefan Hendricks :office:
Browse files

bugfix

parent 38d8223a
No related branches found
No related tags found
No related merge requests found
...@@ -706,7 +706,7 @@ class FloeNaviGrid(object): ...@@ -706,7 +706,7 @@ class FloeNaviGrid(object):
else: else:
self.basestation_dict[mmsi].append(pos) self.basestation_dict[mmsi].append(pos)
def get_virtual_reference_station_positions(self, time_resolution_sec=10.0, **refstat_kwargs): def get_virtual_reference_station_positions(self, time_resolution_sec=10, **refstat_kwargs):
""" """
Compute the position objects of two virtual reference stations, based on the number of available Compute the position objects of two virtual reference stations, based on the number of available
basestations. This is primary input for the icedrift correction in the icedrift module. basestations. This is primary input for the icedrift correction in the icedrift module.
...@@ -718,8 +718,8 @@ class FloeNaviGrid(object): ...@@ -718,8 +718,8 @@ class FloeNaviGrid(object):
# Compute common timestamp # Compute common timestamp
logger.info("Compute timestamp of virtual base stations [resolution: %.2f sec]" % time_resolution_sec) logger.info("Compute timestamp of virtual base stations [resolution: %.2f sec]" % time_resolution_sec)
duration_seconds = (self.time_bounds[1]-self.time_bounds[0]).seconds duration_seconds = (self.time_bounds[1]-self.time_bounds[0]).seconds
seconds_increments = np.arange(0, duration_seconds+time_resolution_sec, time_resolution_sec).astype(int) seconds_increments = np.arange(0, duration_seconds+time_resolution_sec, time_resolution_sec)
time = np.array([self.time_bounds[0]+timedelta(seconds=sec) for sec in seconds_increments]) time = np.array([self.time_bounds[0]+timedelta(seconds=int(sec)) for sec in seconds_increments])
# Create a collection of all base stations # Create a collection of all base stations
# NOTE: Making sure all base stations have the same temporal resolutions # NOTE: Making sure all base stations have the same temporal resolutions
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment