def calculateBasisOffset(self,x1,x2,basis): dx = [(x2[j] - x1[j]) for j in range(len(x1))] # Calculate the difference between the master and slave position vectors z_offset = MM.dotProduct(dx,basis.getVelocityVector()) # Calculate the length of the projection of the difference in position and the "velocity" component v_offset = MM.dotProduct(dx,basis.getPositionVector()) c_offset = MM.dotProduct(dx,basis.getCrossTrackVector()) return z_offset,v_offset,c_offset
def _integrateBVector(self, date, coordinate, k): """ Integrate the B-field estimates through the ionosphere at the specified date and location @param date (\a datetime.datetime) date at which to calculate the B-field @param coordinate (\a isceobj.Location.Coordinate) the coordinate at which to calculate the B-field. @param k (\a list) the look vector of the radar @return (\a float) the integrated value of the B-field at the specified date and location in gauss """ kdotb = [] n_altitude = int((self.top - self.bottom) / self.step) + 1 altitude = [self.bottom + i * self.step for i in range(n_altitude)] for h in altitude: coordinate.setHeight(h) bvector = self._calculateBVector(date, coordinate) kdotb.append(MM.dotProduct(k, bvector)) meankdotb = MM.mean(kdotb) return meankdotb