示例#1
0
文件: example.py 项目: scivision/gsit
def p2kg():
    #Get keograms
    ipp = pyGps.getIonosphericPiercingPoints(rx_xyz,
                                             sv,
                                             obstimes,
                                             ipp_alt,
                                             navfname,
                                             cs='aer')
    t5, el5, i5, el_out4 = asi.getASIKeogramIPP(asi_folder3,
                                                ipp[0],
                                                ipp_alt,
                                                timelim,
                                                '558',
                                                obstimes=obstimes,
                                                elevation=ipp[1])
    t4, el4, i4, el_out5 = asi.getASIKeogramIPP(asi_folder3,
                                                ipp[0],
                                                ipp_alt,
                                                timelim,
                                                '428',
                                                obstimes=obstimes,
                                                elevation=ipp[1])
    t6, el6, i6, el_out6 = asi.getASIKeogramIPP(asi_folder3,
                                                ipp[0],
                                                ipp_alt,
                                                timelim,
                                                '630',
                                                obstimes=obstimes,
                                                elevation=ipp[1])
    plotoptics.plot2Keogram(t5,
                            t6,
                            el5,
                            el6,
                            i5 / 1000,
                            i6 / i4,
                            ylim=[45, 85],
                            pcolorbar=True,
                            ytick2=[45, 55, 65, 75],
                            ytick1=[45, 55, 65, 75, 85],
                            cmap='viridis',
                            cbartick1=[0, 2, 4, 6, 8],
                            cbartick2=[0, 0.4, 0.8, 1.2, 1.6, 2],
                            cbartitle1='558nm [kR]',
                            cbartitle2='red/blue',
                            xtick=[
                                datetime.datetime(2015, 10, 7, 6, 10, 0),
                                datetime.datetime(2015, 10, 7, 6, 15, 0),
                                datetime.datetime(2015, 10, 7, 6, 20, 0),
                                datetime.datetime(2015, 10, 7, 6, 25, 0),
                                datetime.datetime(2015, 10, 7, 6, 30, 0),
                                datetime.datetime(2015, 10, 7, 6, 35, 0),
                                datetime.datetime(2015, 10, 7, 6, 40, 0)
                            ],
                            xlim=[
                                datetime.datetime(2015, 10, 7, 6, 10, 0),
                                datetime.datetime(2015, 10, 7, 6, 40, 0)
                            ])
示例#2
0
文件: example.py 项目: scivision/gsit
def pkg():
    #Get keograms
    ipp = pyGps.getIonosphericPiercingPoints(rx_xyz,
                                             sv,
                                             obstimes,
                                             ipp_alt,
                                             navfname,
                                             cs='aer')
    t5, el5, i5, el_out4 = asi.getASIKeogramIPP(asi_folder3,
                                                ipp[0],
                                                ipp_alt,
                                                timelim,
                                                '558',
                                                obstimes=obstimes,
                                                elevation=ipp[1])
    t4, el4, i4, el_out5 = asi.getASIKeogramIPP(asi_folder3,
                                                ipp[0],
                                                ipp_alt,
                                                timelim,
                                                '428',
                                                obstimes=obstimes,
                                                elevation=ipp[1])
    t6, el6, i6, el_out6 = asi.getASIKeogramIPP(asi_folder3,
                                                ipp[0],
                                                ipp_alt,
                                                timelim,
                                                '630',
                                                obstimes=obstimes,
                                                elevation=ipp[1])
    plotoptics.plotKeogram(t5,
                           el5,
                           i5 / 1E3,
                           ylim=[45, 85],
                           title='Green line intensity',
                           pcolorbar=True,
                           cmap='viridis',
                           cbartick=[0, 2, 4, 6, 8],
                           cbartitle='kR',
                           ytick=[45, 55, 65, 75, 85],
                           xtick=[
                               datetime.datetime(2015, 10, 7, 6, 10, 0),
                               datetime.datetime(2015, 10, 7, 6, 15, 0),
                               datetime.datetime(2015, 10, 7, 6, 20, 0),
                               datetime.datetime(2015, 10, 7, 6, 25, 0),
                               datetime.datetime(2015, 10, 7, 6, 30, 0),
                               datetime.datetime(2015, 10, 7, 6, 35, 0),
                               datetime.datetime(2015, 10, 7, 6, 40, 0)
                           ],
                           xlim=[
                               datetime.datetime(2015, 10, 7, 6, 10, 0),
                               datetime.datetime(2015, 10, 7, 6, 40, 0)
                           ])
