def add_stormcell(self, celldata): frame_i, verts = celldata stormcell_index = np.max(self.stormdata['feat_id']) + 1 xcent, ycent = np.mean(verts, axis=0) newcell = np.array([(xcent, ycent, frame_i, np.nan, calc_area(verts), stormcell_index, -9, np.array(verts))], dtype=storm_dtype) self.stormdata = np.append(self.stormdata, newcell) self.stormmap[frame_i] = np.append(self.stormmap[frame_i], stormcell_index)