def _base_before_launch(self, data_file, region_volume_gid): if data_file is None: raise LaunchException("Please select a file to import!") if region_volume_gid is not None: rvm_h5 = h5.h5_file_for_gid(region_volume_gid) self._attempt_to_cache_regionmap(rvm_h5) self.region_volume_shape = rvm_h5.read_data_shape() self.region_volume_h5 = rvm_h5 datatype = Tracts() dummy_rvm = RegionVolumeMapping() dummy_rvm.gid = region_volume_gid datatype.region_volume_map = dummy_rvm return datatype
def _base_before_launch(self, data_file, region_volume): if data_file is None: raise LaunchException("Please select a file to import") self.region_volume = region_volume if region_volume is not None: self._attempt_to_cache_regionmap(region_volume) # this is called here and not in _get_tract_region because it goes to disk to get this info # which would massively dominate the runtime of the import self.region_volume_shape = region_volume.read_data_shape() datatype = Tracts() datatype.storage_path = self.storage_path datatype.region_volume_map = region_volume return datatype
def _base_before_launch(self, data_file, region_volume): if data_file is None: raise LaunchException("Please select a file to import") self.region_volume = region_volume if region_volume is not None: self._attempt_to_cache_regionmap(region_volume) # this is called here and not in _get_tract_region because it goes to disk to get this info # which would massively dominate the runtime of the import self.region_volume_shape = region_volume.read_data_shape() datatype = Tracts() datatype.storage_path = self.storage_path datatype.region_volume_map = region_volume return datatype