示例#3
0
文件: example.py 项目: scivision/gsit
def plotObservationDay():
    # Green keogram
    ipp_aer = pyGps.getIonosphericPiercingPoints(rx_xyz,
                                                 sv,
                                                 obstimes,
                                                 ipp_alt,
                                                 navfname,
                                                 cs='aer')
    ipp = pyGps.getIonosphericPiercingPoints(rx_xyz,
                                             sv,
                                             obstimes,
                                             ipp_alt,
                                             navfname,
                                             cs='wsg84')
    t, el, i, el_out4 = asi.getASIKeogramIPP(asi_folder3,
                                             ipp_aer[0],
                                             ipp_alt,
                                             timelim,
                                             '558',
                                             obstimes=obstimes,
                                             elevation=ipp[1])
    # Magnetic Field
    mag_folder = '/home/smrak/Documents/TheMahali/magnetometer/poker_2015_10_07.csv'
    mag = magnetometer.readMag(mag_folder, '2015-10-07')
    #mag_start = np.datetime64('2015-10-07T00:00:00')
    #mag_stop = np.datetime64('2015-10-07T22:00:00')
    #idx = np.where( (mag[0] > mag_start) & (mag[0] < mag_stop) )
    mag_xyz = magnetometer.magHDZ2XYZ(mag, angle=True)

    plotting.plot2subplotK_xy(t,
                              el,
                              i / 1000,
                              mag[0][8000:],
                              mag_xyz[0][8000:] / 1000,
                              obstimes=obstimes,
                              ipp=ipp_aer[1],
                              xlabel='UT',
                              ylim1=[45, 85],
                              ylabel1='Elevation[deg]',
                              ylabel2='Bx [uT]',
                              ytick1=[45, 55, 65, 75, 85],
                              ylim2=[12.2, 13.1],
                              ytick2=[12, 12.2, 12.4, 12.6, 12.8, 13],
                              pcolorbar=True,
                              cbartick=[0, 2, 4, 6, 8],
                              cbartitle='558nm [kR]',
                              xlim=[
                                  datetime.datetime(2015, 10, 7, 6, 10, 0),
                                  datetime.datetime(2015, 10, 7, 6, 40, 0)
                              ])
