Exemple #1
0
 def get_sub(self, hstart=399, hend=400, hstep=1):
     res = _iri.iri_get_sub(self.datapath,
                            self.flags,
                            jmag=self.jmag,
                            alati=self.lat,
                            along=self.lon,
                            iyyyy=self.yr,
                            mmdd=self.month * 100 + self.day,
                            dhour=self.hour,
                            heibeg=hstart,
                            heiend=hend,
                            heistp=hstep)
     #res=_iri.iri_get_tec(self.datapath,self.flags,jmag=self.jmag,alati=self.lat,along=self.lon,iyyyy=self.yr,mmdd=self.month*100+self.day,dhour=self.hour,heibeg=50,heiend=1500)
     return res
Exemple #2
0
 def get_profile(self, hstart, hend, hstep):
     #res=_iri.iri_sub(self.flags,jmag=self.jmag,alati=self.lat,along=self.lon,iyyyy=self.yr,mmdd=self.month*100+self.day,dhour=self.hour,heibeg=hstart,heiend=hend,heistp=hstep)[0][0]
     res = _iri.iri_get_sub(self.datapath,
                            self.flags,
                            jmag=self.jmag,
                            alati=self.lat,
                            along=self.lon,
                            iyyyy=self.yr,
                            mmdd=self.month * 100 + self.day,
                            dhour=self.hour,
                            heibeg=hstart,
                            heiend=hend,
                            heistp=hstep)[0][0]
     myshape = np.arange(hstart, hend + hstep, hstep).shape[0]
     return res[:myshape]
Exemple #3
0
    def get_hprofile(self, h):
        #res=_iri.iri_sub(self.flags,jmag=self.jmag,alati=self.lat,along=self.lon,iyyyy=self.yr,mmdd=self.month*100+self.day,dhour=self.hour,heibeg=hstart,heiend=hend,heistp=hstep)[0][0]
        heibeg = h[0]
        heiend = min(2000, h[-1])
        heistp = (heiend - heibeg) / 999.
        res = _iri.iri_get_sub(self.datapath,
                               self.flags,
                               jmag=self.jmag,
                               alati=self.lat,
                               along=self.lon,
                               iyyyy=self.yr,
                               mmdd=self.month * 100 + self.day,
                               dhour=self.hour,
                               heibeg=heibeg,
                               heiend=heiend,
                               heistp=heistp)[0][0]
        heights = np.arange(heibeg, heiend + 0.5 * heistp, heistp)
        hinterpol = interp1d(heights, res, fill_value='extrapolate')

        return hinterpol(h)