コード例 #1
0
ファイル: nadirPostFit.py プロジェクト: mikemoorester/ESM
def prepareSites(cl3files, dt_start, dt_end, args):
    # =====================================================================
    # Work out how many station models need to be created
    # =====================================================================
    numModels = 0
    params = []

    for f in range(0, np.size(cl3files)):
        filename = os.path.basename(cl3files[f])
        siteID = filename[0:4]
        sdata = gsf.parseSite(args.station_file, siteID.upper())
        changes = gsf.determineESMChanges(dt_start, dt_stop, sdata)
        sitepos = gapr.getStationPos(args.apr_file, siteID)
        numModels = numModels + np.size(changes["ind"]) + 1
        info = {}
        info["filename"] = cl3files[f]
        info["basename"] = filename
        info["site"] = siteID
        info["numModels"] = np.size(changes["ind"]) + 1
        info["changes"] = changes
        info["sitepos"] = sitepos
        params.append(info)

    return params, numModels
コード例 #2
0
def prepareSites(cl3files, dt_start, dt_end, args):
    #=====================================================================
    # Work out how many station models need to be created
    #=====================================================================
    numModels = 0
    params = []

    for f in range(0, np.size(cl3files)):
        filename = os.path.basename(cl3files[f])
        siteID = filename[0:4]
        sdata = gsf.parseSite(args.station_file, siteID.upper())
        changes = gsf.determineESMChanges(dt_start, dt_stop, sdata)
        sitepos = gapr.getStationPos(args.apr_file, siteID)
        numModels = numModels + np.size(changes['ind']) + 1
        info = {}
        info['filename'] = cl3files[f]
        info['basename'] = filename
        info['site'] = siteID
        info['numModels'] = np.size(changes['ind']) + 1
        info['changes'] = changes
        info['sitepos'] = sitepos
        params.append(info)

    return params, numModels
コード例 #3
0
ファイル: nadirSiteModel.py プロジェクト: mikemoorester/ESM
     print("")
     print("Warning:")
     print("\tusing:",args.resfile,"to work out the time period to determine how many satellites were operating.")
     print("")
     
     dt_start = gt.unix2dt(site_residuals[0,0])
     res_start = int(dt_start.strftime("%Y") + dt_start.strftime("%j")-1)
     dt_stop = gt.unix2dt(site_residuals[-1,0])
     res_stop = int(dt_stop.strftime("%Y") + dt_stop.strftime("%j")-1)
     print("\tResiduals run from:",res_start,"to:",res_stop)
 
 filename    = os.path.basename(args.resfile)
 siteID      = filename[0:4]
 sdata       = gsf.parseSite(args.station_file,siteID.upper())
 changes     = gsf.determineESMChanges(dt_start,dt_stop,sdata)
 sitepos     = gapr.getStationPos(args.apr_file,siteID)
 numModels   = np.size(changes['ind']) + 1
 
 info = {}
 info['filename']  = args.resfile
 info['basename']  = filename
 info['site']      = siteID
 info['numModels'] = np.size(changes['ind']) + 1 
 info['changes']   = changes
 info['sitepos']   = sitepos
 params.append(info)
 
 for s in range(0,info['numModels']):
     siteIDList.append(info['site']+"_model_"+str(s+1))   
     
 antennas = ant.parseANTEX(args.antex)
コード例 #4
0
ファイル: plotNetwork.py プロジェクト: mfkiwl/ESM
                        help="Location of coordinate file - GAMIT .apr format")
    parser.add_argument('-s',
                        '--sites',
                        dest='sites',
                        nargs='+',
                        help="Sites to plot (4 charcater ID)")

    args = parser.parse_args()

    lons = []
    lats = []
    # get the reference frame parameters
    a, b, e2, finv = geodetic.refell('WGS84')

    for siteID in args.sites:
        sitepos = gapr.getStationPos(args.apr_file, siteID)
        dphi, dlambda, h = gcoord.togeod(a, finv, sitepos[0], sitepos[1],
                                         sitepos[2])
        lats.append(dphi)
        lons.append(dlambda)

    # set up orthographic map projection with
    # perspective of satellite looking down at 50N, 100W.
    # use low resolution coastlines.
    #map = Basemap(projection='ortho',lat_0=-45,lon_0=140,resolution='l')
    #map = Basemap(projection='hammer',lat_0=-45,lon_0=10,resolution='l')
    map = Basemap(projection='robin',
                  area_thresh=1000.0,
                  lat_0=-45,
                  lon_0=10,
                  resolution='l')