示例#4
0
文件: example.py 项目: scivision/gsit
def tec_keogram_intensity5():
    N_roti = 100
    aer = pyGps.getSatellitePosition(np.asarray(rx_xyz),
                                     sv,
                                     obstimes,
                                     navfname,
                                     cs='aer')
    L1 = np.array(data['L1', sv, :, 'data'])
    L2 = np.array(data['L2', sv, :, 'data'])
    P1 = np.array(data['C1', sv, :, 'data'])
    P2 = np.array(data['P2', sv, :, 'data'])
    l2_lli = np.array(data['L2', sv, :, 'lli'])
    #Phase corrected TEC
    sTECp = pyGps.getPhaseCorrTEC(L1, L2, P1, P2)
    vTECp = pyGps.getVerticalTEC(sTECp, aer[1], 130)
    tec_norm = vTECp - vTECp[np.isfinite(vTECp[0:1000])].min()
    # Rate of TEC Index
    roti = pyGps.getROTI(vTECp, N_roti)
    roti_t = obstimes[0:-N_roti]
    #ASI Intensity data
    # Piercing point for all-sky data
    aer = pyGps.getIonosphericPiercingPoints(rx_xyz,
                                             sv,
                                             obstimes,
                                             ipp_alt,
                                             navfname,
                                             cs='aer')
    #ipp = pyGps.getIonosphericPiercingPoints(rx_xyz, sv, obstimes, ipp_alt, navfname, cs='wsg84')
    #Asi intensity:
    t5, intensity5 = asi.getAllSkyIntensityAER(asi_folder3,
                                               aer[0],
                                               aer[1],
                                               ipp_alt,
                                               timelim,
                                               '558',
                                               obstimes=obstimes)
    t6, intensity6 = asi.getAllSkyIntensityAER(asi_folder3,
                                               aer[0],
                                               aer[1],
                                               ipp_alt,
                                               timelim,
                                               '630',
                                               obstimes=obstimes)
    t4, intensity4 = asi.getAllSkyIntensityAER(asi_folder3,
                                               aer[0],
                                               aer[1],
                                               ipp_alt,
                                               timelim,
                                               '428',
                                               obstimes=obstimes)
    # Asi Keogram
    ipp_aer = pyGps.getIonosphericPiercingPoints(rx_xyz,
                                                 sv,
                                                 obstimes,
                                                 ipp_alt,
                                                 navfname,
                                                 cs='aer')
    t, el, i, el_out4 = asi.getASIKeogramIPP(asi_folder3,
                                             ipp_aer[0],
                                             ipp_alt,
                                             timelim,
                                             '558',
                                             obstimes=obstimes,
                                             elevation=aer[1])
    # Magnetometer
    mag_folder = '/home/smrak/Documents/TheMahali/magnetometer/poker_2015_10_07.csv'
    mag = magnetometer.readMag(mag_folder, '2015-10-07')
    b_t = mag[0][5000:]
    mag_xyz = magnetometer.magHDZ2XYZ(mag, angle=True)
    plotting.plot5subplot(t,
                          t5,
                          obstimes,
                          roti_t,
                          i / 1E3,
                          np.array(intensity5) / 1E3,
                          tec_norm,
                          roti,
                          el1=el,
                          ylabel1='Elevation [deg]',
                          ylabel3='vTEC [TECU]',
                          ylabel2='Intensity [kR]',
                          ylabel4='ROTI[TECU/10s]',
                          xlabel='UT',
                          ylim1=[45, 85],
                          color5='b',
                          ytick1=[45, 55, 65, 75, 85],
                          pcolorbar=True,
                          cbartick=[0, 2, 4, 6, 8],
                          cbartitle='Intensity [kR]',
                          t31=t6,
                          t32=t4,
                          y31=np.array(intensity6) / 1E3,
                          y32=np.array(intensity4) / 1E3,
                          color2='g',
                          color3='r',
                          color4='b',
                          legend1=True,
                          label2='558nm',
                          label3='630nm',
                          label4='428nm',
                          lli1=l2_lli,
                          ylim2=[0, 3.5],
                          ylim4=[0, 3.5],
                          ylim3=[0, 18],
                          ipp_elevation=aer[1],
                          ytick2=[0, 1, 2, 3],
                          ytick3=[0, 4, 8, 12, 16],
                          ytick4=[0, 0.5, 1, 1.5, 2, 2.5, 3],
                          Bt=b_t,
                          Bx=mag_xyz[0][5000:] / 1000,
                          ylabel5='Bx [uT]',
                          cbx='b',
                          ylim5=[12.2, 13],
                          ytick5=[12.2, 12.4, 12.6, 12.8],
                          xlim=[
                              datetime.datetime(2015, 10, 7, 6, 10, 0),
                              datetime.datetime(2015, 10, 7, 6, 40, 0)
                          ])
示例#5
0
文件: example.py 项目: scivision/gsit
def tec_keogram_intensity3():
    aer = pyGps.getSatellitePosition(np.asarray(rx_xyz),
                                     sv,
                                     obstimes,
                                     navfname,
                                     cs='aer')
    L1 = np.array(data['L1', sv, :, 'data'])
    L2 = np.array(data['L2', sv, :, 'data'])
    P1 = np.array(data['C1', sv, :, 'data'])
    P2 = np.array(data['P2', sv, :, 'data'])
    l2_lli = np.array(data['L2', sv, :, 'lli'])
    #Phase corrected TEC
    sTECp = pyGps.getPhaseCorrTEC(L1, L2, P1, P2)
    vTECp = pyGps.getVerticalTEC(sTECp, aer[1], 130)
    tec_norm = vTECp - vTECp[np.isfinite(vTECp[0:1000])].min()
    # Rate of TEC Index
    roti = pyGps.getROTI(vTECp, 10)
    roti_t = obstimes[0:-10]
    #ASI Intensity data
    # Piercing point for all-sky data
    aer = pyGps.getIonosphericPiercingPoints(rx_xyz,
                                             sv,
                                             obstimes,
                                             ipp_alt,
                                             navfname,
                                             cs='aer')
    ipp = pyGps.getIonosphericPiercingPoints(rx_xyz,
                                             sv,
                                             obstimes,
                                             ipp_alt,
                                             navfname,
                                             cs='wsg84')
    #Asi intensity:
    t5, intensity5 = asi.getAllSkyIntensityAER(asi_folder3,
                                               aer[0],
                                               aer[1],
                                               ipp_alt,
                                               timelim,
                                               '558',
                                               obstimes=obstimes)
    t5a, intensity5a = asi.getAllSkyIntensity(asi_folder3,
                                              ipp[0],
                                              ipp[1],
                                              ipp_alt,
                                              timelim,
                                              '558',
                                              obstimes=obstimes)
    # Asi Keogram
    ipp_aer = pyGps.getIonosphericPiercingPoints(rx_xyz,
                                                 sv,
                                                 obstimes,
                                                 ipp_alt,
                                                 navfname,
                                                 cs='aer')
    t, el, i, el_out4 = asi.getASIKeogramIPP(asi_folder3,
                                             ipp_aer[0],
                                             ipp_alt,
                                             timelim,
                                             '558',
                                             obstimes=obstimes,
                                             elevation=ipp[1])
    plotting.plot4subplot(t,
                          obstimes,
                          t5,
                          roti_t,
                          i / 1E3,
                          tec_norm,
                          np.array(intensity5) / 1E3,
                          roti,
                          el1=el,
                          ylabel1='Elevation [deg]',
                          ylabel2='vTEC [TECU]',
                          ylabel3='Intensity [kR]',
                          ylabel4='ROTI[TECU/10s]',
                          xlabel='UT',
                          ylim1=[45, 85],
                          color5='b',
                          title1='Rx8 - PRN23, Poker Flat 10/07/2015',
                          ytick1=[45, 55, 65, 75, 85],
                          pcolorbar=True,
                          cbartick=[0, 2, 4, 6, 8],
                          cbartitle='Intensity [kR]',
                          t31=t5a,
                          y31=np.array(intensity5a) / 1E3,
                          color2='g',
                          color3='r',
                          legend2=True,
                          label2='org',
                          label3='int',
                          label4='630nm',
                          lli1=l2_lli,
                          ylim3=[0, 3.5],
                          ylim4=[0, 3.5],
                          ylim2=[0, 18],
                          ipp_elevation=aer[1],
                          ytick3=[0, 1, 2, 3],
                          ytick2=[0, 4, 8, 12, 16],
                          ytick4=[0, 0.5, 1, 1.5, 2, 2.5, 3],
                          xlim=[
                              datetime.datetime(2015, 10, 7, 6, 10, 0),
                              datetime.datetime(2015, 10, 7, 6, 40, 0)
                          ])